full support

This commit is contained in:
19atlas 2024-01-29 19:01:35 +03:00
parent 3df61d532b
commit 0d2e1352f8
1 changed files with 60 additions and 29 deletions

View File

@ -39,8 +39,9 @@ if (year_int == ""):
print("set for file => date is",dt_string, "year is", year_int, "month is", month_int)
# month_int to mount_str for example 1 -> January
# for writing get number of month change to text
# for example 1 -> January
month_name_eng = {
"01": "January",
"02": "February",
@ -102,9 +103,9 @@ month_name_por_BR = {
}
# writing dates
writing_date_eng = month_name_eng[month_int] + year_int
writing_date_tur = month_name_tur[month_int] + year_int
writing_date_por_BR = month_name_por_BR[month_int] + year_int
writing_date_eng = month_name_eng[month_int] + " " + year_int
writing_date_tur = month_name_tur[month_int] + " " + year_int
writing_date_por_BR = month_name_por_BR[month_int] + " " + year_int
# for html id
html_id_n = short_month_name[month_int] + year_int[-2::] + "finreport"
@ -115,12 +116,40 @@ langfolder_names = ["tur", "eng", "por_BR"]
for folder in langfolder_names:
os.makedirs(folder, exist_ok=True)
print("Dirs was created\nnow please answer financial questions (maybe boring) (dont use currency only number) ")
print("Dirs was created")
LibP_total_str = str(input("LiberaPay total [0] = "))
XMR_total_str = str(input("Monero (XMR) total [0] = "))
servers_usage_str = str(input("all servers usage (don't forget that is text) = "))
totally_used_s = str(input("all money used [0] = "))
what_we_have = str(input("what we have? [0] = "))
XMR_wehave = str(input("XMR conversion rate? [0] = "))
XMR_conv_date = str(input("XMR cheking date? (Dth MMM YYYY) = "))
extramoneyis_dividedto_team = str(input("Was extra money shared among team? [The extra money has not been yet divided among the team] = "))
# if is that NULL
if (LibP_total_str == ""):
LibP_total_str = "0"
if (XMR_total_str == ""):
XMR_total_str = "0"
if (servers_usage_str == ""):
servers_usage_str = "dont used any server"
if (totally_used_s == ""):
totally_used_s = "0"
if (what_we_have == ""):
what_we_have = "0"
if (XMR_wehave == ""):
XMR_wehave = "0"
if (extramoneyis_dividedto_team == ""):
extramoneyis_dividedto_team = "The extra money has not been yet divided among the team."
remaining = str(float(what_we_have) + float(XMR_wehave)) #maybe that is make performance issue
if (remaining == ""):
print("remaining is NULL please check again...")
# output html's
# English
# for writing get number of month change to text
eng_f = open(os.path.join("eng", dt_string + ".html"), "w")
eng_f.write("<!DOCTYPE html>\n")
eng_f.write('<html lang="en">\n')
@ -131,24 +160,25 @@ eng_f.write(' <meta name="description" content="' + writing_date_eng + ' Financi
eng_f.write(' <meta name="keywords" content="~vern, vern, free software, privacy, tilde, tildeverse, costs, transparency">\n')
eng_f.write(' <link rel="preload" href="//gcdn.vern.cc/vernsite/style.css">\n')
eng_f.write(' <link rel="stylesheet" href="//gcdn.vern.cc/vernsite/style.css">\n')
eng_f.write(" <title>" + writing_date_eng + " Finansal Raporu | ~vern</title>\n")
eng_f.write(" <title>" + writing_date_eng + " | ~vern</title>\n")
eng_f.write("</head>\n")
eng_f.write("<body>\n")
eng_f.write(' <!--#include file="/eng/nav.php" -->\n')
eng_f.write(' <div class=h><h1 id=' + html_id_n + '>~vern ' + writing_date_eng + ' Finansal Raporu</h1> <a aria-hidden=true href=#'+ html_id_n +'>#'+ html_id_n+ '</a></div>\n')
eng_f.write(' <div class=h><b id=liberapay>LiberaPay (Fiat) Bağışları:</b> <a aria-hidden=true href=#liberapay>#liberapay</a></div>\n')
eng_f.write(" <p>Bu ayda LiberaPay'den toplam olarak 33.74 USD aldık.</p>\n")
eng_f.write(' <div class=h><b id=xmr>Monero (XMR) Bağışları:</b> <a aria-hidden=true href=#xmr>#xmr</a></div>\n')
eng_f.write(" <p>Bu ay toplam olarak 0.12972345 XMR aldık. Fiat'a dönüştürülmedi. Bu para, XMR zirveye ulaştığında kullanacak veya nakde çevirecek paramızın olmadığı zamanlar için tutuluyor.</p>\n")
eng_f.write(' <div class=h><b id=usage>Kullanım:</b> <a aria-hidden=true href=#usage>#usage</a></div>\n')
eng_f.write(' <p>11.38 USD Iceberg için, 21.73 USD Mythos için.</p>\n')
eng_f.write(' <p>Toplam 33.11 USD bu ay kullanıldı. bizde olan 0.63 USD + yaklaşık 18.50 USD (1 Aralık 2022 itibarıyla XMR dönüşüm oranı) = 19.13 USD kalan.</p>\n')
eng_f.write(' <p>Ekstra para henüz takım arasında paylaştırılmadı.</p>\n')
eng_f.write(' <div class=h><h1 id=' + html_id_n + '>' + writing_date_eng + ' Financial Report of ~vern</h1> <a aria-hidden=true href=#'+ html_id_n +'>#'+ html_id_n+ '</a></div>\n')
eng_f.write(' <div class=h><b id=liberapay>LiberaPay (Fiat) Donations:</b> <a aria-hidden=true href=#liberapay>#liberapay</a></div>\n')
eng_f.write(" <p>We received a total of " + LibP_total_str + " USD on LiberaPay this month.</p>\n")
eng_f.write(' <div class=h><b id=xmr>Monero (XMR) Donations:</b> <a aria-hidden=true href=#xmr>#xmr</a></div>\n')
eng_f.write(" <p>We received a total of "+ XMR_total_str +" XMR this month. It has not been converted to fiat. This money is kept for times when we have a lack of funds to use or to cash out when XMR peaks.</p>\n")
eng_f.write(' <div class=h><b id=usage>Usage:</b> <a aria-hidden=true href=#usage>#usage</a></div>\n')
eng_f.write(" <p>"+ servers_usage_str +"</p>\n")
eng_f.write(' <p>Totally '+ totally_used_s +' USD was used up this month. We have '+ what_we_have +' USD + around '+ XMR_wehave +' USD (XMR conversion rate as of '+ XMR_conv_date +') = '+ remaining +' USD remaining.</p>\n')
eng_f.write(' <p>'+ extramoneyis_dividedto_team +'</p>\n')
eng_f.write(' <!--#include file="/eng/footer.cgi" -->\n')
eng_f.write('</body>\n')
eng_f.write('</html>')
eng_f.close()
print("\e[1;31m!!!!Please send the remaining files(por_BR and tur) to our translators!!!!\e[0m")
# Turkish
tur_f = open(os.path.join("tur", dt_string + ".html"), "w")
tur_f.write("<!DOCTYPE html>\n")
@ -166,13 +196,13 @@ tur_f.write("<body>\n")
tur_f.write(' <!--#include file="/tur/nav.php" -->\n')
tur_f.write(' <div class=h><h1 id='+ html_id_n+ '>~vern ' + writing_date_tur + ' Finansal Raporu</h1> <a aria-hidden=true href=#'+ html_id_n+ '>#'+ html_id_n+ '</a></div>\n')
tur_f.write(' <div class=h><b id=liberapay>LiberaPay (Fiat) Bağışları:</b> <a aria-hidden=true href=#liberapay>#liberapay</a></div>\n')
tur_f.write(" <p>Bu ayda LiberaPay'den toplam olarak 33.74 USD aldık.</p>")
tur_f.write(" <p>Bu ayda LiberaPay'den toplam olarak "+ LibP_total_str +" USD aldık.</p>")
tur_f.write(' <div class=h><b id=xmr>Monero (XMR) Bağışları:</b> <a aria-hidden=true href=#xmr>#xmr</a></div>\n')
tur_f.write(" <p>Bu ay toplam olarak 0.12972345 XMR aldık. Fiat'a dönüştürülmedi. Bu para, XMR zirveye ulaştığında kullanacak veya nakde çevirecek paramızın olmadığı zamanlar için tutuluyor.</p>\n")
tur_f.write(" <p>Bu ay toplam olarak "+ XMR_total_str +" XMR aldık. Fiat'a dönüştürülmedi. Bu para, XMR zirveye ulaştığında kullanacak veya nakde çevirecek paramızın olmadığı zamanlar için tutuluyor.</p>\n")
tur_f.write(' <div class=h><b id=usage>Kullanım:</b> <a aria-hidden=true href=#usage>#usage</a></div>\n')
tur_f.write(' <p>11.38 USD Iceberg için, 21.73 USD Mythos için.</p>\n')
tur_f.write(' <p>Toplam 33.11 USD bu ay kullanıldı. bizde olan 0.63 USD + yaklaşık 18.50 USD (1 Aralık 2022 itibarıyla XMR dönüşüm oranı) = 19.13 USD kalan.</p>\n')
tur_f.write(' <p>Ekstra para henüz takım arasında paylaştırılmadı.</p>\n')
tur_f.write(" <p>"+ servers_usage_str +"</p>\n")
tur_f.write(' <p>Toplam '+ totally_used_s +' USD bu ay kullanıldı. bizde olan '+ what_we_have +' USD + yaklaşık '+ XMR_wehave +' USD ('+ XMR_conv_date +' itibarıyla XMR dönüşüm oranı) = '+ remaining +' USD kalan.</p>\n')
tur_f.write(' <p>'+ extramoneyis_dividedto_team +'</p>\n')
tur_f.write(' <!--#include file="/tur/footer.cgi" -->\n')
tur_f.write('</body>\n')
tur_f.write('</html>')
@ -194,16 +224,17 @@ por_BR_f.write(" <title>Reporte Financeiro de " + writing_date_por_BR + " | ~ver
por_BR_f.write("</head>\n")
por_BR_f.write("<body>\n")
por_BR_f.write(' <!--#include file="/por-BR/nav.php" -->')
por_BR_f.write(' <div class=h><h1 id='+ html_id_n+ '>Reporte Financeiro de Abril de 2023 do ~vern</h1> <a aria-hidden=true href=#'+ html_id_n+ '>#'+ html_id_n+ '</a></div>\n')
por_BR_f.write(' <div class=h><b id=liberapay>LiberaPay (dinheiro) Bağışları:</b> <a aria-hidden=true href=#liberapay>#liberapay</a></div>\n')
por_BR_f.write(" <p>Bu ayda LiberaPay'den toplam olarak 33.74 USD aldık.</p>\n")
por_BR_f.write(' <div class=h><b id=xmr>Monero (XMR) Bağışları:</b> <a aria-hidden=true href=#xmr>#xmr</a></div>\n')
por_BR_f.write(" <p>Bu ay toplam olarak 0.12972345 XMR aldık. dinheiro'a dönüştürülmedi. Bu para, XMR zirveye ulaştığında kullanacak veya nakde çevirecek paramızın olmadığı zamanlar için tutuluyor.</p>\n")
por_BR_f.write(' <div class=h><h1 id='+ html_id_n+ '>Reporte Financeiro de '+ writing_date_por_BR +' do ~vern</h1> <a aria-hidden=true href=#'+ html_id_n+ '>#'+ html_id_n+ '</a></div>\n')
por_BR_f.write(' <div class=h><b id=liberapay>LiberaPay (dinheiro):</b> <a aria-hidden=true href=#liberapay>#liberapay</a></div>\n')
por_BR_f.write(" <p>Recebemos um total de "+ LibP_total_str +" USD no LiberaPay neste mês.</p>\n")
por_BR_f.write(' <div class=h><b id=xmr>Monero (XMR):</b> <a aria-hidden=true href=#xmr>#xmr</a></div>\n')
por_BR_f.write(" <p>Recebemos um total de "+ XMR_total_str +" XMR este mês. Não foi convertido para dinheiro. Este dinheiro é guardado para quando nós temos uma emergência e para conversão quando XMR subir.</p>\n")
por_BR_f.write(' <div class=h><b id=usage>Utilização:</b> <a aria-hidden=true href=#usage>#usage</a></div>\n')
por_BR_f.write(' <p>11.38 USD Iceberg için, 21.73 USD Mythos için.</p>\n')
por_BR_f.write(' <p>Toplam 33.11 USD bu ay kullanıldı. bizde olan 0.63 USD + yaklaşık 18.50 USD (1 Aralık 2022 itibarıyla XMR dönüşüm oranı) = 19.13 USD kalan.</p>\n')
por_BR_f.write(' <p>Ekstra para henüz takım arasında paylaştırılmadı.</p>\n')
por_BR_f.write(" <p>"+ servers_usage_str +"</p>\n")
por_BR_f.write(' <p>No total, '+ totally_used_s +' USD foi utilizado neste mês. Nós temos '+ what_we_have +' USD + por volta de '+ XMR_wehave +' USD (taxa de conversão de XMR na data de '+ XMR_conv_date +') = '+ remaining +' USD restantes.</p>\n')
por_BR_f.write(' <p>'+ extramoneyis_dividedto_team +'</p>\n')
por_BR_f.write(' <!--#include file="/por-BR/footer.cgi" -->\n')
por_BR_f.write('</body>\n')
por_BR_f.write('</html>')
por_BR_f.close()