diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b295ebd --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.idea +dist/ +venv/ +*.egg-info/ +build/ +__pycache__/ + +.DS_Store diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..1aba38f --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include LICENSE diff --git a/README.md b/README.md index f02c233..e572f0f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,25 @@ -# spelling +# Spell It For Me A simple command line tool to display a spelling for any phrase using a phonetic alphabet. + +Uses the NATO phonetic alphabet. + +More alphabets will be supported in the future. + +## Installation + +Run the following to install: + +```bash +$ pip install spell-it-for-me +``` + +## Usage + +```bash +$ spell Louis +L: Líma +o: Óscar +u: Úniform +i: Índia +s: Siérra +``` diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..1932cb2 --- /dev/null +++ b/setup.py @@ -0,0 +1,35 @@ +from setuptools import setup + +with open('README.md') as readme_file: + long_description = readme_file.read() + +setup( + name='spell-it-for-me', + version='0.1.1', + url='https://github.com/bondarevts/spell-it-for-me', + author='Timofei Bondarev', + author_email='bondarevts@gmail.com', + description='A simple command line tool to display a spelling for any phrase using a phonetic alphabet.', + long_description=long_description, + long_description_content_type='text/markdown', + py_modules=['spell'], + entry_points={'console_scripts': ['spell = spell:main']}, + package_dir={'': 'src'}, + classifiers=[ + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Operating System :: OS Independent', + 'Environment :: Console', + 'Intended Audience :: End Users/Desktop', + 'Topic :: Communications', + 'Topic :: Utilities', + ], +) diff --git a/spell.py b/src/spell.py similarity index 96% rename from spell.py rename to src/spell.py index 98c879d..78e00e6 100755 --- a/spell.py +++ b/src/spell.py @@ -66,7 +66,7 @@ def print_spelling(word: str, spelling_map: Dict[str, str]) -> None: for letter in word: print(letter, ': ', sep='', end='') - print(spelling_map.get(letter, letter)) + print(spelling_map.get(letter.lower(), letter)) def main() -> None: