Add data download view (actual download WIP)

This commit is contained in:
Kiril Kovachev 2024-10-16 11:56:44 +01:00
parent 11689fb627
commit 2ac903553c
7 changed files with 47591 additions and 2 deletions

View File

@ -110,6 +110,10 @@ def create_app(test_config=None):
lang.update_languages()
return redirect("/translations")
@app.route("/data")
def data_page():
return render_template("data.html")
# def use_english(text_id: str):
# return lang.localize(text_id, lang.JAPANESE)
app.jinja_env.globals.update(localize=lang.localize)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -31,5 +31,10 @@
"ja": "Japanese",
"add_string": "Add string",
"submit": "Submit",
"about_para": "KankenOnline is a website seeking to provide resources to pass the Kanji Kentei level 1 exam. You can search through the approximately 6,300 characters included in Kanken, as well as generate a number of study materials automatically. For example, you can generate a PDF-format exam resembling the Kanken level 1 exam, which has the goal of mirroring the real thing as closely as possible for your preparation. Additionally, a variety of information about kanji is provided, among which phonetic series, rimes/kanji phonology, radicals, inseparable kanji, character origins and etymologies."
"about_para": "KankenOnline is a website seeking to provide resources to pass the Kanji Kentei level 1 exam. You can search through the approximately 6,300 characters included in Kanken, as well as generate a number of study materials automatically. For example, you can generate a PDF-format exam resembling the Kanken level 1 exam, which has the goal of mirroring the real thing as closely as possible for your preparation. Additionally, a variety of information about kanji is provided, among which phonetic series, rimes/kanji phonology, radicals, inseparable kanji, character origins and etymologies.",
"data": "Data",
"kanji_tsv_download": "Download kanji TSV",
"kotoba_tsv_download": "Download kotoba TSV",
"ankipkg_download": "Download Anki package",
"database_download": "Download database"
}

View File

@ -31,5 +31,10 @@
"ja": "日本語",
"add_string": "翻訳語を追加",
"submit": "投入",
"about_para": "漢検オンラインとは、漢検一級合格を目当てにした資料を供用しているサイトです。ここで漢検のやく字を検索でき、いろんな勉強材を自動的に作ることができます。たとえば、漢検一級模様の試験PDFを作ることができて、本物の漢検試験に大抵該当することが目的です。さらに、色々漢字についての情報を取り集めております。諧声域かいせいいき・音韻学・部首・不可分漢字・字源・語源などがその内です。"
"about_para": "漢検オンラインとは、漢検一級合格を目当てにした資料を供用しているサイトです。ここで漢検のやく字を検索でき、いろんな勉強材を自動的に作ることができます。たとえば、漢検一級模様の試験PDFを作ることができて、本物の漢検試験に大抵該当することが目的です。さらに、色々漢字についての情報を取り集めております。諧声域かいせいいき・音韻学・部首・不可分漢字・字源・語源などがその内です。",
"data": "データ",
"kanji_tsv_download": "漢字TSVをダウンロード",
"kotoba_tsv_download": "言葉TSVをダウンロード",
"ankipkg_download": "APKGをダウンロード",
"database_download": "データーベースをダウンロード"
}

View File

@ -27,6 +27,7 @@
<li><a href="{{ url_for('about_page') }}">{{ localize("about") }}</a></li>
<li><a href="{{ url_for('indices.indices_page') }}">{{ localize("indices") }}</a></li>
<li><a href="{{ url_for('search.search_page') }}">{{ localize("search") }}</a></li>
<li><a href="{{ url_for('data_page') }}">{{ localize("data") }}</a></li>
</ul>
</nav>
<section class="content">

View File

@ -0,0 +1,12 @@
{% extends 'base.html' %}
{% block header %}
<h1>{% block title %}{{ localize("data") }}{% endblock %}</h1>
{% endblock %}
{% block content %}
<button id="kanji-tsv-download-button"> {{ localize("kanji_tsv_download") }}</button>
<button id="kotoba-tsv-download-button"> {{ localize("kotoba_tsv_download") }}</button>
<button id="ankipkg-download-button"> {{ localize("ankipkg_download") }}</button>
<button id="database-download-button"> {{ localize("database_download") }}</button>
{% endblock %}