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

Add CleanupJob for removing non-existent files #10929

Closed
koppor opened this issue Feb 26, 2024 · 4 comments · Fixed by #10960
Closed

Add CleanupJob for removing non-existent files #10929

koppor opened this issue Feb 26, 2024 · 4 comments · Fixed by #10960
Assignees
Labels
cleanup-ops FirstTimeCodeContribution Triggers GitHub Greeter Workflow good first issue An issue intended for project-newcomers. Varies in difficulty.

Comments

@koppor
Copy link
Member

koppor commented Feb 26, 2024

(This is #7288 (comment))

As user, I have renamed files, but JabRef still has the old links. JabRef perfectly links the new files, but also keeps the broken links. I want to have them removed.

Implement org.jabref.logic.cleanup.RemoveLinksToNotExistentFiles.

That class is similar to org.jabref.logic.cleanup.MoveFilesCleanup, but uses org.jabref.logic.externalfiles.LinkedFileHandler#findExistingFile. Links with org.jabref.model.entry.LinkedFile#isOnlineLink() do not exist in the file system, but have to kept, too.


When testing, please make use of JUnit's @TempDir or let inspire yourself with org.jabref.logic.search.DatabaseSearcherWithBibFilesTest.

@koppor koppor added the good first issue An issue intended for project-newcomers. Varies in difficulty. label Feb 26, 2024
@WenJJ2000
Copy link

WenJJ2000 commented Feb 27, 2024

Hi, we (@WenJJ2000 @karlsb @burcukilic @muchembledMartin @LinusWallin) are a group of university students who would like to work on this issue if possible!

@ThiloteE ThiloteE added the FirstTimeCodeContribution Triggers GitHub Greeter Workflow label Feb 27, 2024
Copy link
Contributor

As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at.

Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback.

@karlsb
Copy link
Contributor

karlsb commented Feb 28, 2024

Hi! We have implemented a cleanup job for removing non-existing files but do not know when to trigger it. Should there be a new field in the "cleanup entry" under "quality" in the app menu? Or should it be triggered automatically somewhere else? Is it in the scope of this issue?

@koppor
Copy link
Member Author

koppor commented Feb 28, 2024

  1. Open Chocolate.bib
  2. Select all entries
  3. image
  4. "Enable field formatters"

Add the cleanup to the checklist above. Place it Above "Convert to biblatex format".

image

If you want, you can improve the dialog to add some grouping to all file-related points (from "Upgrade external PDF/PS links" to your new entry"

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup-ops FirstTimeCodeContribution Triggers GitHub Greeter Workflow good first issue An issue intended for project-newcomers. Varies in difficulty.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants