diff options
author | Zhiming Wang <zmwangx@gmail.com> | 2015-05-09 00:34:08 -0700 |
---|---|---|
committer | Zhiming Wang <zmwangx@gmail.com> | 2015-05-09 00:34:08 -0700 |
commit | 38f5c298302264edad7cdedff805ada67d6b0140 (patch) | |
tree | d73e123fb2197efda832f06e54777e382b2d87c5 /pyblog | |
parent | 31246ba82cf7234a75505346520bf6c9653eec67 (diff) | |
download | my_new_personal_website-38f5c298302264edad7cdedff805ada67d6b0140.tar.xz my_new_personal_website-38f5c298302264edad7cdedff805ada67d6b0140.zip |
20150509 storyboard reached 0.1
Also fixed the bugs in pyblog introduced in the last revision and
tweaked the theme a bit.
Diffstat (limited to '')
-rwxr-xr-x | pyblog | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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) |