Skip to content

mwigakki/mdhelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdhelper

This repository is a command-line tool that helps you quickly organize the images referenced in the markdown file.

本仓库是一个帮助你快速整理markdown文件中所引用图片的命令行工具。

The currently supported functions are:

  • Tidy: Clean up image files in the img directory that have not been referenced by any markdowns.
  • Pack: Automatically add the referenced image files to the tar or zip package file when packaging the markdown file.
  • Move: Automatically move the image files referenced by the markdown file to the img directory of the target location when moving it. (To be completed)

目前支持的功能有:

  • tidy:清理img目录下未被任何markdown引用的图片文件。
  • pack:打包markdown文件时自动将其引用的图片文件加入到tar或zip打包文件中。
  • move:移动markdown文件时自动将其引用的图片文件移动到目标位置的img目录中。(待完成)

example:

$ go run main.go tidy example -r
example : 1 redundant images in directory img that have not been referenced by any md files
├── folder1
│   ├── subfolder1 : 1 redundant images in directory img that have not been referenced by any md files
│   └── subfolder2
│       ├── subsubfolder1
│       │   ├── 12
│       │   │   ├── 45
│       │   │   │   ├── 13
│       │   │   │   └── 55
│       │   │   └── 56
│       │   │       ├── 67
│       │   │       └── 78
│       │   └── 23
│       └── subsubfolder2
│           └── 34
└── folder2 : 1 redundant images in directory img that have not been referenced by any md files
    └── subfolder1

文件 example/test.md 第 7 行的引用图片无法正常解析,请检查。引用原文为:![up2](up2.gif)
文件 example/test.md 第 10 行的引用图片 example/img/noExists.gif 未找到,请检查
文件 example/folder2/subtest1.md 第 8 行的引用图片无法正常解析,请检查。引用原文为:![uwwp](qweqweqwqe.gif)

暂未执行文件删除功能,请确认后使用 mdhelper tidy example -r -d 进行清理

About

A command-line tool that helps you quickly organize the images referenced in the markdown files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages