https://github.com/blocklune/markdown-posts-utilities
Utilities to batch process your markdown posts
https://github.com/blocklune/markdown-posts-utilities
markdown
Last synced: 4 months ago
JSON representation
Utilities to batch process your markdown posts
- Host: GitHub
- URL: https://github.com/blocklune/markdown-posts-utilities
- Owner: BlockLune
- License: other
- Created: 2024-04-28T07:15:54.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-06T15:34:26.000Z (over 1 year ago)
- Last Synced: 2025-03-13T23:13:50.304Z (over 1 year ago)
- Topics: markdown
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Markdown Posts Utilities
I use markdown to write my blog posts, and here are some of the scripts I've used to migrate my blogs, etc.
## `img-downloader.py`
This script download images in Markdown files and update the links.
## Reference
- [mufidu/download_imgs.py](https://gist.github.com/mufidu/f7b795f844f1ee4dc78e55123d5a398b)
### Usage
```text
usage: python img-downloader.py [-h] [--only-basename-link] [-o OUTPUT_DIR] dir [dir ...]
Download images in Markdown files and update links
positional arguments:
dir directory of markdown files
options:
-h, --help show this help message and exit
--only-basename-link by default, link will be updated to `OUTPUT_DIR/IMG_NAME`. If this flag is set, link will be updated to
`IMG_NAME` only
-o OUTPUT_DIR, --output-dir OUTPUT_DIR
directory to save images
```
- If you don't specify the `OUTPUT_DIR`, the script will create a dir based on the name of the markdown file.
- If you want to use this script to update all the image links in your [Hexo](https://hexo.io) posts, run:
```bash
python MdImgDownloader /path-to-your-hexo-project/source/_posts --only-basename-link
```
## `s3-uploader.py`
This script uploads images to a s3-compatible service, written in the help of `gpt-4o`.
## `tagenerator.py`
This script uses the power of LLMs to generate tags for blog posts.