Jim Paris
79b410a85b
Remove conditional as we know these args are always present
4 years ago
Jim Paris
57751f5b32
Consistently use bytes everywhere for stream data
Previous commits went back and forth a bit on whether the various APIs
should use bytes or strings, but bytes appears to be a better answer,
because actual data in streams will always be 7-bit ASCII or raw
binary. There's no reason to apply the performance penalty of
constantly converting between bytes and strings.
One drawback now is that lots of code now has to have "b" prefixes on
strings, especially in tests, which inflates this commit quite a bit.
4 years ago
Jim Paris
a2e124f444
Make command a required argument for new argparse changes
4 years ago
Jim Paris
41abf53085
Remove references to local copy of datetime_tz
4 years ago
Jim Paris
0f5c1c0db6
Run 2to3 automatic fixes over entire tree
4 years ago
Jim Paris
7d7b89b52f
Add --no-decim option to nilmtool list
10 years ago
Jim Paris
8d249273c6
Change -V option to -v everywhere
10 years ago
Jim Paris
04f815a24b
Reorder nilmtool commands
10 years ago
Jim Paris
8e8ec59e30
Support "nilmtool cmd --version"
10 years ago
Jim Paris
bd7bdb2eb8
Add --optimize option to nilmtool intervals
10 years ago
Jim Paris
9a2699adfc
Attempt at fixing up more Unicode issues with metadata.
11 years ago
Jim Paris
9bbb95b18b
Add unicode decode/encode helpers
11 years ago
Jim Paris
6bbed322c5
Fix unicode in completion
11 years ago
Jim Paris
539c92226c
Add more disk space info
11 years ago
Jim Paris
f2a48bdb2a
Test binary extract; fix bugs
11 years ago
Jim Paris
6d14e0b8aa
Allow binary extract
11 years ago
Jim Paris
bfb09a189f
Fix coverage
11 years ago
Jim Paris
416a499866
Support wildcards for destroy
11 years ago
Jim Paris
637d193807
Fix unicode processing of command line arguments
11 years ago
Jim Paris
b7fa5745ce
nilmtool list: allow multiple paths to be supplied
11 years ago
Jim Paris
0104c8edd9
nilmtool remove: allow wildcards and multiple paths
11 years ago
Jim Paris
83d022016c
nilmtool list: add new --layout option to show layouts
11 years ago
Jim Paris
43b740ecaa
nilmtool list: remove old -p parameter
11 years ago
Jim Paris
99a4228285
Set up default SIGPIPE handler
This lets you do something like "nilmtool extract | head" without
triggering backtraces.
11 years ago
Jim Paris
9ce0f69dff
Add "--delete" option to "nilmtool metadata" tool
This is the same as "--update" with an empty string as the value.
11 years ago
Jim Paris
e006f1d02e
Change default URL to http://localhost/nilmdb/
11 years ago
Jim Paris
89be6f5931
Add option to include interval start/end markup on extract
When enabled, lines like "# interval-start 1234567890123456" and "#
interval-end 1234567890123456" will be added to the data output. Note
that there may be an "interval-end" timestamp followed by an identical
"interval-start" timestamp, if the response at the nilmdb level was
split up into multiple chunks.
In general, assume contiguous data if previous_interval_end ==
new_interval_start.
11 years ago
Jim Paris
4cdef3285d
Destroy now requires that all data has been previously removed.
Added new flag "-R" to command line to perform an automatic removal.
This should be the last of the ways in which a single command could
block the nilmdb thread for a long time.
11 years ago
Jim Paris
90b96799ac
Bulk of the switch to int64 microsecond timestamps, including test data.
11 years ago
Jim Paris
b5541722c2
Continue moving time-handling code into nilmdb.utils.time
11 years ago
Jim Paris
aaea105861
Consolidate most timestamp <-> string conversions (outside of rocket)
11 years ago
Jim Paris
cd1dfe7dcd
Add completion functions to most commandline arguments
11 years ago
Jim Paris
fb35517dfa
Add basic argument completion
11 years ago
Jim Paris
b9f0b35bbe
Stream renaming support, and comprehensive tests
Implemented in command line, client, server, nilmdb, bulkdata
11 years ago
Jim Paris
7eca587fdf
Add 'nilmtool intervals' command, with --diff option
Can show the set-difference between the interval ranges in two
streams.
11 years ago
Jim Paris
9f914598c2
Make /stream/list give some more extended info, like row count
Also changes the HTTP parameter from "extent" to "extended",
and the commandline parameter from "extent" to "ext".
11 years ago
Jim Paris
232a3876c2
Clean up imports to separate client and server more.
"import nilmdb" doesn't do much; "import nilmdb.client" or "import
nilmdb.server" is now required.
11 years ago
Jim Paris
0fc092779d
Big rework of stream_insert_context and places that use it.
Things are now block-focused, rather than line-focused. This should
give a pretty big speedup to inserting client data, especially when
inserting preformatted data.
11 years ago
Jim Paris
92724d10ba
Rework 'nilmtool insert' and some client stuff to speed up inserting data
Still needs work.
11 years ago
Jim Paris
1d7acbf916
Remove null timestamper, speed up insert --none a tiny bit
11 years ago
Jim Paris
11b228f77a
Convert times to microsecond precision strings more consistently.
Use a new helper, nilmdb.utils.time.float_to_time_string().
This will help if we ever want to change representation (like using
uint64 microseconds since epoch, which saves us from having to
waste bits on the floating-point exponent)
11 years ago
Jim Paris
1ccc2bce7e
Add commandline support for listing extents
11 years ago
Jim Paris
521ff88f7c
Support 'nilmtool help command' just like 'nilmtool command --help'
11 years ago
Jim Paris
41ce8480bb
cmdline: Support NILMDB_URL environment variable for default URL
11 years ago
Jim Paris
e3f335dfe5
Move time parsing from cmdline into nilmdb.utils.time
11 years ago
Jim Paris
a49c655816
Strictly enforce (start < end) for all intervals.
Previously, we allowed start == end, but this doesn't make sense with
half-open intervals.
11 years ago
Jim Paris
841b2dab5c
server: Replace /dbpath and /dbsize with a more generic /dbinfo
Update tests accordingly. This isn't backwards compatible, but
existing clients don't rely on it.
11 years ago
Jim Paris
1593e181a3
Switch to versioneer-provided versions everywhere
11 years ago
Jim Paris
3fe3e2ca95
Move nilmtool into a dedicated nilmdb.scripts module
11 years ago
Jim Paris
f01e781469
Convert nilmtool.py into a setuptools-generated script
At install time, the script "/usr/bin/nilmtool" will be created.
11 years ago