Skip to content

Commit

Permalink
Update boilerplate module
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-developer committed Apr 22, 2024
1 parent 06af194 commit cb2e0c2
Showing 1 changed file with 56 additions and 4 deletions.
60 changes: 56 additions & 4 deletions allsky_boilerplate/allsky_boilerplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,43 @@
},
"businfo": [
"i2c"
]
],
"changelog": {
"v1.0.0" : [
{
"author": "Alex Greenland",
"authorurl": "https://github.com/allskyteam",
"changes": "Initial Release"
}
],
"v1.0.1" : [
{
"author": "Alex Greenland",
"authorurl": "https://github.com/allskyteam",
"changes": [
"Change 1",
"Change 2",
"Change 3"
]
}
],
"v1.0.2" : [
{
"author": "Alex Greenland",
"authorurl": "https://github.com/allskyteam",
"changes": "Change 1"
},
{
"author": "JOhn Doe",
"authorurl": "https://github.com/allskyteam",
"changes": [
"Change 1",
"Change 2",
"Change 3"
]
}
]
}
}

def boilerplate(params, event):
Expand All @@ -153,9 +189,9 @@ def boilerplate(params, event):
params - A list of all parameters, as defined by the 'arguments' entry in the meta data
event - The event for which the module is being called for i.e. day, night, endofnight etc
The moule must return a string with some text to indicate the result of the function. This text
The module must return a string with some text to indicate the result of the function. This text
is displayed in the module managers debug dialog. This text can be an emptry string but please
consider makinh it more meaningful.
consider making it more meaningful.
Notes on Modules
Expand Down Expand Up @@ -196,6 +232,8 @@ def boilerplate(params, event):
s.dbUpdate(key, value) - Updates the key/value pair to the internal database
s.isFileWriteable(fileName) - Determines of the file is writeable
s.isFileReadable - Determines if the file is readable
See the Allsky documentation for the most uptodate list of avaiable function
'''

result = ""
Expand All @@ -210,4 +248,18 @@ def boilerplate(params, event):
result = "I don't know if its day or night!"
s.log(0,f"ERROR: {result}")

return result
return result

def boilerplate_cleanup():
moduleData = {
"metaData": metaData,
"cleanup": {
"files": {
"allskyboiler.json"
},
"env": {
"ALLSKY_BOILERPLATE"
}
}
}
s.cleanupModule(moduleData)

0 comments on commit cb2e0c2

Please sign in to comment.