A linked open bibliography display system: https://bellerophons-pegasus.github.io/lobib/
Data is stored on Wikidata, fetched from there (via a common main subject), and displayed on the application linked above. In the application it can be searched, sorted, and filtered. An export function is also planned along integration of multiple citation styles.
Import data into Wikidata
Get data from Wikidata in custom JSON format
For this a SPARQL query has to be designed. See file
query.rq for the query originally taken from Scholia.
The query can be executed on the wikidata query service and then downloaded as json and uploaded into this repository (
- Install jq
- Install wikidata-cli, for instance via these steps:
- Install npm
npm installin the repository directory
wd sparql query.rq > result.jsonfollowed by
jq -f flatten.jq result.json > test.json
The last step can also be executed via
npm run download.
Get bibliographic data from Wikidata in CSL JSON format
This requires jq, wcite and standard Unix command line tools. Run
npm run download # download custom JSON as described above npm run ids # extract Wikidata IDs from custom JSON npm run csl # download CSL JSON for each ID
The resulting CSL JSON data is written to file
wcite.json. A bibliography can be generated from this data for instance via
wcite show wcite.json wcite show -f bibtex wcite.json
Display JSON data
With the JSON file and some HTML, CSS, and JS magic a nicely formatted annotated bibliography will be listed. An introduction to do this is provided by Mozilla.
Add search all box
With even more JS the list can be filtered with a search box. A good example is provided by w3schools
this is the current result on the main link provided above
Add facets for filtering
The current test result is here: https://bellerophons-pegasus.github.io/lobib/testItemsJS/index.html
Split up topics into list
Hide the main topic used in the Wikidata query to get the items (e. g. 'Aegean glyptic')
Provide means to hide topics without filtering anything; E. g. many entries have 'archaeology' as a main subject, which is a bit too general for the intended reference list
Get more information from Wikidata in order to be able to fully display the biblography entries. But also:
It would be good to get CSL JSON from Wikidata. For this citation.js was tested, but unfortunately not all needed properties (e. g. subtitle/P1680 or main subject/P921) are recognised or incorporated (see issues on GitHub, esp. #76). Thus either an own solution has to be implemented (only if no other way possible) or appropriate extensions have to be contributed to citation.js.
Think about using CSL JSON as primary input format instead of custom JSON or extend CSL JSON with additional fields
With CSL JSON it is possible to export entries in any citation style with citation.js, which would already be a great help for the planned export function.
It would be nice to highlight the latest changes or additions in the bibliography. This could be achieved if the date of the last change can be queried via the SPARQL endpoint of Wikidata. This has to be investigated first.
Possibly useful links ?