Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
heschy committed Sep 25, 2021
1 parent 84554a1 commit 896c4d1
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 37 deletions.
129 changes: 129 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
1 change: 1 addition & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

while x != 1:
x = starfleet.library(input("Name / Regristrierungnummer: "));
print(x);
75 changes: 38 additions & 37 deletions starfleet.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
import mhn;

def __help__():
return 'Starfleet Library 1.0';



def db_entry_decode(database, mhn):
print('Name: ' + database[0]);
print('Klasse: ' + database[1]);
print('Registriernummer(n): ' + database[2]);
print('Captain: ' + database[3]);
print('Zeitraum: ' + database[4]);
print('Medizinisches Holografisches Notfallprogramm (MHN): ' + mhn);
output = '';
output += 'Name: ' + database[0] + '\n';
output += 'Klasse: ' + database[1] + '\n';
output += 'Registriernummer(n): ' + database[2] + '\n';
output += 'Captain: ' + database[3] + '\n';
output += 'Zeitraum: ' + database[4] + '\n';
output += 'Medizinisches Holografisches Notfallprogramm (MHN): ' + mhn + '\n';
return output;

def library(name):
print();
output='\n';

spaceship_enterprise = [
'USS Enterprise (NX-01) NX Klasse Captain Jonathan Archer, 2151 - 2161',
'USS Enterprise (NCC-1701) Constitution Klasse, Captain James Tiberus Kirk, 2245 - 2285',
'USS Enterprise (NCC-1701-A) Constitution Klasse, Captain James Tiberus Kirk, 2286 - 2293',
'USS Enterprise (NCC-1701-B) Excelsior Klasse, Captain John Harriman, 2293 - Unbekannt',
'USS Enterprise (NCC-1701-C) Ambassador Klasse, Captain Rachel Garrett, Unbekannt - 2344',
'USS Enterprise (NCC-1701-D) Galaxy Klasse, Captain Jean-Luc Picard, 2363 - 2371',
'USS Enterprise (NCC-1701-E) Sovereign Klasse, Captain Jean-Luc Picard, 2372 - Unbekannt',
'USS Enterprise (NCC-1701-J) Universe Klasse, Ubekannter Captain, Unbekannt'];
'USS Enterprise (NX-01) NX Klasse Captain Jonathan Archer, 2151 - 2161\n',
'USS Enterprise (NCC-1701) Constitution Klasse, Captain James Tiberus Kirk, 2245 - 2285\n',
'USS Enterprise (NCC-1701-A) Constitution Klasse, Captain James Tiberus Kirk, 2286 - 2293\n',
'USS Enterprise (NCC-1701-B) Excelsior Klasse, Captain John Harriman, 2293 - Unbekannt\n',
'USS Enterprise (NCC-1701-C) Ambassador Klasse, Captain Rachel Garrett, Unbekannt - 2344\n',
'USS Enterprise (NCC-1701-D) Galaxy Klasse, Captain Jean-Luc Picard, 2363 - 2371\n',
'USS Enterprise (NCC-1701-E) Sovereign Klasse, Captain Jean-Luc Picard, 2372 - Unbekannt\n',
'USS Enterprise (NCC-1701-J) Universe Klasse, Ubekannter Captain, Unbekannt\n'];

spaceship_prometheus = [
'USS Prometheus (NX-59650/NX-74913) Prometheus Klasse, Unbekannter Captain, 2373 - 2385',
'USS Prometheus (NCC-71201), Nebula Klasse, Lieutenant Commander Piersall, Unbekannt' ];
'USS Prometheus (NX-59650/NX-74913) Prometheus Klasse, Unbekannter Captain, 2373 - 2385\n',
'USS Prometheus (NCC-71201), Nebula Klasse, Lieutenant Commander Piersall, Unbekannt\n' ];

spaceship_voyager = [
'USS Voyager (NCC-74656) Intrepid Klasse, Captain Kathryn Janeway, 2373 - 2385'];
'USS Voyager (NCC-74656) Intrepid Klasse, Captain Kathryn Janeway, 2373 - 2385\n'];

spaceship_prometheus_59650 = [
'USS Prometheus',
Expand All @@ -45,41 +47,40 @@ def library(name):
spaceship_prometheus,
spaceship_voyager,
spaceship_prometheus_59650];
if name == 'MHN' or name == 'Medizinisches Holografisches Notfallprogramm' or name == 'mhn':
print(mhn.v1());
print(mhn.v2());

if name == 'MHN' or name == 'Medizinisches Holografisches Notfallprogramm' or name == 'mhn'or name == 'Medizinisch Holografisches Notfallprogramm':
output = mhn.v1()+'\n';
output += mhn.v2();

elif name == 'USS Enterprise':
for listitem in spaceship_enterprise:
print(listitem);
output += listitem;

elif name == 'USS Prometheus':
for listitem in spaceship_prometheus:
print(listitem);
output += listitem;

elif name == 'USS Voyager':
for listitem in spaceship_voyager:
print(listitem);
output += listitem;

elif name == 'NX-59650' or name == 'NX-74913':
db_entry_decode(spaceship_prometheus_59650, mhn.v2());
output += db_entry_decode(spaceship_prometheus_59650, mhn.v2());

elif name == 'db_entry:nx59650':
print(spaceship_prometheus_59650);
elif name == 'db_entry:nx59650' or name == 'db_entry:nx74913':
output += str(spaceship_prometheus_59650);

elif name == 'exit' or name == 'quit' or name == 'stop':
return 1;

elif name == 'help' or name == 'info':
print('Um eine Liste der Schiffe zu erhalten, die den selben namen tragen, geben sie bitte den Namen ein.');
print('Um alle Informationen über ein bestimmtes Schiff zu erhalten, geben sie bitte die Registriernummer des Schiffes an.');
output += 'Um eine Liste der Schiffe zu erhalten, die den selben namen tragen, geben sie bitte den Namen ein.' + '\n';
output += 'Um alle Informationen über ein bestimmtes Schiff zu erhalten, geben sie bitte die Registriernummer des Schiffes an.' + '\n';

elif name == 'db' or name == 'print_db' or name == 'print db' or name == 'database' or name == 'print_database' or name == 'print database':
for listitem in db:
for listitem_subitem in listitem:
print('db_entry ' + listitem_subitem);
print('db' + str(db));
output = 'Output to Large, wrote into Console';
else:
print('Zugriff nicht möglich!');
output += 'Zugriff nicht möglich!'+'\n';

print();
return 0;
return output;

0 comments on commit 896c4d1

Please sign in to comment.