text: remove a smartify.py script I don’t use
- ID
2c07abc- date
2026-04-15 21:04:56+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
2ceaac4- message
text: remove a smartify.py script I don't use- changed files
4 files, 1 addition, 43 deletions
Changed files
requirements.in (228) → requirements.in (216)
diff --git a/requirements.in b/requirements.in
index 533deaf..1e6dfbc 100644
--- a/requirements.in
+++ b/requirements.in
@@ -10,7 +10,6 @@ pygments # Used as 'pygmentize' in 'pp_xml.sh'
pypdf
pytest
ruff
-smartypants
sqlite-utils
tqdm
yt-dlp[default]>=2024.3.10
requirements.txt (1962) → requirements.txt (1914)
diff --git a/requirements.txt b/requirements.txt
index dbd77ac..3451af5 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -65,8 +65,6 @@ ruff==0.15.9
# via -r requirements.in
six==1.17.0
# via python-dateutil
-smartypants==2.0.2
- # via -r requirements.in
soupsieve==2.8.3
# via beautifulsoup4
sqlite-fts4==1.0.3
text/README.md (6786) → text/README.md (6469)
diff --git a/text/README.md b/text/README.md
index acce74d..4c653cd 100644
--- a/text/README.md
+++ b/text/README.md
@@ -73,10 +73,6 @@ scripts = [
"description": "prints the lines of text, but in reverse order.",
},
{
- "usage": "smartify.py [PATH]",
- "description": "apply smart typography to a text file."
- },
- {
"usage": "sumsizes.py < [PATH]",
"description": """
prints a human-readable data size for the numbers passed on stdin.
@@ -201,15 +197,6 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
</dd>
<dt>
- <a href="https://github.com/alexwlchan/scripts/blob/main/text/smartify.py">
- <code>smartify.py [PATH]</code>
- </a>
- </dt>
- <dd>
- apply smart typography to a text file.
- </dd>
-
- <dt>
<a href="https://github.com/alexwlchan/scripts/blob/main/text/sumsizes.py">
<code>sumsizes.py < [PATH]</code>
</a>
@@ -239,4 +226,4 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
open a path in Visual Studio Code
</dd>
</dl>
-<!-- [[[end]]] (sum: 78MC1MmStd) -->
\ No newline at end of file
+<!-- [[[end]]] (sum: YMjzg7VZH5) -->
\ No newline at end of file
text/smartify.py (560) → text/smartify.py (0)
diff --git a/text/smartify.py b/text/smartify.py
deleted file mode 100755
index aa44e2f..0000000
--- a/text/smartify.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python3
-"""
-Given the name of a file, apply SmartyPants to get nice typographical
-quotes etc.
-"""
-
-import sys
-
-import smartypants
-
-
-if __name__ == "__main__":
- if len(sys.argv) != 2:
- sys.exit(f"Usage: {__file__} PATH")
-
- path = sys.argv[1]
-
- with open(path) as in_file:
- old_text = in_file.read()
-
- attrs = smartypants.Attr.default | smartypants.Attr.u
- new_text = smartypants.smartypants(old_text, attrs)
-
- if new_text != old_text:
- with open(path, "w") as out_file:
- out_file.write(new_text)