HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
davejarvis
scrivenvar
HISTORICAL RECORD2017–2020
davejarvis / scrivenvar · Not publicly available

scrivenvar

Discover this repository through its Hacker News conversations.

2Distinct people
10Mentions
0Explicit recommenders
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A public description has not been verified.

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year10 dated mentions

Observed mentions: 2017-02-04 21:42:20 UTC to 2020-09-15 23:00:10 UTC.

02462017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2020

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC615

What Hacker News says

10 sources
> I suspect that formatting functions with named placeholders would be difficult to make acceptably ergonomic or performant in Java yamlp performs string interpolation from YAML files: https://bitbucket.org/djarvis/yamlp/ I reuse my library in my text editor: https://github.com/DaveJarvis/scrivenvar/ The text editor can interpolate strings in a variety of contexts (such as Markdown, R Markdown, XML, and R XML documents): https://www.youtube.com/watch?v=u_dFd6UhdV8 As far as I can tell, there is no performance degradation from the recursive interpolation; the editor reads, interpolates key/value pairs, and substitutes the resulting values into R Markdown documents riddled with up to a thousand simple formulas in about 600 milliseconds (on my desktop computer). Also, the editor provides a way to maintain the interpolated variables in a tree
Read the rest
-like view: https://github.com/DaveJarvis/scrivenvar/blob/master/README.... The substituted values appear in the preview pane in their final form. This is all real-time and pure Java.
In JDK 15
Of late I've been modernizing ExTeX[0] for integration with my markdown editor Scrivenvar[1][2] so that the editor can include TeX. My Typesetting Markdown series[3] dives into numerous reasons why I prefer to embed plain TeX in Markdown over LaTeX (skip ahead to parts 7 and 8). The text editor's TeX integration hasn't started yet[4], but if you're keen, star the GitHub page. [0]: https://github.com/DaveJarvis/extex [1]: https://github.com/DaveJarvis/scrivenvar/ [2]: https://www.youtube.com/watch?v=u_dFd6UhdV8 [3]: https://dave.autonoma.ca/blog/ [4]: https://github.com/DaveJarvis/scrivenvar/issues/69
In Writing math papers in pre-LaTeX era (2010)
There's an endless variation on how shell scripts can present help information. Here's another, consider this array: ARGUMENTS+=( "a,arch,Target operating system architecture (amd64)" "b,build,Suppress building application" "o,os,Target operating system (linux, windows, mac)" "u,update,Java update version number (${ARG_JRE_UPDATE})" "v,version,Full Java version (${ARG_JRE_VERSION})" ) The lines are machine-readable and alignment is computed by the template: https://github.com/DaveJarvis/scrivenvar/blob/master/build-t... When install script[0] help is requested, the following is produced: $ ./installer -h Usage: installer [OPTIONS...] -V, --verbose Log messages while processing -h, --help Show this help message then exit -a, --arch Target operating system architectu
Read the rest
re (amd64) -b, --build Suppress building application -o, --os Target operating system (linux, windows, mac) -u, --update Java update version number (8) -v, --version Full Java version (14.0.1) Using an array reduces some duplication, though more can be eliminated. Scripts typically have two places where the arguments are referenced: help and switch statements. The switch statements resemble: https://github.com/DaveJarvis/scrivenvar/blob/master/install... Usually parsing arguments entails either assigning a variable or (not) performing an action later. Introducing another convention would allow hoisting the switch statement out of the installer script and into the template. Off the cuff, this could resemble: ARGUMENTS+=( "ARG_ARCH,a,arch,Target operating system architecture (amd64)" "do_build=noop,b,build,Suppress building application" "ARG_JRE_OS,o,os,Target operating system (linux, windows, mac)" "ARG_JRE_UPDATE,u,update,Java update version number (${ARG_JRE_UPDATE})" "ARG_JRE_VERSION,v,version,Full Java version (${ARG_JRE_VERSION})" ) The instructions to execute when arguments are parsed are thus associated with the arguments themselves, in a quasi-FP style. This approach, not including the FP convention, is discussed at length in my Typesetting Markdown series[1]. [0]: https://github.com/DaveJarvis/scrivenvar/blob/master/install... [1]: https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdow...
In Help Message for Shell Scripts
I wrote an editor (based on the aforementioned architecture diagram) that makes the integration of interpolated variables much simpler than what the blog describes: https://github.com/DaveJarvis/scrivenvar/ Here's the money shot: https://raw.githubusercontent.com/DaveJarvis/scrivenvar/mast... Variables are visible on the leftmost panel. You can insert a variable by typing in any partial value followed by pressing Ctrl+Space (two steps instead of over a dozen). The editor inserts the variable name and the preview panel updates accordingly. That definitely isn't clear from the blog post, though. Aside, can Word perform string interpolation on variables?
In “Typesetting Markdown” blog post series by a technical writer
My blog dives into Markdown, Pandoc, R, bash, and the ConTeXt typesetting engine. https://dave.autonoma.ca/blog/ Part 8 (coming soon!) uses annotated Markdown to reproduce a famous poem (original is on the left): https://i.imgur.com/idV1mTM.png The text of the poem is written in Pandoc-flavoured Markdown: ::: poem Some say the world will end in fire, Some say in ice. From what I’ve tasted of desire I hold with those who favor fire. But if it had to perish twice, I think I know enough of hate To say that for destruction ice Is also great, And would suffice. ::: > Markdown is good for generating HTML and terrible for making PDFs.² Yes, Pandoc is essential for transforming Markdown into beautiful PDF files. Tooting my own horn a little more, my illustrated photobook, Impacts, is written almost ent
Read the rest
irely in pure Markdown, with a few annotations for plots and spectra: https://impacts.to/preview.html Tangentially related, what would be amazing is a robust text editor that allows injection of interpolated string variables from various data sources and structured data formats. Here's an architecture diagram to clarify: https://i.imgur.com/8IMpAkN.png My open-source editor, Scrivenvar (https://github.com/DaveJarvis/scrivenvar), implements that architecture to some extent.
In Don't write documentation in Markdown
Of possible interest is my open-source, Java-based desktop Markdown editor with live preview and variable interpolation. * https://github.com/DaveJarvis/scrivenvar * https://github.com/DaveJarvis/scrivenvar/blob/master/USAGE.m... The software provides a simple way to include variables in technical documentation. It also integrates with an R engine for editing R Markdown files, which can also use variables sourced from an external YAML file. (Editing XML documents that have stylesheets is possible, too.) My authoring workflow involves Scrivenvar, Markdown, pandoc, knitr, and ConTeXt. As Markdown separates content from presentation, I prefer ConTeXt to LaTeX for the same reason.
In Writing a Book with Unix
The Chain-of-Responsibility software development design pattern provides a way to separate a source document (Markdown) from its final presentation format (PDF). On a related note, I've developed an open source editor that can edit Markdown, R Markdown, and XML documents[1][2]. The input document is translated in real-time to HTML. Using the Chain-of-Responsibility pattern[3] makes it straightforward to introduce additional processor chains, which could include slide show output via CSS. On a minor technical note, including HTML tags (such as <small>...</small>) defeats one of the key benefits of Markdown: separation of content from presentation. An alternative is to use named blocks to classify text, such as[4]: ::: footer Copyright 2019 ... ::: [1]: https://github.com/DaveJarvis/scrivenvar [2]: https://github.com/DaveJarvis
Read the rest
In Marp: Markdown Presentation Writer
In my spare time I've been developing a Java-based (don't hate me) WYSIWYM tool that integrates R, Markdown, and a fair bit more. For example, Scrivenvar can also transform XML into Markdown via XSLT, then use an R engine to perform computations that are substituted back into the Markdown document prior to generating an HTML preview from the final text. (For the OOP enthusiasts, it uses the Chain-of-Command design pattern.) I wrote Scrivenvar because I wanted the ability to use interpolated variables while writing, so as to create documents free from duplicated content (e.g., character names, locations, and timeline calculations in a novel). (My favourite part of the book's R code is integration of a GIS API to compute driving distance based on the lat/long coordinates of two places in the novel, falling back to the Haversine formula if t
Read the rest
he website is unavailable; the number is then converted to English text using a Chicago Manual of Style function call. Effectively, if I change the lat/long of either location, the value of the book is updated without having to remember where in the text that that particular number was referenced.) Once a YAML document is loaded, inserting a variable is quick: type a few letters from a value followed by Control+Space to insert the corresponding variable name. This is handy if for deeply nested variable hierarchies. The software is open-source and very much beta: https://github.com/DaveJarvis/scrivenvar Ping me on GitHub if you like the concept and have comments or questions.
In How to self-publish a book: A handy list of resources
The article describes Markdown[1], basically. In my opinion, content should be written once and transformed to any format[2], including ConTeXt[3], docx, HTML, EPUB, or plain text. But here's a puzzler. Every software developer defines and uses variables. If variables are so powerful, why do WYSIWYG word processors lack the ability to quickly and easily insert variable definitions?[4] In the screenshot, the left-hand side provides an editable variable definition hierarchy, the middle pane provides a Markdown editor, and the right-hand side provides a real-time HTML preview of the content with variables interpolated and substituted. After variables, programming language integration--such as R[5]--comes naturally. Consider the following syntax (that could be hidden through a UI): `r#csv2md('data.csv',totals=TRUE)` The function imports
Read the rest
data from an external data source and converts it to Markdown. The HTML version can be styled, or piped through pandoc to create beautiful PDF output[6]. In the screenshot, the left-hand side shows the csv2md command (totals are calculated automatically for numeric columns), the middle pane shows an HTML preview (real-time), and the right-hand side shows a PDF produced from the same source document using pandoc and ConTeXt. The CSV file could also be a JSON request over HTTP, or database query, meaning that the document is always up-to-date with the most recent data: a living document. This could be accomplished without having to change the source document, as well: `r#import(v$data$source,totals=TRUE)` Here, v$data$source is a variable that defines a data source. In this case, the value might be 'data.csv', but could be 'protocol://host/app/api/json'. The variables themselves could be sourced from a YAML file, JSON data stream, or remote database. This is what I've been working towards for the last several months.[7] There's more that this editor can do, but it's still in early beta stages, should anyone care to try it. [1]: https://github.com/jgm/pandoc/issues/168 [2]: http://pandoc.org/ [3]: http://wiki.contextgarden.net/ [4]: https://raw.githubusercontent.com/DaveJarvis/scrivenvar/mast... [5]: https://github.com/bedatadriven/renjin/ [6]: http://i.imgur.com/Qe6mTpx.png [7]: https://github.com/DaveJarvis/scrivenvar
In Foolproof HTML

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.