Skip to content

Modernize - #30

Open
briangillan wants to merge 33 commits into
iphelix:masterfrom
briangillan:modernize
Open

Modernize#30
briangillan wants to merge 33 commits into
iphelix:masterfrom
briangillan:modernize

Conversation

@briangillan

Copy link
Copy Markdown

No description provided.

Hydraze and others added 30 commits June 19, 2016 00:29
Reported and fixed by philsmd here: iphelix#1
(I couldn't just pull his fix due to my modifications)
When using the --threads flag, the script doesn't end, because it is waiting for cpu_count() threads (which is never satisfied).
Fix bug when threads != cpu_count
'x' has been replaced with 'O' and the new functionality of 'x' has been added.
sn0 and others added 3 commits July 28, 2026 08:20
Update all four tools (statsgen, maskgen, policygen, rulegen) and add
packaging, with the biggest focus on rulegen.

CLI / dependencies:
- Port all tools from deprecated optparse to argparse.
- rulegen: make pyenchant optional with a clear install message instead of
  a raw ImportError; default providers aspell,myspell -> aspell,hunspell
  (enchant-2, since myspell no longer exists there).

Bug fixes:
- rulegen: word-frequency percentages summed the rules counter instead of
  the words counter.
- rulegen: extract rule 'x' collided with truncate rule "'"; a debug branch
  was a no-op string literal instead of a print.
- rulegen --password now prints the generated word and rule instead of
  silently discarding them.
- statsgen/maskgen: guard division-by-zero on empty/fully-filtered input.
- statsgen/maskgen/policygen: output files were never closed; now closed
  via try/finally.

Cleanups:
- Wrap file access in context managers; raw strings for regexes and the
  ASCII-art banners (no more invalid-escape warnings on Python 3.12+).
- Wrap each CLI in a main() so the tools install as console scripts.

Packaging:
- Add pyproject.toml (console entry points, optional [rulegen] extra),
  requirements.txt, .gitignore.
- Replace the plain-text README with a modern README.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts:
#	maskgen.py
#	policygen.py
#	rulegen.py
#	statsgen.py
@roycewilliams

Copy link
Copy Markdown

As you can see by examining the history of this repo, it has not changed in years. The de-facto successor is:

https://github.com/Hydraze/pack

@briangillan

Copy link
Copy Markdown
Author

As you can see by examining the history of this repo, it has not changed in years. The de-facto successor is:

https://github.com/Hydraze/pack

That hasn't changed in a long time either.

@roycewilliams

Copy link
Copy Markdown

That hasn't changed in a long time either.

Fair. Nevertheless it's A) what most people use now, and B) more likely to get movement from thoughtful, digestible human PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants