GetRD / academic-file-converter

📚 Import Bibtex publications and Jupyter Notebook blog posts into your Markdown website or book. 将Bibtex转换为Markdown网站
https://docs.hugoblox.com/reference/content-types/#automatically-import-publications-from-bibtex
MIT License
355 stars 101 forks source link

Add support for front matter options via `extras` field in reference managers #48

Open gcushen opened 5 years ago

gcushen commented 5 years ago

Goals

Add support for front matter options (e.g. projects, categories) via reference manager's extras field.

This could simplify the process of importing publications, effectively using the reference manager as the CMS for publications.

Details

Configuration of front matter options via the reference manager's extras field will streamline the import process and alleviate the need to edit any of the automatically generated Markdown files. Hence, all publication editing can be performed in the user's existing reference management tool.

For example, this would enable users to set front matter options such as categories within their reference manager.

There are many limitations to the extras field in reference managers. We'd need to design a data structure and consider how multiple front matter options, including lists and nested key-value pairs, are stored in a flat extras field.

laszewsk commented 3 years ago

I do find the support of bibtex important. Please do not drop it.

A workaround for the issue of tags not being set has been posted in https://github.com/laszewski/laszewski.github.io/blob/master/bin/featured.py The use is documented in a Makefile such as in https://github.com/laszewski/laszewski.github.io/blob/master/Makefile

The makefile contains the following tags:

make bib which cleans the bib file and removes the mont tags with strings

make mark_class_books which marks some of the bibtex related documents for hugo with the tag that in that case is used for a filter.

it would be much nicer if we would have an academic import that has tags included.

However, maybe I do not use the import correctly?

kevinpolisano commented 4 months ago

There is an alternative written in R that supports front matter options via the extras field in Zotero. You can see the implementation in this code for bibtex_2academic_plus.R.

However, I think we can improve on this solution. The current method requires manually filling these extras fields, while it is possible to automate the process without using the extras field by utilizing the related items field instead. In Zotero, one can create a folder called for instance academic-publications containing various items such as journal articles, conference papers, codes, slides, posters, and presentation videos, all of which can be linked to a specific article entry via the related items field. Currently, these related items are not yet exported with Better BibTeX in the generated .bib file. However, related items are exported with BetterBibtex JSON. This means it is technically possible to extract the type (e.g., slides, poster, video) and corresponding URL for each related item to populate the front matter options url_{slides,poster,video} in the generated .md files.

Additionally, it would be also possible to automatically extract the PDF files associated with these items (e.g., article PDFs, slides, posters) and put them in the local folder uploads/ in order to produce a "self-contained" website.