diff --git a/CHANGELOG.md b/CHANGELOG.md index d39e2745597a..f1046088013f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We added support for basic markdown in custom formatted previews [#6194](https://github.com/JabRef/jabref/issues/6194) - We now show the number of items found and selected to import in the online search dialog. [#6248](https://github.com/JabRef/jabref/pull/6248) - We created a new install screen for macOS. [#5759](https://github.com/JabRef/jabref/issues/5759) +- We implemented an option to download fulltext files while importing. [#6381](https://github.com/JabRef/jabref/pull/6381) ### Changed @@ -26,6 +27,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We changed the buttons for import/export/show all/reset of preferences to smaller icon buttons in the preferences dialog. [#6130](https://github.com/JabRef/jabref/pull/6130) - We moved the functionality "Manage field names & content" from the "Library" menu to the "Edit" menu, because it affects the selected entries and not the whole library - We merged the functionality "Append contents from a BibTeX library into the currently viewed library" into the "Import into database" functionality. Fixes [#6049](https://github.com/JabRef/jabref/issues/6049). +- We changed the directory where fulltext downloads are stored to the directory set in the import-tab in preferences. [#6381](https://github.com/JabRef/jabref/pull/6381) - We improved the error message for invalid jstyles. [#6303](https://github.com/JabRef/jabref/issues/6303) ### Fixed @@ -102,7 +104,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We fixed an issue where adding the addition of a new entry was not completely validated [#6370](https://github.com/JabRef/jabref/issues/6370) - We fixed an issue where the blue and red text colors in the Merge entries dialog were not quite visible [#6334](https://github.com/JabRef/jabref/issues/6334) - We fixed an issue where underscore character was removed from the file name in the Recent Libraries list in File menu [#6383](https://github.com/JabRef/jabref/issues/6383) - +- We fixed an issue where few keyboard shortcuts regarding new entries were missing [#6403](https://github.com/JabRef/jabref/issues/6403) ### Removed - Ampersands are no longer escaped by default in the `bib` file. If you want to keep the current behaviour, you can use the new "Escape Ampersands" formatter as a save action. [#5869](https://github.com/JabRef/jabref/issues/5869) diff --git a/build.gradle b/build.gradle index 667030a90d27..2d6959fd4c72 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ plugins { id 'com.github.ben-manes.versions' version '0.28.0' id 'org.javamodularity.moduleplugin' version '1.5.0' id 'org.openjfx.javafxplugin' version '0.0.8' - id 'org.beryx.jlink' version '2.17.8' + id 'org.beryx.jlink' version '2.18.0' // nicer test outputs during running and completion id 'com.adarshr.test-logger' version '2.0.0' @@ -112,7 +112,7 @@ dependencies { implementation group: 'org.apache.commons', name: 'commons-csv', version: '1.8' implementation 'com.h2database:h2-mvstore:1.4.200' - implementation group: 'org.apache.tika', name: 'tika-core', version: '1.24' + implementation group: 'org.apache.tika', name: 'tika-core', version: '1.24.1' // required for reading write-protected PDFs - see https://github.com/JabRef/jabref/pull/942#issuecomment-209252635 implementation 'org.bouncycastle:bcprov-jdk15on:1.65' @@ -191,16 +191,16 @@ dependencies { exclude module: "log4j-core" } - implementation 'com.vladsch.flexmark:flexmark:0.61.20' - implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.61.20' - implementation 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.61.20' + implementation 'com.vladsch.flexmark:flexmark:0.61.24' + implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.61.24' + implementation 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.61.24' - testImplementation 'io.github.classgraph:classgraph:4.8.77' + testImplementation 'io.github.classgraph:classgraph:4.8.78' testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2' testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.2' testImplementation 'org.junit.platform:junit-platform-launcher:1.6.2' - testImplementation 'net.bytebuddy:byte-buddy-parent:1.10.9' + testImplementation 'net.bytebuddy:byte-buddy-parent:1.10.10' testRuntime group: 'org.apache.logging.log4j', name: 'log4j-core', version: '3.0.0-SNAPSHOT' testRuntime group: 'org.apache.logging.log4j', name: 'log4j-jul', version: '3.0.0-SNAPSHOT' testImplementation 'org.mockito:mockito-core:3.3.3' @@ -212,7 +212,7 @@ dependencies { testImplementation "org.hamcrest:hamcrest-library:2.2" checkstyle 'com.puppycrawl.tools:checkstyle:8.32' - xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '2.3.2' + xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '2.3.3' jython 'org.python:jython-standalone:2.7.2' } diff --git a/buildres/linux/JabRef.desktop b/buildres/linux/JabRef.desktop index 24b4db366014..c2aae7781619 100644 --- a/buildres/linux/JabRef.desktop +++ b/buildres/linux/JabRef.desktop @@ -9,4 +9,4 @@ Type=Application DESKTOP_MIMES Categories=DEPLOY_BUNDLE_CATEGORY Keywords=bibtex;biblatex;latex;bibliography -StartupWMClass=org-jabref-JabRefMain +StartupWMClass=org.jabref.JabRefMain diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 234174006da4..a4a05883da3f 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -245,6 +245,30 @@ private void initKeyBindings() { case SEARCH: getGlobalSearchBar().focus(); break; + case NEW_ARTICLE: + new NewEntryAction(this, StandardEntryType.Article, dialogService, prefs, stateManager).execute(); + break; + case NEW_BOOK: + new NewEntryAction(this, StandardEntryType.Book, dialogService, prefs, stateManager).execute(); + break; + case NEW_INBOOK: + new NewEntryAction(this, StandardEntryType.InBook, dialogService, prefs, stateManager).execute(); + break; + case NEW_MASTERSTHESIS: + new NewEntryAction(this, StandardEntryType.MastersThesis, dialogService, prefs, stateManager).execute(); + break; + case NEW_PHDTHESIS: + new NewEntryAction(this, StandardEntryType.PhdThesis, dialogService, prefs, stateManager).execute(); + break; + case NEW_PROCEEDINGS: + new NewEntryAction(this, StandardEntryType.Proceedings, dialogService, prefs, stateManager).execute(); + break; + case NEW_TECHREPORT: + new NewEntryAction(this, StandardEntryType.TechReport, dialogService, prefs, stateManager).execute(); + break; + case NEW_UNPUBLISHED: + new NewEntryAction(this, StandardEntryType.Unpublished, dialogService, prefs, stateManager).execute(); + break; default: } } diff --git a/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java b/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java index ca4af64148c1..add0b6c17270 100644 --- a/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java +++ b/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java @@ -38,6 +38,7 @@ import org.jabref.logic.l10n.Localization; import org.jabref.logic.net.URLDownload; import org.jabref.logic.util.io.FileNameUniqueness; +import org.jabref.logic.util.io.FileUtil; import org.jabref.logic.xmp.XmpPreferences; import org.jabref.logic.xmp.XmpUtilWriter; import org.jabref.model.database.BibDatabaseContext; @@ -415,6 +416,7 @@ public void download() { LinkedFile newLinkedFile = LinkedFilesEditorViewModel.fromFile(destination, databaseContext.getFileDirectoriesAsPaths(filePreferences), externalFileTypes); linkedFile.setLink(newLinkedFile.getLink()); linkedFile.setFileType(newLinkedFile.getFileType()); + entry.addFile(0, newLinkedFile); }); downloadProgress.bind(downloadTask.workDonePercentageProperty()); taskExecutor.execute(downloadTask); @@ -431,8 +433,9 @@ public BackgroundTask prepareDownloadTask(Path targetDirectory, URLDownloa String suggestedTypeName = externalFileType.getName(); linkedFile.setFileType(suggestedTypeName); String suggestedName = linkedFileHandler.getSuggestedFileName(externalFileType.getExtension()); - suggestedName = FileNameUniqueness.getNonOverWritingFileName(targetDirectory, suggestedName); - return targetDirectory.resolve(suggestedName); + String fulltextDir = FileUtil.createDirNameFromPattern(databaseContext.getDatabase(), entry, filePreferences.getFileDirPattern()); + suggestedName = FileNameUniqueness.getNonOverWritingFileName(targetDirectory.resolve(fulltextDir), suggestedName); + return targetDirectory.resolve(fulltextDir).resolve(suggestedName); }) .then(destination -> new FileDownloadTask(urlDownload.getSource(), destination)) .onFailure(exception -> dialogService.showErrorDialogAndWait("Download failed", exception)); diff --git a/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.fxml b/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.fxml index 0a161e436ec9..a9eaa748f478 100644 --- a/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.fxml +++ b/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.fxml @@ -1,6 +1,7 @@ + @@ -38,6 +39,7 @@