Browse Source

added openpyxl to requirements

pyinstaller
Holger Frey 7 years ago
parent
commit
766b0ca5aa
  1. 2
      LICENSE
  2. 11
      arduino_timetable/__init__.py
  3. 1
      setup.py

2
LICENSE

@ -1,4 +1,4 @@
Copyright (c) <year> <owner> . All rights reserved. Copyright (c) 2017, Holger Frey . All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

11
arduino_timetable/__init__.py

@ -8,6 +8,9 @@ from collections import namedtuple
from datetime import datetime, timedelta from datetime import datetime, timedelta
__version__ = '0.0.1'
# example time table for the TrapControl # example time table for the TrapControl
example = ''' example = '''
00:00.0 close 00:00.0 close
@ -187,6 +190,7 @@ class TimedCommands(object):
''' parses a time table and establishes a serial connection ''' parses a time table and establishes a serial connection
timetable: timetable:
a file path to an excel file or
a textual representaion of time and commands like a textual representaion of time and commands like
00:12.0 close 00:12.0 close
@ -215,7 +219,10 @@ class TimedCommands(object):
# make sure the available commands are a dictionary # make sure the available commands are a dictionary
cmd_dict = self._ensure_command_dict(available_commands) cmd_dict = self._ensure_command_dict(available_commands)
# parse the time table into something suitable # parse the time table into something suitable
self.commands = parse_time_table(timetable, cmd_dict) if '.xls' in timetable:
self.commands = parse_excel_file(timetable, cmd_dict)
else:
self.commands = parse_time_table(timetable, cmd_dict)
# establish the serial connection # establish the serial connection
port = port or find_arduino_port() port = port or find_arduino_port()
@ -259,5 +266,3 @@ class TrapControl(TimedCommands):
def __init__(self, timetable): def __init__(self, timetable):
super().__init__(timetable, ['open', 'close']) super().__init__(timetable, ['open', 'close'])

1
setup.py

@ -110,6 +110,7 @@ setup(
# https://packaging.python.org/en/latest/requirements.html # https://packaging.python.org/en/latest/requirements.html
install_requires=[ install_requires=[
'pyserial', 'pyserial',
'openpyxl',
], ],
# List additional groups of dependencies here (e.g. development # List additional groups of dependencies here (e.g. development

Loading…
Cancel
Save