### new-entry.sh, 2th revision ---- [blogs entry script](#basic-usage), test on debian, requires bash, python-mardown, trentm/python-markdown2. folder/files structure. @ means symlink/shortcut, \* is executable. ``` $ alias ll='ls -F --color=auto -h --group-directories-first -a|tail -n +3|column|tr -s ' \t' ' '|column -t > /tmp/file' $ ll;cat /tmp/file ./======================================================== b/ blog_index.md@ removeComment.sh im/ im_index.md@ .style.css md-sh/ .index.html style.css neoup/ index.html test@ python-markdown2-2.3.7/ not_found.html b/======================================================== 00blogdex.html 26.htm .00blogdex-old.html 28.htm 01.htm 29.htm ... ... md-sh/==================================================== bin/ 22 blogdexHead.txt index2.md templist lib/ 28 curljq.sh* index.md test-markdown.md oldmd/ 29 entry-template.txt index-md2html.sh* todo.txt 01 30 im@ json x-curljq* 10 b@ imdexHead.txt new-entry.sh* z-pad.txt ``` #### Basic Usage: jump to [Upload](#upload), [Misc](#misc) [new-entry.sh](./30-new-entry.sh.txt), [index-md2html.sh](./30-index-md2html.sh.txt) `./new-entry.sh n 'blog title quote include'; ` make new file numeric order start with 01, no file extension. Script looks for the largest number and +1 as new filename. A message appears once hit enter. This step can be skip, but the format is important, check my blog examples below. `./new-entry.sh [h|h2|i|i2] #; h or h2` makes markdown copies in /tmp, then add 2 spaces end of each line. Parsing extras option if found on third line. And convert to html, sandwhich btwn [entry-template.txt][et], in b/ or im/. `i or i2` adds entry or change existing title base on file name (#.htm) to index.md or index2.md (only one entry per line not two, if seperate by comma the other one would be replace.). *This script does not support multiple input, use for loop instead.* [et]: ./30-entry-template.txt