diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..90d48e8ff --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + + - package-ecosystem: "pip" + directory: "docs/" + schedule: + interval: "monthly" diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 270ab06e3..89490dd40 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -1,11 +1,26 @@ name: doc on: + pull_request: + branches: + - master + paths: + - 'docs/**' + - '.github/workflows/doc.yml' push: branches: - master paths: - 'docs/**' - '.github/workflows/doc.yml' + workflow_dispatch: # useful for testing tx pushes + workflow_call: + +permissions: + contents: write + +defaults: + run: + working-directory: docs jobs: deploy: @@ -16,16 +31,13 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Checkout Python uses: actions/setup-python@v4 with: python-version: '3.10' - name: Install Python requirements - run: pip install -r ./docs/.utils/requirements.txt + run: pip install -r requirements.txt - name: Install Transifex client run: | @@ -33,23 +45,34 @@ jobs: tar -xvzf tx-linux-amd64.tar.gz - name: Configure Transifex - run: | - python ./docs/.utils/transifex_utils.py + run: scripts/transifex_utils.py env: TX_TOKEN: ${{ secrets.TX_TOKEN }} - name: Push source files to Transifex - run: | - ./tx push + if: ${{ github.event_name == 'push' }} + run: ./tx push env: TX_TOKEN: ${{ secrets.TX_TOKEN }} - name: Pull translations from Transifex + if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'opengisch/QgisModelBaker' }} run: | ./tx pull --translations --all --minimum-perc 10 ./tx status env: TX_TOKEN: ${{ secrets.TX_TOKEN }} - - name: Build docs + - name: Build documentation + run: mkdocs build + + - uses: actions/upload-artifact@v4 + if: ${{ github.event_name == 'pull_request' }} + with: + name: docs + path: docs/site + if-no-files-found: error + + - name: Deploy to GitHub Pages + if: ${{ github.event_name == 'push' }} run: mkdocs gh-deploy --force diff --git a/.tx/config b/docs/.tx/config similarity index 100% rename from .tx/config rename to docs/.tx/config diff --git a/docs/.utils/requirements.txt b/docs/.utils/requirements.txt deleted file mode 100644 index 20b192f5d..000000000 --- a/docs/.utils/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -mkdocs-material==8.5.4 -mkdocs-static-i18n==0.31 -PyGithub==1.55 -python-dotenv==0.19.2 -python-slugify diff --git a/docs/assets/arrow_button.png b/docs/docs/assets/arrow_button.png similarity index 100% rename from docs/assets/arrow_button.png rename to docs/docs/assets/arrow_button.png diff --git a/docs/assets/baskets_dataset_manager.png b/docs/docs/assets/baskets_dataset_manager.png similarity index 100% rename from docs/assets/baskets_dataset_manager.png rename to docs/docs/assets/baskets_dataset_manager.png diff --git a/docs/assets/catalogues_form.png b/docs/docs/assets/catalogues_form.png similarity index 100% rename from docs/assets/catalogues_form.png rename to docs/docs/assets/catalogues_form.png diff --git a/docs/assets/catalogues_relationeditor.png b/docs/docs/assets/catalogues_relationeditor.png similarity index 100% rename from docs/assets/catalogues_relationeditor.png rename to docs/docs/assets/catalogues_relationeditor.png diff --git a/docs/assets/catalogues_treevalidation.png b/docs/docs/assets/catalogues_treevalidation.png similarity index 100% rename from docs/assets/catalogues_treevalidation.png rename to docs/docs/assets/catalogues_treevalidation.png diff --git a/docs/assets/catalogues_withoutvalidation.png b/docs/docs/assets/catalogues_withoutvalidation.png similarity index 100% rename from docs/assets/catalogues_withoutvalidation.png rename to docs/docs/assets/catalogues_withoutvalidation.png diff --git a/docs/assets/checkmark_button.png b/docs/docs/assets/checkmark_button.png similarity index 100% rename from docs/assets/checkmark_button.png rename to docs/docs/assets/checkmark_button.png diff --git a/docs/assets/dataset_basket_manager.png b/docs/docs/assets/dataset_basket_manager.png similarity index 100% rename from docs/assets/dataset_basket_manager.png rename to docs/docs/assets/dataset_basket_manager.png diff --git a/docs/assets/dataset_manager.png b/docs/docs/assets/dataset_manager.png similarity index 100% rename from docs/assets/dataset_manager.png rename to docs/docs/assets/dataset_manager.png diff --git a/docs/assets/dataset_relation_reference.png b/docs/docs/assets/dataset_relation_reference.png similarity index 100% rename from docs/assets/dataset_relation_reference.png rename to docs/docs/assets/dataset_relation_reference.png diff --git a/docs/assets/dataset_relation_reference_domain.png b/docs/docs/assets/dataset_relation_reference_domain.png similarity index 100% rename from docs/assets/dataset_relation_reference_domain.png rename to docs/docs/assets/dataset_relation_reference_domain.png diff --git a/docs/assets/dataset_selector.png b/docs/docs/assets/dataset_selector.png similarity index 100% rename from docs/assets/dataset_selector.png rename to docs/docs/assets/dataset_selector.png diff --git a/docs/assets/drag_arrows_button.png b/docs/docs/assets/drag_arrows_button.png similarity index 100% rename from docs/assets/drag_arrows_button.png rename to docs/docs/assets/drag_arrows_button.png diff --git a/docs/assets/extended-models-baskets-all.png b/docs/docs/assets/extended-models-baskets-all.png similarity index 100% rename from docs/assets/extended-models-baskets-all.png rename to docs/docs/assets/extended-models-baskets-all.png diff --git a/docs/assets/extended-models-baskets-relevant.png b/docs/docs/assets/extended-models-baskets-relevant.png similarity index 100% rename from docs/assets/extended-models-baskets-relevant.png rename to docs/docs/assets/extended-models-baskets-relevant.png diff --git a/docs/assets/extended-models-group.png b/docs/docs/assets/extended-models-group.png similarity index 100% rename from docs/assets/extended-models-group.png rename to docs/docs/assets/extended-models-group.png diff --git a/docs/assets/extended-models-hide.png b/docs/docs/assets/extended-models-hide.png similarity index 100% rename from docs/assets/extended-models-hide.png rename to docs/docs/assets/extended-models-hide.png diff --git a/docs/assets/extended-models-none.png b/docs/docs/assets/extended-models-none.png similarity index 100% rename from docs/assets/extended-models-none.png rename to docs/docs/assets/extended-models-none.png diff --git a/docs/assets/file_browser_button.png b/docs/docs/assets/file_browser_button.png similarity index 100% rename from docs/assets/file_browser_button.png rename to docs/docs/assets/file_browser_button.png diff --git a/docs/assets/generated_project.png b/docs/docs/assets/generated_project.png similarity index 100% rename from docs/assets/generated_project.png rename to docs/docs/assets/generated_project.png diff --git a/docs/assets/menu.png b/docs/docs/assets/menu.png similarity index 100% rename from docs/assets/menu.png rename to docs/docs/assets/menu.png diff --git a/docs/assets/meta_attributes_relation_reference.png b/docs/docs/assets/meta_attributes_relation_reference.png similarity index 100% rename from docs/assets/meta_attributes_relation_reference.png rename to docs/docs/assets/meta_attributes_relation_reference.png diff --git a/docs/assets/modelbaker_icon.svg b/docs/docs/assets/modelbaker_icon.svg similarity index 100% rename from docs/assets/modelbaker_icon.svg rename to docs/docs/assets/modelbaker_icon.svg diff --git a/docs/assets/modelbaker_logo_long.svg b/docs/docs/assets/modelbaker_logo_long.svg similarity index 100% rename from docs/assets/modelbaker_logo_long.svg rename to docs/docs/assets/modelbaker_logo_long.svg diff --git a/docs/assets/oid_physical_data.png b/docs/docs/assets/oid_physical_data.png similarity index 100% rename from docs/assets/oid_physical_data.png rename to docs/docs/assets/oid_physical_data.png diff --git a/docs/assets/oid_tid_manager.png b/docs/docs/assets/oid_tid_manager.png similarity index 100% rename from docs/assets/oid_tid_manager.png rename to docs/docs/assets/oid_tid_manager.png diff --git a/docs/assets/plus_button.png b/docs/docs/assets/plus_button.png similarity index 100% rename from docs/assets/plus_button.png rename to docs/docs/assets/plus_button.png diff --git a/docs/assets/settings_general.png b/docs/docs/assets/settings_general.png similarity index 100% rename from docs/assets/settings_general.png rename to docs/docs/assets/settings_general.png diff --git a/docs/assets/settings_ili2db.png b/docs/docs/assets/settings_ili2db.png similarity index 100% rename from docs/assets/settings_ili2db.png rename to docs/docs/assets/settings_ili2db.png diff --git a/docs/assets/settings_interlis.png b/docs/docs/assets/settings_interlis.png similarity index 100% rename from docs/assets/settings_interlis.png rename to docs/docs/assets/settings_interlis.png diff --git a/docs/assets/toolbar.png b/docs/docs/assets/toolbar.png similarity index 100% rename from docs/assets/toolbar.png rename to docs/docs/assets/toolbar.png diff --git a/docs/assets/upgrade_create.png b/docs/docs/assets/upgrade_create.png similarity index 100% rename from docs/assets/upgrade_create.png rename to docs/docs/assets/upgrade_create.png diff --git a/docs/assets/upgrade_export_data.png b/docs/docs/assets/upgrade_export_data.png similarity index 100% rename from docs/assets/upgrade_export_data.png rename to docs/docs/assets/upgrade_export_data.png diff --git a/docs/assets/upgrade_import_data.png b/docs/docs/assets/upgrade_import_data.png similarity index 100% rename from docs/assets/upgrade_import_data.png rename to docs/docs/assets/upgrade_import_data.png diff --git a/docs/assets/upgrade_import_schema.png b/docs/docs/assets/upgrade_import_schema.png similarity index 100% rename from docs/assets/upgrade_import_schema.png rename to docs/docs/assets/upgrade_import_schema.png diff --git a/docs/assets/usabilityhub_ili2dboptions.png b/docs/docs/assets/usabilityhub_ili2dboptions.png similarity index 100% rename from docs/assets/usabilityhub_ili2dboptions.png rename to docs/docs/assets/usabilityhub_ili2dboptions.png diff --git a/docs/assets/usabilityhub_legend_entry.png b/docs/docs/assets/usabilityhub_legend_entry.png similarity index 100% rename from docs/assets/usabilityhub_legend_entry.png rename to docs/docs/assets/usabilityhub_legend_entry.png diff --git a/docs/assets/usabilityhub_localrepo.png b/docs/docs/assets/usabilityhub_localrepo.png similarity index 100% rename from docs/assets/usabilityhub_localrepo.png rename to docs/docs/assets/usabilityhub_localrepo.png diff --git a/docs/assets/usabilityhub_multimodels.png b/docs/docs/assets/usabilityhub_multimodels.png similarity index 100% rename from docs/assets/usabilityhub_multimodels.png rename to docs/docs/assets/usabilityhub_multimodels.png diff --git a/docs/assets/usabilityhub_original_project.png b/docs/docs/assets/usabilityhub_original_project.png similarity index 100% rename from docs/assets/usabilityhub_original_project.png rename to docs/docs/assets/usabilityhub_original_project.png diff --git a/docs/assets/usabilityhub_qgis_legend.png b/docs/docs/assets/usabilityhub_qgis_legend.png similarity index 100% rename from docs/assets/usabilityhub_qgis_legend.png rename to docs/docs/assets/usabilityhub_qgis_legend.png diff --git a/docs/assets/usabilityhub_raw_import.png b/docs/docs/assets/usabilityhub_raw_import.png similarity index 100% rename from docs/assets/usabilityhub_raw_import.png rename to docs/docs/assets/usabilityhub_raw_import.png diff --git a/docs/assets/usabilityhub_raw_import_toml.png b/docs/docs/assets/usabilityhub_raw_import_toml.png similarity index 100% rename from docs/assets/usabilityhub_raw_import_toml.png rename to docs/docs/assets/usabilityhub_raw_import_toml.png diff --git a/docs/assets/usabilityhub_save_qml.png b/docs/docs/assets/usabilityhub_save_qml.png similarity index 100% rename from docs/assets/usabilityhub_save_qml.png rename to docs/docs/assets/usabilityhub_save_qml.png diff --git a/docs/assets/usabilityhub_style.png b/docs/docs/assets/usabilityhub_style.png similarity index 100% rename from docs/assets/usabilityhub_style.png rename to docs/docs/assets/usabilityhub_style.png diff --git a/docs/assets/usabilityhub_toml_config.png b/docs/docs/assets/usabilityhub_toml_config.png similarity index 100% rename from docs/assets/usabilityhub_toml_config.png rename to docs/docs/assets/usabilityhub_toml_config.png diff --git a/docs/assets/usabilityhub_uml.png b/docs/docs/assets/usabilityhub_uml.png similarity index 100% rename from docs/assets/usabilityhub_uml.png rename to docs/docs/assets/usabilityhub_uml.png diff --git a/docs/assets/usabilityhub_uml_modelbaker.png b/docs/docs/assets/usabilityhub_uml_modelbaker.png similarity index 100% rename from docs/assets/usabilityhub_uml_modelbaker.png rename to docs/docs/assets/usabilityhub_uml_modelbaker.png diff --git a/docs/assets/validation.png b/docs/docs/assets/validation.png similarity index 100% rename from docs/assets/validation.png rename to docs/docs/assets/validation.png diff --git a/docs/assets/validation_configfile.png b/docs/docs/assets/validation_configfile.png similarity index 100% rename from docs/assets/validation_configfile.png rename to docs/docs/assets/validation_configfile.png diff --git a/docs/assets/validation_skipgeometryerrors.png b/docs/docs/assets/validation_skipgeometryerrors.png similarity index 100% rename from docs/assets/validation_skipgeometryerrors.png rename to docs/docs/assets/validation_skipgeometryerrors.png diff --git a/docs/assets/workflow_wizard_data_import.png b/docs/docs/assets/workflow_wizard_data_import.png similarity index 100% rename from docs/assets/workflow_wizard_data_import.png rename to docs/docs/assets/workflow_wizard_data_import.png diff --git a/docs/assets/workflow_wizard_db_configuration.png b/docs/docs/assets/workflow_wizard_db_configuration.png similarity index 100% rename from docs/assets/workflow_wizard_db_configuration.png rename to docs/docs/assets/workflow_wizard_db_configuration.png diff --git a/docs/assets/workflow_wizard_default_baskets_page.png b/docs/docs/assets/workflow_wizard_default_baskets_page.png similarity index 100% rename from docs/assets/workflow_wizard_default_baskets_page.png rename to docs/docs/assets/workflow_wizard_default_baskets_page.png diff --git a/docs/assets/workflow_wizard_export_data.png b/docs/docs/assets/workflow_wizard_export_data.png similarity index 100% rename from docs/assets/workflow_wizard_export_data.png rename to docs/docs/assets/workflow_wizard_export_data.png diff --git a/docs/assets/workflow_wizard_ili2db_options.png b/docs/docs/assets/workflow_wizard_ili2db_options.png similarity index 100% rename from docs/assets/workflow_wizard_ili2db_options.png rename to docs/docs/assets/workflow_wizard_ili2db_options.png diff --git a/docs/assets/workflow_wizard_intro.png b/docs/docs/assets/workflow_wizard_intro.png similarity index 100% rename from docs/assets/workflow_wizard_intro.png rename to docs/docs/assets/workflow_wizard_intro.png diff --git a/docs/assets/workflow_wizard_project_generation.png b/docs/docs/assets/workflow_wizard_project_generation.png similarity index 100% rename from docs/assets/workflow_wizard_project_generation.png rename to docs/docs/assets/workflow_wizard_project_generation.png diff --git a/docs/assets/workflow_wizard_schema_import.png b/docs/docs/assets/workflow_wizard_schema_import.png similarity index 100% rename from docs/assets/workflow_wizard_schema_import.png rename to docs/docs/assets/workflow_wizard_schema_import.png diff --git a/docs/assets/workflow_wizard_schema_session.png b/docs/docs/assets/workflow_wizard_schema_session.png similarity index 100% rename from docs/assets/workflow_wizard_schema_session.png rename to docs/docs/assets/workflow_wizard_schema_session.png diff --git a/docs/assets/workflow_wizard_source_selection.png b/docs/docs/assets/workflow_wizard_source_selection.png similarity index 100% rename from docs/assets/workflow_wizard_source_selection.png rename to docs/docs/assets/workflow_wizard_source_selection.png diff --git a/docs/assets/workflow_wizard_tid_generator_page.png b/docs/docs/assets/workflow_wizard_tid_generator_page.png similarity index 100% rename from docs/assets/workflow_wizard_tid_generator_page.png rename to docs/docs/assets/workflow_wizard_tid_generator_page.png diff --git a/docs/background_info/basket_handling.md b/docs/docs/background_info/basket_handling.md similarity index 100% rename from docs/background_info/basket_handling.md rename to docs/docs/background_info/basket_handling.md diff --git a/docs/background_info/catalogues.md b/docs/docs/background_info/catalogues.md similarity index 100% rename from docs/background_info/catalogues.md rename to docs/docs/background_info/catalogues.md diff --git a/docs/background_info/extended_models_optimization.md b/docs/docs/background_info/extended_models_optimization.md similarity index 100% rename from docs/background_info/extended_models_optimization.md rename to docs/docs/background_info/extended_models_optimization.md diff --git a/docs/background_info/meta_attributes.md b/docs/docs/background_info/meta_attributes.md similarity index 100% rename from docs/background_info/meta_attributes.md rename to docs/docs/background_info/meta_attributes.md diff --git a/docs/background_info/oid_tid_generator.md b/docs/docs/background_info/oid_tid_generator.md similarity index 100% rename from docs/background_info/oid_tid_generator.md rename to docs/docs/background_info/oid_tid_generator.md diff --git a/docs/background_info/repositories.md b/docs/docs/background_info/repositories.md similarity index 100% rename from docs/background_info/repositories.md rename to docs/docs/background_info/repositories.md diff --git a/docs/background_info/upgrade_3_to_4.md b/docs/docs/background_info/upgrade_3_to_4.md similarity index 100% rename from docs/background_info/upgrade_3_to_4.md rename to docs/docs/background_info/upgrade_3_to_4.md diff --git a/docs/background_info/usabilityhub/modelbaker_integration.md b/docs/docs/background_info/usabilityhub/modelbaker_integration.md similarity index 100% rename from docs/background_info/usabilityhub/modelbaker_integration.md rename to docs/docs/background_info/usabilityhub/modelbaker_integration.md diff --git a/docs/background_info/usabilityhub/technical_concept.md b/docs/docs/background_info/usabilityhub/technical_concept.md similarity index 100% rename from docs/background_info/usabilityhub/technical_concept.md rename to docs/docs/background_info/usabilityhub/technical_concept.md diff --git a/docs/background_info/usabilityhub/user_guide.md b/docs/docs/background_info/usabilityhub/user_guide.md similarity index 100% rename from docs/background_info/usabilityhub/user_guide.md rename to docs/docs/background_info/usabilityhub/user_guide.md diff --git a/docs/development.md b/docs/docs/development.md similarity index 100% rename from docs/development.md rename to docs/docs/development.md diff --git a/docs/index.de.md b/docs/docs/index.de.md similarity index 100% rename from docs/index.de.md rename to docs/docs/index.de.md diff --git a/docs/index.md b/docs/docs/index.md similarity index 100% rename from docs/index.md rename to docs/docs/index.md diff --git a/docs/user_guide/export_workflow.md b/docs/docs/user_guide/export_workflow.md similarity index 100% rename from docs/user_guide/export_workflow.md rename to docs/docs/user_guide/export_workflow.md diff --git a/docs/user_guide/get_started.md b/docs/docs/user_guide/get_started.md similarity index 100% rename from docs/user_guide/get_started.md rename to docs/docs/user_guide/get_started.md diff --git a/docs/user_guide/import_workflow.md b/docs/docs/user_guide/import_workflow.md similarity index 100% rename from docs/user_guide/import_workflow.md rename to docs/docs/user_guide/import_workflow.md diff --git a/docs/user_guide/plugin_configuration.md b/docs/docs/user_guide/plugin_configuration.md similarity index 100% rename from docs/user_guide/plugin_configuration.md rename to docs/docs/user_guide/plugin_configuration.md diff --git a/docs/user_guide/validation.md b/docs/docs/user_guide/validation.md similarity index 100% rename from docs/user_guide/validation.md rename to docs/docs/user_guide/validation.md diff --git a/mkdocs.yml b/docs/mkdocs.yml similarity index 64% rename from mkdocs.yml rename to docs/mkdocs.yml index 1964ef277..ef443dbe2 100644 --- a/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,9 +1,11 @@ # Project information -site_name: QGIS Model Baker Documenation +site_name: QGIS Model Baker Documentation site_description: >- This site contains documentation about QGIS Model Baker site_url: https://opengisch.github.io/QgisModelBaker/ +docs_dir: docs + # Repository repo_name: opengisch/QgisModelBaker repo_url: https://github.com/opengisch/QgisModelBaker @@ -12,7 +14,7 @@ edit_uri: https://github.com/opengisch/QgisModelBaker/tree/master/docs/ # Theme configuration theme: name: material - custom_dir: docs/theme_overrides/ + custom_dir: theme_overrides/ features: - navigation.tabs - navigation.tabs.sticky @@ -65,25 +67,29 @@ markdown_extensions: plugins: - i18n: - default_language: en languages: - en: English - de: Deutsch - nav_translations: - de: - User Guide: Benutzerhandbuch - Get Started: Loslegen - Model and Data Import Workflow: Modell und Daten Import Workflow - Export Data Workflow: Daten Export Workflow - Validate Data: Daten Validierung - Plugin Configuration: Plugin Konfiguration - Repositories: Repositories - Basket and Dataset Handling: Dataset und Basket Handling - OID Generator: OID Generator - Optimized Projects for Extended Models : Optimierte Projekte für erweiterte Modelle - Model Baker Integration: Model Baker Integration - Technical Concept: Technisches Konzept - Catalogues and their special cases: Kataloge und ihre Spezialfälle - Meta Attributes: Metaattribute - Migrate from ili2db 3 to 4: Migration von ili2db 3 zu 4 - Development: Enwicklung + - locale: en + default: true + name: English + site_name: QGIS Model Baker Documentation + + - locale: de + name: Deutsch + site_name: QGIS Model Baker Dokumentation + nav_translations: + User Guide: Benutzerhandbuch + Get Started: Loslegen + Model and Data Import Workflow: Modell und Daten Import Workflow + Export Data Workflow: Daten Export Workflow + Validate Data: Daten Validierung + Plugin Configuration: Plugin Konfiguration + Repositories: Repositories + Basket and Dataset Handling: Dataset und Basket Handling + OID Generator: OID Generator + Optimized Projects for Extended Models : Optimierte Projekte für erweiterte Modelle + Model Baker Integration: Model Baker Integration + Technical Concept: Technisches Konzept + Catalogues and their special cases: Kataloge und ihre Spezialfälle + Meta Attributes: Metaattribute + Migrate from ili2db 3 to 4: Migration von ili2db 3 zu 4 + Development: Enwicklung diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 000000000..1dc992d61 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,3 @@ +mkdocs-material==9.5.9 +mkdocs-static-i18n==1.2.0 +python-slugify diff --git a/docs/.utils/transifex_utils.py b/docs/scripts/transifex_utils.py old mode 100644 new mode 100755 similarity index 87% rename from docs/.utils/transifex_utils.py rename to docs/scripts/transifex_utils.py index cbc6094ef..ca148f773 --- a/docs/.utils/transifex_utils.py +++ b/docs/scripts/transifex_utils.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import glob import os @@ -16,15 +18,15 @@ def create_transifex_config(): print("Start creating transifex configuration") current_dir = os.path.dirname(os.path.abspath(__file__)) - config_file = os.path.join(current_dir, "..", "..", ".tx", "config") - root = os.path.join(current_dir, "..", "..") + config_file = os.path.join(current_dir, "..", ".tx", "config") + root = os.path.join(current_dir, "..") count = 0 with open(config_file, "w") as f: f.write("[main]\n") f.write("host = https://www.transifex.com\n\n") - for file in glob.iglob(current_dir + "/../**/*.md", recursive=True): + for file in glob.iglob(current_dir + "/../docs/**/*.md", recursive=True): # Get relative path of file relative_path = os.path.relpath(file, start=root)