HEALTH - kaktusztea/szilankrpg GitHub Wiki

Az alábbi eszközök felügyelik, biztosítják a dokumentáció jó állapotát.

Orphan nodes

Obsidian editor Dataview, ami ellenőrzi, hogy vannak -e gazdátlan, nem linkelt oldalak.

https://github.com/kaktusztea/szilankrpg/blob/master/md/views/note_health.md



Broken markdown links checks

Jelenleg megtalálja, de filterezni a találatokat. Nyitottam bug ticketet: linkspector #85

Ezt egy Github Workflow Action ellenőrzi minden git push alkalmával: az md könyvtár összes ".md" állományát vizsgálja át a Linkspector nevű Github project segítségével. Az anchor linkeket is ellenőrzi.

szilankrpg.wiki repót is kéne vizsgálni Linkspectorral. Nyitottam rá issue ticketet.



Helyesírás ellenőrzés v1

Probléma összefoglalása:
https://gist.github.com/kaktusztea/04c56ac9d4b98a26115c2a30edb42cda

Libretranslate https://libretranslate.com

Github Workflow: Spellcheck

https://github.com/kaktusztea/szilankrpg/actions/workflows/spellcheck.yml

  • Letöltjük a latest hu_HU.dic és hu_HU.aff fájlokat, a hu_HU.aff fájl headert kicsit meg kell javítani, hogy rendes UTF-8 kódolású legyen.
  • hunspell telepítése
  • action
    • rojopolis/[email protected]
    • spell_checker: hunspell → kierőltetni, hogy ne az aspell tool-t használja

.github/workflows/spellcheck.yaml

name: Spell Check
on: [push]
jobs:
  hunspell:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Download latest Hungarian Hunspell dictionary, correct encoding in aff file
        run: |
          mkdir -p dictionaries/hu_HU
          curl -L -o dictionaries/hu_HU/hu_HU.dic https://raw.githubusercontent.com/LibreOffice/dictionaries/master/hu_HU/hu_HU.dic
          curl -L -o dictionaries/hu_HU/hu_HU.aff https://raw.githubusercontent.com/LibreOffice/dictionaries/master/hu_HU/hu_HU.aff
          sed -i '1iSET UTF-8\nFLAG UTF-8' dictionaries/hu_HU/hu_HU.aff

      - name: Install Hunspell and Hungarian directionary
        run: |
          sudo apt-get update
          sudo apt-get install -y hunspell hunspell-hu

      - name: Running spellcheck with Hunspell
        uses: rojopolis/[email protected]
        with:
          config_path: .github/spellcheck-config.yaml
          task_name: Markdown
          spell_checker: hunspell

      - name: Remove .dic and .aff files
        run: |
          rm -rf dictionaries/hu_HU

github/spellcheck-config.yaml

matrix:
- name: Markdown
  language: hu_HU
  spellcheck:
    - hunspell
  hunspell:
    d: dictionaries/hu_HU/hu_HU
  dictionary:
    encoding: utf-8
    words:
      - .github/unique_hun_words.txt
  pipeline:
  - pyspelling.filters.markdown   # Markdown formázás eltávolítása
  - pyspelling.filters.html
  sources:
  - 'md/**/*.md'
  default_encoding: utf-8

Lokális futtatás

- source venv
- pip install pyspelling
- pyspelling -c .github/spellcheck-config.yaml
curl -L -o dictionaries/hu_HU/hu_HU.dic_8859-2 https://raw.githubusercontent.com/LibreOffice/dictionaries/master/hu_HU/hu_HU.dic

curl -L -o dictionaries/hu_HU/hu_HU.aff_8859-2 https://raw.githubusercontent.com/LibreOffice/dictionaries/master/hu_HU/hu_HU.aff

iconv -f ISO-8859-2 -t UTF-8 dictionaries/hu_HU/hu_HU.aff_8859-2 > dictionaries/hu_HU/hu_HU.aff
iconv -f ISO-8859-2 -t UTF-8 dictionaries/hu_HU/hu_HU.dic_8859-2 > dictionaries/hu_HU/hu_HU.dic

hunspell -d dictionaries/hu_HU/hu_HU -i utf-8




Helyesírás ellenőrzés v0

Ez még nem aktív, de ezt a python libraryt érdemes majd használni.

import hunspellpy.hunspellpy as hunspell
h = hunspell.HunspellPy()
h.spell('működik')    # Returns if word spelleed correctly or not?
(((True)))
⚠️ **GitHub.com Fallback** ⚠️