flinventory 0.4.2__py3-none-any.whl → 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- flinventory/__main__.py +6 -1
- flinventory/location.py +4 -1
- {flinventory-0.4.2.dist-info → flinventory-0.5.0.dist-info}/METADATA +20 -6
- {flinventory-0.4.2.dist-info → flinventory-0.5.0.dist-info}/RECORD +7 -7
- flinventory-0.5.0.dist-info/entry_points.txt +5 -0
- flinventory-0.4.2.dist-info/entry_points.txt +0 -4
- {flinventory-0.4.2.dist-info → flinventory-0.5.0.dist-info}/WHEEL +0 -0
- {flinventory-0.4.2.dist-info → flinventory-0.5.0.dist-info}/licenses/LICENSE +0 -0
flinventory/__main__.py
CHANGED
@@ -34,7 +34,8 @@ def parse_args():
|
|
34
34
|
return parser.parse_args()
|
35
35
|
|
36
36
|
|
37
|
-
|
37
|
+
def main():
|
38
|
+
"""Run the command-line interface."""
|
38
39
|
arguments = parse_args()
|
39
40
|
datacleanup.logging_config(arguments)
|
40
41
|
try:
|
@@ -43,3 +44,7 @@ if __name__ == "__main__":
|
|
43
44
|
print("No command given. See -h for help information.")
|
44
45
|
else:
|
45
46
|
function(arguments)
|
47
|
+
|
48
|
+
|
49
|
+
if __name__ == "__main__":
|
50
|
+
main()
|
flinventory/location.py
CHANGED
@@ -213,12 +213,13 @@ class Schema:
|
|
213
213
|
).get_schema_hierarchy(location_info)
|
214
214
|
|
215
215
|
def get_valid_subs(
|
216
|
-
self, shortcuts: Literal["yes", "only", "()", "*"] = "yes"
|
216
|
+
self, shortcuts: Literal["yes", "only", "()", "*", "no"] = "yes"
|
217
217
|
) -> Optional[list[Union[str, int]]]:
|
218
218
|
"""A list of valid sub schemas. Usable for suggesting options.
|
219
219
|
|
220
220
|
Args:
|
221
221
|
shortcuts: if valid shortcuts should be listed as well:
|
222
|
+
'no': shortcuts are not listed
|
222
223
|
'yes': shortcuts listed in the same way as names,
|
223
224
|
'only': only shortcuts are listed
|
224
225
|
'()': shortcuts are listed in parentheses after the name (note: result
|
@@ -232,6 +233,8 @@ class Schema:
|
|
232
233
|
return None
|
233
234
|
if self._subs is None:
|
234
235
|
return []
|
236
|
+
if shortcuts == "no":
|
237
|
+
return [sub.name for sub in self._subs]
|
235
238
|
if shortcuts == "yes":
|
236
239
|
return [name for sub in self._subs for name in (sub.name, sub.shortcut)]
|
237
240
|
if shortcuts == "only":
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: flinventory
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.5.0
|
4
4
|
Summary: An inventory system for self-help repair shops
|
5
5
|
Author-Email: flukx <flinventory-flukx@612211124.xyz>
|
6
6
|
License: GPL3
|
@@ -55,9 +55,23 @@ The data format is a specific directory structure with specific file names:
|
|
55
55
|
|
56
56
|
No keys in `things/someID/*yaml` are mandatory. Therefore, code that uses the data has to handle missing data.
|
57
57
|
|
58
|
-
##
|
59
|
-
|
58
|
+
## Install
|
59
|
+
`pip install flinventory`
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
61
|
+
or
|
62
|
+
```
|
63
|
+
git clone https://codeberg.org/flukx/flinventory
|
64
|
+
# install requirements listed in pyproject.toml
|
65
|
+
# e.g. with
|
66
|
+
nix-shell
|
67
|
+
```
|
68
|
+
|
69
|
+
## Usage
|
70
|
+
flinventory is mainly intended as a python module used
|
71
|
+
in the [flinventory-GUI](https://codeberg.org/flukx/flinventory-gui).
|
72
|
+
But by installing this module, also the command-line interface `flinventory-cli` is installed.
|
73
|
+
(It can also be run with the repo and `python -m flinventory`.)
|
74
|
+
|
75
|
+
This command-line interface includes
|
76
|
+
- `flinventory-cli label` for creating signs that can be printed and glued to the boxes. The size and formatting of the signs happens in `things/*/sign.json`. Also, it creates a list of all names of all things with a reference to their location. This list is in markdown and can be converted with pandoc to a printable (multiple page) list. For details see the help messages.
|
77
|
+
- `flinventory-cli {normalize,printed,shortcut,unprinted,useIDs,locationsFile}` for various tasks for reformatting the yaml files. This is helpful to have a bit of standardisation to avoid big git diffs when the yaml files are read and written again. For details see the help messages.
|
@@ -1,16 +1,16 @@
|
|
1
|
-
flinventory-0.
|
2
|
-
flinventory-0.
|
3
|
-
flinventory-0.
|
4
|
-
flinventory-0.
|
1
|
+
flinventory-0.5.0.dist-info/METADATA,sha256=hJhT7XOxDx-C0be0YzyJyBtG-CzCOpFNk8Vk9DC-15M,4907
|
2
|
+
flinventory-0.5.0.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
3
|
+
flinventory-0.5.0.dist-info/entry_points.txt,sha256=De3jjbHfy68_ZrwdjywlgrSUCn4QhqZGI0CJJt9S8_c,78
|
4
|
+
flinventory-0.5.0.dist-info/licenses/LICENSE,sha256=9c-AWlAEeFMmn1aODEfabsw2he-SpQeykurYw-KqSdw,34478
|
5
5
|
flinventory/__init__.py,sha256=0HTGxw9J-2KnbxQbzX6HH-Pztkp0BEjiHANhndfbtYM,270
|
6
|
-
flinventory/__main__.py,sha256=
|
6
|
+
flinventory/__main__.py,sha256=5U_RxWDlnhzlC98RaE8SkejjiYjv27OLdm5DPYgL4Gw,1295
|
7
7
|
flinventory/box.py,sha256=rk7yrAjVdxcrpvmTMt3jkMVOAoQNJfqoSig9U2S3yJ0,10480
|
8
8
|
flinventory/constant.py,sha256=pPNCwScLon_MOKL9_jjD_sxqB7Q2WW6rZqtrBl7SyWk,10283
|
9
9
|
flinventory/datacleanup.py,sha256=_CImmWJhq5uKz21jJQUqKYoQfbHEYA0000RyPRt5BI0,11363
|
10
10
|
flinventory/defaulted_data.py,sha256=KAy6V2KLcifLg7zHBFnx_eFLp31sCWih1Btp6cE0bQc,21585
|
11
11
|
flinventory/generate_labels.py,sha256=wB9ibokHOcab599qZhi5uTzfy3DTo3wT4DJP9qLMzXs,6642
|
12
12
|
flinventory/inventory_io.py,sha256=OWThcf9nzeZNqvNpzQiBhESQAnVXC7hUA8DEVzq-w-Y,12561
|
13
|
-
flinventory/location.py,sha256=
|
13
|
+
flinventory/location.py,sha256=kJoR5iZF-loimiqEUCaSpDXDDGYV8FECZxodh68Rp9U,16728
|
14
14
|
flinventory/sign.py,sha256=8G7fsne3Nsf8zZKKTUl40uWMNsWIv7FYV2KcqBR2MQI,5515
|
15
15
|
flinventory/signprinter_latex.py,sha256=Ytf1T_ADedj_Wkqe8bWyN23-TwFaKE7zFpeoYxn5NzM,19105
|
16
16
|
flinventory/thing.py,sha256=86fXj3RwTbkCdVVWrbyO-VEW_e5lKJlV8PPt1Xf8ejY,5079
|
@@ -20,4 +20,4 @@ flinventory/thingtemplate_latex/sign.tex,sha256=cVlOjImuS97Gf19MGW27HiP6Uw8JNnob
|
|
20
20
|
flinventory/thingtemplate_latex/signlist-footer.tex,sha256=LcZw5__h8SqgMmYxs5oLbXLaFTQlx_X5rtYnpxwUh9Y,14
|
21
21
|
flinventory/thingtemplate_latex/signlist-header.tex,sha256=F1J4aSPq6QO_Ved4Zn7-rytP1vDkdWTqjjtGJpe_FDg,297
|
22
22
|
flinventory/thingtemplate_latex/signs-example.tex,sha256=J6eCcPhP0Xklgn8xnSenDOvjzmc_NGmakWU4RGbeUtM,3090
|
23
|
-
flinventory-0.
|
23
|
+
flinventory-0.5.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|