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 spice

  • source (str) – Source filepath for encryption

  • destination (str) – Destination filepath of the encrypted file

  • treasure (str) – Name of the variable

  • location (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 spice

  • destination (str) – Destination filepath of the decrypted file

  • treasure (str) – Name of the variable

  • location (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 spice

  • treasure (str) – Name of the variable

  • location (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 spice

  • treasure (str) – Name of the variable

  • location (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 spice

  • treasure (str) – Name of the variable

  • location (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 spice

  • location (str) – Location of the secretmap file

  • match (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 file

  • secretmaps (str) – Two secretmaps that should be compared

Returns

Void

Return type

None