Update hy to 0.10.0
This commit is contained in:
parent
e0158bc47b
commit
2e6dcfd74b
3 changed files with 20 additions and 19 deletions
10
hypo.hy
10
hypo.hy
|
@ -90,17 +90,17 @@ If no lexer is found fallback onto the text lexer."
|
|||
(let ((content (get (.commit-file repo ref filename) "data"))
|
||||
(lexer (get-lexer filename content))
|
||||
(formatter (HtmlFormatter))
|
||||
(args {"file" filename "hash" hash}))
|
||||
(kwargs {"file" filename "hash" hash}))
|
||||
(.update
|
||||
args (if (in (get (os.path.splitext filename) 1)
|
||||
kwargs (if (in (get (os.path.splitext filename) 1)
|
||||
[".png" ".jpg" ".jpeg" ".gif"])
|
||||
{"content" (kwapply (render.image)
|
||||
{"content" (apply render.image []
|
||||
{"name" filename
|
||||
"hash" hash})
|
||||
"style" ""}
|
||||
{"content" (highlight content lexer formatter)
|
||||
"style" (formatter.get-style-defs ".highlight")}))
|
||||
(kwapply (render.main) args))
|
||||
(apply render.main [] kwargs))
|
||||
""))
|
||||
|
||||
(defun get-html [self name]
|
||||
|
@ -129,7 +129,7 @@ If no lexer is found fallback onto the text lexer."
|
|||
(.write f (web.data)))
|
||||
(let ((repo (Gittle.init dirname)))
|
||||
(.stage repo [(str name)])
|
||||
(kwapply (repo.commit)
|
||||
(apply repo.commit []
|
||||
{"name" "Hypo"
|
||||
"email" "hypo@ryuslash.org"
|
||||
"message" "Initial commit"}))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
hy==0.9.12
|
||||
hy==0.10.0
|
||||
gittle==0.2.2
|
||||
pycommand==0.1.0
|
||||
web.py==0.37
|
||||
|
|
|
@ -25,11 +25,12 @@
|
|||
(sys.exit 1)))
|
||||
|
||||
(def db
|
||||
(kwapply (web.database)
|
||||
(apply web.database []
|
||||
{"dbn" "postgres" "user" *dbuser* "pw" *dbpw* "db" *dbname*}))
|
||||
|
||||
(defun get-file [name]
|
||||
(let ((res (kwapply (.select db "hfile" {"shash" name})
|
||||
(let ((res (apply .select
|
||||
[db "hfile" {"shash" name}]
|
||||
{"where" "shash = $shash"})))
|
||||
(if res (car res))))
|
||||
|
||||
|
@ -42,7 +43,7 @@
|
|||
(+ "files/" f "/" file.filename))
|
||||
(let ((repo (Gittle.init (+ "files/" f))))
|
||||
(.stage repo [(str file.filename)])
|
||||
(kwapply (repo.commit)
|
||||
(apply repo.commit []
|
||||
{"name" "System"
|
||||
"email" "tom@ryuslash.org"
|
||||
"message" "Initial commit for upgrade to git"}))))
|
||||
|
|
Loading…
Reference in a new issue