This is the data repo for the draft https://github.com/aminahbl/vinaya project.
(At least during prototyping) project data lives in src/*
files.
The data schema is stored in db/schema.json
which is maintained in and generated by db/generateSchema.js
. After editing the schema (in generateSchema.js
), update both the json file and Xata with:
to run the generator alone:
bunx schema-gen
to generate & upload:
bun update-schema
Data updates can be push to the database with:
bun push-data
If no flag is passed, all tables will be updatd. To update specific tables pass one or more property name given in the updateFns
object in db/updateFns.ts
as arguments:
bun push-data rootLanguages translationLanguages
Adapted from SuttaCentral ids.
- anatomy:
{root_lang}-{tradition}-{rule_set}-{rule_class_sort_id}-{class_prefix + rule_number}
- example:
pli-tv-bi-1-pj001
- example explantion:
Part Value root_lang Pali tradition Theravada rule_set bhikkhuni rule_class_sort_id 1 class_prefix & rule # with pj001 trailing zeros