Added better spell check precommit check, personal dictionary, finished til post
This commit is contained in:
parent
cf2d874f08
commit
6b68960e8a
7
.aspell.en.pws
Normal file
7
.aspell.en.pws
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
personal_ws-1.1 en 0
|
||||||
|
lastmod
|
||||||
|
showTableOfContents
|
||||||
|
Zig
|
||||||
|
Nim
|
||||||
|
tils
|
||||||
|
Spotify
|
@ -16,7 +16,6 @@ echo "Checking markdown files..."
|
|||||||
|
|
||||||
# Check markdown formatting with markdownlint-cli
|
# Check markdown formatting with markdownlint-cli
|
||||||
if command -v markdownlint &> /dev/null; then
|
if command -v markdownlint &> /dev/null; then
|
||||||
echo "Running markdownlint..."
|
|
||||||
markdownlint $STAGED_MD_FILES || {
|
markdownlint $STAGED_MD_FILES || {
|
||||||
echo "❌ Markdown linting failed. Fix issues or use 'git commit --no-verify' to skip."
|
echo "❌ Markdown linting failed. Fix issues or use 'git commit --no-verify' to skip."
|
||||||
exit 1
|
exit 1
|
||||||
@ -36,16 +35,26 @@ if command -v aspell &> /dev/null; then
|
|||||||
echo "Running spell check..."
|
echo "Running spell check..."
|
||||||
MISSPELLED=0
|
MISSPELLED=0
|
||||||
for file in $STAGED_MD_FILES; do
|
for file in $STAGED_MD_FILES; do
|
||||||
# Extract text, strip markdown syntax, check spelling
|
# Get list of misspelled words
|
||||||
ERRORS=$(cat "$file" | aspell list --mode=markdown --personal=./.aspell.personal 2>/dev/null | sort -u)
|
ERRORS=$(cat "$file" | aspell list --mode=markdown --lang=en --personal=./.aspell.en.pws 2>/dev/null | sort -u)
|
||||||
if [ ! -z "$ERRORS" ]; then
|
if [ ! -z "$ERRORS" ]; then
|
||||||
echo "⚠️ Possible misspellings in $file:"
|
echo "⚠️ Possible misspellings in $file:"
|
||||||
echo "$ERRORS" | sed 's/^/ /'
|
# For each misspelled word, show context
|
||||||
|
while IFS= read -r word; do
|
||||||
|
if [ ! -z "$word" ]; then
|
||||||
|
SUGGESTION=$(echo "$word" | aspell pipe --mode=markdown --lang=en --personal=./.aspell.en.pws 2>/dev/null | grep -E "^&" | cut -d: -f2 | cut -d, -f1 | sed 's/^ //')
|
||||||
|
echo " '$word' → suggestion: $SUGGESTION"
|
||||||
|
# Use grep to find lines containing the word (case-insensitive) with line numbers
|
||||||
|
grep -n -i -w --color=always "$word" "$file" | head -3 | while IFS= read -r line; do
|
||||||
|
echo " $line"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
done <<< "$ERRORS"
|
||||||
MISSPELLED=1
|
MISSPELLED=1
|
||||||
|
echo ""
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ $MISSPELLED -eq 1 ]; then
|
if [ $MISSPELLED -eq 1 ]; then
|
||||||
echo ""
|
|
||||||
echo "Review spelling errors above. Add correct terms to .aspell.personal"
|
echo "Review spelling errors above. Add correct terms to .aspell.personal"
|
||||||
echo "Use 'git commit --no-verify' to skip if needed."
|
echo "Use 'git commit --no-verify' to skip if needed."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -8,26 +8,30 @@ title: "TIL: People Are Actually Right"
|
|||||||
image: ""
|
image: ""
|
||||||
image_credit: ""
|
image_credit: ""
|
||||||
image_alt: ""
|
image_alt: ""
|
||||||
tags: ["philosophy"]
|
tags: ["philosophy", "lifestyle"]
|
||||||
---
|
---
|
||||||
|
|
||||||
# Context
|
# Context
|
||||||
|
|
||||||
As a teenager I spent a lot of my energy trying to be different. I don't know what informed my rebellious streak, I just
|
As a teenager I spent a lot of my energy trying to be different. I don't know what informed my rebellious streak, I just
|
||||||
know that once artists got over a couple thousands actve listeners on Spotify, I started to lose interest in them.
|
know that once artists got over a couple thousands active listeners on Spotify, I started to lose interest in them.
|
||||||
|
|
||||||
I'm barely old enough to think straight, and it dawned on me in a conversation with my wife, "you know, things are
|
I'm barely old enough to think straight, and it dawned on me in a conversation with my wife, and I told her, "you know,
|
||||||
probably actually bigger in Texas".
|
things are probably actually bigger in Texas".
|
||||||
|
|
||||||
## Reflection
|
## Reflection
|
||||||
|
|
||||||
I'm glad I still have a pretty strong rebel streak in me that propels me to be curious, to try the more esoteric
|
I'm glad I still have a pretty strong rebel streak in me that propels me to be curious, to try the more esoteric things
|
||||||
things. I'm a better person for having learned other niche programming languages like
|
that others ignore. I'm a better developer for having learned other niche programming languages like
|
||||||
|
|
||||||
|
- Zig
|
||||||
- Clojure
|
- Clojure
|
||||||
- Ocaml
|
- Ocaml
|
||||||
- Zig
|
|
||||||
- Gleam
|
- Gleam
|
||||||
- Nim
|
- Nim
|
||||||
|
|
||||||
(surprisigly no rust, its like mainstream in its deviance or something...)
|
(I know, surprisingly no rust, I feel like when it came on the scene it caught on too quickly...)
|
||||||
|
|
||||||
|
But, I feel like I don't often give the public consensus opinion its fair shake.
|
||||||
|
|
||||||
|
So here's to being a normie sometimes, its actually great to be like everyone else.
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
# export ASPELL_CONF="dict-dir ${pkgs.aspellDicts.en}/lib/aspell"
|
export ASPELL_CONF="dict-dir ${pkgs.aspellDicts.en}/lib/aspell"
|
||||||
|
|
||||||
# Auto-install git hooks if not already installed
|
# Auto-install git hooks if not already installed
|
||||||
if [ ! -L .git/hooks/pre-commit ]; then
|
if [ ! -L .git/hooks/pre-commit ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user