Created
September 26, 2025 00:30
-
-
Save okurka12/73f0f4edafc45ff4f1be005f2ba147fc to your computer and use it in GitHub Desktop.
get list of words in a python file
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
| #!/bin/bash | |
| # | |
| # sudo apt install aspell aspell-cs | |
| # | |
| # takes around 10 s to run | |
| # | |
| FILE=words.py | |
| # $!s each line except last one | |
| # $s last line | |
| # .* whole line | |
| # "\L | |
| SED_CMD=sed '$!s/.*/"\L&",/; $s/.*/"\L&"/' | |
| echo "words = {" > $FILE | |
| aspell -d cs dump master | $SED_CMD >> $FILE | |
| echo "}" >> $FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment