aboutsummaryrefslogtreecommitdiff
path: root/pyblog
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xpyblog10
1 files changed, 3 insertions, 7 deletions
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)