Skip to content

Commit e8df386

Browse files
committed
20250427_00-release
- bug fix for filtering STDIO pipes - added a shell script wrapper to source in your .bashrc, presumable with the virtual environment activated.
1 parent 3d5f868 commit e8df386

File tree

5 files changed

+56
-2
lines changed

5 files changed

+56
-2
lines changed

.gitignore

+23-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
.LSOverride
1010

1111
# Icon must end with two \r
12-
Icon
12+
Icon
13+
1314

1415
# Thumbnails
1516
._*
@@ -229,3 +230,24 @@ pyrightconfig.json
229230

230231
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
231232

233+
.swp
234+
235+
# Swap
236+
[._]*.s[a-v][a-z]
237+
!*.svg # comment out if you don't need vector files
238+
[._]*.sw[a-p]
239+
[._]s[a-rt-v][a-z]
240+
[._]ss[a-gi-z]
241+
[._]sw[a-p]
242+
243+
# Session
244+
Session.vim
245+
Sessionx.vim
246+
247+
# Temporary
248+
.netrwhist
249+
*~
250+
# Auto-generated tag files
251+
tags
252+
# Persistent undo
253+
[._]*.un~

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Normalizes Unicode to ASCII equivalents.
1212
- [What's in This Repo:](#whats-in-this-repo)
1313
- [Contributing](#contributing)
1414
- [Support This and Other Projects I Have](#support-this-and-other-projects-i-have)
15+
- [Changelog](#changelog)
16+
- [2025-04-27](#2025-04-27)
17+
- [2025-04-26](#2025-04-26)
1518
- [License](#license)
1619

1720
## Installation
@@ -119,6 +122,16 @@ If you find this project useful, please tell others, and consider supporting my
119122

120123
Thank you!
121124

125+
126+
## Changelog
127+
128+
### 2025-04-27
129+
- bug fix for filtering STDIO pipes
130+
- added a shell script wrapper to source in your .bashrc, presumable with the virtual environment activated.
131+
132+
### 2025-04-26
133+
- Initial release.
134+
122135
## License
123136

124137
Copyright 2025

bin/cleanup-text.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,17 @@ def main():
6464
None
6565
"""
6666
parser = argparse.ArgumentParser(description="Clean Unicode quirks from text.")
67-
parser.add_argument("infile", nargs="+", help="Input file(s)")
67+
parser.add_argument("infile", nargs="*", help="Input file(s)")
6868
args = parser.parse_args()
6969

70+
if not args.infile:
71+
# No files provided: filter mode (STDIN to STDOUT)
72+
import sys
73+
raw = sys.stdin.read()
74+
cleaned = clean_text(raw)
75+
sys.stdout.write(cleaned)
76+
return
77+
7078
seen = set()
7179
for infile in args.infile:
7280
if infile in seen:

bin/uniclean

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uniclean.sh

bin/uniclean.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
# Uniclean is a wrappet fro cleanup-text.py which ensures the proper virtual environment
4+
# is activated and the script is run from the root of the project.
5+
6+
# Activate the virtual environment
7+
source "${HOME}/.bashrc"
8+
9+
# Run the cleanup-text.py script
10+
cleanup-text.py "$@"

0 commit comments

Comments
 (0)