Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: move files to subfolders (Article,Book) of file directory #1092

Closed
davydden opened this issue Apr 3, 2016 · 17 comments
Closed

Feature: move files to subfolders (Article,Book) of file directory #1092

davydden opened this issue Apr 3, 2016 · 17 comments

Comments

@davydden
Copy link

davydden commented Apr 3, 2016

Is there a workaround not only to rename a file (via Cleanup entries or Move to file directory) but also to move it to a subfolder (Article,Book,etc) where subfolder name is the same as entry type?

@Siedlerchr
Copy link
Member

There is a workaround:
You have to open the entry in the Entry Editor -> General -> File -> RightClick -> Move/Rename File-> Choose your directory...

But I will look if you can specify a global pattern.

@davydden
Copy link
Author

davydden commented Apr 3, 2016

perhaps along the filename format pattern there could be a directory format pattern

@davydden
Copy link
Author

davydden commented Apr 4, 2016

@Siedlerchr btw, the Move/Rename File is not really a workaround as one has to type the new file name which defeats the purpose of automatic renaming using filename format pattern.

@tobiasdiez
Copy link
Member

Maybe one can reuse the functionality of the old plug-in https://github.com/korv/Jabref-plugins/tree/master/renamefile/src/renamefilin which supported subfolders in the filename format pattern (at least according to their about file).

@davydden
Copy link
Author

davydden commented Apr 4, 2016

@tobiasdiez that's correct, i used that plugin quite a lot and subfolders worked there without an issue.

@Siedlerchr
Copy link
Member

I will look into that plugin from @korv and see how it could be integrated in JabRef.

@davydden
Copy link
Author

davydden commented Jul 8, 2016

@Siedlerchr any updates to this issue?

@Siedlerchr
Copy link
Member

@davydden Unfortunately not. Atm I have not that much time due do university. But I hope that I soon have more time in a few weeks.

@oscargus
Copy link
Contributor

oscargus commented Aug 27, 2016

I tried a workaround: \entrytype\\\bibtexkey hoping that it should lead to something good. However, I got Article_Brisigotti2006.pdf so something is replacing the \\ (escaped \) with _. Might be one approach to enable it. (The same thing happens for / btw, I'm on Windows, so it seems that this is explicitly taken care of in the code.) Maybe add a formatter that outputs the file system separator?

@Siedlerchr
Copy link
Member

I wanted to take care of this in the next days. @oscargus :
My idea was to intdroduce a) either a second field similar to the existing one for filenames or b) to have one field for both.
I like option b), but I think it could have side effects, as the layout stuff is also used for displaying entry previews and for html output

When we internally use the Paths methods from nio, the file system separator is implicit taken care of (btw, Windows supports / as file separator, too)

@oscargus
Copy link
Contributor

Yes, maybe having two fields makes sense. The question otherwise is when the /\ to _ mapping occurs. I'm thinking that if it happens for each field and not for the complete layout it should just be to add a new formatter. As long as it is not used everything will be as before. Although I agree that it is sort of ugly from a nio-perspective.

@Siedlerchr Siedlerchr added this to the v3.8 milestone Nov 14, 2016
@koppor
Copy link
Member

koppor commented Dec 8, 2016

Thank you for reporting this feature request. We think, that is already implemented in our development version and consequently the change will be included in the next release. See #1899

We would like to ask you to use a development build from https://builds.jabref.org/master and report back if it works for you.

@stefan-kolb stefan-kolb added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Dec 8, 2016
@stefan-kolb
Copy link
Member

@davydden
Thank you for your report 👍
This should be fixed in current master. Please try the latest build from http://builds.jabref.org/master.

@davydden
Copy link
Author

davydden commented Dec 15, 2016

In the latest dev I set File directory pattern to \EntryType, however when I choose a paper and do Move file to file directory nothing happens and the paper stays in the same location without \EntryType being used as a folder.

p.s. Filename pattern is \bibtexkey\begin{title} - \format[RemoveBrackets]{\title}\end{title}.

p.p.s. .pdf paths are relative to the .bib file, the one I try was {:Name2017 - Title.pdf:PDF}, which I expect to become {:Article/Name2017 - Title.pdf:PDF},

@davydden
Copy link
Author

On a bright side, Cleanup Entries worked as expected and moved my file.

@Siedlerchr
Copy link
Member

Currently the functionaly works when you import a file with drag and drop or do a Cleanup (Rename PDF).
I will look if that could be added to move file to file directory.

@Siedlerchr Siedlerchr reopened this Dec 15, 2016
@davydden
Copy link
Author

@Siedlerchr thanks!

@tobiasdiez tobiasdiez removed the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Dec 16, 2016
@lenhard lenhard removed this from the v3.8 milestone Dec 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants