Published to pypi
This commit is contained in:
parent
e62064f519
commit
7686cd77da
7 changed files with 68 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,4 @@
|
||||||
mensaplan.json
|
mensaplan.json
|
||||||
mensaplan_static.json
|
mensaplan_static.json
|
||||||
|
dist/
|
||||||
|
uulm_mensa.egg-info/
|
||||||
|
|
2
MANIFEST.in
Normal file
2
MANIFEST.in
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
include LICENSE README.md
|
||||||
|
global-exclude *.py[cdo] __pycache__ *.so *.pyd
|
49
setup.py
Normal file
49
setup.py
Normal file
|
@ -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',
|
||||||
|
],
|
||||||
|
)
|
9
uulm_mensa/__init__.py
Normal file
9
uulm_mensa/__init__.py
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
"""
|
||||||
|
uulm-mensa
|
||||||
|
~~~~~~~~~~
|
||||||
|
|
||||||
|
Mensa menu of the university of ulm
|
||||||
|
|
||||||
|
:copyright: (c) 2016 by mmk2410
|
||||||
|
:license: MIT License
|
||||||
|
"""
|
BIN
uulm_mensa/__pycache__/__init__.cpython-35.pyc
Normal file
BIN
uulm_mensa/__pycache__/__init__.cpython-35.pyc
Normal file
Binary file not shown.
BIN
uulm_mensa/__pycache__/cli.cpython-35.pyc
Normal file
BIN
uulm_mensa/__pycache__/cli.cpython-35.pyc
Normal file
Binary file not shown.
|
@ -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
|
import sys
|
||||||
|
@ -17,10 +16,10 @@ def print_usage():
|
||||||
"""Print the help text"""
|
"""Print the help text"""
|
||||||
print("Usage:")
|
print("Usage:")
|
||||||
usage = """
|
usage = """
|
||||||
./mensaplan.py place
|
uulm-mensa place
|
||||||
Print the todays menu at the 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.
|
Print the menu at the place of the given weekday.
|
||||||
|
|
||||||
Supported places are:
|
Supported places are:
|
||||||
|
@ -85,7 +84,7 @@ def print_menu(place, static=False):
|
||||||
print(meal["category"] + ": " + meal["meal"])
|
print(meal["category"] + ": " + meal["meal"])
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Main function"""
|
"""Entry point for the application script"""
|
||||||
if len(sys.argv) >= 2:
|
if len(sys.argv) >= 2:
|
||||||
cmd = sys.argv[1]
|
cmd = sys.argv[1]
|
||||||
if cmd == "help":
|
if cmd == "help":
|
||||||
|
@ -112,4 +111,5 @@ def main():
|
||||||
print("[ERROR]: No argument given")
|
print("[ERROR]: No argument given")
|
||||||
print_usage()
|
print_usage()
|
||||||
|
|
||||||
main()
|
if __name__ == "__main__":
|
||||||
|
main()
|
Reference in a new issue