Add reminder report
This commit is contained in:
parent
5b5ea6061d
commit
b83b1a8b27
26
bloggers.yml
26
bloggers.yml
|
@ -2,84 +2,100 @@ BarbaraHoisl:
|
|||
links:
|
||||
- [0, (blog folgt), 'http://staging.wazong.de/', 'http://staging.wazong.de/feed/']
|
||||
name: Barbara Hoisl
|
||||
mail: barbara@barbarahoisl.com
|
||||
start: 2012/12/31
|
||||
ChemieEmma:
|
||||
links:
|
||||
- [dent, dent in the world (Englisch), 'http://dentintheworld.com/', 'http://dentintheworld.com/feed/atom/']
|
||||
- [alpaka, the naked alpaca (Englisch), 'http://thenakedalpaca.com/', 'http://thenakedalpaca.com/feed/atom/']
|
||||
name: Paula Schramm
|
||||
mail: missp@dentintheworld.com
|
||||
start: 2012/09/24
|
||||
DVDtoday:
|
||||
links:
|
||||
- [0, JKdigital, 'http://jkdigital.de/', 'http://jkdigital.de/feed/']
|
||||
name: "J\xFCrgen Kaiser"
|
||||
mail: jk@jkplus.de
|
||||
start: 2012/09/24
|
||||
HubertMayer:
|
||||
links:
|
||||
- [0, Hubert Mayer, 'http://hubert-mayer.de/', 'http://hubert-mayer.de/feed/']
|
||||
- [testet, Hubert Testet, 'http://hubert-testet.de/', 'http://hubert-testet.de/feed/']
|
||||
name: Hubert Mayer
|
||||
mail: mayerwerbung@gmx.de
|
||||
start: 2012/09/24
|
||||
TabTwo:
|
||||
links:
|
||||
- [0, Nerd Residenz, 'http://www.nerd-residenz.de/blog/', 'http://www.nerd-residenz.de/blog/index.atom']
|
||||
name: Ralph Mayer
|
||||
mail: rmayer@nerd-residenz.de
|
||||
start: 2012/09/24
|
||||
affiliteur:
|
||||
links:
|
||||
- [0, Affiliate auf Partytour, 'http://www.affiliteur.com/', 'http://www.affiliteur.com/feed/atom']
|
||||
name: Sascha Schilling
|
||||
mail: info@affiliteur.com
|
||||
start: 2012/09/24
|
||||
cmsfunk:
|
||||
links:
|
||||
- [0, Stattmarketing, 'http://stattmarketing.wordpress.com/', 'http://stattmarketing.wordpress.com/feed/']
|
||||
name: Christoph Funk
|
||||
mail: christoph.funk28@gmail.com
|
||||
start: 2012/09/24
|
||||
dentaku:
|
||||
links:
|
||||
- [0, Dentaku, 'http://dentaku.wazong.de/', 'http://dentaku.wazong.de/category/blog/feed']
|
||||
name: Thomas Renger
|
||||
mail: dentaku@wazong.de
|
||||
start: 2012/09/24
|
||||
dirkhaun:
|
||||
links:
|
||||
- [0, Dirks Hirnableiter, 'http://hirnableiter.tinycities.de/', 'http://hirnableiter.tinycities.de/feeds/hirnableiter.rss']
|
||||
- [1, The Mobile Presenter (Englisch), 'http://www.themobilepresenter.com/', 'http://www.themobilepresenter.com/feeds/themobilepresenter.rss']
|
||||
name: Dirk Haun
|
||||
mail: dirk@haun-online.de
|
||||
start: 2012/09/24
|
||||
erikschimmel:
|
||||
links:
|
||||
- [0, Erik Schimmel, 'http://erikschimmel.de/', 'http://erikschimmel.de/feed/']
|
||||
name: Erik Schimmel
|
||||
mail: mail@erikschimmel.de
|
||||
start: 2012/10/01
|
||||
gordongeisler:
|
||||
links:
|
||||
- [0, (blog folgt), 'http://staging.wazong.de/', 'http://staging.wazong.de/feed/']
|
||||
name: Gordon Geisler
|
||||
mail: gordon.geisler@freiarbeiter.com
|
||||
start: 2012/12/31
|
||||
hirnrinde:
|
||||
links:
|
||||
- [0, Hirnrinde, 'http://www.hirnrinde.de/', 'http://www.hirnrinde.de/hirnrinde.php']
|
||||
name: Stefan Evertz
|
||||
mail: stefan.evertz@gmail.com
|
||||
start: 2012/09/24
|
||||
hoomygumb:
|
||||
links:
|
||||
- [0, it's a hoomygumb, 'http://hoomygumb.com/', 'http://hoomygumb.com/feed/']
|
||||
name: Jay F. Kay
|
||||
mail: hoomygumb@gmail.com
|
||||
start: 2012/09/24
|
||||
idrottning:
|
||||
links:
|
||||
- [0, (blog folgt), 'http://staging.wazong.de/', 'http://staging.wazong.de/feed/']
|
||||
name: Viola Frankenberg
|
||||
mail: v.frankenberg@gmx.de
|
||||
start: 2012/12/31
|
||||
jantheofel:
|
||||
links:
|
||||
- [0, "Jans K\xFCchenleben", 'http://www.theofel.de/plog/', 'http://www.theofel.de/plog/index.xml']
|
||||
name: Jan Theofel
|
||||
mail: jan@theofel.de
|
||||
start: 2012/09/24
|
||||
lakritzplanet:
|
||||
links:
|
||||
- [0, Lakritzplanet, 'http://www.lakritzplanet.de/', 'http://www.lakritzplanet.de/feed/']
|
||||
name: Christian Kaufmann
|
||||
mail: mail@lakritzplanet.de
|
||||
start: 2012/09/24
|
||||
musevg:
|
||||
links:
|
||||
|
@ -87,51 +103,61 @@ musevg:
|
|||
- [b2s, Brain 2 Shirt, 'http://www.2shirt.org', 'http://www.2shirt.org/feed/atom/']
|
||||
- [allesso, Alles so, 'http://www.alles.so/', 'http://www.alles.so/feed/']
|
||||
name: Michael Schommer
|
||||
mail: iron@muse.vg
|
||||
start: 2012/09/24
|
||||
pNachhaltig:
|
||||
links:
|
||||
- [0, praktisch Nachhaltig, 'http://praktisch-nachhaltig.de/news-und-presse/praktisch-nachhaltig-blog',
|
||||
'http://staging.wazong.de/feed/']
|
||||
name: "Franziska K\xF6ppe"
|
||||
mail: info@madiko.com
|
||||
start: 2012/12/31
|
||||
poster4nature:
|
||||
links:
|
||||
- [0, poster4nature, 'http://www.poster4nature.com/category/blog/', 'http://www.poster4nature.com/category/blog/feed/']
|
||||
name: Alexander Beck
|
||||
mail: partner@poster4nature.com
|
||||
start: 2012/09/24
|
||||
reichepoet:
|
||||
links:
|
||||
- [0, Der Reiche Poet, 'http://reichepoet.blogspot.de/', 'http://reichepoet.blogspot.com/feeds/posts/default']
|
||||
name: "Ute M\xFCndlein"
|
||||
mail: ute.muendlein@10-o-clock.de
|
||||
start: 2012/09/24
|
||||
twitter: false
|
||||
roadkill:
|
||||
links:
|
||||
- [0, Hinten beim Bier, 'http://www.hintenbeimbier.de/', 'http://www.hintenbeimbier.de/feed/']
|
||||
name: Stefan Sommer
|
||||
mail: st.sommer@gmail.com
|
||||
start: 2012/09/24
|
||||
schiri:
|
||||
links:
|
||||
- [0, Patrick Schneider, 'http://www.patrickschneider.net', 'http://www.patrickschneider.net/feed/']
|
||||
name: Patrick Schneider
|
||||
mail: info@patrickschneider.net
|
||||
start: 2012/09/24
|
||||
spacedani:
|
||||
links:
|
||||
- [0, Danigee, 'http://www.danigee.de/', 'http://www.danigee.de/feed/']
|
||||
name: Danijela Grgic
|
||||
mail: spacedani@gmail.com
|
||||
start: 2012/10/01
|
||||
sympatexter:
|
||||
links:
|
||||
- [0, Sympatexter, 'http://www.sympatexter.de/', 'http://www.sympatexter.de/feed']
|
||||
name: "Judith B\xF6hm"
|
||||
mail: boehm.judith@gmail.com
|
||||
start: 2012/09/24
|
||||
werkstatt:
|
||||
links:
|
||||
- [0, Wissenswerkstatt, 'http://www.wissenswerkstatt.net/', 'http://www.wissenswerkstatt.net/feed/']
|
||||
name: Marc Scheloske
|
||||
mail: marc.scheloske@gmail.com
|
||||
start: 2012/09/24
|
||||
wunschgeburt:
|
||||
links:
|
||||
- [0, Wunschgeburt, 'http://www.wunschgeburt.de/weblog/', 'http://www.wunschgeburt.de/feed/']
|
||||
name: Mika Kienberger
|
||||
mail: frau.kienberger@web.de
|
||||
start: 2012/10/08
|
||||
|
|
|
@ -88,6 +88,7 @@ def render_template(path, week=None, **kwargs):
|
|||
u = User()
|
||||
u.username = un
|
||||
u.name = rec['name']
|
||||
u.mail = rec['mail']
|
||||
u.links = rec['links']
|
||||
u.twitter = rec.get('twitter')
|
||||
u.start_de = datetime.datetime.strptime(rec['start'],"%Y/%m/%d").strftime("%d.%m.%Y")
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
From: ${mail}
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
Subject: IRON BLOGGER results for the week beginning ${week_start.strftime("%F")}
|
||||
To: ${mail}
|
||||
|
||||
|
|
44
templates/reminder.txt
Normal file
44
templates/reminder.txt
Normal file
|
@ -0,0 +1,44 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
From: ${mail}
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
Subject: Iron Blogger Erinnerung: noch kein Beitrag in der Woche ab ${week_start.strftime("%d.%m.%Y")}:
|
||||
To: \
|
||||
% for u in sorted(userlist, key=lambda u:u.name[u.name.rfind(' '):].lower()):
|
||||
% if len(u.lameblogs)>0:
|
||||
${u.mail}, \
|
||||
% endif
|
||||
% endfor
|
||||
|
||||
|
||||
Hallo liebe Blogger,
|
||||
|
||||
ich habe gesehen, dass die folgenden Benutzer in dieser Woche noch nichts
|
||||
geschrieben haben:
|
||||
|
||||
% for u in sorted(userlist, key=lambda u:u.name[u.name.rfind(' '):].lower()):
|
||||
% for g in u.lameblogs:
|
||||
% for b in u.links:
|
||||
% if b[0] == g:
|
||||
* ${u.name} \
|
||||
% if u.twitter != False:
|
||||
(@${u.username}) \
|
||||
% endif
|
||||
% if len(u.links) != 1:
|
||||
in ${b[1]} \
|
||||
% endif
|
||||
|
||||
% endif
|
||||
% endfor
|
||||
% endfor
|
||||
% endfor
|
||||
% if punt:
|
||||
|
||||
Achtung, Gefahr des Ausscheidens wegen zu hoher Schulden:
|
||||
% for u in sorted(punt):
|
||||
* ${u}
|
||||
% endfor
|
||||
% endif
|
||||
|
||||
Besorgt,
|
||||
--
|
||||
Der Iron Blogger Bot
|
|
@ -12,17 +12,28 @@ import settings
|
|||
config=settings.load_settings()
|
||||
|
||||
dry_run = False
|
||||
send_mail = True
|
||||
quick_view = False
|
||||
reminder = False
|
||||
|
||||
args = sys.argv[1:]
|
||||
if args[0] == '-q':
|
||||
dry_run = True
|
||||
quick_view = True
|
||||
args = args[1:]
|
||||
|
||||
if args[0] == '-n':
|
||||
dry_run = True
|
||||
args = args[1:]
|
||||
if len(args)>0:
|
||||
if args[0] == '-q':
|
||||
dry_run = True
|
||||
quick_view = True
|
||||
send_mail = False
|
||||
args = args[1:]
|
||||
|
||||
if args[0] == '-r':
|
||||
dry_run = True
|
||||
reminder = True
|
||||
args = args[1:]
|
||||
|
||||
if args[0] == '-n':
|
||||
dry_run = True
|
||||
send_mail = False
|
||||
args = args[1:]
|
||||
|
||||
date = args[0]
|
||||
|
||||
|
@ -60,13 +71,17 @@ if not dry_run:
|
|||
|
||||
x = xmlrpclib.ServerProxy(config['xmlrpc_endpoint'])
|
||||
x.metaWeblog.newPost(config['blog_id'], config['username'], config['password'], page, True)
|
||||
email = render.render_template('templates/email.txt', date, punt=punt,mail=config['mail'])
|
||||
if not reminder:
|
||||
email = render.render_template('templates/email.txt', date, punt=punt,mail=config['mail'])
|
||||
else:
|
||||
email = render.render_template('templates/reminder.txt', date, punt=punt,mail=config['mail'])
|
||||
if quick_view:
|
||||
print(render.render_template('templates/quick_view.tmpl',date,punt=punt))
|
||||
if dry_run and not quick_view:
|
||||
print email
|
||||
if not dry_run:
|
||||
p = subprocess.Popen(['mutt', '-H', '/dev/stdin'],
|
||||
if send_mail:
|
||||
# p = subprocess.Popen(['mutt', '-H', '/dev/stdin'],
|
||||
p = subprocess.Popen(['/usr/sbin/sendmail', '-oi', '-t'],
|
||||
stdin=subprocess.PIPE)
|
||||
p.communicate(email)
|
||||
|
||||
|
|
Loading…
Reference in a new issue