Secret Map¶
- narrenschiff.cli.secretmap.secretmap(ctx)¶
Encrypt, decrypt, and edit files.
- Returns
Void
- Return type
None
- narrenschiff.cli.secretmap.stash(keychain, source, destination, treasure, location)¶
Encrypt and stash file.
- Parameters
keychain (
narrenschiff.chest.Keychain
) – Object containing key and spicesource (
str
) – Source filepath for encryptiondestination (
str
) – Destination filepath of the encrypted filetreasure (
str
) – Name of the variablelocation (
str
) – Location of the secretmap file
- Returns
Void
- Return type
None
- narrenschiff.cli.secretmap.loot(keychain, destination, treasure, location)¶
Decrypt file from stash.
- Parameters
keychain (
narrenschiff.chest.Keychain
) – Object containing key and spicedestination (
str
) – Destination filepath of the decrypted filetreasure (
str
) – Name of the variablelocation (
str
) – Location of the secretmap file
- Returns
Void
- Return type
None
- narrenschiff.cli.secretmap.peek(keychain, treasure, location)¶
Print content of the encrypted file to STDOUT.
- Parameters
keychain (
narrenschiff.chest.Keychain
) – Object containing key and spicetreasure (
str
) – Name of the variablelocation (
str
) – Location of the secretmap file
- Returns
Void
- Return type
None
- narrenschiff.cli.secretmap.alter(keychain, treasure, location)¶
Decrypt and edit the file. After edits, the file is encrypted again.
- Parameters
keychain (
narrenschiff.chest.Keychain
) – Object containing key and spicetreasure (
str
) – Name of the variablelocation (
str
) – Location of the secretmap file
- Returns
Void
- Return type
None
- narrenschiff.cli.secretmap.destroy(keychain, treasure, location)¶
Delete secretmap file and corresponding key in the secretmap.
- Parameters
keychain (
narrenschiff.chest.Keychain
) – Object containing key and spicetreasure (
str
) – Name of the variablelocation (
str
) – Location of the secretmap file
- Returns
Void
- Return type
None
You cannot undo this action!
- narrenschiff.cli.secretmap.search(keychain, location, match)¶
Search for a pattern in secretmaps.
- Parameters
keychain (
narrenschiff.chest.Keychain
) – Object containing key and spicelocation (
str
) – Location of the secretmap filematch (
str
) – Pattern you are looking for
- Returns
Void
- Return type
None
- narrenschiff.cli.secretmap.diff(keychain, location, match)¶
Compare secretmaps line by line.
It can only compare secretmaps in the same course project.
- Parameters
location (
str
) – Location of the secretmap filesecretmaps (
str
) – Two secretmaps that should be compared
- Returns
Void
- Return type
None