Skip to content

Commit

Permalink
Merge pull request #1 from teeks99/package-extension
Browse files Browse the repository at this point in the history
Built into an extension
  • Loading branch information
teeks99 authored Oct 3, 2020
2 parents 24b3dac + 8f45d48 commit f9d2ca7
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
Empty file added changelog
Empty file.
26 changes: 26 additions & 0 deletions install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from setup import ExtensionInstaller

def loader():
return JSON_Installer()

class JSON_Installer(ExtensionInstaller):
def __init__(self):
super(JSON_Installer, self).__init__(
version="1.0",
name='JSON',
description='Add JSON output',
author="Thomas Kent",
author_email="https://github.com/teeks99/weewx-json",
config={
'StdReport': {
'JSONReport': {
'skin': 'JSON',
'enable': True
}
}
},
files=[('skins/JSON', [
'skins/JSON/weewx.json.tmpl',
'skins/JSON/skin.conf'
])]
)
Empty file added readme.txt
Empty file.
13 changes: 13 additions & 0 deletions skins/JSON/skin.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[CheetahGenerator]
# This section is used by the generator CheetahGenerator, and specifies
# which files are to be generated from which template.

# Possible encodings are 'html_entities', 'utf8', or 'strict_ascii'
encoding = utf8

[[ToDate]]
template = weewx.json.tmpl

[Generators]
# The list of generators that are to be run:
generator_list = weewx.cheetahgenerator.CheetahGenerator

0 comments on commit f9d2ca7

Please sign in to comment.