diff --git a/scripts/clojure/project.clj b/scripts/clojure/project.clj index 3513863..31c59e6 100644 --- a/scripts/clojure/project.clj +++ b/scripts/clojure/project.clj @@ -1,7 +1,7 @@ -(defproject zenup "0.2.0" - :description "A parser for Zenup, a markup format for poems and stories." +(defproject zendown "0.2.1" + :description "A parser for Zendown, a markup for poems and stories." :min-lein-version "2.0.0" - :url "https://github.com/facjure/zenup" + :url "https://github.com/priyatam/zendown" :warn-on-reflection false :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} @@ -10,6 +10,6 @@ [clj-yaml "0.4.0"] [markdown-clj "0.9.47"]] :plugins [[lein-environ "0.5.0"]] - :uberjar-name "zenup.jar" - :main zenup.core + :uberjar-name "zendown.jar" + :main zendown.core :profiles {:uberjar {:aot :all}}) diff --git a/scripts/clojure/src/zendown/core.clj b/scripts/clojure/src/zendown/core.clj index dd4a82a..c041ca6 100644 --- a/scripts/clojure/src/zendown/core.clj +++ b/scripts/clojure/src/zendown/core.clj @@ -1,4 +1,4 @@ -(ns zenup.core +(ns zendown.core (:refer-clojure :exclude [name parents]) (:import (java.io File)) (:require [environ.core :refer [env]] @@ -38,7 +38,7 @@ :else title)] (sanitize (str author "-" uri)))) -(defn read-zenup +(defn read "Process a zenup poem into clj ds: map of metadata :content :tags. io-type can be :resource :url :file." [io-type file] @@ -53,4 +53,4 @@ ;; Standalone app, pass filename as args (defn -main [& args] - (read-zenup :file (second args))) + (read :file (second args))) diff --git a/scripts/python/zendown.py b/scripts/python/zendown.py index 0e880a5..90ec075 100644 --- a/scripts/python/zendown.py +++ b/scripts/python/zendown.py @@ -3,7 +3,7 @@ Script to convert poems & stories written in Zenup to HTML usage: - zenup.py + zendown.py copyright: (c) 2014 by Priyatam Mudivarti @@ -18,18 +18,18 @@ import argparse -def load(path): +def load(dir_loc): """Create a dictionary for retrieving content's raw body, metadata""" data = [] - for fname in os.listdir(path): + for fname in os.listdir(dir_loc): if fname.endswith('.md') or fname.endswith('.txt'): try: - meta, raw = read_contents(path, fname) + meta, raw = read_contents(dir_loc, fname) content = { "name": meta.get("_type", "contents") + "/" + fname, "original": raw, "html": md.markdown(post['body']), - "modified_date": format_date(path + os.sep + fname) + "modified_date": format_date(dir_loc + os.sep + fname) } content.update(meta) data.append(content)