Skip to main content

this is a description

Project description

介绍

一个小工具, 清理 markdown。

清洗你的 markdown, 只抽取将当前文件夹 markdown 里的文件所关联的图片

安装

pip install md_wash

使用场景

  1. 清理 md 关联的文件夹里多余的资源。 如 readme.md 引用了 asset/a.jpg, asset/b.jpg 而当前文件夹结构如下
- myfolder
  - asset 
   - a.jpg
   - b.jpg
   - c.txt
   - d.jpg
  - readme.md

cd myfolder
md_wash .

将会变为

- myfolder
  - asset 
   - a.jpg
   - b.jpg
  - readme.md
  1. 清理 md 关联的文件夹里多余的资源。并关联丢失的图片 如 readme.md 引用了 asset/a.jpg, asset/b.jpg 而当前文件夹结构如下
- myfolder
  - asset 
   - a.jpg
   - c.txt
   - d.jpg
  - readme.md
  - imgs
    - b.jpg
cd myfolder
md_wash . -r ./imgs

将会变为

- myfolder
  - asset 
   - a.jpg
   - b.jpg
  - readme.md

help

usage: md_wash [-h] [-o OUTPUTDIR] [-r ASSET_REPO] input

positional arguments:
  input                 指定你 md 的目录, 或者 md 文件

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUTDIR, --outputDir OUTPUTDIR
                        指定你 md output 的目录 (default: .)
  -r ASSET_REPO, --asset_repo ASSET_REPO
                        图片文件夹搜索地址,如果md 里图片路径找不到,则会通过名字在此地址查找, 可指定多个 -r(default: None)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

md_wash-0.0.24-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file md_wash-0.0.24-py2.py3-none-any.whl.

File metadata

  • Download URL: md_wash-0.0.24-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.8

File hashes

Hashes for md_wash-0.0.24-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f63dc1904ce79f191c524845a2ac7b504c81312c0842d71955b443a6a46026ef
MD5 558e35a4deb0854049d9e82231326b26
BLAKE2b-256 8b5bbf1533f54345db6e4cbb78bf8ec5078147d44b1e57fd024949bc8a4c7803

See more details on using hashes here.

Supported by

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