Skip to content

Commit

Permalink
additional changes found in master
Browse files Browse the repository at this point in the history
  • Loading branch information
firepick1 committed Feb 19, 2020
1 parent 6e6d6fd commit fe68400
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 37 deletions.
Binary file removed .scripts/pli-tv-bi-vb-as1-7.ods
Binary file not shown.
Binary file removed .scripts/pli-tv-bi-vb-sk1-75.ods
Binary file not shown.
Binary file removed .scripts/pli-tv-bu-vb-as1-7.ods
Binary file not shown.
25 changes: 21 additions & 4 deletions .scripts/sheet_import.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3

import logging
import json
import argparse
import pyexcel
Expand All @@ -8,6 +9,12 @@
from itertools import groupby
from common import iter_json_files, repo_dir, bilarasortkey

def check_segment_id(segment_id, file):
if segment_id.count(':') != 1:
logging.error(f'Segment ID "{segment_id}" in "{str(file)} is malformed, expected a single ":", but {segment_id.count(":")} found')
return False
return True

if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Import Spreadsheet")
parser.add_argument('file', help='Spreadsheet file to import. CSV, TSV, ODS, XLS')
Expand Down Expand Up @@ -44,20 +51,25 @@ def get_file(uid, muids):
with file.open('r') as f:
data = json.load(f)
for segment_id in data:
segment_uid = segment_id.split(':')[0]
segment_uid_to_file_mapping[muids][segment_uid] = file
if check_segment_id(segment_id, file):
segment_uid = segment_id.split(':')[0]
segment_uid_to_file_mapping[muids][segment_uid] = file

raise ValueError('Could not find file for {}_{}'.format(uids, muids))

raise ValueError('Could not find file for {}_{}'.format(uid, muids))

errors = 0
for uid, group in groupby(rows, lambda row: row['segment_id'].split(':')[0]):
group = list(group)
fields = list(group[0].keys())[1:]
data = {field: {} for field in fields}

for record in group:
segment_id = record['segment_id']
if not segment_id:
continue
if not check_segment_id(segment_id, args.file):
errors += 1
continue
for field in fields:
value = record[field]
if value:
Expand All @@ -69,6 +81,7 @@ def get_file(uid, muids):
file = get_file(uid, field)
if not file:
print('ERROR: Could not find file for {}_{}'.format(uid, field), file=sys.stderr)
errors += 1
continue

with file.open('r') as f:
Expand All @@ -95,3 +108,7 @@ def get_file(uid, muids):

with file.open('w') as f:
json.dump(merged_data, f, ensure_ascii=False, indent=2)
if errors > 0:
print(f'{errors} occured while importing sheet, not all data was imported', file=sys.stderr)
exit(1)
exit(0)
@@ -1,5 +1,5 @@
{
"pli-tv-bu-vb-pc58:2.1.4": "The six are linen, cotton, silk, wool, sunn hemp, and hemp; see [](pli-tv-kd8:3.1.6).",
"pli-tv-bu-vb-pc58:2.1.10": "According to [Vin-vn-ṭ.1626]() (presumably commenting on _kaddamena_ in the Kaṅkhāvitaraṇī commentary): _Kaddamenāti udakānukaddamasukkhakaddamādiṃ saṅgaṇhāti_, “With mud means: water with mud, dry mud, etc. is included.”",
"pli-tv-bu-vb-pc58:2.3.6": "I understand _anuvāta_ and _paribhaṇḍa_ to refer to long borders and short borders respectively."
}
"pli-tv-bu-vb-pc58:2.3.7": "I understand _anuvāta_ and _paribhaṇḍa_ to refer to long borders and short borders respectively."
}
@@ -1,3 +1,4 @@
{
"pli-tv-bu-vb-pc68:2.1.53": "_Ñattiyā dukkaṭaṃ_. The Pali text just says _dukkaṭa_, without specifying that it is an _āpatti_, an offense. Yet elsewhere, such as _bhikkhu-saṅghādisesa_ 10-13, it is said that the _dukkaṭa_ is annulled if you commit the full offense. The implication is that _dukkaṭa_ should be read as _āpatti dukkaṭassa_, “an offense of wrong conduct”."
}
"pli-tv-bu-vb-pc68:2.1.53": "_Ñattiyā dukkaṭaṃ_. The Pali text just says _dukkaṭa_, without specifying that it is an _āpatti_, an offense. Yet elsewhere, such as _bhikkhu-saṅghādisesa_ 10-13, it is said that the _dukkaṭa_ is annulled if you commit the full offense. The implication is that _dukkaṭa_ should be read as _āpatti dukkaṭassa_, “an offense of wrong conduct”.",
"pli-tv-bu-vb-pc68:2.3.5": "By editorial mistake the Pali is missing _ādikammikassa_, “the first offender”. This is a universal exception that applies to all the rules of the Vinaya. "
}
@@ -1,5 +1,5 @@
{
"pli-tv-bu-vb-pc8:1.2.16": "_Setughāta_, lit. “destroyed the bridge”. [Sp.1.16](): _Setu vuccati maggo, maggeneva tādisassa vacanassa ghāto, samucchedoti vuttaṃ hoti_, “The path is called the bridge; such speech is destroyed by the path.” The commentary seems to take _setu_, “bridge”, as a reference to the eightfold path. I prefer to understand “bridge” as a metaphor for access.",
"pli-tv-bu-vb-pc8:2.4.2": "In agreement with [Sp.1.220](), I understand _paṭivijānantassa_ to refer to the listener rather than the speaker. Grammatically the word could refer to either (it can be regarded as a genitive agreeing with _bhaṇantassa_, thus referring to the speaker, or it can be regarded as a dative of the person spoken to, that is, the listener), but logically it seems it must refer to the listener. _Paṭivijānantassa_ refers to understanding the overall meaning of what is said, rather than knowing the exact words that have been spoken. Since the speaker knows he is lying, he understands the overall meaning. It follows that the understanding here must refer to the listener.",
"pli-tv-bu-vb-pc8:2.4.2": "“If the listener understands” renders _paṭivijānantassa_. This is in accordance with [Sp.1.219](), which has this to say: _Atha pana yassa āroceti, so na jānāti “ki ayaṃ bhaṇatī”ti, saṃsayaṃ vā āpajjati, ciraṃ vīmaṃsitvā vā pacchā jānāti, appaṭivijānanto icceva saṅkhyaṃ gacchati”, “When he who is informed does not understand, thinking, ʻWhat does he say?’ or he has doubt, or he understands after reflecting for a long time, then it considered ʻone who does not understand.’” Grammatically _paṭivijānantassa_ could refer to either the speaker or the listener (it can be regarded as a genitive agreeing with _bhaṇantassa_, thus referring to the speaker, or it can be regarded as a dative of the person spoken to, that is, the listener), but logically it seems it must refer to the listener. In accordance with common usage, “understanding” (_paṭivijānantassa_) must refer to understanding the overall meaning of what is said, not knowing the exact words that have been spoken. Since the speaker knows he is lying, he understands the overall meaning. It follows that the understanding here must refer to the listener. A parallel construction is found at _bhikkhu pārājika_ 1 where _paṭivijānāti_ is used in connection with giving up the monastic training. Here the verb clearly refers to understanding on the part of the listener, that is, one has only succeeded in renouncing the training if the listener understands what one is saying. At _bhikkhu saṅghādisesa_ 3 the same verb, this time in the aorist form _paṭivijāni_, again refers to the listener.",
"pli-tv-bu-vb-pc8:2.5.51": "Because _vihāra_, “dwelling”, is mentioned just before, I here render _senāsana_ as furniture."
}
Expand Up @@ -8,11 +8,8 @@
"pli-tv-bu-vb-pj4:4.6.108": "For an explanation of the term ʻunconnected’, _khaṇḍa_, see [Sp.1.200]().",
"pli-tv-bu-vb-pj4:4.7.57": "For an explanation of the term ʻlinked’, _baddha_, see [Sp.1.200]().",
"pli-tv-bu-vb-pj4:4.8.115": "Although two attainments are given in each case of the above permutation series, it seems that only the one which remains unchanged within each sub-section is considered the root item.",
"pli-tv-bu-vb-pj4:5.1.1": "It seems to me that the lack of understanding refers to the speaker rather than the listener. _Bhaṇantassa_ (“for the one who is speaking”) and _paṭivijānantassa_ (“for the one who understands”) are more likely to refer to the same person than to different people. Moreover, the natural meaning of _na paṭivijānantassa āpatti thullaccayassa_ (III 97,30-31) is: “There is an offense of _thullaccaya_ for one who does not recognize/understand.” Since the offense mentioned here refers to the person making the claim, this cannot refer to the listener.


In agreement with [Sp.1.220](), I understand _paṭivijānantassa_ to refer to the listener rather than the speaker. Grammatically the word could refer to either (it can be regarded as a genitive agreeing with _bhaṇantassa_, thus referring to the speaker, or it can be regarded as a dative of the person spoken to, that is, the listener), but logically it seems it must refer to the listener. _Paṭivijānantassa_ refers to understanding the overall meaning of what is said, rather than knowing the exact words that have been spoken. Since the speaker knows he is lying, he understands the overall meaning. It follows that the understanding here must refer to the listener.",
"pli-tv-bu-vb-pj4:5.1.42": "The Pali text reads _vatthu_,“basisˮ, rather than _vattu_, “speech.ˮ However, I have chosen to follow the alternative reading of _vattu_—found in the PTS edition and at [Sp.1.215]()—since this seems more reasonable to me given the context.",
"pli-tv-bu-vb-pj4:5.1.1": "“If the listener understands” renders _paṭivijānantassa_. This is in accordance with [Sp.1.219](), which has this to say: _Atha pana yassa āroceti, so na jānāti “ki ayaṃ bhaṇatī”ti, saṃsayaṃ vā āpajjati, ciraṃ vīmaṃsitvā vā pacchā jānāti, appaṭivijānanto icceva saṅkhyaṃ gacchati”, “When he who is informed does not understand, thinking, ʻWhat does he say?’ or he has doubt, or he understands after reflecting for a long time, then it considered ʻone who does not understand.’” Grammatically _paṭivijānantassa_ could refer to either the speaker or the listener (it can be regarded as a genitive agreeing with _bhaṇantassa_, thus referring to the speaker, or it can be regarded as a dative of the person spoken to, that is, the listener), but logically it seems it must refer to the listener. In accordance with common usage, “understanding” (_paṭivijānantassa_) must refer to understanding the overall meaning of what is said, not knowing the exact words that have been spoken. Since the speaker knows he is lying, he understands the overall meaning. It follows that the understanding here must refer to the listener. A parallel construction is found at _bhikkhu pārājika_ 1 where _paṭivijānāti_ is used in connection with giving up the monastic training. Here the verb clearly refers to understanding on the part of the listener, that is, one has only succeeded in renouncing the training if the listener understands what one is saying. At _bhikkhu saṅghādisesa_ 3 the same verb, this time in the aorist form _paṭivijāni_, again refers to the listener.",
"pli-tv-bu-vb-pj4:5.1.42": "The Pali text reads _vatthu_, “basisˮ, rather than _vattu_, “speech.ˮ However, I have chosen to follow the alternative reading of _vattu_—found in the PTS edition and at [Sp.1.215]()—since this seems more reasonable to me given the context.",
"pli-tv-bu-vb-pj4:6.2.15": "Because _vihāra_, “dwelling”, is mentioned just before, I here render _senāsana_ as furniture.",
"pli-tv-bu-vb-pj4:6.2.24": "The Pali has an additional set of ellipses points between “who has made use of your medicines” and “attained the fourth absorption in an empty dwelling”. This seems to be a mistake."
}
Expand Up @@ -6,19 +6,21 @@
"pli-tv-bi-vb-pc93:0.5": "<h1>{}</h1></header>",
"pli-tv-bi-vb-pc93:1.1": "<section class='vinaya-nidana'><p>{}",
"pli-tv-bi-vb-pc93:1.2": "{}",
"pli-tv-bi-vb-pc93:1.3": "{}",
"pli-tv-bi-vb-pc93:1.4": "{}</p>",
"pli-tv-bi-vb-pc93:1.5": "<p>{}",
"pli-tv-bi-vb-pc93:1.3": "{}</p>",
"pli-tv-bi-vb-pc93:1.4": "<p>{}",
"pli-tv-bi-vb-pc93:1.5": "{}",
"pli-tv-bi-vb-pc93:1.6": "{}",
"pli-tv-bi-vb-pc93:1.7": "{}",
"pli-tv-bi-vb-pc93:1.8": "{}",
"pli-tv-bi-vb-pc93:1.9": "{}",
"pli-tv-bi-vb-pc93:1.7": "{}</p>",
"pli-tv-bi-vb-pc93:1.8": "<p>{}</p>",
"pli-tv-bi-vb-pc93:1.9": "<p>{}",
"pli-tv-bi-vb-pc93:1.10": "{}",
"pli-tv-bi-vb-pc93:1.11": "{}",
"pli-tv-bi-vb-pc93:1.12": "{}",
"pli-tv-bi-vb-pc93:1.13": "{}</p></section>",
"pli-tv-bi-vb-pc93:1.12": "{}</p></section>",
"pli-tv-bi-vb-pc93:1.13^a": "<section class='patimokkha'><h2>{}</h2>",
"pli-tv-bi-vb-pc93:1.13": "<p class='rule'>{}</p></section>",
"pli-tv-bi-vb-pc93:1.14": "<section class='patimokkha'><p class='rule'>{}</p></section>",
"pli-tv-bi-vb-pc93:2.1.1": "<section class='vinaya-pada'><dl><dt>{}</dt>",
"pli-tv-bi-vb-pc93:2.1.1^a": "<section class='vinaya-pada'><h2>{}</h2>",
"pli-tv-bi-vb-pc93:2.1.1": "<dl><dt>{}</dt>",
"pli-tv-bi-vb-pc93:2.1.2": "<dd>{}</dd>",
"pli-tv-bi-vb-pc93:2.1.3": "<dt>{}</dt>",
"pli-tv-bi-vb-pc93:2.1.4": "<dd>{}</dd>",
Expand All @@ -27,11 +29,18 @@
"pli-tv-bi-vb-pc93:2.1.7": "<dt>{}</dt>",
"pli-tv-bi-vb-pc93:2.1.8": "<dd>{}</dd>",
"pli-tv-bi-vb-pc93:2.1.9": "<dt>{}</dt>",
"pli-tv-bi-vb-pc93:2.1.10": "<dd>{}</dd></dl></section>",
"pli-tv-bi-vb-pc93:2.1.11": "<section class='vinaya-anapatti'><p>{}",
"pli-tv-bi-vb-pc93:2.1.12": "{} ",
"pli-tv-bi-vb-pc93:2.1.13": "{} ",
"pli-tv-bi-vb-pc93:2.1.14": "{} ",
"pli-tv-bi-vb-pc93:2.1.10": "<dd>{}</dd>",
"pli-tv-bi-vb-pc93:2.1.11": "<dt>{}</dt>",
"pli-tv-bi-vb-pc93:2.1.12": "<dd>{}</dd>",
"pli-tv-bi-vb-pc93:2.1.13": "<dt>{}</dt>",
"pli-tv-bi-vb-pc93:2.1.14": "<dd>{}</dd></dl></section>",
"pli-tv-bi-vb-pc93:2.1.15": "{}</p></section>",
"pli-tv-bi-vb-pc93:2.1.16": "<p class='endsutta'>{}</p>"
"pli-tv-bi-vb-pc93:2.1.16": "<p class='endsutta'>{}</p>",
"pli-tv-bi-vb-pc93:2.2.1^a": "<section class='vinaya-anapatti'><h2>{}</h2>",
"pli-tv-bi-vb-pc93:2.2.1": "<p>{}",
"pli-tv-bi-vb-pc93:2.2.2": "{} ",
"pli-tv-bi-vb-pc93:2.2.3": "{} ",
"pli-tv-bi-vb-pc93:2.2.4": "{} ",
"pli-tv-bi-vb-pc93:2.2.5": "{}</p></section>",
"pli-tv-bi-vb-pc93:2.2.6": "<p class='endsutta'>{}</p>"
}
@@ -1,11 +1,17 @@
{
"pli-tv-bi-vb-pc93:1.1": "sc1, pts-vp-pli4.343, pts-cs1",
"pli-tv-bi-vb-pc93:1.3": "pts-vp-pli4.343",
"pli-tv-bi-vb-pc93:1.4": "sc2, ms2V_3491",
"pli-tv-bi-vb-pc93:1.5": "sc2",
"pli-tv-bi-vb-pc93:1.13": "sc3, ms2V_3492",
"pli-tv-bi-vb-pc93:1.14": "sc3",
"pli-tv-bi-vb-pc93:2.1.1": "sc4, pts-cs2.1",
"pli-tv-bi-vb-pc93:2.1.5": "sc5",
"pli-tv-bi-vb-pc93:2.1.7": "sc6",
"pli-tv-bi-vb-pc93:2.1.9": "sc7",
"pli-tv-bi-vb-pc93:2.1.11": "sc8",
"pli-tv-bi-vb-pc93:2.1.16": "sc11"
"pli-tv-bi-vb-pc93:2.1.1": "sc4, pts-cs2.1, ms2V_3493",
"pli-tv-bi-vb-pc93:2.1.5": "sc5, ms2V_3494",
"pli-tv-bi-vb-pc93:2.1.7": "ms2V_3495",
"pli-tv-bi-vb-pc93:2.1.9": "ms2V_3496",
"pli-tv-bi-vb-pc93:2.1.11": "sc6, ms2V_3497",
"pli-tv-bi-vb-pc93:2.1.13": "sc7, pts-vp-en3.412, ms2V_3498",
"pli-tv-bi-vb-pc93:2.1.16": "sc11",
"pli-tv-bi-vb-pc93:2.2.1": "sc8, pts-cs2.2, ms2V_3499",
"pli-tv-bi-vb-pc93:2.2.6": "sc11, ms2V_3500"
}
2 changes: 1 addition & 1 deletion root/en/blurb/divisions-blurbs_root-en.json
@@ -1,6 +1,6 @@
{
"kn": "The word <i>khuddaka</i> means “lesser” or “minor”, and it seems that this category originally served to collect certain short collections, mostly verse, that were not conveniently assigned to one of the main <i>nikāyas</i>. Over time, however, the collection grew, so that the Khuddaka in the Pali canon today is the largest of the <i>nikāyas</i>. It includes some of the most popular texts in Theravāda Buddhism, such as the Dhammapada, the Sutta Nipāta, and the Jātakas. There is no closely parallel collection in the other canons, but many of the early texts have parallels in various places.",
"kp": "Eight short texts, which appear to have been collected as a kind of basic study curriculum for novices. The collection itself was probably made in Sri Lanka, but most of the texts are found elsewhere in the <i>nikāyas</i>.",
"kp": "Nine short texts, which appear to have been collected as a kind of basic study curriculum for novices. The collection itself was probably made in Sri Lanka, but most of the texts are found elsewhere in the <i>nikāyas</i>.",
"dhp": "The Pali version of this famous text, consisting of 423 verses organized into memorable themes. It is the most widely read of the early texts, and has been translated many times into many languages. Versions of this text are found in Chinese, Tibetan, and several Indic languages, attesting to its timeless, universal appeal.",
"ud": "Eighty short discourses in mixed prose and verse. These take the form of a simple prose narrative, which serves to frame an inspired saying, usually in verse. The <i>udāna<i> and <i>dhammapada</i> literature appear to overlap, and can be considered as one genre. The Dhammapada verses also have associated narratives, but these are found in the commentary. There are some indications that some of the narratives in the Udāna may be a little later than most of the material in the four main <i>nikāyas</i>.",
"iti": "112 short discourses in mixed prose and verse, arranged in the Aṅguttara style of ascending numbered sets, from one to four. Alone among Buddhist texts, its survival is attributed not to the Saṅgha, but to a laywoman named Khujjuttarā. According to the Pali commentaries, she was a maid to the Queen of Kosambi, and memorized these teachings from the Buddha, earning her the title of the most learned of the laywomen disciples.",
Expand Down
@@ -1,3 +1,4 @@
{
"pli-tv-bi-vb-pc93:2.1.12": "gilānāya → ābādhappaccayā (sya-all, mr); ābādhapaccayā (pts-vp-pli1ed)"
"pli-tv-bi-vb-pc93:2.1.12": "gilānāya → ābādhappaccayā (sya-all, mr); ābādhapaccayā (pts-vp-pli1ed)",
"pli-tv-bi-vb-pc93:2.2.2": "gilānāya → ābādhappaccayā (sya-all, mr); ābādhapaccayā (pts-vp-pli1ed)"
}

0 comments on commit fe68400

Please sign in to comment.