3
# Copyright (C) 2010 Robert Jordens
5
# This program is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation, either version 3 of the License, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19
from twisted.internet import reactor
20
from twisted.python import log
22
from eyefi.config import glue_config, get_cards
23
from eyefi.actions import build_actions
24
from eyefi.server import EyeFiServer
30
def get_server(cfg=cfg):
31
cards = get_cards(cfg)
32
actions = build_actions(cfg, cards)
33
server = EyeFiServer(cards, actions)
36
if __name__ == "__main__":
38
log.startLogging(sys.stdout)
40
mac = server.cards.keys()[0]
42
d = server.run_actions(mac, files)
43
d.addBoth(reactor.stop)