OMerge branch 'master' of /home/kenbarbour/git/wxrx
commit
854b2c4c61
|
@ -16,6 +16,7 @@ a major version number.
|
|||
* [shunit2](https://github.com/kward/shunit2) (for development and testing)
|
||||
* rtl_fm
|
||||
* atd
|
||||
* sox
|
||||
|
||||
## Usage
|
||||
Use `wxrx help` or `wxrx <command> help` for helptext for any of the scripts.
|
||||
|
@ -30,7 +31,7 @@ Use `wxrx help` or `wxrx <command> help` for helptext for any of the scripts.
|
|||
|
||||
### Example usage
|
||||
* Set `wxrx/web/public` as a web server document root
|
||||
* Add `wxrx update && wxrx schedule` as a daily cronjoba
|
||||
* Add `PWD=/srv/wxrx wxrx update && wxrx schedule` as a daily cronjobs. Set PWD to a path to store data.
|
||||
|
||||
## Further reading
|
||||
[github.com/nootropicdesign/wx-ground-station](https://github.com/nootropicdesign/wx-ground-station)
|
||||
|
|
|
@ -214,7 +214,7 @@ function render_index() {
|
|||
|
||||
}
|
||||
|
||||
# Renders the markup for an item to include in the site inded
|
||||
# Renders the markup for an item to include in the site index
|
||||
# @param url path to item (usually html page)
|
||||
# @param string Title
|
||||
# @param string thumbnail image
|
||||
|
@ -223,7 +223,7 @@ function render_index_item() {
|
|||
url=${1}
|
||||
title=${2}
|
||||
thumbnail=${3}
|
||||
cat ${WXRX_WEB_TEMPLATES}/item.template |
|
||||
cat $( template_path "item") |
|
||||
template_subst URL "${url}" |
|
||||
template_subst HEADING "${title}" |
|
||||
template_subst THUMBNAIL "${thumbnail}"
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
# WXRX Website Generation
|
||||
|
||||
This directory should contain at least two subdirectories:
|
||||
|
||||
* `public` is where wxrx will put generated website files. Set it or symlink it to your web-server's
|
||||
document root.
|
||||
* `templates` is where you may place custom templates for wxrx to use to generate web pages.
|
||||
|
||||
## Templates
|
||||
|
||||
* `document.template` is used for generating any HTML document. It uses the following variables:
|
||||
* `{{CONTENT}}` - the main content of the page, generated by other templates
|
||||
* `{{TITLE}}` - page title
|
||||
* `{{GENERATED_AT}}` - string description of the time the page was generated
|
||||
* `index.template` - used for the site index
|
||||
* `{{CONTENT}}` - the main content of the page
|
||||
* `item.template` is used for each satellite pass included in an index.
|
||||
* `{{URL}}` - url to the pass HTML page
|
||||
* `{{HEADING}}` - heading to describe the pass
|
||||
* `{{THUMBNAIL}}` - url to an image thumbnail for the pass
|
||||
* `pass.template` is used to generate a page containing all the files for a single satellite pass
|
||||
* `{{TITLE}}` - page title for use in a heading
|
||||
* `{{CONTENT}}` - concatenated content for the items in this pass
|
||||
* `pass-audio.template` is used to render markup to present the audio file for a pass
|
||||
* `{{WAV_FILE}}` - url to an audio file
|
||||
* `pass-image.template` is used to render markup to present an image for a pass
|
||||
* `{{SRC}}` - image `src` attribute
|
||||
* `{{ALT}}` - `alt` attribute for the image
|
||||
* `{{CAPTION}}` - a string caption describing the image
|
||||
|
Loading…
Reference in New Issue