-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 "generate bibtex from identifier" button in toolbar #4183
Comments
I'm working on this. Already implemented a "New Entry" button next to new article. Working on implementing fly-out. |
@chrisjmendoza r u still working on this? |
Refs #550 |
Hello, |
@CarodePourtales Thanks for your interest! The feature should work as follows:
Implementation wise, the last step is already implemented in https://github.com/JabRef/jabref/blob/master/src/main/java/org/jabref/gui/EntryTypeViewModel.java#L117 apart from the automatic determination of the type of the identifier. Let us know if you need more details and/or if there are still things that are unclear. It would be nice if you could open a pull request very early in your development to outline your ideas and show prototypes. |
Yes, the feature in itself kind of exists. The idea was to move the functionality from the lower part of this dialog to the button in the toolbar. In addition, the So it's a bit of work, but not that involved (depending on how much time you are supposed to invest, it might make sense to look at another issue too). |
Please also read along the discussion at #550 (comment). It should provide an idea of the user requirements. |
Hello, I was wondering what a crossref id looks like, because I am using Regex to know what IDBasedFetcher I should use to parse the ID the user enters but I don't know what the user should enter to use a Crossref fetcher. |
I will of course change the look of the string showed but it is just a prototype for the moment |
👍 Crossref is a fetcher for DOI data (see https://search.crossref.org/) |
This issue has been inactive for half a year. Since JabRef is constantly evolving this issue may not be relevant any longer and it will be closed in two weeks if no further activity occurs. As part of an effort to ensure that the JabRef team is focusing on important and valid issues, we would like to ask if you could update the issue if it still persists. This could be in the following form:
Thank you for your contribution! |
I'd like to play around with this but I don't want to be assigned yet. How would we check if an entered ID is valid? Implement regular expressions for every fetcher? Try every fetcher until a result pops up? |
Nice to hear! The most versatile approach would be to extend the IdentifierParser by a method that tries to parse the string into one of the Identifier classes. This is a bit similar to the existing
jabref/src/main/java/org/jabref/logic/importer/WebFetchers.java Lines 67 to 74 in a0284e1
(As of now this only covers DOIs, but that should be relatively straightforward to extend). |
I can see that some of the identifier classes have methods that check the validity of the given String id. Shouldn't that be a part of the Identifier interface? Parsing the string into one of the identifier classes would be easier that way. Also, not every fetcher has a corresponding Identifier class as far as I can see. Am I correct in assuming those should be implemented or do they all fall within the available Identifier classes. For example, Crossref and DOI-fetcher both match with the DOI-Identifier but there is no Identifier class for medline or diva. |
These are static methods, and thus cannot be lifted to the interface. Maybe it would make sense to introduce a
Right, that's still work in progress. I would say you can ignore this problem for now and add the button in the toolbar for all fetcher that do have an identifier |
Yes, I think that makes sense but there is already a class called IdentifierParser and I'm drawing a blank on what to call that one instead if we are creating an interface with that name. Looking at the class, it seems more like a field parser to me? |
You can rename this class to |
Another question, can I use a dialogpane instead of a flyout for now? I'm not seeing a jabref component (or a javafx component) that I can use for that, should that be implemented from scratch? Anyways, I implemented it the same way the new entry view works for a start, by opening a new dialogpane that returns an entrytype. This is what it looks like right now (It also only works for DOI (from CrossRef), Arxiv and ISBN fetchers at the moment as those are the only types that have implemented Identifier classes): |
That looks already pretty nice, thanks for your work! For the flyout, you can use the popover control. As an example: jabref/src/main/java/org/jabref/gui/JabRefFrame.java Lines 941 to 945 in c7f2671
|
@tmrd993 May I ask for an update? Is there some chance to get this into JabRef? |
For the implementation, please also investigate #550. That request asks that JabRef also recognizes This issue describes that the lower part of the "new entry" dialog should be duplicated to a toolbar submenu only for an id: Thus, this is not just a request to add some new dialog, but to work with JavaFX's toolbar magic to create an input possibility directly at a toolbar button. |
I had stopped working on it because of finals, I'll get back on it if I find the time but I'm not claiming it or anything, if someone else wants to solve this feel free to. |
I'm not sure I understand the requirements, is it supposed to be a Menu object inside the toolbar that opens up a text input for the id? Is there some graphical example of this? This is how I pictured it: |
Looks good. The implementation should try different Ids and try to fetch it. --> The user should not be required to input the Id type. Only the Id (as you shown it). (This is #550) The position should be below the button (as I interpret your screenshot) |
Thanks to @colinhex the feature is now implemented! |
There should be a button in the toolbar which allows to generate a new entry from a given identifier. We could just open the "New entry" dialog on button click, or, what might be more user friendly, open a flyout popup that only contains the lower part of the "New entry" dialog.
Flyout similar to this here:
The text was updated successfully, but these errors were encountered: