incremented to v0.8.0

added markdown parsing for entries
master
endorphant 2016-05-15 01:19:44 -04:00
parent 36e1102720
commit 23ed372d64
5 changed files with 1173 additions and 9 deletions

View File

@ -416,6 +416,9 @@ thanks to everyone who reads, listens, writes, and feels.\
def write_entry(entry=os.path.join(DATA, "test.txt")):
entered = raw_input("""
"""+util.hilight("new feature!")+""" you can now use standard markdown in
your entry text! raw html is still valid, and you can mix them together.
feels will be recorded for today, """+time.strftime("%d %B %Y")+""".
if you've already started recording feels for this day, you

View File

@ -4,6 +4,7 @@ import os
import time
import subprocess
import re
import mistune
import chatter
@ -50,7 +51,6 @@ def load_files():
FILES = []
for filename in os.listdir(DATA):
filename = os.path.join(DATA, filename)
#if os.path.isfile(filename) and os.path.splitext(filename)[1] == ".txt":
if os.path.isfile(filename) and valid(filename):
FILES.append(filename)
@ -114,8 +114,8 @@ def write_entry(filename):
entry = [
"\t\t<p><a name=\""+date[0]+date[1]+date[2]+"\"></a><br /><br /></p>\n",
"\t\t<div class=\"entry\">\n",
"\t\t\t<h5><a href=\"#"+date[0]+date[1]+date[2]+"\">"+date[2]+"</a> "+MONTHS[date[1]]+" "+date[0]+"</h5>\n",
"\t\t\t<P>"
"\t\t\t<h5><a href=\"#"+date[0]+date[1]+date[2]+"\">"+date[2]+"</a> "+MONTHS[date[1]]+" "+date[0]+"</h5>\n"
#"\t\t\t<P>"
]
raw = []
@ -125,12 +125,14 @@ def write_entry(filename):
raw.append(line)
rawfile.close()
for line in raw:
entry.append(line+"\t\t\t")
if line == "\n":
entry.append("</p>\n\t\t\t<p>")
entry.append("\t\t\t"+mistune.markdown("".join(raw), escape=False, hard_wrap=False))
entry.append("</p>\n")
#for line in raw:
#entry.append(line+"\t\t\t")
#if line == "\n":
# entry.append("</p>\n\t\t\t<p>")
#entry.append("</p>\n")
entry.append("\t\t\t<p style=\"font-size:.6em; font-color:#808080; text-align: right;\"><a href=\""+"".join(date)+".html\">permalink</a></p>\n")
entry.append("\n\t\t</div>\n")

1154
bin/mistune.py 100644

File diff suppressed because it is too large Load Diff

View File

@ -415,6 +415,9 @@ thanks to everyone who reads, listens, writes, and feels.\
def write_entry(entry=os.path.join(DATA, "test.txt")):
entered = raw_input("""
"""+util.hilight("new feature!")+""" you can now use standard markdown in
your entry text! raw html is still valid, and you can mix them together.
feels will be recorded for today, """+time.strftime("%d %B %Y")+""".
if you've already started recording feels for this day, you

View File

@ -4,7 +4,6 @@ TO-DO:
-show most recent global entries on html
-command line flags:
-shortcut to most recent feels, writing entry, seeing own entry
-markdown parsing
-neighbor view takes you to individual entry listing
(goals for phase two)
@ -22,6 +21,9 @@ TO-DO:
CHANGELOG:
ver 0.8.0
-markdown parsing for entries
ver 0.7.5
-COLORFUL BANNER
-backend stuff; feedback uses sendmail, some code cleanup