From 38f5c298302264edad7cdedff805ada67d6b0140 Mon Sep 17 00:00:00 2001
From: Zhiming Wang <zmwangx@gmail.com>
Date: Sat, 9 May 2015 00:34:08 -0700
Subject: 20150509 storyboard reached 0.1

Also fixed the bugs in pyblog introduced in the last revision and
tweaked the theme a bit.
---
 pyblog | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

(limited to 'pyblog')

diff --git a/pyblog b/pyblog
index f993172d..037b3693 100755
--- a/pyblog
+++ b/pyblog
@@ -310,9 +310,9 @@ def generate_index_and_feed():
     feed.title = ET.fromstring("<title>%s</title>" % feed.title_text)
     # update time will be set after everthing finishes
 
-    for name in os.listdir(POSTSDIR):
+    for name in os.listdir(os.path.join(BUILDDIR, "blog")):
         if re.match(r"^[0-9]{4}-[0-9]{2}-[0-9]{2}.*\.html", name):
-            htmlpath = os.path.join(POSTSDIR, name)
+            htmlpath = os.path.join(BUILDDIR, "blog", name)
             entry = AtomEntry()
             with open(htmlpath, encoding="utf-8") as htmlfile:
                 soup = bs4.BeautifulSoup(htmlfile.read())
@@ -501,7 +501,7 @@ def new_post(title):
     display_date = "%s %d, %d" % (date.strftime("%B"), date.day, date.year)
     title_sanitized = sanitize(title)
     filename = "%s-%s.md" % (filename_date, title_sanitized)
-    fullpath = os.path.join(postdir, filename)
+    fullpath = os.path.join(POSTSDIR, filename)
     if not os.path.isdir(POSTSDIR):
         if os.path.exists(POSTSDIR):
             os.remove(POSTSDIR)
@@ -726,10 +726,6 @@ def gen_deploy(args):
             touch(latest_post)
             sys.stderr.write("\n")
 
-    # TODO: remove temporary code
-    print("deploying...")
-    return 0
-
     generate_blog(fresh=True)
     deploy(None)
 
-- 
cgit v1.2.1