save markdown file
This commit is contained in:
parent
44eea21cf4
commit
7e6816c391
1 changed files with 8 additions and 1 deletions
7
bb.sh
7
bb.sh
|
@ -167,6 +167,9 @@ global_variables() {
|
||||||
# Regexp matching the HTML line where to do the cut
|
# Regexp matching the HTML line where to do the cut
|
||||||
# note that slash is regexp separator so you need to prepend it with backslash
|
# note that slash is regexp separator so you need to prepend it with backslash
|
||||||
cut_line='<hr ?\/?>'
|
cut_line='<hr ?\/?>'
|
||||||
|
# save markdown file when posting with "bb post -m"
|
||||||
|
# possible values: "yes", ""
|
||||||
|
save_markdown="yes"
|
||||||
# prefix for tags/categories files
|
# prefix for tags/categories files
|
||||||
# please make sure that no other html file starts with this prefix
|
# please make sure that no other html file starts with this prefix
|
||||||
prefix_tags="tag_"
|
prefix_tags="tag_"
|
||||||
|
@ -626,7 +629,11 @@ EOF
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ "$fmt" == "md" && "$save_markdown" ]]; then
|
||||||
|
mv "$TMPFILE" "${filename%%.*}.md"
|
||||||
|
else
|
||||||
rm "$TMPFILE"
|
rm "$TMPFILE"
|
||||||
|
fi
|
||||||
chmod 644 "$filename"
|
chmod 644 "$filename"
|
||||||
echo "Posted $filename"
|
echo "Posted $filename"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue