Modify checker script for SS3
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
e5a45460f9
commit
d84d852ce6
|
@ -1,5 +1,6 @@
|
|||
# Example usage:
|
||||
# python static/src/short-story.py (curl -s https://raw.githubusercontent.com/awestover/skyspace/master/posts/misc/src/02-25-24.md | tail -n +10 | psub) (tail -n +13 content/posts/short-story-2.md | psub)
|
||||
# python static/src/short-story.py (tail -n +13 content/posts/short-story-2.md | psub) (tail -n +13 content/posts/guest-post-short-story-3.md | psub)
|
||||
|
||||
from collections import Counter
|
||||
from re import sub
|
||||
|
@ -8,7 +9,7 @@ from sys import argv
|
|||
def cnt(filename):
|
||||
c = Counter()
|
||||
with open(filename) as f:
|
||||
for w in f.read().split():
|
||||
for w in f.read().replace('--', ' ').split():
|
||||
c[sub(r'[^a-zA-Z]', '', w).lower()] += 1
|
||||
return c
|
||||
|
||||
|
|
Loading…
Reference in a new issue