Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dart Script for Generating SQL Imports for Annya Pali Texts #2

Merged
merged 7 commits into from
Nov 10, 2023

Conversation

iulspop
Copy link
Collaborator

@iulspop iulspop commented Nov 3, 2023

This is WIP. I have my WIP notes/documenation in iuliu_test dir, but I will reorganize it to fit with the current repo later.

Todos:

  • comparing the VRI XML for Majjhimanikāya Mūlapaṇṇāsapāḷi with current DB data
  • documenting VRI XML to current DB schema mapping
  • comparing the VRI XML for Niruttidipanipatha with current DB data (I want to analyze one current Annya text example too before proceeding)
  • Read Anudīpanīpāṭha XML file, and manually write a partial SQL import and test to verify it works
  • Write a Dart script which inputs an XML file and outputs SQL import for our current DB schema (with tests)

Comment on lines +20 to +34
The page beginning numbers `"1.0001"` have two parts. The first part indicates the volume number of a particular book (a book can be split over multiple physical volumes), the second part the page number of that volume.

For example, the Majjhimanikāya is split into three volumes in the Myanmar edition. The start of each volume mapping to Mūlapaṇṇāsapāḷi, Majjhimapaṇṇāsapāḷi and Uparipaṇṇāsapāḷi respectively. The PTS version also splits the Majjhimanikāya into three volumes, but the start of the third volume is doesn't mat to the start of Uparipaṇṇāsapāḷi, but starts later in that collection.

If the number starts with `0.`, it means the book is not split over volumes but has one physical book. For example, the Myanmmar edition of the Vinaya is one book one volume, so: `<pb ed="M" n="0.0001" />`.

But the PTS edition of the Vinaya is five volumes, so the count starts at 1:

```
<pb ed="P" n="1.0001" />
<pb ed="P" n="2.0001" />
<pb ed="P" n="3.0001" />
<pb ed="P" n="4.0001" />
<pb ed="P" n="5.0001" />
```
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I induced this explanation for the two parts of the page beginning number from looking at various examples, but I'm not sure if it's correct. Do you know what they mean @bksubhuti?

@bksubhuti bksubhuti marked this pull request as ready for review November 3, 2023 01:10
@bksubhuti
Copy link
Owner

our information is a little fragmented.. with an issue and the pr.. but ven pndazza says that vri uses this script to generate html from xml.. I have no idea what this does. When you click on it, it will prompt for a download immediately and then you can open in a text editor.
[https://tipitaka.org/romn/cscd/tipitaka-latn.xsl](https://tipitaka.org/romn/cscd/tipitaka-latn.xsl)

@bksubhuti bksubhuti merged commit c001d33 into master Nov 10, 2023
@iulspop
Copy link
Collaborator Author

iulspop commented Nov 10, 2023

Hi @bksubhuti, why did you merge this PR when it was still WIP? I created a new PR to continue my work: #3

@bksubhuti
Copy link
Owner

I was under the impression you could still keep editing this PR>> sorry.
I don't know PR stuff. I just wanted to see the files and so I merged so I could download them.

@iulspop
Copy link
Collaborator Author

iulspop commented Nov 10, 2023

I was under the impression you could still keep editing this PR>> sorry. I don't know PR stuff. I just wanted to see the files and so I merged so I could download them.

No worries @bksubhuti. You can view the files changed/added in the PR tab "files changed" and leave comments there as you review my code and documentation. If you wish to view the files locally, you can run the command git checkout download-anna in the project directory. It will pull the remote branch I'm working on to your local machine, then switch git to it. Once you're done viewing, you can switch back using git checkout master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants