A simple Shell that mimics the nostalgic MS-DOS from the 1980s made by Bright Bluefins of Python Discord Summer Code Jam 2021.
This project aims to create a clone of a MS-DOS with python and prompt-toolkit framework. We named it BoxOS because the TUI resembles an old box inside the modern OS with GUIs. In a nutshell, it is a simple shell with common and basic commands of MS-DOS. It also features a text editor called Notepad and an image viewer called Photos.
The shell runs on top of a prompt_toolkit prompt session, which creates a REPL and takes the user input. It then parses the input from the user and then calls the appropriate command. It keeps track of the current path as a Path object. So that we can resolve the relative path as well as absolute path. It also uses custom styles to create the looks of the old DOS.
The structure of the project which actually is made using the TREE command of the shell!
The folder structure is restructured a bit to make it prettier but essentially the output is almost same.
└──bright-bluefins
├──.github
│ └──workflows
│ └──lint.yaml
├──docs
│ ├──images
│ │ │
│ │ ...
│ ├──Notepad.md
│ ├──Photos.md
│ └──ShellCommands.md
├──main
│ ├──commands.py
│ ├──main.py
│ ├──notepad
│ │ ├──notepad.py
│ │ └──__init__.py
│ ├──photos
│ │ ├──photos.py
│ │ └──__init__.py
│ ├──styles
│ │ ├──bright_blue.py
│ │ ├──styles.py
│ │ └──__init__.py
│ ├──tests
│ │ ├──commands_test.py
│ │ └──__init__.py
│ └──__init__.py
├──.gitignore
├──.pre-commit-config.yaml
├──LICENSE
├──Pipfile
├──Pipfile.lock
├──README.md
└──tox.ini
To get a local copy up and running of this shell, follow these simple steps.
-
Clone the repo and go into the local repo
bright-bluefinsgit clone https://github.com/DavinderJolly/bright-bluefins.git cd bright-bluefins -
Install pipenv (skip to next step if already have it installed)
py -m pip install pipenv
-
Install dependencies
pipenv install
-
Start the program
pipenv run start
-
Clone the repo and go into the local repo
bright-bluefinsgit clone https://github.com/DavinderJolly/bright-bluefins.git cd bright-bluefins -
Install pipenv (skip to next step if already have it installed)
python -m pip install pipenv # (or python3 -m) -
Install dependencies
pipenv install
-
Start the program
pipenv run start
Example usage of few of the common commands are given below. Try these out and have fun!
CD ../bright-bluefins/mainEDIT ./README.mdIMGVIEW ./docs/images/logo.pngTREE ./mainPING 1.1.1.1For the complete and detailed list of commands and features, please refer to the Documentation
Distributed under the MIT License. See LICENSE for more information.
A lot of free resources have been used to develop this project. A huge thanks to the creators of these resources:
