tags 784788 + patch
thanks

* Yves-Alexis Perez <[email protected]> [150510 17:28]:
> I just upgraded rss2email from 2.x to 3.x, so the config file format
> has changed. I tried to migrate my configuration, but unfortunately
> the per-feed email address (which I'm using intensively) was not
> migrated. This is really painful, especially considering it's
> apparently not possible to edit a feed afterwards.

Hi Yves-Alexis,

I prepared a patch which should add your feeds with the correct email
address. I'll include it in my next upload.

Thanks for the report!

-- 
Etienne Millon
From 170bbb4516c3381450cf2fedd0e021a7cef847ef Mon Sep 17 00:00:00 2001
From: Etienne Millon <[email protected]>
Date: Sat, 4 Jul 2015 12:30:20 +0200
Subject: [PATCH] r2e-migrate: support per-feed addresses

---
 debian/changelog   |  1 +
 debian/r2e-migrate | 12 +++++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 98a63bf..4f6796c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ rss2email (1:3.9-2) UNRELEASED; urgency=medium
 
   * Bump Standards-Version to 3.9.6 (no changes needed)
   * Use TLSv1 by default instead of SSLv3 (Closes: #781315)
+  * r2e-migrate: add per-feed addresses (Closes: #784788)
 
  -- Etienne Millon <[email protected]>  Sat, 04 Jul 2015 11:59:25 +0200
 
diff --git a/debian/r2e-migrate b/debian/r2e-migrate
index 47844cb..393d067 100755
--- a/debian/r2e-migrate
+++ b/debian/r2e-migrate
@@ -10,6 +10,9 @@
 #
 # Changelog:
 #
+#   v5 (2015-07-04)
+#      - support per-feed addresses
+#
 #   v4 (2014-06-10)
 #      - support XDG directories
 #
@@ -81,8 +84,11 @@ def slugify(s):
     return ''.join([slugify_char(c) for c in s])
 
 
-def add(url, name):
-    return subprocess.call(['r2e', 'add', name, url])
+def add(url, name, to):
+    extra_args = []
+    if to is not None:
+        extra_args = [to]
+    return subprocess.call(['r2e', 'add', name, url] + extra_args)
 
 
 def pause(name):
@@ -118,7 +124,7 @@ def main():
         url = feed.url
         print url
         name = slugify(url)
-        add(url, name)
+        add(url, name, feed.to)
         if not feed.active:
             pause(name)
         modified = None
-- 
2.1.4

Attachment: signature.asc
Description: Digital signature

Reply via email to