diff --git a/officinam/1603/1/7/1603_1_7.no1.tm.hxl.csv b/officinam/1603/1/7/1603_1_7.no1.tm.hxl.csv index d40bbe2..525f58c 100644 --- a/officinam/1603/1/7/1603_1_7.no1.tm.hxl.csv +++ b/officinam/1603/1/7/1603_1_7.no1.tm.hxl.csv @@ -9,7 +9,7 @@ 1603:1:7:1:1,1_1,50,50,Cōdex factō,,,,,,ix_codexfacto,v_codex_facto,, 1603:1:7:1:2,1_2,50,19,Numerordĭnātĭo,,,,,,ix_n1603,v_n1603,a generic strategy of arranging numbers in an taxonomy-like explicit way, 1603:1:7:1:3,1_3,50,19,Dictiōnāria,,,,,,,,, -1603:1:7:1:3:1,1_3_1,50,19,Dictiōnāria necessitātibus,,,,,,ix_dctnrnncssttbs,v_dictionaria_necessitatibus,Dictionaries groups required by this work., +1603:1:7:1:4,1_4,50,19,Dictiōnāria necessitātibus,,,,,,ix_dctnrnncssttbs,v_dictionaria_necessitatibus,Dictionaries groups required by this work., 1603:1:7:1:91,1_91,50,19,/Wiki QID/,,,,Q[1-9]\d*,,ix_wikiq,v_wiki_q,"QID (or Q number) is the unique identifier of a data item on Wikidata, comprising the letter ""Q"" followed by one or more digits. It is used to help people and machines understand the difference between items with the same or similar names e.g there are several places in the world called London and many people called James Smith. This number appears next to the name at the top of each Wikidata item.", 1603:1:7:1:92,1_92,50,19,/Wiki P/,,,,P[1-9]\d*,,ix_wikip,v_wiki_p,"Property (also attribute) describes the data value of a statement and can be thought of as a category of data, for example ""color"" for the data value ""blue"". Properties, when paired with values, form a statement in Wikidata. Properties are also used in qualifiers. Properties have their own pages on Wikidata and are connected to items, resulting in a linked data structure.", 1603:1:7:1:93,1_93,50,19,/Wiki LID/,,,,,,ix_wikil,v_wiki_l,"LID (or L number) The identifier for a lexeme entity in Wikidata, comprising the letter ""L"" followed by one or more digits.", diff --git a/officinam/1603/44/README.md b/officinam/1603/44/README.md index 6f0a229..74e8064 100644 --- a/officinam/1603/44/README.md +++ b/officinam/1603/44/README.md @@ -29,15 +29,19 @@ - Very temporary: //dictiōnāria de post mortis condicio// -## [1603:44:86] //Dictiōnāria basibus dē tortūrīs// -- //Dictiōnāria basibus de sceleribus contra humanus// - - Literal English Translation: Basic dictionaries about crimes against humans - +## [1603:44:86] //Dictiōnāria basibus dē tortūrīs modīs// +- //Dictiōnāria basibus dē tortūrīs modīs// + - Literal English Translation: Basic dictionaries about methods of tortures - dictiōnāria, n, pl, nōminātīvus, https://en.wiktionary.org/wiki/dictionarium#Latin - basibus, f, pl, (dativus) https://en.wiktionary.org/wiki/basis#Latin - http://www.perseus.tufts.edu/hopper/text?doc=Perseus:text:1999.04.0059:entry=basis - dē (+ ablātīvus), n, pl, nōminātīvus, https://en.wiktionary.org/wiki/de#Latin - tortūrīs, f, pl, ablātīvus, https://en.wiktionary.org/wiki/tortura#Latin + - http://www.perseus.tufts.edu/hopper/text?doc=Perseus:text:1999.04.0059:entry=tortura + - http://ducange.enc.sorbonne.fr/TORTURA +- methodīs, f, pl, dativus/ablātīvus fhttps://en.wiktionary.org/wiki/methodus#Latin +- modīs, m, pl, dativus/ablātīvus https://en.wiktionary.org/wiki/modus#Latin + ## [1603:44:101] /Dictiōnāria basibus dē sceleribus contrā persōnam/ - //Dictiōnāria basibus de sceleribus contra humanus// diff --git a/officinam/999999999/0/1603_1.py b/officinam/999999999/0/1603_1.py index 5a09574..47dc73b 100755 --- a/officinam/999999999/0/1603_1.py +++ b/officinam/999999999/0/1603_1.py @@ -573,6 +573,34 @@ def _referencia(self, rem: dict, index: int = 1) -> list: return paginae + def _dictionaria_necessitatibus(self, rem: dict, index: int = 1) -> list: + paginae = [] + iri = '' + comment = '' + if '#item+rem+i_qcc+is_zxxx+ix_codexfacto' in rem and \ + rem['#item+rem+i_qcc+is_zxxx+ix_codexfacto']: + temp_ix_codexfacto = rem['#item+rem+i_qcc+is_zxxx+ix_codexfacto'] + + # if temp_ix_codexfacto.find('||') == -1: + # raise ValueError( + # 'Codex {0}; bad ix_codexfacto. No ||. [{1}]'.format( + # self.de_codex, str(temp_ix_codexfacto))) + + paginae.append(str(rem)) + paginae.append('') + # parts = temp_ix_codexfacto.split('||') + # iri = parts[0] + # comment = parts[1] + # paginae.append( + # "Referēns {0}::".format(index)) + # paginae.append( + # " /reference URL/@eng-Latn:::\n link:{0}[]".format(iri)) + # paginae.append( + # " Linguae multiplīs (Scrīptum incognitō):::\n{0}".format(_pad(comment, 4))) + # # paginae.append() + + return paginae + def codex_appendici(self) -> list: """cōdex appendicī /book appendix/@eng-Latn @@ -1141,6 +1169,24 @@ def codex_praefatio(self) -> list: # resultatum.append("\nres_explanationibus\n") paginae.extend(self.res_explanationibus(meta)) + dictionaria_necessitatibus = [] + for index, item in enumerate(range(100)): + referentia_textum = self.quod_res( + '0_1603_1_7_1_4_' + str(item)) + if referentia_textum and len(referentia_textum) > 0: + # dictionaria_necessitatibus.extend(self._referencia(referentia_textum, index)) + dictionaria_necessitatibus.extend( + self._dictionaria_necessitatibus(referentia_textum, index)) + + if len(dictionaria_necessitatibus) > 0: + paginae.append('=== Dictiōnāria necessitātibus') + # paginae.append('') + # paginae.append('----') + # paginae.append(str(referentia)) + paginae.extend(dictionaria_necessitatibus) + # paginae.append('----') + paginae.append('') + # paginae.extend(descriptio_tabulae_de_lingua( # 'Lingua Anglica (Abecedarium Latinum)', # codex_praefatio_textum @@ -1850,7 +1896,7 @@ def methodi_ex_codice(self) -> list: # term.replace("\\n", "\n") referentia = [] - for index, item in enumerate(range(20)): + for index, item in enumerate(range(100)): referentia_textum = self.quod_res( '0_1603_1_7_2616_854_' + str(item)) if referentia_textum and len(referentia_textum) > 0: @@ -1975,7 +2021,7 @@ def quod_res(self, codicem: str) -> dict: return None def res_explanationibus( - self, res: dict, picturae: List[Type['CodexAnnexo']]=None) -> list: + self, res: dict, picturae: List[Type['CodexAnnexo']] = None) -> list: """rēs explānātiōnibus Trivia: @@ -2417,7 +2463,7 @@ def quod_sarcinae(self) -> List[Type[str]]: def quod_picturae( self, - numerordinatio_locali: str=None) -> List[Type['CodexAnnexo']]: + numerordinatio_locali: str = None) -> List[Type['CodexAnnexo']]: resultatum = [] for item in self.completum: if numerordinatio_locali is not None: @@ -2621,7 +2667,7 @@ def _quod_meta_titulum(self, meta): return nomen - def quod_sarcinarum(self, index: str=None): + def quod_sarcinarum(self, index: str = None): resultatum = [] for item in self.sarcina: @@ -2637,7 +2683,7 @@ def quod_sarcinarum(self, index: str=None): class DictionariaInterlinguarum: - def __init__(self, fontem_archivum: str=None): + def __init__(self, fontem_archivum: str = None): if fontem_archivum: self.D1613_1_7_fontem = fontem_archivum else: @@ -2664,8 +2710,8 @@ def _init_dictionaria(self): def formatum_nomen( self, clavem: str, - objectivum_linguam: str=None, - auxilium_linguam: list=None) -> str: + objectivum_linguam: str = None, + auxilium_linguam: list = None) -> str: # fōrmātum, f, s, (Nominative) https://en.wiktionary.org/wiki/formatus meta_langs = [ @@ -2684,8 +2730,8 @@ def formatum_nomen( def formatum_res_facto( self, res: dict, clavem: str, - objectivum_linguam: str=None, - auxilium_linguam: list=None + objectivum_linguam: str = None, + auxilium_linguam: list = None ) -> str: # fōrmātum, f, s, (Nominative) https://en.wiktionary.org/wiki/formatus # TODO: this still need improvement @@ -2693,7 +2739,7 @@ def formatum_res_facto( return res_interlingualibus_formata(res, clavem) # return res[clavem] + '[' + clavem + ']' - def imprimere(self, linguam: list=None) -> list: + def imprimere(self, linguam: list = None) -> list: """imprimere /print/@eng-Latn @DEPRECATED using methodo direct from codex @@ -2795,7 +2841,7 @@ def imprimere(self, linguam: list=None) -> list: return resultatum - def imprimereTabula(self, linguam: list=None) -> list: + def imprimereTabula(self, linguam: list = None) -> list: """imprimere /print/@eng-Latn Trivia: @@ -2906,7 +2952,7 @@ def imprimereTabula(self, linguam: list=None) -> list: def quod(self, terminum: str, # factum: str = '#item+rem+i_lat+is_latn', - clavem: str=None) -> str: + clavem: str = None) -> str: # clavem_defallo = [ # '#item+rem+i_qcc+is_zxxx+ix_hxla', # '#item+rem+i_qcc+is_zxxx+ix_csvsffxm' @@ -2935,7 +2981,7 @@ def quod(self, terminum: str, class DictionariaLinguarum: - def __init__(self, fontem_archivum: str=None): + def __init__(self, fontem_archivum: str = None): if fontem_archivum: self.D1613_1_51_fontem = fontem_archivum else: @@ -2964,7 +3010,7 @@ def _init_dictionaria(self): return datum def imprimere( - self, linguam: list=None, codex: Type['Codex']=None) -> list: + self, linguam: list = None, codex: Type['Codex'] = None) -> list: """imprimere /print/@eng-Latn Trivia: @@ -3099,7 +3145,7 @@ def imprimere( def quod(self, terminum: str, # factum: str = '#item+rem+i_lat+is_latn', - clavem: str=None): + clavem: str = None): clavem_defallo = [ '#item+rem+i_qcc+is_zxxx+ix_hxla', # '#item+rem+i_qcc+is_zxxx+ix_hxla', @@ -3844,9 +3890,9 @@ def execute_cli(self, pyargs, stdin=STDIN, stdout=sys.stdout, stderr=sys.stderr): # print('TODO') - self.pyargs=pyargs + self.pyargs = pyargs - a1603z1=A1603z1() + a1603z1 = A1603z1() # cs1603_1 = cs1603_1() @@ -3858,13 +3904,13 @@ def execute_cli(self, pyargs, stdin=STDIN, stdout=sys.stdout, # if self.pyargs.actionem_sparql: if self.pyargs.codex_de: - formatum='asciidoctor' + formatum = 'asciidoctor' if self.pyargs.ad_asciidoctor: - formatum='asciidoctor' + formatum = 'asciidoctor' # if self.pyargs.ad_markdown: # formatum = 'markdown' - codex=Codex( + codex = Codex( self.pyargs.codex_de, objectivum_linguam=self.pyargs.objectivum_linguam, auxilium_linguam=self.pyargs.auxilium_linguam, @@ -3878,7 +3924,7 @@ def execute_cli(self, pyargs, stdin=STDIN, stdout=sys.stdout, return self.output(codex.imprimere_codex_copertae()) if self.pyargs.dictionaria_numerordinatio: - dictionaria_numerordinatio=DictionariaNumerordinatio() + dictionaria_numerordinatio = DictionariaNumerordinatio() # data = ['TODO'] return self.output(dictionaria_numerordinatio.exportatum()) @@ -3887,26 +3933,26 @@ def execute_cli(self, pyargs, stdin=STDIN, stdout=sys.stdout, if stdin.isatty(): with open(self.pyargs.infile) as csv_file: - csv_reader=csv.reader( + csv_reader = csv.reader( csv_file, delimiter=args.fontem_separato) - line_count=0 + line_count = 0 for row in csv_reader: if a1603z1.is_ready(): break a1603z1.est_lineam(row) - quod_query=a1603z1.exportatum() + quod_query = a1603z1.exportatum() return self.output(quod_query) for line in sys.stdin: if a1603z1.is_ready(): break - crudum_lineam=line.replace('\n', ' ').replace('\r', '') + crudum_lineam = line.replace('\n', ' ').replace('\r', '') # TODO: deal with cases were have more than Qcode # a1603z1.est_wikidata_q(codicem) a1603z1.est_lineam(crudum_lineam) - quod_query=a1603z1.exportatum() + quod_query = a1603z1.exportatum() # tabulam_numerae = ['TODO'] # return self.output(tabulam_numerae) return self.output(quod_query) @@ -3916,7 +3962,7 @@ def execute_cli(self, pyargs, stdin=STDIN, stdout=sys.stdout, def output(self, output_collectiom): - spamwriter=csv.writer( + spamwriter = csv.writer( sys.stdout, delimiter=self.pyargs.resultatum_separato) for item in output_collectiom: # TODO: check if result is a file instead of print @@ -3932,8 +3978,8 @@ def output(self, output_collectiom): if __name__ == "__main__": - cli_2600=CLI_2600() - args=cli_2600.make_args() + cli_2600 = CLI_2600() + args = cli_2600.make_args() # pyargs.print_help() # args.execute_cli(args) diff --git a/officinam/999999999/999999_17.sh b/officinam/999999999/999999_17.sh index c8cc68b..ea1f8b0 100755 --- a/officinam/999999999/999999_17.sh +++ b/officinam/999999999/999999_17.sh @@ -149,27 +149,27 @@ file_convert_numerordinatio_de_hxltm "1603_1_99" "1" "0" # neo_codex_de_numerordinatio_pdf "1603_64_41" "0" "0" # neo_codex_de_numerordinatio_epub "1603_64_41" "0" "0" -file_download_if_necessary "$DATA_1603_44_86" "1603_44_86" "csv" "tm.hxl.csv" "hxltmcli" "1" -file_convert_numerordinatio_de_hxltm "1603_44_86" "1" "0" -file_translate_csv_de_numerordinatio_q "1603_44_86" "0" "0" -file_merge_numerordinatio_de_wiki_q "1603_44_86" "0" "0" -file_convert_tmx_de_numerordinatio11 "1603_44_86" -file_convert_tbx_de_numerordinatio11 "1603_44_86" -neo_codex_copertae_de_numerordinatio "1603_44_86" "0" "0" -neo_codex_de_numerordinatio "1603_44_86" "0" "0" -neo_codex_de_numerordinatio_epub "1603_44_86" "0" "0" -neo_codex_de_numerordinatio_pdf "1603_44_86" "0" "0" - -file_download_if_necessary "$DATA_1603_44_101" "1603_44_101" "csv" "tm.hxl.csv" "hxltmcli" "1" -file_convert_numerordinatio_de_hxltm "1603_44_101" "1" "0" -file_translate_csv_de_numerordinatio_q "1603_44_101" "0" "0" -file_merge_numerordinatio_de_wiki_q "1603_44_101" "0" "0" -file_convert_tmx_de_numerordinatio11 "1603_44_101" -file_convert_tbx_de_numerordinatio11 "1603_44_101" -neo_codex_copertae_de_numerordinatio "1603_44_101" "0" "0" -neo_codex_de_numerordinatio "1603_44_101" "0" "0" -neo_codex_de_numerordinatio_epub "1603_44_101" "0" "0" -neo_codex_de_numerordinatio_pdf "1603_44_101" "0" "0" +# file_download_if_necessary "$DATA_1603_44_86" "1603_44_86" "csv" "tm.hxl.csv" "hxltmcli" "1" +# file_convert_numerordinatio_de_hxltm "1603_44_86" "1" "0" +# file_translate_csv_de_numerordinatio_q "1603_44_86" "0" "0" +# file_merge_numerordinatio_de_wiki_q "1603_44_86" "0" "0" +# file_convert_tmx_de_numerordinatio11 "1603_44_86" +# file_convert_tbx_de_numerordinatio11 "1603_44_86" +# neo_codex_copertae_de_numerordinatio "1603_44_86" "0" "0" +# neo_codex_de_numerordinatio "1603_44_86" "0" "0" +# neo_codex_de_numerordinatio_epub "1603_44_86" "0" "0" +# neo_codex_de_numerordinatio_pdf "1603_44_86" "0" "0" + +# file_download_if_necessary "$DATA_1603_44_101" "1603_44_101" "csv" "tm.hxl.csv" "hxltmcli" "1" +# file_convert_numerordinatio_de_hxltm "1603_44_101" "1" "0" +# file_translate_csv_de_numerordinatio_q "1603_44_101" "0" "0" +# file_merge_numerordinatio_de_wiki_q "1603_44_101" "0" "0" +# file_convert_tmx_de_numerordinatio11 "1603_44_101" +# file_convert_tbx_de_numerordinatio11 "1603_44_101" +# neo_codex_copertae_de_numerordinatio "1603_44_101" "0" "0" +# neo_codex_de_numerordinatio "1603_44_101" "0" "0" +# neo_codex_de_numerordinatio_epub "1603_44_101" "0" "0" +# neo_codex_de_numerordinatio_pdf "1603_44_101" "0" "0" file_download_if_necessary "$DATA_1603_44_111" "1603_44_111" "csv" "tm.hxl.csv" "hxltmcli" "1" file_convert_numerordinatio_de_hxltm "1603_44_111" "1" "0"