Skip to content

Instantly share code, notes, and snippets.

@okurka12
Created September 26, 2025 00:30
Show Gist options
  • Select an option

  • Save okurka12/73f0f4edafc45ff4f1be005f2ba147fc to your computer and use it in GitHub Desktop.

Select an option

Save okurka12/73f0f4edafc45ff4f1be005f2ba147fc to your computer and use it in GitHub Desktop.
get list of words in a python file
#!/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