Closed bbest closed 3 years ago
Hi @bbest - This is very cool - I saw it mentioned in the wowchemy docs but didn't realize that you could actually import references with the Chrome plugin. That will save me so much time (I've been manually entering everything via the netlify CMS, which is excruciating). Thanks! I'll set it up and let you know.
Oooh. This publications functionality is even cooler than I realized!
Torie: you can just put all the .bib files in a directory here and then I will run the python script on all of them in one go.
Will do @7yl4r - I'm going to work on getting them all together in the next few days. @bbest - I've registered for Zotero with the username torie.ketcham
Right on @torieketcham and @7yl4r,
I invited you to marinebon Zotero group. Feel free to tweak that for your purposes. You can export as BibTex the whole group folder or subfolders.
If @7yl4r you also have a Zotero account, I could add you and then opening Zotero will similarly sync your exported BibTex file and you can run the Python from there. The beauty of a shared Zotero group is that others could also contribute and export.
Eventually we might be able to setup a Github Action to automatically handle the Python updating.
Awesome, thanks @bbest - I think I will start by adding all of the pubs that are currently on the MBON site to my library and then exporting that folder as BibTex for @7yl4r to help me run. Then I guess we could merge that with the MBON group (does it check for dupes or would it be better just to keep the folder separate anyway?). I'd also like to add specialized tags per the current site organization (i.e. ‘Omics and eDNA, Ocean Obs ‘19, Seascapes etc) so I will play around with that.
Hi @7yl4r - I've uploaded a .bib file of the publications to the /content/publication folder - let me know if I did it right and if you're able to run the script on it? @bbest I saved the publications to my zotero app, and I can't seem to get the sync working with my web library. If I can figure that out then maybe I can add these files to the marinebon group - you can let me know if there is a specific way in which you'd like to add them (as a subfolder, etc).
Notes from attempts with @7yl4r ...
https://github.com/wowchemy/hugo-academic-cli#usage
Import publications:
academic import --bibtex my_publications.bib
Optional arguments:
--help
Help--featured
Flag publications as featured (to appear in Featured Publications widget)--overwrite
Overwrite existing publications--publication-dir PUBLICATION_DIR
Path to your publications directory (defaults to publication
)--normalize
Normalize tags by converting them to lowercase and capitalizing the first letter--verbose
or -v
Show verbose messagesAfter importing publications, a full text PDF and image can be associated with each item and further details added via extra parameters.
academic import --bibtex content/publication/MBON_publications.bib --overwrite
FileNotFoundError: [Errno 2] No such file or directory: 'content/publication/djurhuus-environmental-2020/index.md'
Bens-MBP:www_marinebon2 bbest$ academic import --bibtex content/publication/MBON_publications.bib --overwrite
Error: from config: failed to resolve output format "WebAppManifest" from site config
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/bin/academic", line 11, in <module>
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/academic/cli.py", line 26, in main
parse_args(sys.argv[1:]) # Strip command name, leave just args.
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/academic/cli.py", line 90, in parse_args
dry_run=known_args.dry_run,
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/academic/import_bibtex.py", line 40, in import_bibtex
entry, pub_dir=pub_dir, featured=featured, overwrite=overwrite, normalize=normalize, dry_run=dry_run,
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/academic/import_bibtex.py", line 85, in parse_bibtex_entry
page.load(Path("index.md"))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/academic/editFM.py", line 27, in load
academic import --bibtex content/publication/MBON_publications.bib --overwrite -v
12:57:18PM INFO: Parsing entry djurhuus_environmental_2020
12:57:18PM INFO: Creating folder content/publication/djurhuus-environmental-2020
12:57:18PM INFO: Saving citation to content/publication/djurhuus-environmental-2020/cite.bib
Error: from config: failed to resolve output format "WebAppManifest" from site config
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/bin/academic", line 11, in <module>
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/academic/cli.py", line 26, in main
parse_args(sys.argv[1:]) # Strip command name, leave just args.
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/academic/cli.py", line 90, in parse_args
dry_run=known_args.dry_run,
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/academic/import_bibtex.py", line 40, in import_bibtex
entry, pub_dir=pub_dir, featured=featured, overwrite=overwrite, normalize=normalize, dry_run=dry_run,
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/academic/import_bibtex.py", line 85, in parse_bibtex_entry
page.load(Path("index.md"))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/academic/editFM.py", line 27, in load
with self.path.open("r", encoding="utf-8") as f:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 1183, in open
opener=self._opener)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 1037, in _opener
return self._accessor.open(self, flags, mode)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 387, in wrapped
return strfunc(str(pathobj), *args)
FileNotFoundError: [Errno 2] No such file or directory: 'content/publication/djurhuus-environmental-2020/index.md'
So something
academic import --bibtex content/publication/MBON_publications.bib -dr
12:56:31PM WARNING: Skipping creation of content/publication/djurhuus-environmental-2020 as it already exists. To overwrite, add the `--overwrite` argument.
12:56:31PM ERROR: Invalid date for entry `vestfals_seasonal_nodate`.
12:56:31PM ERROR: Invalid date for entry `sutton_functional_nodate`.
12:56:31PM ERROR: Invalid date for entry `noauthor_deep_nodate`.
12:56:31PM ERROR: Invalid date for entry `noauthor_fish_nodate`.
Hi @torieketcham,
For adding publications (per https://github.com/marinebon/www_marinebon2/issues/10#issuecomment-846038036), I highly recommend using Zotero to export to BibTex, then import into Wowchemy with their Python command all at once.
Documentation
Tips
bdbest
; or share your Zotero login with me and I can add you to my marinebon Zotero group.Images
Zotero desktop app
Be sure to download, install and try the Chrome plugin too
marinebon Zotero group