Skip to content

Generate pointless haikus about a place from OpenStreetMap data

License

Notifications You must be signed in to change notification settings

icezee/osm-haiku

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

osm-haiku

Run locally

  • Run npm i
  • Create an app/config.js file (cp app/config-sample.js app/config.js) and add tokens
  • Run npm start and go to http://localhost:9094/

Line rules

See lines.en.json

  • template : Mandatory. The text that appears on a line when a rule is matched. Can be a string, or a function that returns a string and takes two arguments: el: the feature element, env: information about the environment (meteo, local time, etc)
  • tags : If provided, matches against tags in a feature, in the form of: [[feature key 0,feature value 0], [feature key n,feature value n]]. If several key/features tuples are provided, uses an OR combination. See OSM map features. Both keys and values can any using the * wildcard.
  • condition : If provided, must be a function returning a boolean taht takes two arguments: el: the feature element, env: information about the environment (meteo, local time, etc)
  • needsName : If set to true, feature must have a defined name to match.

Environment object

  • moment: 'night'|'morning'|'afternoon'|'evening'
  • temperature: in °C
  • timeHour: local hour 0-23

TBD:

  • sunny
  • rain
  • cloudy

Credits

Spanis translation by Onar Berrade / Prodigioso Volcán

About

Generate pointless haikus about a place from OpenStreetMap data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.8%
  • CSS 3.4%
  • HTML 3.2%
  • Shell 0.6%