Skip to content

vipol0/Pycoder-CLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pycoder-CLI

A simple command-line cipher tool written in Python. It encodes and decodes text by mapping each letter (English or Russian) to a "code word" defined in a JSON dictionary — for example hComet, иCompass.

Features

  • Encode text into a sequence of code words
  • Decode a sequence of code words back into text
  • Supports both English and Russian alphabets out of the box
  • Fully customizable cipher — just edit a JSON file, no code changes needed

Requirements

  • Python 3.10+ (uses match statements)

No external dependencies — only the standard library is used.

Getting Started

  1. Clone the repository:

    git clone https://github.com/vipol0/Pycoder-CLI.git
    cd Pycoder-CLI
  2. Run the program:

    python main.py
  3. Choose an option from the menu:

    Menu:
    [1] Code
    [2] Decode
    [3] Exit
    > 
    

Usage Example

Encoding:

> 1
Enter text: hello
Comet Forest Violin Violin Window

Decoding:

> 2
Enter text: Comet Forest Violin Violin Window
hello

Spaces between words are represented as - in the encoded text.

Creating Your Own Dictionary

The cipher mapping lives entirely in cipher_secret.json — you don't need to touch main.py to customize it.

The file has two sections, "english" and "russian", each mapping a letter to a code word:

{
  "english": {
    "a": "Table",
    "b": "River",
    ...
  },
  "russian": {
    "а": "Bronze",
    "б": "Crystal",
    ...
  }
}

To create your own cipher:

  1. Open cipher_secret.json.
  2. Replace the code words with anything you like (any string works — words, emojis, numbers as strings, etc.).
  3. Keep the letter keys ("a", "b", "а", "б", ...) unchanged, and make sure every value is unique — otherwise decoding will be ambiguous.
  4. Save the file and run main.py again. Your new dictionary will be used automatically.

You can also add entirely new languages/alphabets by adding another section (e.g. "french") — just make sure main.py's dictionary-merging logic includes it if you do.

License

This project is licensed under the MIT License — see the LICENSE file for details.

About

A simple CLI cipher tool with customizable JSON-based dictionaries

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages