Comments (9)
Hi, once you modify the metadata of a paper (by clicking the edit button in the menu bar), the generated bib is changed. Have you tried that?
from paperlib.
Yes, that works; but I'd like to have one editable field that contains the entire bib entry, to make some changes manually.
Then, if there are manual changes, it should copy the manually modified entry.
from paperlib.
As it is a very personal feature, what about we achieve it via an extension?
- You can attach your modified
.bib
as a supplementary like this. - You develop an extension to hook a point in the reference exporting pipeline.
- Once you export a paper, it triggers a function in your hook extension to replace the original bib string with the content in the
.bib
file if exits.
As we currently only have some hook points in the metadata scraping pipeline (refer to https://paperlib.app/en/extension-doc/process-hook.html). All we need to do is to add some new hook points in the reference exporting pipeline.
What do you think about it?
from paperlib.
Sounds good! The extension could be called "Export from supplementary BibTeX".
- Attaching supplementary files could be nice, because one could mass-edit them in PaperLib's directory using shell scripts.
- Instead, an editable field would be easier to edit within PaperLib, but it would be saved in the metadata (so, harder to access).
The part on extension hooks makes sense; but I would say that it intercept two actions:
- One for
Export > BibTex
- Another for
Export > BibTex Key
Regarding support for this kind of hooks in PaperLib: how would you determine the order in which extensions should run if they are registered for a hook? E.g., say that there's also an extension that fixes the capitalization; should it run before or after "Export from supplementary BibTeX"?
from paperlib.
Currently, for a pipeline, we have many hook points, such as beforeXXX
, afterXXX
. For each point, the order is determined by the hook registering order.
In future, we would add a priority arg for hook registering.
In your own extension, you can organise all your functions in sequential like this:
Pipeline X ---> beforeStep1 ---> Step1 ---> afterStep1 ---> Others.
(go into your ext)/ ^ (return from your ext)
-------- / \ --------
/ \
v \
your func1 --> your func2 --> .. -- > your funcN
from paperlib.
Thanks, makes sense!
Priorities are perhaps not the best solution, because high/low priority extensions would likely use the max/min priority value, and you would still have to solve ties by "hook register ordering".
In my opinion, it would be better to:
- Allow the user to re-order extensions (this could be in the extensions configuration page)
- Allow extension developers to specify a list of other extensions that should run before, if installed (to decide where to place the extension when it is installed)
from paperlib.
Hi, a new version with some new hook points has been released now.
Please refer to:
- extension development doc: https://paperlib.app/en/extension-doc/
- hook extension introduction: https://paperlib.app/en/extension-doc/ext-types/hook-ext.html
- available hook points: https://paperlib.app/en/extension-doc/process-hook.html
For inspiration about how to develop a hook extension, you can see https://github.com/Future-Scholars/paperlib-entry-scrape-extension
I would suggest you use the beforeExport...
or the citeObjCreatedIn...
hook points for this issue.
For priorities, I will think about it. Thanks for your suggestion.
from paperlib.
Thanks! I may have to postpone this to May, but I'll give it a try to implement the extension.
from paperlib.
OK~ I will close this issue for now.
If you have any problem with the development of extensions, feel free to ask me.
from paperlib.
Related Issues (20)
- [Feature Request] hope the thesis title supports simple latex formulas. HOT 9
- [Bug] Detect folders when dragging-and-dropping files HOT 6
- Introduction pdf file failure HOT 2
- [BUG] The number under tag displayed under macOS does not match the actual number of papers. HOT 2
- [BUG] Importing papers from folder failed, and the software got stuck when restarting. HOT 16
- [Feature Request] Shared paper collections HOT 2
- [Feature Request] Highlight search results HOT 7
- [Feature Request] Customizable Bibtex Key HOT 4
- [Question] Any way import only metadata without downloading the PDF files? HOT 5
- [Feature Request] Update presetting page
- [Feature Request] Custom fields HOT 4
- [BUG] Investigate RSS 403 HOT 3
- [BUG] Colorize smartfilter will reset the query sentence. HOT 1
- [Feature Request] Automatically move the items to a classified folder when drag a pdf into a child folder. HOT 2
- [Feature Request] Linking my local .md note files HOT 2
- [Feature Request] 关于使用的一些新功能需求建议 HOT 6
- [Feature Request] Import files without duplicating and renaming HOT 2
- [Feature Request] Better LaTex font for Windows.
- [Feature Request] Add website link like BLOG into the attachments. HOT 8
- [Feature Request] Fetch Pdf from Arxiv when Reading, No Local Storage or Webdav Needed HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paperlib.