-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Filename format pattern issue #3582
Comments
Yes, we removed support for the old format (that is also used in the preview) in favor of the same bracketed syntax as for BibTex keys. So if I understand you correctly, you want to remove the latex, right? The pattern |
I see. The pattern I was trying to replace was a bit more complicated. In addition I need to limit the title length (but |
I fear that is currently not possible. These are all possible modifiers (sorry for the format, but their meaning should be more or less clear): jabref/src/main/java/org/jabref/logic/formatter/Formatters.java Lines 35 to 64 in 7895ae0
If you describe in more detail what you want to achieve, we may add the necessary modifiers. |
I think RegexFormatter would do it for me. Essentially I had one regexp The rationale was that I was synching between mac - win - linux and one or the other had problems - these gave reasonable filenames for me. |
I wonder what the problematic filenames are, because we have a method to clean up filenames and to replace illegal chars with underscores. The method is always called after the filename pattern. These are the illegal chars (their ascii codes) https://www.branah.com/ascii-converter private static final int[] ILLEGAL_CHARS = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 34,
42,
58,
60, 62, 63,
124
}; |
After having a look at the code, I think the syntax is |
@Siedlerchr moving between machines I run into different issues. On windows I encounter an issue when filenames get too long (something active directory I think - for me it triggers once the full path is around 100 characters). On mac I have a HFS+ issue - when creating a file the system automatically does some unicode normalisation - however when looking up the same file it does not perform this normalisation, so the file is not found under the expected name (Triggers when umlauts and accents are in the name). see e.g. https://eclecticlight.co/2017/04/06/apfs-is-currently-unusable-with-most-non-english-languages/ Also So not an issue of JabRef - rather of the underlying filesystems I try to counteract. |
I have similar issues, in I can get similar effect from |
Closing this issue due to inactivity 💤 |
I am trying to rename the linked files to something like Any help on how this can be achieved would be greatly appreciated. Thank you. |
Hello, like @krunal-shah I am trying to customize filename format pattern [ |
hello @allabur, while I have not tried your concrete example, in theory a customized pattern should be possible, according to the docs: https://docs.jabref.org/finding-sorting-and-cleaning-entries/filelinks#filename-format-and-file-directory-pattern |
You can simply enter a new pattern. The combo box allows modification |
Thank you guys @Siedlerchr and @ThiloteE. Actually I was making a mistake, pressing Enter after modification and the changes were not saving at all. |
JabRef version 4.1 on Mac OS X 10.13_2
I was doing my first cleanup on 4.1 and noticed that the filename format pattern and file directory pattern would not produce the desired path.
I fiddled around a little and here's a small example:
\format[HTMLChars]{\author}
(basically an example from manual CustomExports.format{author}
I noticed I can just use
[author]
- but that will leave latex in the string - so not a general solution.The text was updated successfully, but these errors were encountered: