summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimeon Simeonov2022-04-04 21:11:25 +0200
committerSimeon Simeonov2022-04-04 21:11:25 +0200
commite36f260c2ebc5e21724e5eedf0a91d2bc66cceec (patch)
tree19213b92189c957ec0f2d0638ee06f07d089167a
parent6eb9318f6b22db29942998fddf88752aa4c54779 (diff)
Treat instances with names starting with _ as abstract and do not list them
-rw-r--r--README.md5
-rw-r--r--src/etoolkit/__init__.py2
-rw-r--r--src/etoolkit/__main__.py5
3 files changed, 9 insertions, 3 deletions
diff --git a/README.md b/README.md
index c6c69e0..a4efa6f 100644
--- a/README.md
+++ b/README.md
@@ -158,7 +158,7 @@ Another possibility is to pass the value to *etoolkit*'s *stdin* using a pipe.
158... or if the *ETOOLKIT_MASTER_PASSWORD* env. variable is defined, its value 158... or if the *ETOOLKIT_MASTER_PASSWORD* env. variable is defined, its value
159will be used instead of prompting for password. 159will be used instead of prompting for password.
160 160
161Listing all available instances defined in the configuration file and then 161Listing available instances defined in the configuration file and then
162loading a specific instance can be achieved by: 162loading a specific instance can be achieved by:
163 163
164 ```bash 164 ```bash
@@ -166,6 +166,9 @@ loading a specific instance can be achieved by:
166 etoolkit <instance-name> 166 etoolkit <instance-name>
167 ``` 167 ```
168 168
169Instances with names starting with *_* will be considered *abstract* and will
170not be displayed by *--list*.
171
169*etoolkit* will prompt for the master password the first time it encounters 172*etoolkit* will prompt for the master password the first time it encounters
170and encrypted value. Once provided the master password will be used to decrypt 173and encrypted value. Once provided the master password will be used to decrypt
171the rest of the encrypted values. 174the rest of the encrypted values.
diff --git a/src/etoolkit/__init__.py b/src/etoolkit/__init__.py
index e2925ef..ae6465c 100644
--- a/src/etoolkit/__init__.py
+++ b/src/etoolkit/__init__.py
@@ -17,7 +17,7 @@
17from .etoolkit import EtoolkitInstance, EtoolkitInstanceError 17from .etoolkit import EtoolkitInstance, EtoolkitInstanceError
18 18
19__author__ = 'Simeon Simeonov' 19__author__ = 'Simeon Simeonov'
20__version__ = '1.1.0' 20__version__ = '1.2.0-beta1'
21__license__ = 'GPL3' 21__license__ = 'GPL3'
22 22
23 23
diff --git a/src/etoolkit/__main__.py b/src/etoolkit/__main__.py
index 603bb2e..299d75c 100644
--- a/src/etoolkit/__main__.py
+++ b/src/etoolkit/__main__.py
@@ -306,7 +306,10 @@ def main(inargs=None):
306 sys.exit(0) 306 sys.exit(0)
307 if args.list: 307 if args.list:
308 for instance_name in sorted( 308 for instance_name in sorted(
309 config_dict.get('instances', {}).keys() 309 filter(
310 lambda s: not s.startswith('_'),
311 config_dict.get('instances', {}).keys(),
312 )
310 ): 313 ):
311 print(instance_name) 314 print(instance_name)
312 sys.exit(0) 315 sys.exit(0)