JabRef / JabRef/jabmap

update pdf comment nodes / import comment nodes of specific pdf

Open
#21 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Description

Note: putting this here to have all jabmap issues in one place

change the "path" attribute of a pdf-node to always be an absolute path. this way, one could make a request on "http://localhost:23119/libraries/{id}/entries/pdffiles/annotations?filepath={PathToPdfFile}" and receive a list of annotations.
currently, the "path" is added using the getLink() method from LinkedFile.Java which doesn't always return absolute paths. (see JabRef Docs)

my best guess for a starting point:

public Optional<Path> findIn(BibDatabaseContext databaseContext, FilePreferences filePreferences)

in LinkedFile.Java

Use this to change the Path attribute in LinkedPDFFileDTO

Why?

To reliably retrieve the annotations for the correct file its easiest to use absolute paths.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with findIn in jablib/src/main/java/org/jabref/model/entry/LinkedFile.java and inspect how its path is resolved. Then follow the path assignment in jabmap/jabsrv/src/main/java/org/jabref/http/dto/LinkedPdfFileDTO.java. Done means the PDF node path is always absolute and the annotations endpoint retrieves the correct file by filepath.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.