Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
priyatam committed Jul 31, 2014
1 parent 68214d9 commit 2bf8d41
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions scripts/clojure/project.clj
Original file line number Diff line number Diff line change
@@ -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"}
Expand All @@ -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}})
6 changes: 3 additions & 3 deletions scripts/clojure/src/zendown/core.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns zenup.core
(ns zendown.core
(:refer-clojure :exclude [name parents])
(:import (java.io File))
(:require [environ.core :refer [env]]
Expand Down Expand Up @@ -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]
Expand All @@ -53,4 +53,4 @@

;; Standalone app, pass filename as args
(defn -main [& args]
(read-zenup :file (second args)))
(read :file (second args)))
10 changes: 5 additions & 5 deletions scripts/python/zendown.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Script to convert poems & stories written in Zenup to HTML
usage:
zenup.py <folder-to-zenup-files>
zendown.py <folder-to-zenup-files>
copyright:
(c) 2014 by Priyatam Mudivarti
Expand All @@ -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)
Expand Down

0 comments on commit 2bf8d41

Please sign in to comment.