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 hashes)

Uploaded Python 2 Python 3

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