Skip to main content

norepeat

The norepeat package contains some magical function, it's my personal tools collection...

Installation

You can install the Real Python Feed Reader from PyPI:

pip install norepeat

The norepeat is supported on Python 3 and above.

norepeat package (DEBUG)

https://pypi.org/project/norepeat/1.0.0/

TEST:

PROD:

  • python3 setup.py sdist bdist_wheel

  • twine upload dist/*

DOC

1.Count a project sum of codes number

norepeat count_code_nums -h
usage: count_code_nums [-h] [-p PATH] [-t TYPE]

    Count summary codes lines/统计代码行数
    Eg:
        norepeat count_code_nums -p=project -t=py


optional arguments:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  file/directory path
  -t TYPE, --type TYPE  file type

2.Generate markdown menu automatically

norepeat gen_markdown_menu -h
usage: gen_markdown_menu [-h] [-n NAME] [-p PREFIX]

    Generate markdown Menu(TOC(Table of Content)) automatically 生成Markdown TOC目录结构, 对###三层可以增加自动序号
    Eg:
        norepeat gen_markdown_menu -n=sample.md
        OR

    then you will get a sample_back.md with contents
    sample_back.md is new generated file including menu


optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  file name
  -p PREFIX, --prefix PREFIX
                        auto generate num prefix for menu

3.Merge all dirs files to a same directory named 'merge'

norepeat merge_dir -h
usage: merge_dir [-h] [-p PATH]

    Merge all dirs files to a same directory named 'merge'
    合并迭代所有目录文件夹, 将全部文件合并到merge文件夹下
    Eg:
        norepeat split_dir -p=test
        before:
            dir
                txt
                    txt2
                        c.txt
                    a.txt
                    b.txt
                png
                    a.png
                    b.png
        after:
            dir
                merge
                    a.txt
                    b.txt
                    c.txt
                    a.png
                    b.png


optional arguments:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  dir path

4.Split files to a new directory for same type

norepeat split_dir -h
usage: split_dir [-h] [-p PATH] [-r REMOVE]

    Split files to a new directory for same type 根据文件类型分离目录下文件到不同文件夹
    Eg:
        norepeat split_dir -p=test
        before:
            dir
                a.txt
                b.txt
                a.png
                b.png
        after:
            dir
                txt
                    a.txt
                    b.txt
                png
                    a.png
                    b.png


optional arguments:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  dir path
  -r REMOVE, --remove REMOVE
                        if remove src files, default is No

5.Rename multiple file names

norepeat rename_file -h
usage: rename_file [-h] [-d DIR_PATH] [-p PREFIX] [-s SUFFIX] [-r REMOVE]
                   [-i ID]

    Rename multiple file names 批量重命名
    Eg:
        norepeat rename_file -d=test -p=test -s=end -r=true -i=true
        before:
            dir
                a.txt
                b.txt
        after:
            dir
                testaend1.txt
                testbend1.txt



optional arguments:
  -h, --help            show this help message and exit
  -d DIR_PATH, --dir_path DIR_PATH
                        directory path
  -p PREFIX, --prefix PREFIX
                        new file name prefix
  -s SUFFIX, --suffix SUFFIX
                        new file name suffix
  -r REMOVE, --remove REMOVE
                        new file name with removing src name
  -i ID, --id ID        new file name need id

6.Download http image

norepeat download_img -h
usage: download_img [-h] [-u URL] [-n NAME]

    Download image to current directory 下载网络图片到本地目录
    Eg:
        norepeat download_img -u=https://test.png -n=test.png


optional arguments:
  -h, --help            show this help message and exit
  -u URL, --url URL     img url
  -n NAME, --name NAME  image name

7.Compare dirs files

norepeat diff_file -h
usage: diff_file [-h] [-p1 PATH1] [-p2 PATH2] [-d1 DIR_PATH1] [-d2 DIR_PATH2]

    Compare two files
    对比两个文件差异
    Eg:
        norepeat diff_file -p1=a.md -p2=b.md
    Compare all files that have same name in two dirs including recursive subdirs
    对比迭代所有文件夹下重名文件内容差异(可以跨文件目录搜索文件, 打包输出到一个result文件)
    Eg:
        norepeat diff_file -d1=python-norepeat/norepeat/ -d2=python-norepeat/test/



optional arguments:
  -h, --help            show this help message and exit
  -p1 PATH1, --path1 PATH1
                        file path
  -p2 PATH2, --path2 PATH2
                        file path
  -d1 DIR_PATH1, --dir_path1 DIR_PATH1
                        dir path
  -d2 DIR_PATH2, --dir_path2 DIR_PATH2
                        dir path

result:

8.Spell check

norepeat spell_check -h
usage: spell_check [-h] [-p PATH]

    It's used to check en-US word typo in project
    spell-check用来检查项目中英文单词拼写问题
    Eg:
        norepeat spell_check -p=test
    output:
        spell_check_ignore.txt : ignore checking words
        spell_check_wrong.txt : wrong spell words


optional arguments:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  directory path

Metadata

Release files for norepeat 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for norepeat 1.1.0
File Size Uploaded Provenance
norepeat-1.1.0.tar.gz 11.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for norepeat 1.1.0
File Interpreter ABI Platform
norepeat-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.5 kB

Release files / norepeat-1.1.0.tar.gz

Download URL norepeat-1.1.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0373b78b777f4ec4cfafff66788642c182a1a0f0c0ccc8f8aeeda85e2e1902d0
BLAKE2b-256 checksum
How to use checksums
22531b30f4a457d509e198f4bb68eab37bf9c9720fed7aa3ee7db41afb121de5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

Release files / norepeat-1.1.0-py3-none-any.whl

Download URL norepeat-1.1.0-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7d4cc4c4bce8da6956c437d926ae038eb7262ad962f8775fd01a79e35fa040f
BLAKE2b-256 checksum
How to use checksums
24c3deb3020e1d226d46cf2eb893ac4adfc65872e7e1f0c7f6eceba425157a8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

Security for norepeat 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page