bksubhuti / tpr_downloads

2 stars 2 forks source link

Dart Script for Generating SQL Imports for Annya Pali Texts (2) #3

Closed iulspop closed 3 months ago

iulspop commented 1 year ago

@bksubhuti I did some comparing the current SQL data to the VRI XML today, looking at Niruttidipanipatha in addition to Mūlapaṇṇāsapāḷi. I starting writing an SQL import file manually for Anudīpanīpāṭha so I understand the expected output of the Dart script. So far only the books table SQL insert have I written with explanation. Once I have the reset of the manually written SQL file, I will test importing the book to the database to see if it works and ask you for review. Finally I will proceed to writing the Dart script for generating the full SQL import.

bksubhuti commented 1 year ago

Great work.. I will let you continue and then merge again later. Remember to delete the toc and other items by bookID (IF EXIST) so that the extensions can be added multiple times but only one copy.

You can see the pali english books do this at the very beginning. You should test directly in sqlitebrowser based on the location of the TPR db.

Version 59 has been released except mac.. it will come this weekend. However, book imports.. nothing has changed so the testing will be fine with any version.

iulspop commented 1 year ago

Great work.. I will let you continue and then merge again later.

Please read the comment I wrote in the previous PR. I would prefer you read the code under the "Files Changed" tab of the PR in GitHub, that way you can leave comments/questions for me as you read. However, if you wish to read it locally too, then you can follow the instruction I wrote in the comment (just one command to switch to my branch git checkout download-anna.

Remember to delete the toc and other items by bookID (IF EXIST) so that the extensions can be added multiple times but only one copy.

Yes.

You can see the pali english books do this at the very beginning. You should test directly in sqlitebrowser based on the location of the TPR db.

Yes.

bksubhuti commented 1 year ago

I got this from ven pndzza These are obselete.

iulspop commented 1 year ago

I got this from ven pndzza These are obselete.

  • paranum column in pages table.
  • pali_attha_tika_match table
  • tran_books table

Perfect, thanks

iulspop commented 1 year ago

@bksubhuti, is the simple column in the tocs table still required?

CREATE TABLE "tocs" (
    "book_id"   TEXT,
    "name"  TEXT,
    "type"  TEXT,
    "page_number"   INTEGER,
  simple TEXT
);

eg.

INSERT INTO tocs VALUES('mula_ma_01','1. mūlapariyāyavaggo','chapter',1,'1. mulapariyayavaggo');
bksubhuti commented 1 year ago

Simple s not required. I will remove that and the others shortly. The app can handle with or without.

bksubhuti commented 1 year ago

The paranum column in pages table is actually needed. I uploaded a new copy to the same location and url