Test Russian Draft Release #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Russian Draft Release | |
| on: | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| RELEASE_DATE: ${{ steps.set_release_date.outputs.RELEASE_DATE }} | |
| RELEASE_TAG: ${{ steps.set_release_tag.outputs.RELEASE_TAG }} | |
| steps: | |
| # ---------------------------------------- | |
| # Setup | |
| # ---------------------------------------- | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| # this might remove tools that are actually needed, | |
| # if set to "true" but frees about 6GB | |
| tool-cache: true | |
| # all of these default to true, but feel free to set to | |
| # "false" if necessary for your workflow | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| # keep the default swap file: the goldendict high-mem exporter needs | |
| # it on 16GB runners (upstream draft_release keeps swap too) | |
| swap-storage: false | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: 'sasanarakkha/dpd-db-sbs' | |
| ref: 'sbs-ru' | |
| submodules: 'recursive' | |
| # Fetch depth 1 for shallow clone to save disk space | |
| fetch-depth: 1 | |
| # Use PAT to allow pushing to the submodule | |
| token: ${{ secrets.GH_PAT }} | |
| - name: Remove large dirs | |
| run: | | |
| rm -rf ${{ github.workspace }}/resources/bjt/dev/* | |
| rm -rf ${{ github.workspace }}/resources/sc-data/html_text/* | |
| - name: Unzip deconstructor_output | |
| run: | | |
| cd ${{ github.workspace }}/resources/deconstructor_output | |
| tar -xzvf deconstructor_output.json.tar.gz | |
| ls -la | |
| cd ${{ github.workspace }}/ | |
| - name: Install dictzip | |
| run: sudo apt-get update && sudo apt-get install -y dictzip | |
| - name: Install Slob Linux dependencies | |
| run: sudo apt-get install -y build-essential libicu-dev icu-devtools pkg-config | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
| - name: Install dependencies | |
| run: uv sync --all-groups | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.22.2' | |
| # ---------------------------------------- | |
| # Build Database | |
| # ---------------------------------------- | |
| - name: Config for GitHub release | |
| run: uv run python scripts/rus_exporter/set_config.py --profile release_full_ru | |
| - name: Create dpd.db | |
| run: touch dpd.db | |
| - name: Build the database | |
| run: uv run python scripts/build/db_rebuild_from_tsv.py | |
| # - name: Apply Additions | |
| # run: uv run python scripts/change_in_db/apply_all_additions.py | |
| - name: Populating RU SBS tables | |
| run: uv run python scripts/build/db_rebuild_from_tsv_dps.py | |
| - name: Run initial setup script | |
| run: uv run python scripts/bash/initial_setup_run_once.py | |
| - name: Create version | |
| run: uv run python tools/version_ru.py | |
| - name: Create Inflection Templates | |
| run: uv run python db/inflections/create_inflection_templates.py | |
| - name: Create Inflection Tables | |
| run: uv run python db/inflections/generate_inflection_tables.py | |
| - name: Update Root Has Verb values | |
| run: uv run python scripts/build/root_has_verb_updater.py | |
| - name: Update Sanskrit Family Roots | |
| run: uv run python scripts/build/sanskrit_root_families_updater.py | |
| - name: Add Root Families | |
| run: uv run python db/families/family_root.py | |
| - name: Add Word Families | |
| run: uv run python db/families/family_word.py | |
| - name: Add Compound Families | |
| run: uv run python db/families/family_compound.py | |
| - name: Add Sets | |
| run: uv run python db/families/family_set.py | |
| - name: Add Idioms | |
| run: uv run python db/families/family_idiom.py | |
| - name: Add Root Families Ru | |
| run: uv run python db/families/family_root_ru.py | |
| - name: Add Word Families Ru | |
| run: uv run db/families/family_word_ru.py | |
| - name: Add Compound Families Ru | |
| run: uv run python db/families/family_compound_ru.py | |
| - name: Add Sets Ru | |
| run: uv run python db/families/family_set_ru.py | |
| - name: Add Idioms Ru | |
| run: uv run python db/families/family_idiom_ru.py | |
| - name: Families to JSON | |
| run: uv run python scripts/build/families_to_json.py | |
| - name: Families to JSON RUS | |
| run: uv run python scripts/build/families_to_json_ru.py | |
| - name: Extract Variants | |
| run: uv run python db/variants/main.py | |
| - name: Run Deconstructor | |
| run: uv run python scripts/build/deconstructor_output_add_to_db.py | |
| - name: Add api ca eva iti to inflections | |
| run: uv run python scripts/build/api_ca_eva_iti_iva_hi.py | |
| - name: Transliterate Inflections | |
| run: uv run python db/inflections/transliterate_inflections.py | |
| - name: Inflections to Headwords | |
| run: uv run python db/inflections/inflections_to_headwords.py | |
| - name: Populate Sutta table | |
| run: uv run python db/suttas/suttas_update.py | |
| - name: Add Suttas to Lookup table | |
| run: uv run python db/suttas/suttas_to_lookup.py | |
| - name: Generate Grammar data | |
| run: uv run python db/grammar/grammar_to_lookup.py | |
| - name: Lookup Variants and Spelling Mistakes | |
| run: uv run python db/lookup/spelling_mistakes.py | |
| - name: Lookup Transliterate | |
| run: uv run python db/lookup/transliterate_lookup_table.py | |
| - name: Lookup Help and Abbreviations | |
| run: uv run python db/lookup/help_abbrev_add_to_lookup.py | |
| - name: Lookup Help and Abbreviations Ru | |
| run: uv run python db/lookup/help_abbrev_add_to_lookup_ru.py | |
| - name: Add Frequency | |
| run: | | |
| go build -o frequency go_modules/frequency/main.go | |
| ./frequency | |
| - name: Run EBT Counter | |
| run: uv run python scripts/build/ebt_counter.py | |
| - name: Update Bold Definitions | |
| run: uv run python db/bold_definitions/update_bold_definitions_db.py | |
| - name: Add EPD to Lookup Table | |
| run: uv run python db/epd/epd_to_lookup.py | |
| - name: Add RPD to Lookup Table | |
| run: uv run python db/rpd/rpd_to_lookup.py | |
| - name: Add TPD to Lookup Table | |
| run: uv run python db/tpd/tpd_to_lookup.py | |
| - name: Test Dealbreakers | |
| run: uv run python scripts/build/dealbreakers.py | |
| # - name: Apply Corrections | |
| # run: uv run python scripts/change_in_db/apply_all_corrections.py | |
| # ---------------------------------------- | |
| # Download Audio Database | |
| # ---------------------------------------- | |
| - name: Download Audio Index | |
| run: uv run python audio/index_release_download.py | |
| # ---------------------------------------- | |
| # Exporter | |
| # ---------------------------------------- | |
| - name: Setup disk space checker | |
| run: | | |
| cat << 'EOF' >> $HOME/check_disk.sh | |
| #!/bin/bash | |
| echo "=== Disk space and large files (>1GB) ===" | |
| df -h | |
| du -h --max-depth=2 ${{ github.workspace }} | grep -E "^[0-9.]+[GT]" || echo "No files >1GB found" | |
| EOF | |
| chmod +x $HOME/check_disk.sh | |
| - name: Export Grammar Dictionary | |
| run: uv run python exporter/grammar_dict/grammar_dict_ru.py | |
| - name: Export GoldenDict & MDict | |
| run: | | |
| uv run python exporter/goldendict/main_ru.py | |
| echo "=== After GoldenDict export ===" | |
| $HOME/check_disk.sh | |
| - name: Export Deconstructor | |
| run: | | |
| uv run python exporter/deconstructor/deconstructor_exporter_ru.py | |
| echo "=== After Deconstructor export ===" | |
| $HOME/check_disk.sh | |
| - name: Export Kindle & ePub | |
| run: | | |
| uv run python exporter/kindle/kindle_exporter_ru.py | |
| echo "=== After Kindle export ===" | |
| $HOME/check_disk.sh | |
| - name: Cleanup Kindle Intermediate Files | |
| run: rm -rf exporter/kindle/ru_components/epub/ | |
| - name: Export Variants | |
| run: | | |
| uv run exporter/variants/variants_exporter.py | |
| echo "=== After Variants export ===" | |
| $HOME/check_disk.sh | |
| - name: Export SuttaCentral Ru | |
| run: uv run python exporter/sutta_central/sutta_central_exporter_ru.py | |
| - name: Check disk space and memory | |
| run: | | |
| free -h # Check available memory | |
| df -h # Check disk space | |
| - name: Zip GoldenDict & Mdict | |
| run: | | |
| uv run python scripts/rus_exporter/ru_zip_goldendict_mdict.py | |
| echo "=== After zipping ===" | |
| $HOME/check_disk.sh | |
| - name: Cleanup GoldenDict & MDict Intermediate Files | |
| run: | | |
| rm -rf exporter/share/ru-dpd/ | |
| rm -rf exporter/share/ru-dpd-grammar/ | |
| rm -rf exporter/share/ru-dpd-deconstructor/ | |
| rm -rf exporter/share/dpd-variants/ | |
| rm -f exporter/share/*.mdx | |
| rm -f exporter/share/*.mdd | |
| - name: Tarball DB | |
| run: | | |
| uv run python scripts/build/tarball_db.py | |
| echo "=== After tarball ===" | |
| $HOME/check_disk.sh | |
| # ---------------------------------------- | |
| # Git settings for DPD + RUS | |
| # ---------------------------------------- | |
| - name: Config for DPD + RUS | |
| run: uv run python scripts/rus_exporter/set_config.py --profile release_rus | |
| - name: Run TPR Exporter | |
| run: uv run python exporter/tpr/tpr_exporter_ru.py | |
| # ---------------------------------------- | |
| # Export DPD + RUS and DPD + SBS and DPD + TA | |
| # ---------------------------------------- | |
| - name: Export GoldenDict & MDict for DPD + RUS | |
| run: | | |
| uv run python exporter/goldendict/main.py | |
| echo "=== After GoldenDict for DPD + RUS export ===" | |
| $HOME/check_disk.sh | |
| - name: Zip GoldenDict & Mdict for DPD + RUS | |
| run: uv run python scripts/rus_exporter/zip_dpd.py --locale rus | |
| - name: Cleanup DPD + RUS Intermediate Files | |
| run: | | |
| rm -rf exporter/share/dpd/ | |
| rm -f exporter/share/*.mdx | |
| rm -f exporter/share/*.mdd | |
| - name: Config for DPD + SBS | |
| run: uv run python scripts/rus_exporter/set_config.py --profile release_sbs | |
| - name: Export GoldenDict & MDict for DPD + SBS | |
| run: | | |
| uv run python exporter/goldendict/main.py | |
| echo "=== After GoldenDict for DPD + SBS export ===" | |
| $HOME/check_disk.sh | |
| - name: Zip GoldenDict & Mdict for DPD + SBS | |
| run: uv run python scripts/rus_exporter/zip_dpd.py --locale sbs | |
| - name: Cleanup DPD + SBS Intermediate Files | |
| run: | | |
| rm -rf exporter/share/dpd/ | |
| rm -f exporter/share/*.mdx | |
| rm -f exporter/share/*.mdd | |
| - name: Config for DPD + TA | |
| run: uv run python scripts/rus_exporter/set_config.py --profile release_ta | |
| - name: Export GoldenDict & MDict for DPD + TA | |
| run: | | |
| uv run python exporter/goldendict/main_sbs.py | |
| echo "=== After GoldenDict for DPD + TA export ===" | |
| $HOME/check_disk.sh | |
| - name: Zip GoldenDict & Mdict for DPD + TA | |
| run: uv run python scripts/rus_exporter/zip_dpd.py --locale ta | |
| # ---------------------------------------- | |
| # Create Draft Release | |
| # ---------------------------------------- | |
| - name: Set Release Date | |
| id: set_release_date | |
| run: | | |
| echo "RELEASE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
| echo "RELEASE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
| - name: Set Release Tag | |
| id: set_release_tag | |
| run: | | |
| echo "RELEASE_TAG=$(uv run python scripts/build/version_print.py)" >> $GITHUB_ENV | |
| echo "RELEASE_TAG=$(uv run python scripts/build/version_print.py)" >> $GITHUB_OUTPUT | |
| - name: Create Draft Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| tag_name: ${{ env.RELEASE_TAG }} | |
| release_name: ${{ env.RELEASE_DATE }} | |
| body: | | |
| ### [Цифровой Словарь Пали](https://devamitta.github.io/dpd.rus/) | |
| DPD - это богатый возможностями словарь палийского языка на русском, который работает [онлайн](https://ru.dpdict.net) и в GoldenDict, MDict, DictTango и Kindle, или в любом другом приложении, поддерживающем форматы stardict, mdict, epub, mobi. | |
| На этой странице доступа свежая русской версия словаря в разных форматах. Последнюю версию оригинального английского DPD можно найти на [этой GitHub странице](https://github.com/digitalpalidictionary/dpd-db/releases). Там же можно почитать историю изменений и дополнений. | |
| Также доступна совмещенная версия английского DPD с русским переводом. Более подробную информацию можно найти на [этой странице.](https://devamitta.github.io/dpd.rus/dpd_rus.html) | |
| --- | |
| Цифровой Словарь Пали распространяется под лицензией [С указанием авторства-Некоммерческая-С сохранением условий версии 4.0 Международная](http://creativecommons.org/licenses/by-nc-sa/4.0/deed.ru) | |
| <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br /> | |
| draft: true | |
| prerelease: false | |
| # ---------------------------------------- | |
| # Update Release Assets | |
| # ---------------------------------------- | |
| - name: Upload Asset ru-dpd-goldendict.zip | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: exporter/share/ru-dpd-goldendict.zip | |
| asset_name: ru-dpd-goldendict.zip | |
| asset_content_type: application/zip | |
| - name: Upload Asset ru-dpd-mdict.zip | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: exporter/share/ru-dpd-mdict.zip | |
| asset_name: ru-dpd-mdict.zip | |
| asset_content_type: application/zip | |
| - name: Upload Asset ru-dpd-kindle.epub | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: exporter/share/ru-dpd-kindle.epub | |
| asset_name: ru-dpd-kindle.epub | |
| asset_content_type: application/zip | |
| - name: Upload Asset ru-dpd-kindle.mobi | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: exporter/share/ru-dpd-kindle.mobi | |
| asset_name: ru-dpd-kindle.mobi | |
| asset_content_type: application/zip | |
| - name: Upload Asset dpd.db.tar.xz | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: exporter/share/dpd.db.tar.xz | |
| asset_name: dpd.db.tar.xz | |
| asset_content_type: application/zip | |
| - name: Upload Asset pli2ru_dpd.json | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: resources/sc-data/dictionaries/simple/ru/pli2ru_dpd.json | |
| asset_name: pli2ru_dpd.json | |
| asset_content_type: application/json | |
| - name: Upload Asset dpd+sbs-goldendict.zip | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: exporter/share/dpd+sbs-goldendict.zip | |
| asset_name: dpd+sbs-goldendict.zip | |
| asset_content_type: application/zip | |
| - name: Upload Asset dpd+sbs-mdict.zip | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: exporter/share/dpd+sbs-mdict.zip | |
| asset_name: dpd+sbs-mdict.zip | |
| asset_content_type: application/zip | |
| - name: Upload Asset dpd+rus-goldendict.zip | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: exporter/share/dpd+rus-goldendict.zip | |
| asset_name: dpd+rus-goldendict.zip | |
| asset_content_type: application/zip | |
| - name: Upload Asset dpd+rus-mdict.zip | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: exporter/share/dpd+rus-mdict.zip | |
| asset_name: dpd+rus-mdict.zip | |
| asset_content_type: application/zip | |
| - name: Upload Asset dpd+ta-goldendict.zip | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: exporter/share/dpd+ta-goldendict.zip | |
| asset_name: dpd+ta-goldendict.zip | |
| asset_content_type: application/zip | |
| - name: Upload Asset dpd+ta-mdict.zip | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: exporter/share/dpd+ta-mdict.zip | |
| asset_name: dpd+ta-mdict.zip | |
| asset_content_type: application/zip |