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-gento generate & upload:
bun update-schemaData updates can be push to the database with:
bun push-dataIf 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 translationLanguagesAdapted 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