diff --git a/.gitignore b/.gitignore index fe75148..fe713ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ mensaplan.json mensaplan_static.json +dist/ +uulm_mensa.egg-info/ diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..998297e --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include LICENSE README.md +global-exclude *.py[cdo] __pycache__ *.so *.pyd diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..64e4a8b --- /dev/null +++ b/setup.py @@ -0,0 +1,49 @@ +import sys +from setuptools import setup, find_packages + +if sys.version_info < (3, 2, 0): + raise RuntimeError("uulm-mensa requires Python 3.2.0+") + +setup( + name='uulm-mensa', + version='0.1.0', + + url='https://github.com/mmk2410/uulm-mensa', + + author='mmk2410', + author_email='marcelmichaelkapfer@yahoo.co.nz', + + packages=find_packages(), + + platforms='any', + + description='Mensa plans for the university ulm', + long_description=open('./README.md', 'r').read(), + + keywords='mensa plan bistro uulm ulm', + + install_requires=['datetime'], + + license='MIT', + + entry_points={ + 'console_scripts': [ + 'uulm-mensa=uulm_mensa.cli:main' + ], + }, + + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Operating System :: OS Independent', + 'Environment :: Console', + 'License :: OSI Approved :: MIT License', + 'Intended Audience :: End Users/Desktop', + 'Topic :: Utilities', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.2', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + ], +) diff --git a/uulm_mensa/__init__.py b/uulm_mensa/__init__.py new file mode 100644 index 0000000..959742c --- /dev/null +++ b/uulm_mensa/__init__.py @@ -0,0 +1,9 @@ +""" + uulm-mensa + ~~~~~~~~~~ + + Mensa menu of the university of ulm + + :copyright: (c) 2016 by mmk2410 + :license: MIT License +""" diff --git a/uulm_mensa/__pycache__/__init__.cpython-35.pyc b/uulm_mensa/__pycache__/__init__.cpython-35.pyc new file mode 100644 index 0000000..602e5b5 Binary files /dev/null and b/uulm_mensa/__pycache__/__init__.cpython-35.pyc differ diff --git a/uulm_mensa/__pycache__/cli.cpython-35.pyc b/uulm_mensa/__pycache__/cli.cpython-35.pyc new file mode 100644 index 0000000..48d82de Binary files /dev/null and b/uulm_mensa/__pycache__/cli.cpython-35.pyc differ diff --git a/mensaplan.py b/uulm_mensa/cli.py similarity index 93% rename from mensaplan.py rename to uulm_mensa/cli.py index 45de68f..81574cb 100755 --- a/mensaplan.py +++ b/uulm_mensa/cli.py @@ -1,6 +1,5 @@ -#!/usr/bin/env python3 """ -Print the Mensaplan of the uni ulm in a fancy cli way +Print the Mensaplan of the university ulm in a fancy cli way """ import sys @@ -17,10 +16,10 @@ def print_usage(): """Print the help text""" print("Usage:") usage = """ - ./mensaplan.py place + uulm-mensa place Print the todays menu at the place. - ./mensaplan.py place [mon, tue, wed, thur, fri] + uulm-mensa place [mon, tue, wed, thur, fri] Print the menu at the place of the given weekday. Supported places are: @@ -85,7 +84,7 @@ def print_menu(place, static=False): print(meal["category"] + ": " + meal["meal"]) def main(): - """Main function""" + """Entry point for the application script""" if len(sys.argv) >= 2: cmd = sys.argv[1] if cmd == "help": @@ -112,4 +111,5 @@ def main(): print("[ERROR]: No argument given") print_usage() -main() +if __name__ == "__main__": + main()