# HG changeset patch # User Franz Glasner # Date 1738929535 -3600 # Node ID ccbb6905914ee7d9406bb5b509ae457124fa6221 # Parent 788f14425503b4f3f084b6714d41e078ca36baca Change copyright and note genpwd in the READNE and make an official script diff -r 788f14425503 -r ccbb6905914e README.txt --- a/README.txt Fri Feb 07 12:48:26 2025 +0100 +++ b/README.txt Fri Feb 07 12:58:55 2025 +0100 @@ -19,3 +19,5 @@ Additional utilities: - :command:`py-treesum` to compute hash trees for directories. +- :command:`py-genpwd` to generate passwords of a given length and within + different character repertoires. diff -r 788f14425503 -r ccbb6905914e cutils/genpwd.py --- a/cutils/genpwd.py Fri Feb 07 12:48:26 2025 +0100 +++ b/cutils/genpwd.py Fri Feb 07 12:58:55 2025 +0100 @@ -1,9 +1,9 @@ -#!/usr/local/bin/python3 # -*- coding: utf-8 -*- -# -# @(#)$Id: //Administration/Server/Konfiguration/Dateien/_main/fmgbackup4/root/bin/genpwd.py#1 $ -# $Change: 28588 $ $DateTime: 2018/10/31 13:11:48 $ $Author: fag $ -# +# :- +# :Copyright: (c) 2018 Franz Glasner +# :Copyright: (c) 2025 Franz Glasner +# :License: BSD-3-Clause +# :- r"""Generate passwords. Usage: genpwd.py [ Options ] required_length @@ -18,16 +18,13 @@ from __future__ import (division, absolute_import, print_function) -__author__ = "Franz Glasner" - -__version__ = "0.1" - - import getopt import sys import os import base64 +from . import (__version__, __revision__) + WEB_CHARS = b"ABCDEFGHIJKLMNOPQRSTUVWYXZabcdefghijklmnopqrstuvwxyz0123456789.,-_;!()[]{}*" WEB_SAFE_CHARS = b"ABCDEFGHJKLMNPQRSTUVWYXZabcdefghijkmnopqrstuvwxyz23456789.,-_;!" diff -r 788f14425503 -r ccbb6905914e setup.cfg --- a/setup.cfg Fri Feb 07 12:48:26 2025 +0100 +++ b/setup.cfg Fri Feb 07 12:58:55 2025 +0100 @@ -49,6 +49,7 @@ [options.entry_points] console_scripts = py-dos2unix = cutils.dos2unix:main + py-genpwd = cutils.genpwd:main py-shasum = cutils.shasum:main py-treesum = cutils.treesum:main