1,725
edits
No edit summary |
mNo edit summary |
||
(12 intermediate revisions by the same user not shown) | |||
== Introduction ==
Modules are the basic building blocks of CumulusUtils. Identifying modules on the commandline they become synonym with commands to CumulusUtils and can be used in a users own website. The [[Website Generator|website]] is not seen as a module but it is the CUtils own aggregate of the modules.
== The list of modules ==
CumulusUtils offers the following modules (which can be used as commands):
#[[SysInfo]]
#[[Forecast]]▼
#[[StationMap]]▼
#[[UserReports]]▼
#[[pwsFWI]]
#[[
#[[Custom Logs]]
#[[Graphs]]
#[[Yadr]]
#[[Records]]
#[[NOAA]]
▲#[[Forecast]]
▲#[[StationMap]]
▲#[[UserReports]]
#[[Records - Top10|Top10]]
#[[Records - DayRecords|DayRecords]]
#[[AirLink]] (before version 6.1 this was [[AirQuality]])
#[[ChartsCompiler]]
#[[MeteoCam]]
#[[UserAskedData]]
== The multiple module commands ==
In addition to the true modules which are equivalent to commands, there are commands which are strictly spoken not modules because they do not comprise a single functionality:
#[[Website Generator|Website]] => generates the website which consists of all modules, the inclusion of the libraries is embedded in website's index.html.
#[[UserAskedData]] => a specific command used for generating JSON datafiles when required by other modules (
▲#[[UserAskedData]] => a specific command used for generating JSON datafiles when required by other modules (Compiler and/or AirQuality)
#[[ChartsCompiler|CompileOnly]] => a command which activates the compiler only. This is a very specific command with more than one effect. Please check out its own page.
If you use modules but want the resulting server location outside of you main website location (e.g. in a subdirectory CUtils) then please create that directory and set your uploads for CUtils accordingly. To have your website find the specific realtime values (the JSON files) specifically generated for CUtils, than run the [[UserAskedData]] command and set the parameter where to locate those data. In the case as above:
DoModular=true
ModulePath=<path>
''DoModular'' and the command ''Website'' are incompatibe
== Javascript libraries ==
When using the [[Website Generator]], all modules are used implicitly. Modules, with some exceptions, can be used standalone in any website by including the output of CumulusUtils in that website. When using the standalone mode you need to be aware of the [[cumulusutils.ini|inifile parameters]] (section general) ''GeneratejQueryInclude'' and ''DoLibraryIncludes''.
#GeneratejQueryInclude will - if true - generate the required jQuery library reference line on top of the module.
#DoLibraryIncludes will - if true - generate the required library references (e.g. HighCharts, Leaflet etc...) on top of the module.
If you manage these libraries in your website yourself set these parameter values to false.
If the modules don't work and you have no idea what this is about, set these values to true.
If you use the [[Website Generator]], '''set both parameters to false'''.
== Commandline parameters (v7 and up) ==
To have modules work properly with the commandline parameters introduced in version 7 of CUtils, you need to use a script in your own index file:
<pre>
<script>
const urlParams = new URLSearchParams(window.location.search);
</script>
</pre>
You can also use - i.s.o. the script above - the runtime library for ''CumulusUtils'':
<pre>
<script src='lib/cumulusutils.js'></script>
</pre>
This library is currently only generated with the website command (which you can run even if you don't use the website) but in future it will be possible to generate it separately with an additional command. It will then get it's own entry in the wiki.
[[Category:CumulusUtils]]
|