Skip to content

Commit 8bfec64

Browse files
committed
Fix typos in Caesar Cipher.
1 parent 0879d79 commit 8bfec64

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ So far, the following projects have been integrated to this repo:
2222
|[Bitcoin price GUI](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Bitcoin-Price-GUI) |[Amirul Abu](https://github.com/amirulabu) |
2323
|[Cryptocurrency Converter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Cryptocurrency-converter) |[AdnCodz](https://github.com/AdnCodez) |
2424
|[Cryptocurrency Prices](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Cryptocurrency-Prices) |[xemeds](https://github.com/xemeds) |
25-
|[Caesar Cipher](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/caeser_cipher) |[epi052](https://github.com/epi052) |
25+
|[Caesar Cipher](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/caesar_cipher) |[epi052](https://github.com/epi052) |
2626
|[Checksum tool](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Checksum) |[Austin Ewens](https://github.com/aewens) |
2727
|[Codechef autosubmitter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Codechef-Code-Submitter) |[Harshit Mahajan](https://github.com/hmahajan99) |
2828
|[Colored B&W Image Converter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Color_to_BW_Converter) |[Nitish Srivastava](https://github.com/nitish-iiitd) |
@@ -100,7 +100,7 @@ So far, the following projects have been integrated to this repo:
100100
|[Asymmetric Encryption](asymmetric_cryptography) |[victor matheus](https://github.com/victormatheusc) |
101101
|[Bitcoin price GUI](Bitcoin-Price-GUI) |[Amirul Abu](https://github.com/amirulabu) |
102102
|[Cryptocurrency Converter](Cryptocurrency-converter) |[AdnCodz](https://github.com/AdnCodez) |
103-
|[Caesar Cipher](caeser_cipher) |[epi052](https://github.com/epi052) |
103+
|[Caesar Cipher](caesar_cipher) |[epi052](https://github.com/epi052) |
104104
|[Checksum tool](Checksum) |[Austin Ewens](https://github.com/aewens) |
105105
|[Codechef autosubmitter](Codechef-Code-Submitter) |[Harshit Mahajan](https://github.com/hmahajan99) |
106106
|[Colored B&W Image Converter](Color_to_BW_Converter) |[Nitish Srivastava](https://github.com/nitish-iiitd) |

caesar_cipher/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Simple caesar Cipher [En,De]coder
2+
3+
A simple implementation of a CLI tool to work with caesar ciphers. The default implementation is ROT-13, but can be
4+
adjusted for any offset. Works on files and string arguments passed via CLI.
5+
6+
```bash
7+
python3 caesar.py
8+
9+
usage: caesar.py [-h] [-d] [-o OFFSET] (-f FILE | -s STRING)
10+
caesar.py: error: one of the arguments -f/--file -s/--string is required
11+
```
12+
13+
```bash
14+
python3 caesar.py -s "have you tried turning it off and on again?"
15+
unir lbh gevrq gheavat vg bss naq ba ntnva?
16+
```
17+
18+
```bash
19+
python3 caesar.py -d -s "unir lbh gevrq gheavat vg bss naq ba ntnva?"
20+
have you tried turning it off and on again?
21+
```
22+
23+
```bash
24+
python3 caesar.py -s "have you tried turning it off and on again?" -o -4
25+
dwra ukq pneaz pqnjejc ep kbb wjz kj wcwej?
26+
```
27+
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
maketrans = str.maketrans # python3
1010

1111

12-
def caeser_cipher(string_: str, offset: int, decode: bool, file_: string) -> None:
13-
""" Caeser Cipher implementation, reads file or string. Also decodes.
12+
def caesar_cipher(string_: str, offset: int, decode: bool, file_: string) -> None:
13+
""" caesar Cipher implementation, reads file or string. Also decodes.
1414
1515
Default implementation is ROT13 encoding.
1616
@@ -59,7 +59,7 @@ def check_offset_range(value: int) -> int:
5959

6060

6161
if __name__ == '__main__':
62-
parser = argparse.ArgumentParser(description="Simple Caeser Cipher [En,De]coder")
62+
parser = argparse.ArgumentParser(description="Simple caesar Cipher [En,De]coder")
6363

6464
parser.add_argument('-d', '--decode', action='store_true', dest='decode',
6565
help='decode ciphertext (offset should equal what was used to encode)', default=False)
@@ -72,4 +72,4 @@ def check_offset_range(value: int) -> int:
7272

7373
args = parser.parse_args()
7474

75-
caeser_cipher(args.string, args.offset, args.decode, args.file)
75+
caesar_cipher(args.string, args.offset, args.decode, args.file)

caeser_cipher/README.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)