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 Request] Show sup file name #177

Open
Tracked by #250
woodwm opened this issue Oct 31, 2022 · 18 comments
Open
Tracked by #250

[Feature Request] Show sup file name #177

woodwm opened this issue Oct 31, 2022 · 18 comments
Assignees
Labels
feature-request New feature request mid-priority mid priority

Comments

@woodwm
Copy link
Contributor

woodwm commented Oct 31, 2022

It seems that paperlib does not support multiple files for a paper. The reason for multiple files is the additional supplementary documents. For example, https://www.nature.com/articles/s41467-022-34303-8#Sec13 has supplementary Information, Peer Review File, Reporting Summary and source data.

@GeoffreyChen777
Copy link
Member

It is supported. Just drag files into the details panel.

@woodwm
Copy link
Contributor Author

woodwm commented Oct 31, 2022

Sorry about that. paperlib only shows the extension of a supplementary document. It works if it only has one supplementary document, but is confusing when it has multiple supplementary documents of the same extensions. Please considering show the name of a file.

Show part of the name in the list of supplementary documents and show full name when the mouse hover over it.

@GeoffreyChen777
Copy link
Member

Sorry about that. paperlib only shows the extension of a supplementary document. It works if it only has one supplementary document, but is confusing when it has multiple supplementary documents of the same extensions. Please considering show the name of a file.

Show part of the name in the list of supplementary documents and show full name when the mouse hover over it.

Doable.

@GeoffreyChen777 GeoffreyChen777 changed the title multiple files for a paper Show sup file name Oct 31, 2022
@GeoffreyChen777 GeoffreyChen777 added electron mid-priority mid priority feature-request New feature request labels Oct 31, 2022
@GeoffreyChen777 GeoffreyChen777 changed the title Show sup file name [Feature Request] Show sup file name May 25, 2023
@GeoffreyChen777 GeoffreyChen777 mentioned this issue May 27, 2023
3 tasks
@invisprints
Copy link

It seems the supplementary file https://static-content.springer.com/esm/art%3A10.1038%2Fs41551-020-00682-w/MediaObjects/41551_2020_682_MOESM1_ESM.pdf cannot show in the paperlib. Could you please figure out what happen? The file is already downloaded but not shown in the software.

@GeoffreyChen777
Copy link
Member

@invisprints Hi, could you please describe your operation?

I tried to attach this PDF to a paper, and everything looks ok.

Are you following the guide here?
https://paperlib.app/en/doc/getting-started.html#attach-supplementary-files

@invisprints
Copy link

Thanks, I didn't notice there is a guide.
I just tried to drag the file in the main view or use the browser extension.

@GeoffreyChen777
Copy link
Member

Thanks, I didn't notice there is a guide. I just tried to drag the file in the main view or use the browser extension.

If you drag and drop it into the mainview, it will be regarded as a main paper rather than a supplementary file.

@GeoffreyChen777 GeoffreyChen777 self-assigned this Jan 6, 2024
@GeoffreyChen777 GeoffreyChen777 added this to the v3.0.0 milestone Jan 6, 2024
@GeoffreyChen777 GeoffreyChen777 removed this from the v3.0.0 milestone Mar 21, 2024
@ZephyrZhang3
Copy link
Contributor

Is anyone working on this feature? I'm ready to try it😁

@GeoffreyChen777
Copy link
Member

@ZephyrZhang3

No. It's not easy. To implement this, we need to change the database schema. Currently, the supplementary file name is like xxxxxx_id_sup0.pdf. We need a new field for aliases.

@ZephyrZhang3
Copy link
Contributor

@ZephyrZhang3

No. It's not easy. To implement this, we need to change the database schema. Currently, the supplementary file name is like xxxxxx_id_sup0.pdf. We need a new field for aliases.

could we add its name just between 'id' and 'sup#'

@GeoffreyChen777
Copy link
Member

@ZephyrZhang3
No. It's not easy. To implement this, we need to change the database schema. Currently, the supplementary file name is like xxxxxx_id_sup0.pdf. We need a new field for aliases.

could we add its name just between 'id' and 'sup#'

Sounds good, try it?

@ZephyrZhang3
Copy link
Contributor

I'll try

@ZephyrZhang3
Copy link
Contributor

Is there a pop-up window now? maybe pop a window to input sup name

@GeoffreyChen777
Copy link
Member

Is there a pop-up window now? maybe pop a window to input sup name

@ZephyrZhang3 I would suggest implementing a UI component consisting of a <input> and a button for sup. Just like the tag item in the left sidebar.

We can edit its name by right clicking it.

@ZephyrZhang3
Copy link
Contributor

Is there a pop-up window now? maybe pop a window to input sup name

@ZephyrZhang3 I would suggest implementing a UI component consisting of a <input> and a button for sup. Just like the tag item in the left sidebar.

We can edit its name by right clicking it.

OK

@ZephyrZhang3
Copy link
Contributor

at adding time, use a random name or default like now, just show the extension name

@ZephyrZhang3
Copy link
Contributor

I think the extension name PDF is better😏

@GeoffreyChen777
Copy link
Member

at adding time, use a random name or default like now, just show the extension name

@ZephyrZhang3 The default alias is empty, which yields a file name xxx_id_sup0.pdf. In UI, we show PDF

If users input an alias, say ABC, the filename should be xxx_id_sup0_ABC.pdf. We show ABC.pdf in UI.

Basically, you split the filename with _, and then we check the last element filename_components.pop(). If it starts with sup, we only show the extname. Otherwise, we show the last element.

Notably, users should not input an alias like supX. which means that supX is invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature request mid-priority mid priority
Projects
Status: Todo
Development

No branches or pull requests

4 participants