diff --git a/src/levaindoc-util.lfe b/src/levaindoc-util.lfe index f7f3421..a274c05 100644 --- a/src/levaindoc-util.lfe +++ b/src/levaindoc-util.lfe @@ -1,3 +1,5 @@ +;;; ===================================================== [ levaindoc-util.lfe ] + (defmodule levaindoc-util "Utility functions for [levaindoc](https://github.com/quasiquoting/levaindoc). For each `input`/`output` pair, there exist conversion functions @@ -10,10 +12,7 @@ ;; Random filename (export (random-name 0))) - -;;;=================================================================== -;;; Conversions -;;;=================================================================== +;;; ============================================================ [ Conversions ] (defun input-formats () "The list of supported input formats. @@ -69,19 +68,13 @@ "native" "odt" "opendocument" "opml" "org" "pdf" "plain" "revealjs" "rst" "rtf" "s5" "slideous" "slidy" "tei" "texinfo" "textile"]) - -;;;=================================================================== -;;; Random filename -;;;=================================================================== +;;; ======================================================== [ Random filename ] (defun random-name () "Generate a random filename, ending in `.temp`." (++ (random-string) "-" (timestamp) ".temp")) - -;;;=================================================================== -;;; Internal functions -;;;=================================================================== +;;; ===================================================== [ Internal functions ] (defun random-string () "Generate a random, 11-character, alphanumeric string." @@ -94,3 +87,5 @@ "Return the current timestamp, as a string." (let ((`#(,megasec ,sec ,_microsec) (os:timestamp))) (integer_to_list (+ sec (* megasec 1000000))))) + +;;; ==================================================================== [ EOF ] diff --git a/src/levaindoc.lfe b/src/levaindoc.lfe index 2dd6d55..01b644f 100644 --- a/src/levaindoc.lfe +++ b/src/levaindoc.lfe @@ -1,12 +1,12 @@ +;;; ========================================================== [ levaindoc.lfe ] + (defmodule levaindoc "A partial LFE port of [Pandex](https://github.com/FilterKaapi/pandex)." ;; API (export (convert-string 1) (convert-string 3) (convert-string 4) (convert-file 1) (convert-file 3) (convert-file 4))) -;;;=================================================================== -;;; Conversions -;;;=================================================================== +;;; ============================================================ [ Conversions ] (eval-when-compile (defun defn (name args doc body) @@ -47,10 +47,7 @@ ;; with the names, {{input-}}->{{output}} and {{input}}-file->{{output}}. (defconversions) - -;;;=================================================================== -;;; API -;;;=================================================================== +;;; ==================================================================== [ API ] (defun convert-string (string) "Equivalent to `markdown_github->html/1`, which calls [[convert-string/3]]. @@ -99,3 +96,5 @@ A list of `_options` is currently ignored." (let ((output (os:cmd (++ "pandoc " file " -f " from " -t " to)))) `#(ok ,output))) + +;;; ==================================================================== [ EOF ]