Commit 983efb39 authored by Lysander Trischler's avatar Lysander Trischler

Add categories support and bump version to 1.0.0

parent 0576d708
......@@ -22,13 +22,12 @@ yfav – publish your favorite YouTube videos via Atom feed
Usage: yfav [ VIDEO_ID ... ]
"""
__author = "Lysander Trischler"
__copyright__ = "Copyright 2012-2015, Lysander Trischler"
__license__ = "WTFPL"
__maintainer__ = "Lysander Trischler"
__email__ = "software@lyse.isobeef.org"
__version__ = "0.4.1"
__version_info__ = (0, 4, 1)
__author = "Lysander Trischler"
__copyright__ = "Copyright 2012-2015, Lysander Trischler"
__license__ = "WTFPL"
__maintainer__ = "Lysander Trischler"
__email__ = "software@lyse.isobeef.org"
__version__ = "1.0.0"
import os.path
import os
......@@ -191,6 +190,8 @@ def gen_atom(max=None):
'<sy:updateFrequency>' + CONFIG.get("atom", "updateFrequency", "1") + '</sy:updateFrequency>'
'<updated>' + now() + '</updated>'
'<generator>yfav/' + __version__ + '</generator>\n')
for category in CONFIG.get("atom", "categories", "Sonstiges").split(","):
atom.write('<category term="' + esc(category.strip()) + '"/>\n')
lines = reversed(index.readlines())
if max is not None:
lines = list(lines)[:max]
......@@ -218,7 +219,7 @@ if __name__ == "__main__":
import socket
hostname = os.getenv("HOST") or os.getenv("HOSTNMAE") or socket.gethostname()
if hostname == "isobeef.org":
if hostname in ("isobeef.org", "Ubuntu-1404-trusty-64-minimal"):
process = add_fav
else:
process = upload
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment