Skip to content

Commit 7f9b7a0

Browse files
committed
v0.2.0
1 parent bcfe47e commit 7f9b7a0

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

README.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
1717
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
18+
1819
**Table of Contents**
1920

2021
- [Description](#description)
@@ -117,6 +118,22 @@ Usage:
117118

118119
### Rules
119120

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+
120137
**dotenv-file vs env variables**
121138

122139
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.
128145
```mermaid
129146
flowchart TD;
130147
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"}
132150
Dotenv-. "N" .->Attrib{"is defined as attribute"}
133151
Attrib-. "Y" .->S[["set environment variable"]]
134-
Attrib-. "N" .->V[["get environment variable"]]
152+
Attrib-. "N" .->V{"get environment variable"}
135153
S-->V
136-
V[["get environment variable"]]
154+
137155
V-- "is empty" -->E("EXIT")
138156
V-- "not empty and valid" -->P[["encrypt or decrypt file"]]
139157
```
140158

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-
157159
## Encryption
158160

159161
> \[!WARNING]
@@ -296,6 +298,7 @@ An utility to load environment variables from a .env file
296298
## folder structure
297299

298300
<!-- readme-tree start -->
301+
299302
```
300303
.
301304
├── .github
@@ -344,6 +347,7 @@ An utility to load environment variables from a .env file
344347
345348
10 directories, 34 files
346349
```
350+
347351
<!-- readme-tree end -->
348352

349353
<p align="right">(<a href="#top">back to top</a>)</p>

0 commit comments

Comments
 (0)