Skip to main content

a general purpose python module.

Project description

pywander

a general purpose python module.

USAGE

user just ust the package.

pip install pywander

Console Scripts

pywander_file

扫描该文件夹下的某种类型文件

pywander_file scan --help
pywander_file scan --filetype=py$ pywander

扫描当前文件夹下的pywander文件夹下的所有py结尾的python脚本文件。

执行该文件夹下的所有python脚本

pywander_file run --help
pywander_file run scripts

执行当前文件夹下的scripts文件夹下的所有python脚本文件,有文件hash跟踪改动的优化设计,假设某个python脚本为test.py,输出内容在test.py.out文件那里,可能的错误信息在test.py.err文件那里。

pywander_image

convert image

pywander_image convert --help

将某个pdf图片文件转成png格式

pywander_image.exe convert .\book_cover.pdf   

将某个svgz通过inkscape转成pdf格式

pywander_image.exe convert --imgformat pdf .\f11-08_tc_big.svgz 

建议安装inkscape到默认的 C:\\Program Files 那里,那样命令行工具将可以直接调用,否则你可能需要配置PATH环境变量。

resize image

pywander_image resize --help

pywander_text

猜测某个乱码字符串的可能正确编码

pywander_text encoding 濉旂撼鎵樻媺闆呯殑钁ぜ

将某一字符串转成拼音并用某个连接符号连接起来

pywander_text pinyin 塔纳托拉雅的葬礼

选择连接符号

pywander_text pinyin 塔纳托拉雅的葬礼 --hyphen=_

利用pandoc进行文档转换

专门对tex输出epub进行了一些优化

pywander_text.exe  convert main.tex

对当前文件夹下的某个文件执行某个脚本处理动作

你可以在当前文件夹下的pywander.json 来配置 PROCESS_TEXT: [] 字段来设计一系列的文本处理步骤 其内的单个动作配置如下: {"OPERATION": "remove_english_line", } 该动作可以添加其他值作为目标函数的可选参数

pywander_text.exe process test.txt

TEST

local environment run

pip install -e .

and run

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywander_text-0.1.0.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pywander_text-0.1.0-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file pywander_text-0.1.0.tar.gz.

File metadata

  • Download URL: pywander_text-0.1.0.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pywander_text-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f49ddf640b00b71043c2b2f5998172cd3db8626a519d2332aa5133742b4dc6ae
MD5 f57bf57b30cea8683630e5f9912858bd
BLAKE2b-256 bbb50c0168b00327162017d2024e44d626f21f50853b80d22b1f73092e71d8aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for pywander_text-0.1.0.tar.gz:

Publisher: python-publish.yml on a358003542/pywander-text

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pywander_text-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pywander_text-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pywander_text-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e4ef16520c045cf3cd1cf30f712e69ec7887520625b133896e9ea1818bd3b89
MD5 fd2900c14d6e4e1502655dfa309a1cb3
BLAKE2b-256 8b6217eb2bf463b8d93782d77ebf045984ca4e12c75c3ffbb456b6451fe73654

See more details on using hashes here.

Provenance

The following attestation bundles were made for pywander_text-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on a358003542/pywander-text

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page