diff options
| author | Simeon Simeonov | 2022-04-04 21:11:25 +0200 |
|---|---|---|
| committer | Simeon Simeonov | 2022-04-04 21:11:25 +0200 |
| commit | e36f260c2ebc5e21724e5eedf0a91d2bc66cceec (patch) | |
| tree | 19213b92189c957ec0f2d0638ee06f07d089167a | |
| parent | 6eb9318f6b22db29942998fddf88752aa4c54779 (diff) | |
Treat instances with names starting with _ as abstract and do not list them
| -rw-r--r-- | README.md | 5 | ||||
| -rw-r--r-- | src/etoolkit/__init__.py | 2 | ||||
| -rw-r--r-- | src/etoolkit/__main__.py | 5 |
3 files changed, 9 insertions, 3 deletions
| @@ -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 |
| 159 | will be used instead of prompting for password. | 159 | will be used instead of prompting for password. |
| 160 | 160 | ||
| 161 | Listing all available instances defined in the configuration file and then | 161 | Listing available instances defined in the configuration file and then |
| 162 | loading a specific instance can be achieved by: | 162 | loading 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 | ||
| 169 | Instances with names starting with *_* will be considered *abstract* and will | ||
| 170 | not 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 |
| 170 | and encrypted value. Once provided the master password will be used to decrypt | 173 | and encrypted value. Once provided the master password will be used to decrypt |
| 171 | the rest of the encrypted values. | 174 | the 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 @@ | |||
| 17 | from .etoolkit import EtoolkitInstance, EtoolkitInstanceError | 17 | from .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) |
