15
15
16
16
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
17
17
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
18
+
18
19
** Table of Contents**
19
20
20
21
- [ Description] ( #description )
@@ -117,6 +118,22 @@ Usage:
117
118
118
119
### Rules
119
120
121
+ ** encryption or decryption**
122
+
123
+ - if sourcefile given without a targetfile and sourcefile has not extension ` .aes ` , the targetfile will be encrypted as ` <samePath>/<sourcefile>.aes `
124
+ - if sourcefile has extension ` .aes ` without a targetfile, the targetfile will be decrypted ` <samePath>/<sourcefile> ` (without extension ` .aes ` )
125
+
126
+ ``` mermaid
127
+ flowchart TD;
128
+ A["path/to/sourcefile"]-. "has not .aes" .->B[[encrypt sourcefile]]
129
+ B-- "has --target" -->C["new/path/to/sourcefile.aes"]
130
+ B-- "has no --target" -->D["path/to/sourcefile.aes"]
131
+
132
+ A["path/to/sourcefile"]-. "has .aes" .->F[["decrypt sourcefile"]]
133
+ F-- "has --target" -->G["new/path/to/sourcefile"]
134
+ F-- "has no --target" -->H["path/to/sourcefile"]
135
+ ```
136
+
120
137
** dotenv-file vs env variables**
121
138
122
139
The program works with given arguments and/or given dotenv-file.
@@ -128,32 +145,17 @@ The program works with given arguments and/or given dotenv-file.
128
145
``` mermaid
129
146
flowchart TD;
130
147
A["Variable"]-->Dotenv{"is defined in dotenv-file"}
131
- Dotenv-. "Y" .->S[["set environment variable"]]
148
+ Dotenv-. "Y" .->S1[["set environment variable"]]
149
+ S1[["set environment variable"]]-->Attrib{"is defined as attribute"}
132
150
Dotenv-. "N" .->Attrib{"is defined as attribute"}
133
151
Attrib-. "Y" .->S[["set environment variable"]]
134
- Attrib-. "N" .->V[[ "get environment variable"]]
152
+ Attrib-. "N" .->V{ "get environment variable"}
135
153
S-->V
136
- V[["get environment variable"]]
154
+
137
155
V-- "is empty" -->E("EXIT")
138
156
V-- "not empty and valid" -->P[["encrypt or decrypt file"]]
139
157
```
140
158
141
- ** encryption or decryption**
142
-
143
- - if sourcefile given without a targetfile and sourcefile has not extension ` .aes ` , the targetfile will be encrypted as ` <samePath>/<sourcefile>.aes `
144
- - if sourcefile has extension ` .aes ` without a targetfile, the targetfile will be decrypted ` <samePath>/<sourcefile> ` (without extension ` .aes ` )
145
-
146
- ``` mermaid
147
- flowchart TD;
148
- A["path/to/sourcefile"]-. "has not .aes" .->B[[encrypt sourcefile]]
149
- B-- "has --target" -->C["new/path/to/sourcefile.aes"]
150
- B-- "has no --target" -->D["path/to/sourcefile.aes"]
151
-
152
- A["path/to/sourcefile"]-. "has .aes" .->F[["decrypt sourcefile"]]
153
- F-- "has --target" -->G["new/path/to/sourcefile"]
154
- F-- "has no --target" -->H["path/to/sourcefile"]
155
- ```
156
-
157
159
## Encryption
158
160
159
161
> \[ !WARNING]
@@ -296,6 +298,7 @@ An utility to load environment variables from a .env file
296
298
## folder structure
297
299
298
300
<!-- readme-tree start -->
301
+
299
302
```
300
303
.
301
304
├── .github
@@ -344,6 +347,7 @@ An utility to load environment variables from a .env file
344
347
345
348
10 directories, 34 files
346
349
```
350
+
347
351
<!-- readme-tree end -->
348
352
349
353
<p align =" right " >(<a href =" #top " >back to top</a >)</p >
0 commit comments