An OSM Markdown Parser for epic-osm
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

OpenStreetMap Markdown

An OSM Markdown Parser for EPIC-OSM

Given an osmdown file, this package will generate an easy to navigate and analyze html document.

osmdown is built on the vizdown engine


Command Line Usage

Usage: osmbuild [options] [command]


    parse    Simply parse a file, print back to STOUT
    render   Render a string of text
    build    Given an .osmdown file, write HTML
    preview  preview <src> rendered in a web browser


    -h, --help                output usage information
    -V, --version             output the version number
    -d, --destination <path>  A destination for the rendered HTML

Example Build:

osmdown preview ./test/sample.osmdown; open ./test/sample.osmdown.html

Sample Document

An osmdown document starts with YAML frontmatter denoted by ---

title: My osmdown sample document
email: ''

#Analysis Window Information
start_date: '2010-01-01'
end_date:   '2010-12-31'

bbox: '-86.354212,12.084238,-86.133199,12.191113' #Expecting 4 parameters

baseurl: '../'

#This is the title of my document
The content in the codeblock below will be evaluated at build time and the variables are available throughout the rest of the document.

//Code denoted by 3 ticks
var options = {foo: bar}

You can reference variables with curly braces: The value of foo in options is {{ }}

A variety of pre-coded blocks exist:

{{ osmviz.block('summary', {title: 'Boulder Sample'}) }}

Specific data files can be loaded
var data = osmdata('./test/json/median_changesets_per_mapper.json')

{{ osmviz.block('changesets', {title: 'Boulder Sample'}) }}

Available Prefabricated Blocks

Summary Block

{{osmviz.block('summary', options)}}

Changeset Block

{{osmviz.block('summary', options)}}