Skip to main content

快速开始

安装

pip install xcommand

使用

xreport

xreport --help
>>>Usage: xreport [OPTIONS] COMMAND [ARGS]...

  报告相关工具,可极大提高出报告或其他模板式word文档的效率

Options:
  --help  Show this message and exit.

Commands:
  genrpt  根据word模板自动读取excel中指定数据生成报告文档
xreport genrpt --help
>>>Usage: xreport genrpt [OPTIONS]

  根据word模板自动读取excel中指定数据生成报告文档

Options:
  -t, --template FILE  必要参数,指定word模板文件地址
  -f, --file FILE      指定excel数据文件地址,与-d参数必须二选一
  -d, --dir DIRECTORY  指定excel数据文件夹地址,与-f参数必须二选一,此模式下最终的word输出文档名与excel数据文件名一致
  -o, --out PATH       指定word输出文件或文件夹地址。当选择-f参数时,默认为“./out.docx”;当选择-
                       d参数时,默认为“./out/”
  -h, --hide           隐藏运行过程中office软件窗口
  --help               Show this message and exit.

xpdf

xpdf --help
>>>Usage: xpdf [OPTIONS] COMMAND [ARGS]...

  快速合并或拆分pdf文件

Options:
  --help  Show this message and exit.

Commands:
  toimg  将单个pdf文件的每一页导出为图片
  topdf  将指定图片及指定文件夹中图片合并为一个pdf文件,文件夹中图片顺序按照文件名升序排列
xpdf toimg --help
>>>Usage: xpdf toimg [OPTIONS] PATH

  将单个pdf文件的每一页导出为图片

Options:
  -o, --out PATH           指定图片输出文件夹地址  [default: out/]
  -s, --scale FLOAT        指定输出图片的缩放比例  [default: 2]
  -p, --prefix TEXT        每张图片的文件名前缀
  -f, --format [jpeg|png]  每张图片的文件格式  [default: jpeg]
  --help                   Show this message and exit.
xpdf topdf --help
>>>Usage: xpdf topdf [OPTIONS] PATH...

  将指定图片及指定文件夹中图片合并为一个pdf文件,文件夹中图片顺序按照文件名升序排列

Options:
  -o, --out PATH               指定pdf输出文件地址  [default: out.pdf]
  -s, --size [A3|A4|A5|B4|B5]  指定pdf输出文件每一页的固定尺寸  [default: A4]
  -r, --reverse                反转页面的长和高,配合“--size”使用,添加该参数后页面为横向
  -f, --free                   自由尺寸,添加该参数后“--size”和“--reverse”无效,每一页保持源图片的形状和尺
                               寸
  --help                       Show this message and exit.

Metadata

Release files for xcommand 0.2

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

Built distribution (wheel)

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

Release files / xcommand-0.2-py3-none-any.whl

Download URL xcommand-0.2-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2e8d0868156dd7e801b7e2043536bf095b186c5cb1e8718434d7587706cbf0f
BLAKE2b-256 checksum
How to use checksums
79c543ff74592daca63b43cfb98fb28d44341beccb3faa1b4fa4c978e2b5bc38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file

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