8000 html -> md · ThinkCode/python-scripts@8138de6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8138de6

Browse files
committed
html -> md
1 parent c06e6de commit 8138de6

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

14_html_to_markdown.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Convert all html files in a single directory to markdown
2+
#
3+
# 1. Install pandoc
4+
# 2. Run the script
5+
6+
7+
8+
FILES=*.html
9+
for f in $FILES
10+
do
11+
# extension="${f##*.}"
12+
filename="${f%.*}"
13+
echo "Converting $f to $filename.md"
14+
`pandoc $f -t markdown -o ../mds/$filename.md`
15+
# uncomment this line to delete the source file.
16+
# rm $f
17+
done

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
1. **11_optimize_images_with_wand.py**: recursively grab images from a directory, then optimize them for the web
1414
1. **12_csv_split.py**: Splits a CSV file into multiple files based on command line arguments.
1515
1. **13_random_name_generator.py**: random name generator
16+
1. ***14_html_to_markdown.sh**: Convert all html files in a single directory to markdown

0 commit comments

Comments
 (0)
0