This project is used to provide a publication site that shows the publication work from all the faculty members in Link Lab community.
We introduce the LinkLabPublications HTMLs Generator, which is the hightlight of the project. It is a Python-based script that could generate all the static HTMLs files that the Link Lab Publications Site needs. The benefit of this way of implementation is because it is eaiser to get the site to the UVA Link Lab Official Website.
We use BibBase to help create and manage our publications page. It is an online platform and you will have more information from their documantation to learn how Link Lab publications pages are maintained and produced with the help of BibBase.
If you are on a windows machine, you can copy and paste all the code snippets as they are. If you are on mac, you will need to do python3/pip 3 for the commands.
- orcid_bibtex_mod.py
This Python code retrieves the works of every link lab author through the ORCID API. It gets the works as they appear on the authors page, so we rely on authors to update their own ORCID page with their publications. To see what this looks like on the web go to https://orcid.org/{ORCID}, where {ORCID} is the ORCID of a given author
python orcid_bibtex_mod.py
- Link_Lab_Publications.bib
This bib file is generated after running the orcid_bibtex_mod.py
that is mentioned above. We will upload this file to the BibBase file manage to create the publication pages/
- pythonHTMLGen
It is the highlight of the project. In the folder, you will run the Python file llpub_html_gen.py
to generate the Link Lab Publication HTML Pages
pyhon llpub_html_gen.py
- platform (DEPRECATED)
It is the previous version and is implemented by Django
web framework. It is now not a good option for making Link Lab Publication Site as it is harder for the maintenance later.
The first step is to register an account on BibBase and then you are good to upload the bib.file, which includes the all collected publications from Link Lab faculty members.
BibBase File Manager |
---|
Versioning
- python==3.11.8
Setup
- Install Python
- Clone the repository
https://github.com/AustinFengYi/linklabpublication.git
This repository includes the folder named pythonHTMLGen
, to start to experiment on your local machine with our repo.
- In the folder
linklabpublications
, command the following
pip install requirements.txt
cd pythonHTMLGen
python llpub_html_gen.py
- If working successful, in terminal you will see the results like the below.
- If working successful, in folder
pythonHTMLGen
you will see the files structured like the below.
💡 Note: I will restructure the publication file path like as below
- Finally, we can go through these static HTML files and browse the publication site through node.js (express.js). Run the following command in the directory path. NOTE: You will need node installed on your machine to run this next line of code.
node app.js
[Directory: orcid_bibtex_mod.py]
Run this as often as needed to generate an updated .bib file.
Step 2: Maintain the bib file of Link Lab Publications on BibBase's file manager
Upload the newly created bib file to the file manager and click render. Copy the URL and put into the bibbase_url variable in llpub_html_gen.py.
[Directory/PythonGen: llpub_html_gen.py]
In the file llpub_html_gen.py
, notice the following variables
bibbase_url = "" # string
#
filter_years = [] # array
#
filter_authors = {} # dict
- bibbase_url= Here if puts the URL of the bib file on BibBase
- filter_year Here it puts the year range of the publications
- filter_authors
Here it is announced as the dictionary of the [key:pair]
author_name: author_searh_name_in_BibBase_filter_condition
Notice that the list of Link Lab faculty members is referenced from the released ORICID spreadsheet.
After having the lateast bib file content on Bibbase File Manager, we can run the command to generate the newest static html files for the Link Lab publication site.
cd pythonHTMLGen
python llpub_html_gen.py