diff --git a/export.el b/export.el index a6af0c3..b7daac7 100644 --- a/export.el +++ b/export.el @@ -21,6 +21,8 @@ (setq pageurl (replace-regexp-in-string "-" "" (file-name-base))) (setq thedesc (cadar (org-collect-keywords '("OGDESC")))) (setq thecategory (cadar (org-collect-keywords '("CATEGORY")))) +(setq tumblrop "") +(setq tumblrop (cadar (org-collect-keywords '("OP")))) (setq havecomments (if (string-match (cadar (org-collect-keywords '("COMMENTS"))) "t") @@ -63,7 +65,7 @@ holding export options." (org-html--build-head info) (org-html--build-mathjax-config info) "\n" - "\n" + "\n" (let ((link-up (org-trim (plist-get info :html-link-up))) (link-home (org-trim (plist-get info :html-link-home)))) (unless (and (string= link-up "") (string= link-home "")) @@ -81,26 +83,14 @@ holding export options." (plist-get info :html-content-class))) "
\n" ;; Document title. - (when (plist-get info :with-title) - (let ((title (and (plist-get info :with-title) - (plist-get info :title))) - (subtitle (plist-get info :subtitle)) - (html5-fancy (org-html--html5-fancy-p info))) - (when title - (format - (if html5-fancy - "
\n

%s

\n%s
" - "

%s%s

\n") - (org-export-data title info) - (if subtitle - (format - (if html5-fancy - "

%s

\n" - (concat "\n" (org-html-close-tag "br" nil info) "\n" - "%s\n")) - (org-export-data subtitle info)) - ""))))) + (if (string-match "tumblr" thecategory) + (concat "

" tumblrop " on tumblr said: “" thetitle "”

\n") + (concat "

" thetitle "

\n")) + (when (string-match "tumblr" thecategory) + (concat "

" tumblrop "

\n")) "

\n" + (when (string-match "tumblr" thecategory) + (concat "

" thetitle "

\n")) "
\n" contents "
\n" diff --git a/identify.py b/identify.py index a30af69..577ea22 100644 --- a/identify.py +++ b/identify.py @@ -36,7 +36,12 @@ for file in concernedfiles: for post in node.children: if "post" in post.tags: writefile = open(filedate + ".org","w") - writefile.write("#+TITLE: " + post.heading + "\n#+REALTITLE: " + post.properties["realtitle"] + "\n#+OGDESC: " + post.properties["ogdesc"]+ "\n#+CATEGORY: " + post.properties["category"] + "\n#+COMMENTS: " + post.properties["comments"] + "\n" + post.get_body(format="raw") + "\n") + writefile.write("#+TITLE: " + post.heading + "\n#+REALTITLE: " + post.properties["realtitle"] + "\n#+OGDESC: " + post.properties["ogdesc"]+ "\n#+CATEGORY: " + post.properties["category"] + "\n#+COMMENTS: " + post.properties["comments"] + "\n") + try: + writefile.write("#+OP: " + post.properties["op"] + "\n") + except: + pass + writefile.write(post.get_body(format="raw") + "\n") try: for child in post.children: if "noexport" not in child.tags: @@ -73,7 +78,7 @@ posts = sorted(posts,key=lambda d: d["date"],reverse=True) writeindex = open("build/index.html","w") -writeindex.write("\n\n\n\n\npraze • Notes\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n
\n
\n

Notes

\n

This is the part of the site where I post long-ish-form writing I seem to have the embarrassing need to share … I guess you’d call it a blog.

\n

Posts are listed in reverse chronological order. Please be aware of posting dates – my opinions are constantly changing and evolving, and the longer ago something was written, the more likely it is that I’ll have since come to disagree with it completely … or in the case of more technical stuff, details may simply be out of date.

\n

Some of these posts were originally made on a now-deleted Dreamwidth account. Toggle the boxes to show/hide posts in the relevant category.

\n\n\n\n\n\n\n\n\n\n\n
    \n") +writeindex.write("\n\n\n\n\npraze • Notes\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n

    Notes

    \n

    This is the part of the site where I post long-ish-form writing I seem to have the embarrassing need to share … I guess you’d call it a blog.

    \n

    Posts are listed in reverse chronological order. Please be aware of posting dates – my opinions are constantly changing and evolving, and the longer ago something was written, the more likely it is that I’ll have since come to disagree with it completely … or in the case of more technical stuff, details may simply be out of date.

    \n

    Some of these posts were originally made on a now-deleted Dreamwidth account. Toggle the boxes to show/hide posts in the relevant category.

    \n\n\n\n\n\n\n\n\n\n\n\n\n
      \n") for post in posts: poststring = "
    • " + post["date"] + " "