Energy Dashboard Command Line Interface (CLI)
Project description
Energy Dashboard Command Line Interface (edc)
Command Line Interface for the Energy Dashboard.
Still a WIP...
Show Help
edc
edc
Usage: edc [OPTIONS] COMMAND [ARGS]...
Command Line Interface for the Energy Dashboard. This tooling collects
information from a number of data feeds, imports that data, transforms
it, and inserts it into a database.
Options:
--config-dir TEXT Config file directory
--debug / --no-debug Enable debug logging
--help Show this message and exit.
Commands:
config Manage config file.
feed Manage individual 'feed' (singular).
feeds Manage the full set of data 'feeds' (plural).
license Show the license (GPL v3).
config
Usage: edc config [OPTIONS] COMMAND [ARGS]...
Manage config file.
Options:
--help Show this message and exit.
Commands:
show Show the config
update Update config
feed
Usage: edc feed [OPTIONS] COMMAND [ARGS]...
Manage individual 'feed' (singular).
Options:
--help Show this message and exit.
Commands:
archive Archive feed to tar.gz
create Create new feed
download Download from source url
invoke Invoke a shell command in the feed directory
proc Process a feed through the stages
reset Reset feed to reprocess stage
restore Restore feed from tar.gz
s3archive Archive feed to S3 bucket
s3restore Restore feed zip files from from S3 bucket
status Show feed status
feeds
Usage: edc feeds [OPTIONS] COMMAND [ARGS]...
Manage the full set of data 'feeds' (plural).
Options:
--help Show this message and exit.
Commands:
list List feeds
search Search feeds (NYI)
license
edc : Energy Dashboard Command Line Interface
Copyright (C) 2019 Todd Greenwood-Geer (Enviro Software Solutions, LLC)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
##Usage
Examples
edc feed invoke data-oasis-atl-lap-all "git st"
edc feed invoke data-oasis-atl-lap-all "ls"
edc feed invoke data-oasis-atl-lap-all "cat manifest.json"
edc feed invoke data-oasis-atl-lap-all "head manifest.json"
edc feeds list
edc feeds list | grep atl
edc feeds list | grep atl | edc feed invoke "head manifest.json"
edc feeds list | grep atl | edc feed invoke "head manifest.json" -
edc feeds list | grep atl | xargs -L 1 -I {} edc feed invoke {} "head manifest.json"
edc feeds list | grep atl | xargs -L 1 -I {} edc feed invoke {} "jq . < manifest.json"
edc feeds list | grep atl | xargs -L 1 -I {} edc feed invoke {} "jq .url < manifest.json"
edc feeds list | grep mileage | xargs -L 1 -I {} edc feed invoke {} "echo {}; sqlite3 db/{}.db 'select count(*) from oasis'"
edc feeds list | grep atl | xargs -L 1 -I {} edc feed invoke {} "jq .url < manifest.json"
edc feeds list| xargs -L 1 -I {} edc feed invoke {} "echo {}; sqlite3 db/{}.db 'select count(*) from oasis'"
edc feeds list | grep atl | xargs -L 1 -I {} edc feed status {}
edc feeds list | grep atl | xargs -L 1 -I {} edc feed status --header {}
edc feeds list | grep atl | xargs -L 1 -I {} edc feed status --header {}
edc feeds list | grep mileage | xargs -L 1 -I {} edc feed status --header {}
edc feeds list | xargs -L 1 -I {} edc feed invoke {} "./src/10_down.py"
edc feed archive data-oasis-as-mileage-calc-all
edc feed archive data-oasis-as-mileage-calc-all | xargs -L 1 -I {} tar -tvf {}
edc feed reset data-oasis-as-mileage-calc-all --stage xml --stage db
edc feed s3restore data-oasis-as-mileage-calc-all --outdir=temp --service=wasabi
edc feed s3archive data-oasis-as-mileage-calc-all
Onboarding
Some quick notes on how I onboarded 'data-oasis-as-mileage-calc-all':
edc feed proc data-oasis-as-mileage-calc-all
edc feed s3archive data-oasis-as-mileage-calc-all --service wasabi
edc feed s3archive data-oasis-as-mileage-calc-all --service digitalocean
edc feed status data-oasis-as-mileage-calc-all --header
edc feed invoke data-oasis-as-mileage-calc-all "git st"
edc feed invoke data-oasis-as-mileage-calc-all "git log"
edc feed invoke data-oasis-as-mileage-calc-all "git show HEAD"
Author
Todd Greenwood-Geer (Enviro Software Solutions, LLC)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for energy-dashboard-client-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 145af06bd4e14b5d57ed83a2b9748a50587fef8f1e1641128303db1b7cc99a99 |
|
MD5 | b05f459a1bf2e3344d261caf06be6919 |
|
BLAKE2b-256 | 49ba58c1285b67935f263e71e8dae406b75c9ad746752f0fa9cfad34da1fea16 |
Close
Hashes for energy_dashboard_client-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6182f13850498905df2fbe9b9808d404c772a5bc8144d3ef56c12df721706268 |
|
MD5 | 24d1e354813e3ed6401d7e4715094192 |
|
BLAKE2b-256 | 60dabe9f3fbe937785cf194604b65202e08fe442bbd2d475b299d0552f7944af |