mirror of
https://github.com/deadc0de6/catcli
synced 2024-11-11 13:11:00 +00:00
fix tests and update readme
This commit is contained in:
parent
a54716353d
commit
cdc20e3532
@ -138,8 +138,11 @@ directory under `catcli.catalog`.
|
|||||||
|
|
||||||
The `--meta` switch allows to add any additional information to store along in
|
The `--meta` switch allows to add any additional information to store along in
|
||||||
the catalog like for example `the blue disk in my office`.
|
the catalog like for example `the blue disk in my office`.
|
||||||
The `-u --subsize` switch tells catcli to also store (and calculate) the total size
|
|
||||||
of each directory. Using the `-a --archive` switch allows to also index archive files as explained
|
Catcli will calculate and store the total size of each node (directories, storages, etc)
|
||||||
|
unless the `-n --no-subsize` switch is used.
|
||||||
|
|
||||||
|
Using the `-a --archive` switch allows to also index archive files as explained
|
||||||
[below](#index-archive-files).
|
[below](#index-archive-files).
|
||||||
|
|
||||||
## Index archive files
|
## Index archive files
|
||||||
@ -233,7 +236,7 @@ First this directory is indexed with `catcli` as if it was some kind of
|
|||||||
external storage:
|
external storage:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ catcli index --meta='my test directory' --subsize tmptest /tmp/test
|
$ catcli index --meta='my test directory' tmptest /tmp/test
|
||||||
```
|
```
|
||||||
|
|
||||||
Catcli creates its catalog file in the current directory as `catcli.catalog`.
|
Catcli creates its catalog file in the current directory as `catcli.catalog`.
|
||||||
|
@ -48,7 +48,7 @@ class TestIndexing(unittest.TestCase):
|
|||||||
tmpdirname = 'tmpdir'
|
tmpdirname = 'tmpdir'
|
||||||
args = {'<path>': dirpath, '<name>': tmpdirname,
|
args = {'<path>': dirpath, '<name>': tmpdirname,
|
||||||
'--hash': True, '--meta': ['some meta'],
|
'--hash': True, '--meta': ['some meta'],
|
||||||
'--subsize': True, '--verbose': True}
|
'--no-subsize': False, '--verbose': True}
|
||||||
|
|
||||||
# index the directory
|
# index the directory
|
||||||
cmd_index(args, noder, catalog, top)
|
cmd_index(args, noder, catalog, top)
|
||||||
|
@ -49,7 +49,7 @@ class TestIndexing(unittest.TestCase):
|
|||||||
tmpdirname = 'tmpdir'
|
tmpdirname = 'tmpdir'
|
||||||
args = {'<path>': dirpath, '<name>': tmpdirname,
|
args = {'<path>': dirpath, '<name>': tmpdirname,
|
||||||
'--hash': True, '--meta': ['some meta'],
|
'--hash': True, '--meta': ['some meta'],
|
||||||
'--subsize': True, '--verbose': True}
|
'--no-subsize': False, '--verbose': True}
|
||||||
|
|
||||||
# index the directory
|
# index the directory
|
||||||
unix_tree(dirpath)
|
unix_tree(dirpath)
|
||||||
|
Loading…
Reference in New Issue
Block a user