screedcast.core
Generate screencast panels.
generate-all-screencasts
(generate-all-screencasts opt)
Given an options map opt
, generate a screencast html doc for all maps contained by the vector associated to :screencast-filename-bases
.
See project documentation for details of the options map.
generate-screencast
(generate-screencast fnbe opt)
Given file-name base entry fnbe
and screedcast options map opt
, generate an html screencast page. fnbe
is a single element of an options hash-map containing :screencast-filename
, :screencast-title
, and :screencast-uuid
.
generate-toc
(generate-toc opt)
Given an options map opt
, generate a Table of Contents listing of screencasts hyperlinks. Hyperlink slugs are composed from the screencast filenames.
Within opt
,
:toc-preamble
is hiccup/html displayed above the listing:toc-uuid
is a UUID for the TOC webpage:toc-panel-url-base
is the leading portion of the url up to the slug (include a trailing slash ‘/’); address to the panels:toc-video-url-base
is the leading portion of the url up to the slug (include a trailing slash ‘/’); address to the video
panel
(panel & hiccups)
Returns a screencast panel, with zero or more hiccup forms, including a header and a footer.
prettyfy-form-prettyfy-eval
(prettyfy-form-prettyfy-eval str-form)
(prettyfy-form-prettyfy-eval str-form width-fn width-output)
Returns a hiccup [:pre [:code]]
block wrapping a Clojure stringified form str-form
, then a [:pre [:code]]
block wrapping a separator sep
(default ' => '
), and evaluated value.
def
, defn
, s/def/
, defmacro
, defpred
, and require
expressions are only evaled; their output is not captured.
Example:
(prettyfy-form-prettyfy-eval "(inc 99)")
produces this hiccup/html
[:pre [:code.form "(inc 99)"] [:br] [:code.eval ";; => 100"]]
The compiled html elements are manipulated by javascript.
Re-bind readmoi.core/*wrap-at*
to change base-case column-wrap width. The two optional width args, width-fn
and width-output
, supersede this value.
Re-bind readmoi.core/*separator*
to change the evaluation arrow.
Note: Evaluated output can not contain an anonymous function of either (fn [x] ...)
nor #(...)
because zprint requires an internal reference to attempt a backtrack. Since the rendering of an anonymous function changes from one invocation to the next, there is no stable reference.
screedcast-defaults
A hash-map residing in screedcast_defaults.clj
that supplies the default values for the following options keys:
:project-license-section
:screencast-html-directory
:sections-directory
:separator
:wrap-at
:tidy-html?
:toc?
screencast-title
(screencast-title idx screencast-title)
Construct a screencast title element from index idx
and topic screencast-title
.
whats-next-panel
(whats-next-panel idx & notes)
Returns a ‘What’s next’ panel, with the next idx
screencast highlighted, optional presentation notes
to be appended.