Commit 35a6f366 authored by Philipp's avatar Philipp

Updated README.md with archive howto, contributor(s) and extracam help

parent 6b3a0ba3
......@@ -52,8 +52,87 @@ included `skin.conf`.
If, however, you ARE running a webcam, you may also take a look
at some scripts, I wrote for several different types of webcams playing nice
with this template: https://gitlab.ambhost.net/stimpy/scripts_webcam
* **Extracams (optional)**
At the bottom of the starting page, there's space for three extra images, you
can freely configure at the `skin.conf` file.
If you don't want these extra images, simply comment [Line 67-75](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf#L67) from `skin.conf`:
```
# extracam1_title = 'Rabenwetter'
# extracam1_img = 'https://www.rabenwetter.de/photocam/rabenberg-hires.jpg'
# extracam1_link = 'https://www.rabenwetter.de'
# extracam2_title = 'Niddastausee'
# extracam2_img = 'https://www.rabenwetter.de/external/wfc.jpg'
# extracam2_link = 'https://www.wfc-schotten.de/wetter'
# extracam3_title = 'Ortenberg'
# extracam3_img = 'https://www.rabenwetter.de/external/ortenberg2.jpg'
# extracam3_link = 'http://www.wetter.ortenberg.net/'
```
**Attention:** Don't only comment the content, but the whole variable!
> **For Example:**
> `# extracam1_img = 'https://www.rabenwetter.de/photocam/rabenberg-hires.jpg'`
> **NOT:**
> ` extracam1_img = #'https://www.rabenwetter.de/photocam/rabenberg-hires.jpg'`
## Archive
If you're switching from another template, you probably already have a lot of
data from the past, you don't want to lose when switching templates.
There is a way to preserve old data and export it to the json files needed by
this template.
It's a bit complicated and I don't recall all the steps, but here's some rough
information to point you to the right direction:
* **Stop weewx if running:**
> `/etc/init.d/weewx stop`
* **Uncomment [Lines 305-306](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf#L305) and [Lines 314-315](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf#L314) of your [skin.conf](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf):**
```
[[[adayjson]]]
template = archive/aday-YYYY-MM.json.tmpl
```
and
```
[[[ayearjson]]]
template = archive/aweek-YYYY.json.tmpl
```
* **Start weewx and watch its logs:**
> `/etc/init.d/weewx start`
> `tail -f /var/log/syslog`
You should soon see weewx exporting its complete database to .json files.
This takes some time, is quiet cpu intensive and will restart as soon as finished.
So continue watching the logs and
* **Stop weewx again as soon as the export is finished**
> `/etc/init.d/weewx stop`
* **Comment [Lines 305-306](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf#L305) and [Lines 314-315](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf#L314) of your [skin.conf](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf) again:**
```
# [[[adayjson]]]
# template = archive/aday-YYYY-MM.json.tmpl
```
and
```
# [[[ayearjson]]]
# template = archive/aweek-YYYY.json.tmpl
```
* **Start weewx again...**
Now you have all the data from your database exported to json files, but concentrated to files, weewx can't handle.
This is because of the way, we had to export the data using the archive function of weewx.
You'll need to extract and split the files to those needed by the template:
`day-YYYY-MM-DD.json`, `week-YYYY-WW.json`, `month-YYYY-MM.json` and `year-YYYY.json`
I did this with some simple bash scripting logic using sed and grep, but I don't have the scripts
anymore, so I can't share them. Sorry...
All future data will get exported and saved automatically in the correct format.
## Development
### Initial dependencies
* [npm](https://nodejs.org/en/)
......@@ -90,11 +169,18 @@ Simply copy and rename `src/i18n/en.json` to match your iso 639-1 language code.
There's also the humongous forecast file at `src/archive/current.en.json.tmpl`, you may want to translate. Even if you don't want to, you'll have to copy the english version to one matching your countrycode. e.g: `src/archive/current.no.json.tmpl` or the build process will fail.
The first time, you're adding a new translation, you'll also have to edit the Gruntfile.js and add your new file to the array at line 60:
The first time, you're adding a new translation, you'll also have to edit the Gruntfile.js and add your new file to the array at [line 60](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/Gruntfile.js#L60):
`locales: ['de', 'en', 'no'],`
When you've done a translation, please also send it to me! I'm happy to add it to the official build!
### Contributors
All translations other than english and german were done by users of this template all over the world.
**THANK YOU VERY MUCH:**
* [Hans-Christian Grande](http://grandebu.com/): Norwegian
## Updates
You can always find the latest version of this
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment