https://github.com/holgerbrandl/mdimgfix
A small command line tool to fix orphan images in markdown documents
https://github.com/holgerbrandl/mdimgfix
Last synced: 3 months ago
JSON representation
A small command line tool to fix orphan images in markdown documents
- Host: GitHub
- URL: https://github.com/holgerbrandl/mdimgfix
- Owner: holgerbrandl
- License: bsd-2-clause
- Created: 2019-03-22T20:45:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-22T21:46:56.000Z (over 6 years ago)
- Last Synced: 2025-03-14T20:28:38.995Z (7 months ago)
- Language: Kotlin
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Fix Image References in Markdown Files
This little tools solves a couple of problems which occur when working with images and mardkown
* Image reference was moved to markdown file in same directory --> Fix: Move the image to `._images`
* Image reference was duplicated in a markdown file in same directory --> Fix: duplicate the image to `._images`
* Image reference was remove --> Fix: remove the orphan imageChecks a couple of markdown documents for the absence/presence of images files in a directory, and removes orphane images, that is images which are not referenced in the markdown documents.
# Installation
The tool required [kscript](https://github.com/holgerbrandl/kscript) to be installed.
```bash
export PATH=/Users/brandl/projects/kotlin/kutils/tools/orphan_images:$PATHorphimg.kt --help
```
or use a url-cached copy
```bash
alias orphimg='kscript https://github.com/holgerbrandl/mdimgfix/blob/master/src/MdImgFix.kt'orphimg --help
```