Skip to content

buda-base/embedded-reader-import

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collection import script for BDRC's eReader

Import script for the BDRC embeded reader.

This script takes a TSV file (in the input/ folder), generated from a spreadsheet representing the collection, and outputs a .trig file (in the output/ folder), ready to be imported in BDRC's database to generate the iframe code.

Index

#, site, github user, catalog

  1. khampagar.org, https://github.com/khampagar དཀར་ཆག
  2. vajravidya.org, https://github.com/thrangu དཀར་ཆག
  3. glorioussakya.org, https://github.com/Sakya-center དཀར་ཆག
  4. gadenjangtse.org, https://github.com/Garden-jangtse དཀར་ཆག
  5. loselingmonastery.net, https://github.com/Loseling དཀར་ཆག
  6. tibetanlibrary.org/bo/, https://github.com/Tibetan-library དཀར་ཆག
  7. theyungdrungbon.com, https://github.com/geleknyima, དཀར་ཆག
  8. cuts.ac.in, https://github.com/Cutac དཀར་ཆག
  9. shechen.org, https://github.com/shechenorg དཀར་ཆག
  10. namdroling.or, https://github.com/namdroling དཀར་ཆག
  11. dzongsarinstitute.org.in, https://github.com/dzongsarshedra, དཀར་ཆག
  12. gadenshartse.org, https://github.com/gadenshartse དཀར་ཆག
  13. palpung.org, https://github.com/palpung དཀར་ཆག
  14. gyudra.com, https://github.com/gyudra དཀར་ཆག
  15. sarah.instituteofbuddhistdialectics.org, https://github.com/sarahcollege དཀར་ཆག
  16. sakyacollege.org, https://github.com/sakyacollege དཀར་ཆག
  17. internationalbuddhistacademy.org, https://github.com/internationalbuddhistacademy དཀར་ཆག
  18. gomanglibrary.com, https://github.com/gomanglibrary དཀར་ཆག
  19. serajeyrigzodchenmo.org, https://github.com/serajeyrigzodchenmo དཀར་ཆག
  20. དཀར་ཆག
  21. tashilhunpo.org, https://github.com/tashilhunpo དཀར་ཆག
  22. kirti92.org, https://github.com/Kirtigonpa དཀར་ཆག
  23. དཀར་ཆག
  24. དཀར་ཆག
  25. songtsenlibrary.net, དཀར་ཆག
  26. དཀར་ཆག
  27. དཀར་ཆག
  28. དཀར་ཆག
  29. rigzod.org, དཀར་ཆག
  30. serameymonastery.org, དཀར་ཆག
  31. དཀར་ཆག
  32. tbrc.org, དཀར་ཆག
  33. lopenling.org, དཀར་ཆག

Dependency installation

$ pip3 install -r requirements.txt

It may also be necessary to:

pip3 install setuptools

before the requirements.txt.

Running the script

To convert all csv files into an RDF graph, run

$ python3 tsvtordf.py

and then execute the command given as output to upload the new data in the database.

Input file format

To create a tsv catalog, copy-paste the catalog from a spreadsheet in a copy of an existing tsv.

Each line of the spreadsheet should only contain one value. Section and subsections only need to contain the names, while works should contain a BDRC Work ID. Titles from BDRC will be displayed by default. You can replace them with a custom title by adding a space and the custom title after the Work ID.

[spreadsheet screenshot]

For texts running from a specific page to another page, add these four things to the tsv files (<start volume> and <end volume> are optional):

W123(120,347,3,5) title
W123(<start page>,<end page>,<start volume>,<end volume>) title

Setting up an embedded reader

Iframe code:

<iframe src="http://library.bdrc.io/scripts/embed-iframe.html?work=bdr:W1ERI#######&origin=website.com"></iframe>

About

csv-ttl conversion script and collection ttl files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published