aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_podcaster/__init__.py
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2015-10-11 17:54:06 +0200
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2015-10-11 17:54:56 +0200
commita7fe15b99d64904855ba2bd3649b1a3642824a75 (patch)
tree35c2da4777ffcbd1b6fb661227af8a6528646030 /youtube_podcaster/__init__.py
parentf1ddf104809017784aa136ebb8ff7e2cfb96d5f4 (diff)
downloadyoutube-podcaster-a7fe15b99d64904855ba2bd3649b1a3642824a75.tar.gz
youtube-podcaster-a7fe15b99d64904855ba2bd3649b1a3642824a75.tar.bz2
youtube-podcaster-a7fe15b99d64904855ba2bd3649b1a3642824a75.zip
Can actually be installed with setup.py now
Diffstat (limited to 'youtube_podcaster/__init__.py')
-rw-r--r--youtube_podcaster/__init__.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/youtube_podcaster/__init__.py b/youtube_podcaster/__init__.py
new file mode 100644
index 0000000..32aee7c
--- /dev/null
+++ b/youtube_podcaster/__init__.py
@@ -0,0 +1,28 @@
1#!/usr/bin/env python3
2
3import json
4
5from http.server import (
6 HTTPServer,
7)
8
9from . import (
10 youtube,
11)
12
13from .podcastfeeder import (
14 create_feeder
15)
16
17
18def main():
19 config = json.load(open("youtube-podcaster.json"))
20
21 try:
22 PodcastFeeder = create_feeder(config["youtube"], config["podcasts"])
23 server = HTTPServer(("", 8888), PodcastFeeder)
24 server.serve_forever()
25 except KeyboardInterrupt:
26 server.socket.close()
27
28# vim: set ts=8 sw=4 tw=0 et :