Skip to content

Commit

Permalink
1603_1.py (#12, #26): --codex-in-tabulam-json, better output (still f…
Browse files Browse the repository at this point in the history
…ake data)
  • Loading branch information
fititnt committed Mar 18, 2022
1 parent e70a3bd commit 5ab0bdf
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
/officinam/**/**.tbx
/officinam/**/**.png
/officinam/**/**.jpg
/officinam/**/**.json
# /officinam/README.md
/officinam/LICENSE.md
/officinam/package.json
Expand Down
67 changes: 63 additions & 4 deletions officinam/999999999/0/1603_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2681,11 +2681,40 @@ def _columnae(self) -> list:
list: _description_
"""
res = []
res.append({'name': '#item+conceptum+codicem', 'type': 'string'})
res.append({'name': 'item__conceptum__codicem', 'type': 'string',
'title': {
'la': 'Codicem'
}})
res.append(
{'name': '#item+rem+i_qcc+is_zxxx+ix_wikiq', 'type': 'string'})
{'name': 'item__rem__i_qcc__is_zxxx__ix_wikiq', 'type': 'string',
'title': {
'la': 'Q ID'
}})
res.append(
{'name': '#item+rem+i_mul+is_zyyy', 'type': 'string'})
{'name': 'item__rem__i_mul__is_zyyy', 'type': 'string',
'title': {
'la': 'Linguae multiplīs (Scrīptum incognitō)'
}})

clavem = self.codex.codex[0].keys()
# for item in clavem:
# pass
# res.append(
# {'name': 'item__rem__terminum', 'type': 'localized',
# 'title': {
# 'la': 'Lingua Latina (Abecedarium Latinum)',
# 'en': 'Lingua Anglica (Abecedarium Latinum)',
# 'pt': 'Lingua Lusitana (Abecedarium Latinum)',
# }})
res.append(
{'name': 'item__rem__terminum', 'type': 'localized',
'title': {
'la': 'Rēs linguālibus',
'en': 'Lingual thing',
# 'en': 'Lingua Anglica (Abecedarium Latinum)',
# 'pt': 'Lingua Lusitana (Abecedarium Latinum)',
}})

return res

def dicitionaria_rebus(self) -> list:
Expand All @@ -2704,7 +2733,34 @@ def dicitionaria_rebus(self) -> list:
res.append([
'1',
'Q1',
'/salvi mundi!/@lat-Latn'
'/salvi mundi!/@lat-Latn',
{
'la': 'testum est',
'en': 'testing testing',
'pt': 'teste teste',
}
])
res.append([
'2',
'Q2',
'/test/@lat-Latn',
None
])
res.append([
'2_3',
'Q345',
'/test test test/@lat-Latn',
{
'pt': 'teste teste',
}
])
res.append([
'33',
'Q33',
'/teste em espanhol/@por-Latn',
{
'es': 'teste en espanol',
}
])
return res

Expand All @@ -2722,6 +2778,9 @@ def imprimere_textum(self) -> list:
'license': "CC0-1.0",
'sources': "https://github.com/EticaAI/multilingual-lexicography "
"+ https://www.wikidata.org/wiki/Help:Multilingual",
'description': {
'la': str(self.codex.de_codex)
},
'schema': {
'fields': self._columnae()
},
Expand Down
42 changes: 23 additions & 19 deletions officinam/999999999/999999_17.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ set -e

# time HTTPS_PROXY="socks5://127.0.0.1:9050" ./999999999/999999_17.sh

# ./999999999/0/1603_1.py --codex-de 1603_45_31 --codex-in-tabulam-json | jq
# ./999999999/0/1603_1.py --codex-de 1603_45_31 --codex-in-tabulam-json > 1603/45/31/1603_45_31.mul-Latn.tab.json
# https://commons.wikimedia.org/wiki/Data:Sandbox/EmericusPetro/Example.tab

# humanitarium_responsum_rem="https://proxy.hxlstandard.org/data/download/humanitarium-responsum-rem_hxl.csv?dest=data_edit&filter01=select&filter-label01=%23status%3E-1&select-query01-01=%23status%3E-1&filter02=cut&filter-label02=HXLated&cut-skip-untagged02=on&strip-headers=on&force=on&url=https%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F1ih3ouvx_n8W5ntNcYBqoyZ2NRMdaA0LRg5F9mGriZm4%2Fedit%23gid%3D1331879749"
DATA_1603_1_1="https://docs.google.com/spreadsheets/d/1ih3ouvx_n8W5ntNcYBqoyZ2NRMdaA0LRg5F9mGriZm4/edit#gid=2095477004"
DATA_1603_1_6="https://docs.google.com/spreadsheets/d/1ih3ouvx_n8W5ntNcYBqoyZ2NRMdaA0LRg5F9mGriZm4/edit#gid=1417450794"
Expand Down Expand Up @@ -106,15 +110,15 @@ file_convert_numerordinatio_de_hxltm "1603_1_51" "1" "0"
# neo_codex_de_numerordinatio "1603_1_7" "0" "0"
# neo_codex_de_numerordinatio_pdf "1603_1_7" "0" "0"

# file_download_if_necessary "$DATA_1603_45_31" "1603_45_31" "csv" "tm.hxl.csv" "hxltmcli" "1"
# file_convert_numerordinatio_de_hxltm "1603_45_31" "1" "0"
# file_translate_csv_de_numerordinatio_q "1603_45_31" "0" "0"
# file_merge_numerordinatio_de_wiki_q "1603_45_31" "0" "0"
# file_convert_tmx_de_numerordinatio11 "1603_45_31"
# file_convert_tbx_de_numerordinatio11 "1603_45_31"
# neo_codex_de_numerordinatio "1603_45_31" "0" "0"
# neo_codex_de_numerordinatio_epub "1603_45_31" "0" "0"
# neo_codex_de_numerordinatio_pdf "1603_45_31" "0" "0"
file_download_if_necessary "$DATA_1603_45_31" "1603_45_31" "csv" "tm.hxl.csv" "hxltmcli" "1"
file_convert_numerordinatio_de_hxltm "1603_45_31" "1" "0"
file_translate_csv_de_numerordinatio_q "1603_45_31" "0" "0"
file_merge_numerordinatio_de_wiki_q "1603_45_31" "0" "0"
file_convert_tmx_de_numerordinatio11 "1603_45_31"
file_convert_tbx_de_numerordinatio11 "1603_45_31"
neo_codex_de_numerordinatio "1603_45_31" "0" "0"
neo_codex_de_numerordinatio_epub "1603_45_31" "0" "0"
neo_codex_de_numerordinatio_pdf "1603_45_31" "0" "0"

# file_download_if_necessary "$DATA_1603_23_21" "1603_23_21" "csv" "tm.hxl.csv" "hxltmcli" "1"
# file_convert_numerordinatio_de_hxltm "1603_23_21" "1" "0"
Expand Down Expand Up @@ -147,16 +151,16 @@ file_convert_numerordinatio_de_hxltm "1603_1_51" "1" "0"
# neo_codex_de_numerordinatio "1603_45_19" "0" "0"
# neo_codex_de_numerordinatio_pdf "1603_45_19" "0" "0"

file_download_if_necessary "$DATA_1603_63_101" "1603_63_101" "csv" "tm.hxl.csv" "hxltmcli" "1"
file_convert_numerordinatio_de_hxltm "1603_63_101" "1" "0"
file_translate_csv_de_numerordinatio_q "1603_63_101" "0" "0"
file_merge_numerordinatio_de_wiki_q "1603_63_101" "0" "0"
file_convert_tmx_de_numerordinatio11 "1603_63_101"
file_convert_tbx_de_numerordinatio11 "1603_63_101"
neo_codex_copertae_de_numerordinatio "1603_63_101" "0" "0"
neo_codex_de_numerordinatio "1603_63_101" "0" "0"
neo_codex_de_numerordinatio_epub "1603_63_101" "0" "0"
neo_codex_de_numerordinatio_pdf "1603_63_101" "0" "0"
# file_download_if_necessary "$DATA_1603_63_101" "1603_63_101" "csv" "tm.hxl.csv" "hxltmcli" "1"
# file_convert_numerordinatio_de_hxltm "1603_63_101" "1" "0"
# file_translate_csv_de_numerordinatio_q "1603_63_101" "0" "0"
# file_merge_numerordinatio_de_wiki_q "1603_63_101" "0" "0"
# file_convert_tmx_de_numerordinatio11 "1603_63_101"
# file_convert_tbx_de_numerordinatio11 "1603_63_101"
# neo_codex_copertae_de_numerordinatio "1603_63_101" "0" "0"
# neo_codex_de_numerordinatio "1603_63_101" "0" "0"
# neo_codex_de_numerordinatio_epub "1603_63_101" "0" "0"
# neo_codex_de_numerordinatio_pdf "1603_63_101" "0" "0"

# file_download_if_necessary "$DATA_1603_64_41" "1603_64_41" "csv" "tm.hxl.csv" "hxltmcli" "1"
# file_convert_numerordinatio_de_hxltm "1603_64_41" "1" "0"
Expand Down

0 comments on commit 5ab0bdf

Please sign in to comment.