install src/qml/*.qml ${DESTDIR}/opt/FeedingIt/qml
install src/qml/i18n/*.qm ${DESTDIR}/opt/FeedingIt/qml/i18n
install src/qml/common/*.qml ${DESTDIR}/opt/FeedingIt/qml/common
- install src/qml/common/images/*.{sci,png} ${DESTDIR}/opt/FeedingIt/qml/common/images
+ install src/qml/common/images/*.png ${DESTDIR}/opt/FeedingIt/qml/common/images
+ install src/qml/common/images/*.sci ${DESTDIR}/opt/FeedingIt/qml/common/images
install src/FeedingIt.py ${DESTDIR}/opt/FeedingIt
install src/feedparser.py ${DESTDIR}/opt/FeedingIt
install src/portrait.py ${DESTDIR}/opt/FeedingIt
rm src/*pyc
sourcepkg:
- dpkg-buildpackage -rfakeroot -sa -S -i -I.git
+ dpkg-buildpackage -rfakeroot -sa -S -i -I.git -Ipsa_harmattan
-feedingit (0.9.1~woodchuck-0) unstable; urgency=low
+feedingit (0.9.1-2) unstable; urgency=low
+
+ * Fixed update issue with feeds having old articles
+ * Removed qmlviewer dependency
+
+ -- Yves <yves@marcoz.org> Tue, 15 Nov 2011 21:51:19 -0800
+
+feedingit (0.9.1-1) unstable; urgency=low
* Add support for Woodchuck
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, python, python-hildon,
python-dbus, python-osso, python-gconf, python2.5-webkit,
- python-hildondesktop, hildon-desktop-python-loader, qt4-declarative-qmlviewer
+ python-hildondesktop, hildon-desktop-python-loader
Description: A RSS feed reader with portrait mode support
FeedingIt is an easy to use RSS feed reader with portrait
mode support and automatic feed updates. You can swipe left
copying pysrc/feedingit.py -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit
copying pysrc/feedparser.py -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit
copying pysrc/opml.py -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit
+copying pysrc/opml_lib.py -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit
copying pysrc/XmlHandler.py -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit
copying pysrc/download.py -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit
copying pysrc/mainthread.py -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit
* source package automatically created by stdeb 0.6.0+git
- -- Yves <yves@marcoz.org> Mon, 07 Nov 2011 21:25:40 -0800
+ -- Yves <yves@marcoz.org> Tue, 15 Nov 2011 22:13:06 -0800
Version: 0.1.0-1
Architecture: all
Maintainer: Yves <yves@marcoz.org>
-Installed-Size: 764
+Installed-Size: 772
Depends: python-pyside.qtgui, python-pyside.qtopengl, python-pyside.qtdeclarative, python-dbus, python-gconf
Breaks: python (<< 2.6)
Section: user/development
4420c31f88de68fe6e1b7637abb06196 usr/bin/feedingit
6a42e9aebedfd157062bd5a9616dc935 usr/share/applications/feedingit.desktop
eda8cc6ffe8d842d6dfe0244b01b3042 usr/share/dbus-1/services/feedingit_status.service
-f0e50a0975405a76169cc01da42cdcff usr/share/doc/feedingit/changelog.Debian.gz
+b0694ac13e871b46b2a598a20aea01f7 usr/share/doc/feedingit/changelog.Debian.gz
bac2be6ae9673ee5096e20e8b714c9cd usr/share/feedingit/BeautifulSoup.py
8f6e980f2e1154103a90763be6c00dc4 usr/share/feedingit/XmlHandler.py
d41d8cd98f00b204e9800998ecf8427e usr/share/feedingit/__init__.py
6b5296119ef6bc859c3e3a8706fa7f0d usr/share/feedingit/config.py
9cf859c8297e4b0e8466cb5861eb75e7 usr/share/feedingit/debugging.py
fae02e730b76761d43a626fe19828d5e usr/share/feedingit/download.py
-42786634079070f54f06838e922a1307 usr/share/feedingit/feedingit.py
+6227346488fba33c8222965dd3b23690 usr/share/feedingit/feedingit.py
afa4f462892136f59beaf96b6bf1cf96 usr/share/feedingit/feedparser.py
c1a0c0a9ccefd64d1e27bddb817c72a3 usr/share/feedingit/httpprogresshandler.py
f1e9ba0f44786f513659a7fa3111fc8a usr/share/feedingit/jobmanager.py
0201faa30d34c58d71f36ab42a7a8233 usr/share/feedingit/mainthread.py
d9c0665dfdd5cf19f1529ce88af95134 usr/share/feedingit/opml.py
-31d26f7ae14940f99ec8d47c7035fd04 usr/share/feedingit/qml/AddFeed.qml
+26c43c6f67a53f45078ecbd66d895ddd usr/share/feedingit/opml_lib.py
+38643cdd42bdb32d373eba77fb9cb355 usr/share/feedingit/qml/AddFeed.qml
af27062fdba0bc7a3df92116e8340d19 usr/share/feedingit/qml/ArticleDisplay.qml
80858d581189fcf00ab1c6192be87e27 usr/share/feedingit/qml/ArticleViewer.qml
15083e9a1fac05c8efaaa085dfabcbcb usr/share/feedingit/qml/Articles.qml
02784496485eb5547a1ad48c043bb2a9 usr/share/feedingit/qml/Feeds.qml
bec5fe4599a3ad5799ed96d7ed81fb5f usr/share/feedingit/qml/MainPage.qml
1c500d41d190f8f8c6d478fda117bb28 usr/share/feedingit/qml/Settings.qml
-53595350196421039e3adefac380d21f usr/share/feedingit/qml/TestWebview.qml
+aa3fc0a4edbd17d93a9dc5c39c433c3d usr/share/feedingit/qml/TestWebview.qml
508fde19c7bb7bc4892bd6642fbcb7d3 usr/share/feedingit/qml/TextInputClear.qml
cef5ae4af926a759f4a233336c00f017 usr/share/feedingit/qml/common/AddCat.qml
c39cde168ef8d608670c81be7c808701 usr/share/feedingit/qml/common/AddFeed.qml
1c7751b124aa1bdf4b89ec76cdf815a2 usr/share/feedingit/qml/i18n/FeedingIt.ts
7790a99425dd7c1046e6ae3b1ee72a03 usr/share/feedingit/qml/i18n/qml_en.qm
1674fcce45bcf3319e61d19a9adf4fdd usr/share/feedingit/qml/i18n/qml_en.ts
-0ede84085fc61707b6ee27f72ef2808c usr/share/feedingit/qml/main.qml
-da4cc789664ec1980300d1df080c6d90 usr/share/feedingit/rss_sqlite.py
+82ce3a19141362b7c01968f69ccdaaff usr/share/feedingit/qml/main.qml
+e3b4184531f29bbf86d812f9b8adacc2 usr/share/feedingit/rss_sqlite.py
721777a26cd2a5b8466ce2aa2b99fad7 usr/share/feedingit/update_feeds.py
6ccf12dc4379e91800ae8505b2e86082 usr/share/feedingit/updatedbus.py
833ff79caab7c1fa89d6ff4a2f3bb3fd usr/share/feedingit/wc.py
if (item == "hideReadArticles"):
return "False"
return ""
+
+ @QtCore.Slot(str, result=int)
+ def importOpml(self, filename):
+ from opml_lib import parseOpml
+ file = open(filename, "r")
+ feeds = parseOpml(file.read())
+ file.close()
+ for (title, url) in feeds:
+ listing.addFeed(title, url)
+ return len(feeds)
+
+ @QtCore.Slot(str, result=str)
+ def exportOpml(self, filename="/home/user/MyDocs/feedingit-export.opml"):
+ logger.debug("ExportOpmlData: %s" % filename)
+ from opml_lib import getOpmlText
+ try:
+ str = getOpmlText(listing)
+ file = open(filename, "w")
+ file.write(str)
+ file.close()
+ return filename
+ except:
+ logger.debug("Error exporting: %s" % filename)
+ return "error"
def main():
WebView {
id: webView
- //url: "http://www.google.com";
- //url: "http://www.viedemerde.fr/inclassable/5873986?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+viedemerde+%28Vie+de+merde%29"
- url: "/home/ymarcoz/.feedingit/361f6abe590be9c681b5489e5d48331c.d/1b1033c75378fb19a8a70151d764cd33.html"
+ url: "http://www.google.com";
+ //url: "/home/user/.feedingit/640fb167aca8bf5318ed721c5162f5eb.d/56a86b6b1675716ab54db83b1a78ab4c.html"
preferredWidth: flickable.width
preferredHeight: flickable.height
settings.defaultFontSize: 32
import QtQuick 1.0
import com.nokia.meego 1.0
-
+import com.nokia.extras 1.0
PageStackWindow {
id: window
visualParent: pageStack
MenuLayout {
MenuItem { text: qsTr("Settings"); onClicked: {} }
+ MenuItem { text: qsTr("Export Feeds"); onClicked: { var file=controller.exportOpml(); banner.text=qsTr("Feeds exported as "+file); banner.open() } }
MenuItem { text: qsTr("Invert Theme"); onClicked: { theme.inverted = !theme.inverted } }
MenuItem { text: qsTr("Add Feeds"); onClicked: { pageStack.push(addFeedPage) } }
MenuItem { text: qsTr("Update All Categories"); onClicked: controller.updateAll(); }
ToolIcon { iconId: "toolbar-back";
onClicked: {
myArticlesMenu.close();
+ window.categoryReloadRequest()
pageStack.pop();
}
}
Settings {
id: settings
}
+
+ InfoBanner {
+ id: banner
+ //text: "This is an info banner with no icon"
+ }
}
logger.debug("%s: No changes to feed." % (self.key,))
mainthread.execute(wc_success, async=True)
success = True
- elif len(tmp["entries"])==0 and not tmp.version:
+ elif len(tmp["entries"])==0 and not tmp.get('version', None):
# An error occured fetching or parsing the feed. (Version
# will be either None if e.g. the connection timed our or
# '' if the data is not a proper feed)
logger.error(
"Error fetching %s: version is: %s: error: %s"
- % (url, str (tmp.version),
+ % (url, str (tmp.get('version', 'unset')),
str (tmp.get ('bozo_exception', 'Unknown error'))))
logger.debug(tmp)
def register_stream_update_failed(http_status):
#reversedEntries = self.getEntries()
#reversedEntries.reverse()
- ids = self.getIds()
-
tmp["entries"].reverse()
for entry in tmp["entries"]:
# Yield so as to make the main thread a bit more
"date":date, "link":entry["link"], "author":entry["author"], "id":entry["id"]}
id = self.generateUniqueId(tmpEntry)
- current_version \
- = self.db.execute('select date from feed where id=?',
- (id,)).fetchone()
+ current_version = self.db.execute(
+ 'select date, ROWID from feed where id=?',
+ (id,)).fetchone()
if (current_version is not None
and current_version[0] == date):
logger.debug("ALREADY DOWNLOADED %s (%s)"
% (entry["title"], entry["link"]))
+ ## This article is already present in the feed listing. Update the "updated" time, so it doesn't expire
+ self.db.execute("UPDATE feed SET updated=? WHERE id=?;",(currentTime,id))
+ try:
+ logger.debug("Updating already downloaded files for %s" %(id))
+ filename = configdir+self.key+".d/"+id+".html"
+ file = open(filename,"a")
+ utime(filename, None)
+ file.close()
+ images = self.db.execute("SELECT imagePath FROM images where id=?;", (id, )).fetchall()
+ for image in images:
+ file = open(image[0],"a")
+ utime(image[0], None)
+ file.close()
+ except:
+ logger.debug("Error in refreshing images for %s" % (id))
+ self.db.commit()
continue
if current_version is not None:
self.serial_execution_lock.release ()
have_serial_execution_lock = False
for img in images:
- if not 'src' in img:
+ if not img.has_key('src'):
continue
filename = self.addImage(
file = open(tmpEntry["contentLink"], "w")
file.write(soup.prettify())
file.close()
- if id in ids:
- self.db.execute("UPDATE feed SET updated=? WHERE id=?;", (currentTime, id) )
- self.db.commit()
- else:
- values = (id, tmpEntry["title"], tmpEntry["contentLink"], tmpEntry["date"], currentTime, tmpEntry["link"], 0)
- self.db.execute("INSERT INTO feed (id, title, contentLink, date, updated, link, read) VALUES (?, ?, ?, ?, ?, ?, ?);", values)
- self.db.commit()
-# else:
-# try:
-# self.db.execute("UPDATE feed SET updated=? WHERE id=?;", (currentTime, id) )
-# self.db.commit()
-# filename = configdir+self.key+".d/"+id+".html"
-# file = open(filename,"a")
-# utime(filename, None)
-# file.close()
-# images = self.db.execute("SELECT imagePath FROM images where id=?;", (id, )).fetchall()
-# for image in images:
-# file = open(image[0],"a")
-# utime(image[0], None)
-# file.close()
-# except:
-# pass
-
+
+ values = {'id': id,
+ 'title': tmpEntry["title"],
+ 'contentLink': tmpEntry["contentLink"],
+ 'date': tmpEntry["date"],
+ 'updated': currentTime,
+ 'link': tmpEntry["link"],
+ 'read': 0}
+
+ if current_version is not None:
+ # This is an update. Ensure that the existing
+ # entry is replaced.
+ values['ROWID'] = current_version[1]
+
+ cols, values = zip(*values.items())
+ self.db.execute(
+ "INSERT OR REPLACE INTO feed (%s) VALUES (%s);"
+ % (','.join(cols), ','.join(('?',) * len(values))),
+ values)
+ self.db.commit()
+
# Register the object with Woodchuck and mark it as
# downloaded.
def register_object_transferred(
#!/usr/bin/make -f
# This file was automatically generated by stdeb 0.6.0+git at
-# Mon, 07 Nov 2011 21:25:40 -0800
+# Tue, 15 Nov 2011 22:13:06 -0800
%:
dh $@ --with python2 --buildsystem=python_distutils
if (item == "hideReadArticles"):
return "False"
return ""
+
+ @QtCore.Slot(str, result=int)
+ def importOpml(self, filename):
+ from opml_lib import parseOpml
+ file = open(filename, "r")
+ feeds = parseOpml(file.read())
+ file.close()
+ for (title, url) in feeds:
+ listing.addFeed(title, url)
+ return len(feeds)
+
+ @QtCore.Slot(str, result=str)
+ def exportOpml(self, filename="/home/user/MyDocs/feedingit-export.opml"):
+ logger.debug("ExportOpmlData: %s" % filename)
+ from opml_lib import getOpmlText
+ try:
+ str = getOpmlText(listing)
+ file = open(filename, "w")
+ file.write(str)
+ file.close()
+ return filename
+ except:
+ logger.debug("Error exporting: %s" % filename)
+ return "error"
def main():
logger.debug("%s: No changes to feed." % (self.key,))
mainthread.execute(wc_success, async=True)
success = True
- elif len(tmp["entries"])==0 and not tmp.version:
+ elif len(tmp["entries"])==0 and not tmp.get('version', None):
# An error occured fetching or parsing the feed. (Version
# will be either None if e.g. the connection timed our or
# '' if the data is not a proper feed)
logger.error(
"Error fetching %s: version is: %s: error: %s"
- % (url, str (tmp.version),
+ % (url, str (tmp.get('version', 'unset')),
str (tmp.get ('bozo_exception', 'Unknown error'))))
logger.debug(tmp)
def register_stream_update_failed(http_status):
#reversedEntries = self.getEntries()
#reversedEntries.reverse()
- ids = self.getIds()
-
tmp["entries"].reverse()
for entry in tmp["entries"]:
# Yield so as to make the main thread a bit more
"date":date, "link":entry["link"], "author":entry["author"], "id":entry["id"]}
id = self.generateUniqueId(tmpEntry)
- current_version \
- = self.db.execute('select date from feed where id=?',
- (id,)).fetchone()
+ current_version = self.db.execute(
+ 'select date, ROWID from feed where id=?',
+ (id,)).fetchone()
if (current_version is not None
and current_version[0] == date):
logger.debug("ALREADY DOWNLOADED %s (%s)"
% (entry["title"], entry["link"]))
+ ## This article is already present in the feed listing. Update the "updated" time, so it doesn't expire
+ self.db.execute("UPDATE feed SET updated=? WHERE id=?;",(currentTime,id))
+ try:
+ logger.debug("Updating already downloaded files for %s" %(id))
+ filename = configdir+self.key+".d/"+id+".html"
+ file = open(filename,"a")
+ utime(filename, None)
+ file.close()
+ images = self.db.execute("SELECT imagePath FROM images where id=?;", (id, )).fetchall()
+ for image in images:
+ file = open(image[0],"a")
+ utime(image[0], None)
+ file.close()
+ except:
+ logger.debug("Error in refreshing images for %s" % (id))
+ self.db.commit()
continue
if current_version is not None:
self.serial_execution_lock.release ()
have_serial_execution_lock = False
for img in images:
- if not 'src' in img:
+ if not img.has_key('src'):
continue
filename = self.addImage(
file = open(tmpEntry["contentLink"], "w")
file.write(soup.prettify())
file.close()
- if id in ids:
- self.db.execute("UPDATE feed SET updated=? WHERE id=?;", (currentTime, id) )
- self.db.commit()
- else:
- values = (id, tmpEntry["title"], tmpEntry["contentLink"], tmpEntry["date"], currentTime, tmpEntry["link"], 0)
- self.db.execute("INSERT INTO feed (id, title, contentLink, date, updated, link, read) VALUES (?, ?, ?, ?, ?, ?, ?);", values)
- self.db.commit()
-# else:
-# try:
-# self.db.execute("UPDATE feed SET updated=? WHERE id=?;", (currentTime, id) )
-# self.db.commit()
-# filename = configdir+self.key+".d/"+id+".html"
-# file = open(filename,"a")
-# utime(filename, None)
-# file.close()
-# images = self.db.execute("SELECT imagePath FROM images where id=?;", (id, )).fetchall()
-# for image in images:
-# file = open(image[0],"a")
-# utime(image[0], None)
-# file.close()
-# except:
-# pass
-
+
+ values = {'id': id,
+ 'title': tmpEntry["title"],
+ 'contentLink': tmpEntry["contentLink"],
+ 'date': tmpEntry["date"],
+ 'updated': currentTime,
+ 'link': tmpEntry["link"],
+ 'read': 0}
+
+ if current_version is not None:
+ # This is an update. Ensure that the existing
+ # entry is replaced.
+ values['ROWID'] = current_version[1]
+
+ cols, values = zip(*values.items())
+ self.db.execute(
+ "INSERT OR REPLACE INTO feed (%s) VALUES (%s);"
+ % (','.join(cols), ','.join(('?',) * len(values))),
+ values)
+ self.db.commit()
+
# Register the object with Woodchuck and mark it as
# downloaded.
def register_object_transferred(
WebView {
id: webView
- //url: "http://www.google.com";
- //url: "http://www.viedemerde.fr/inclassable/5873986?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+viedemerde+%28Vie+de+merde%29"
- url: "/home/ymarcoz/.feedingit/361f6abe590be9c681b5489e5d48331c.d/1b1033c75378fb19a8a70151d764cd33.html"
+ url: "http://www.google.com";
+ //url: "/home/user/.feedingit/640fb167aca8bf5318ed721c5162f5eb.d/56a86b6b1675716ab54db83b1a78ab4c.html"
preferredWidth: flickable.width
preferredHeight: flickable.height
settings.defaultFontSize: 32
import QtQuick 1.0
import com.nokia.meego 1.0
-
+import com.nokia.extras 1.0
PageStackWindow {
id: window
visualParent: pageStack
MenuLayout {
MenuItem { text: qsTr("Settings"); onClicked: {} }
+ MenuItem { text: qsTr("Export Feeds"); onClicked: { var file=controller.exportOpml(); banner.text=qsTr("Feeds exported as "+file); banner.open() } }
MenuItem { text: qsTr("Invert Theme"); onClicked: { theme.inverted = !theme.inverted } }
MenuItem { text: qsTr("Add Feeds"); onClicked: { pageStack.push(addFeedPage) } }
MenuItem { text: qsTr("Update All Categories"); onClicked: controller.updateAll(); }
ToolIcon { iconId: "toolbar-back";
onClicked: {
myArticlesMenu.close();
+ window.categoryReloadRequest()
pageStack.pop();
}
}
Settings {
id: settings
}
+
+ InfoBanner {
+ id: banner
+ //text: "This is an info banner with no icon"
+ }
}
Standards-Version: 3.9.1
Build-Depends: python-all (>= 2.6.6-3), debhelper (>= 7.4.3)
Checksums-Sha1:
- 0f46819e2084145776f49c7f7f2ee922a980687c 177736 feedingit_0.1.0.orig.tar.gz
- bc99501e4cf014353f2f9d8807498a9d311337c7 931 feedingit_0.1.0-1.debian.tar.gz
+ c045507274a13c3bea0e1cb6006fea9004ba30b7 178550 feedingit_0.1.0.orig.tar.gz
+ a09869b196b8514cf6431eb04ddd98e6e9dd1c39 894 feedingit_0.1.0-1.debian.tar.gz
Checksums-Sha256:
- 223c41eba6bad5241f54e54e776a6e3bb272d07d91b1fa380848b7d8ce0128f4 177736 feedingit_0.1.0.orig.tar.gz
- 58f20d85f1cae2b33fb346fc6bee304cd304b6674026540aee31b73748d49a7c 931 feedingit_0.1.0-1.debian.tar.gz
+ 92ba00c80c8450eaaae39346abb2a442b5e1714bc396cf7a7267c0b00e74c9df 178550 feedingit_0.1.0.orig.tar.gz
+ 2644b6342aa0f4e8e2c9e1a98d3402b446b50ab4f4b85cecd4a14d557854636c 894 feedingit_0.1.0-1.debian.tar.gz
Files:
- 1b7ddb59ac327613cb42c0bbd7ffa06b 177736 feedingit_0.1.0.orig.tar.gz
- 9c4aba31f4ca66c7cb5fe5dbcd83d100 931 feedingit_0.1.0-1.debian.tar.gz
+ 25f89c7eed2efea44ebc3a15bafd7d8f 178550 feedingit_0.1.0.orig.tar.gz
+ 1d29f8a2b74b889cec7df9d63e96bfc8 894 feedingit_0.1.0-1.debian.tar.gz
Format: 1.8
-Date: Mon, 07 Nov 2011 21:25:40 -0800
+Date: Tue, 15 Nov 2011 22:13:06 -0800
Source: feedingit
Binary: feedingit
Architecture: source all
.
* source package automatically created by stdeb 0.6.0+git
Checksums-Sha1:
- 4872f7d851392a4c31cf7c4e6fba426ef7bfecf9 753 feedingit_0.1.0-1.dsc
- 0f46819e2084145776f49c7f7f2ee922a980687c 177736 feedingit_0.1.0.orig.tar.gz
- bc99501e4cf014353f2f9d8807498a9d311337c7 931 feedingit_0.1.0-1.debian.tar.gz
- d5f6a17d75b19f6ae48a94c3fc685eb55d2cedab 167012 feedingit_0.1.0-1_all.deb
+ a71a6948e1e975888c79be71ca6248b09f7db08e 753 feedingit_0.1.0-1.dsc
+ c045507274a13c3bea0e1cb6006fea9004ba30b7 178550 feedingit_0.1.0.orig.tar.gz
+ a09869b196b8514cf6431eb04ddd98e6e9dd1c39 894 feedingit_0.1.0-1.debian.tar.gz
+ 3dc207cf3b6b6db9193d230ac67d864c1aa09aef 168136 feedingit_0.1.0-1_all.deb
Checksums-Sha256:
- a39151af4220e3ee0b11e210f1d41b78968f4dfc874b949dd914688e99e97d7f 753 feedingit_0.1.0-1.dsc
- 223c41eba6bad5241f54e54e776a6e3bb272d07d91b1fa380848b7d8ce0128f4 177736 feedingit_0.1.0.orig.tar.gz
- 58f20d85f1cae2b33fb346fc6bee304cd304b6674026540aee31b73748d49a7c 931 feedingit_0.1.0-1.debian.tar.gz
- ef85ba37ee11a4bcdae73fc629c3a0acfa2e023cc0502409f0c37b9045a10eb8 167012 feedingit_0.1.0-1_all.deb
+ 96d4c7e6525bd5547946f9cf8f7b182d759d34c3d33523955aca28b8583d773c 753 feedingit_0.1.0-1.dsc
+ 92ba00c80c8450eaaae39346abb2a442b5e1714bc396cf7a7267c0b00e74c9df 178550 feedingit_0.1.0.orig.tar.gz
+ 2644b6342aa0f4e8e2c9e1a98d3402b446b50ab4f4b85cecd4a14d557854636c 894 feedingit_0.1.0-1.debian.tar.gz
+ dca845bc6ce162cc9a22dc965a3a60cb182d1135167fbebfa9836a0f869e9ab3 168136 feedingit_0.1.0-1_all.deb
Files:
- b885f4386ce99ea355ff17988744f887 753 user/development optional feedingit_0.1.0-1.dsc
- 1b7ddb59ac327613cb42c0bbd7ffa06b 177736 user/development optional feedingit_0.1.0.orig.tar.gz
- 9c4aba31f4ca66c7cb5fe5dbcd83d100 931 user/development optional feedingit_0.1.0-1.debian.tar.gz
- 762bca546128e97766835cf81a2d7a5b 167012 user/development optional feedingit_0.1.0-1_all.deb
+ 51acff2d37b5d47ce0c7141e228d9084 753 user/development optional feedingit_0.1.0-1.dsc
+ 25f89c7eed2efea44ebc3a15bafd7d8f 178550 user/development optional feedingit_0.1.0.orig.tar.gz
+ 1d29f8a2b74b889cec7df9d63e96bfc8 894 user/development optional feedingit_0.1.0-1.debian.tar.gz
+ 2b3f1acb38b76d65e916f1fbe6baa208 168136 user/development optional feedingit_0.1.0-1_all.deb
if (item == "hideReadArticles"):
return "False"
return ""
+
+ @QtCore.Slot(str, result=int)
+ def importOpml(self, filename):
+ from opml_lib import parseOpml
+ file = open(filename, "r")
+ feeds = parseOpml(file.read())
+ file.close()
+ for (title, url) in feeds:
+ listing.addFeed(title, url)
+ return len(feeds)
+
+ @QtCore.Slot(str, result=str)
+ def exportOpml(self, filename="/home/user/MyDocs/feedingit-export.opml"):
+ logger.debug("ExportOpmlData: %s" % filename)
+ from opml_lib import getOpmlText
+ try:
+ str = getOpmlText(listing)
+ file = open(filename, "w")
+ file.write(str)
+ file.close()
+ return filename
+ except:
+ logger.debug("Error exporting: %s" % filename)
+ return "error"
def main():
logger.debug("%s: No changes to feed." % (self.key,))
mainthread.execute(wc_success, async=True)
success = True
- elif len(tmp["entries"])==0 and not tmp.version:
+ elif len(tmp["entries"])==0 and not tmp.get('version', None):
# An error occured fetching or parsing the feed. (Version
# will be either None if e.g. the connection timed our or
# '' if the data is not a proper feed)
logger.error(
"Error fetching %s: version is: %s: error: %s"
- % (url, str (tmp.version),
+ % (url, str (tmp.get('version', 'unset')),
str (tmp.get ('bozo_exception', 'Unknown error'))))
logger.debug(tmp)
def register_stream_update_failed(http_status):
#reversedEntries = self.getEntries()
#reversedEntries.reverse()
- ids = self.getIds()
-
tmp["entries"].reverse()
for entry in tmp["entries"]:
# Yield so as to make the main thread a bit more
"date":date, "link":entry["link"], "author":entry["author"], "id":entry["id"]}
id = self.generateUniqueId(tmpEntry)
- current_version \
- = self.db.execute('select date from feed where id=?',
- (id,)).fetchone()
+ current_version = self.db.execute(
+ 'select date, ROWID from feed where id=?',
+ (id,)).fetchone()
if (current_version is not None
and current_version[0] == date):
logger.debug("ALREADY DOWNLOADED %s (%s)"
% (entry["title"], entry["link"]))
+ ## This article is already present in the feed listing. Update the "updated" time, so it doesn't expire
+ self.db.execute("UPDATE feed SET updated=? WHERE id=?;",(currentTime,id))
+ try:
+ logger.debug("Updating already downloaded files for %s" %(id))
+ filename = configdir+self.key+".d/"+id+".html"
+ file = open(filename,"a")
+ utime(filename, None)
+ file.close()
+ images = self.db.execute("SELECT imagePath FROM images where id=?;", (id, )).fetchall()
+ for image in images:
+ file = open(image[0],"a")
+ utime(image[0], None)
+ file.close()
+ except:
+ logger.debug("Error in refreshing images for %s" % (id))
+ self.db.commit()
continue
if current_version is not None:
self.serial_execution_lock.release ()
have_serial_execution_lock = False
for img in images:
- if not 'src' in img:
+ if not img.has_key('src'):
continue
filename = self.addImage(
file = open(tmpEntry["contentLink"], "w")
file.write(soup.prettify())
file.close()
- if id in ids:
- self.db.execute("UPDATE feed SET updated=? WHERE id=?;", (currentTime, id) )
- self.db.commit()
- else:
- values = (id, tmpEntry["title"], tmpEntry["contentLink"], tmpEntry["date"], currentTime, tmpEntry["link"], 0)
- self.db.execute("INSERT INTO feed (id, title, contentLink, date, updated, link, read) VALUES (?, ?, ?, ?, ?, ?, ?);", values)
- self.db.commit()
-# else:
-# try:
-# self.db.execute("UPDATE feed SET updated=? WHERE id=?;", (currentTime, id) )
-# self.db.commit()
-# filename = configdir+self.key+".d/"+id+".html"
-# file = open(filename,"a")
-# utime(filename, None)
-# file.close()
-# images = self.db.execute("SELECT imagePath FROM images where id=?;", (id, )).fetchall()
-# for image in images:
-# file = open(image[0],"a")
-# utime(image[0], None)
-# file.close()
-# except:
-# pass
-
+
+ values = {'id': id,
+ 'title': tmpEntry["title"],
+ 'contentLink': tmpEntry["contentLink"],
+ 'date': tmpEntry["date"],
+ 'updated': currentTime,
+ 'link': tmpEntry["link"],
+ 'read': 0}
+
+ if current_version is not None:
+ # This is an update. Ensure that the existing
+ # entry is replaced.
+ values['ROWID'] = current_version[1]
+
+ cols, values = zip(*values.items())
+ self.db.execute(
+ "INSERT OR REPLACE INTO feed (%s) VALUES (%s);"
+ % (','.join(cols), ','.join(('?',) * len(values))),
+ values)
+ self.db.commit()
+
# Register the object with Woodchuck and mark it as
# downloaded.
def register_object_transferred(
} //urlTab
Item {
+ id: opmlTab
+
+ Column {
+ Text {
+ id: opmlText
+ font.pixelSize: 22
+ color: "white"
+ text: "Enter the OPML filename in MyDocs folder"
+ }
+
+ TextInputClear {
+ id: opmlInput
+ placeHolder: "OPML filename"
+ width: parent.width
+ }
+
+ Button {
+ id: opmlButton
+ text: "Import"
+ onClicked: {
+ console.log("Importing "+opmlInput.text)
+ //controller.addFeed("",urlInput.text,1);
+ var num = controller.importOpml(opmlInput.text)
+ banner.text=qsTr("Successfully imported "+num+" feeds.")
+ banner.open()
+ }
+ width: 150
+ }
+ }
+
+ } //opmlTab
+
+ Item {
id: categoryTab
Column {
tab: urlTab
}
TabButton {
+ text: "Import"
+ tab: opmlTab
+ }
+ TabButton {
text: "Categories"
tab: categoryTab
}
import QtQuick 1.0
import com.nokia.meego 1.0
-
+import com.nokia.extras 1.0
PageStackWindow {
id: window
visualParent: pageStack
MenuLayout {
MenuItem { text: qsTr("Settings"); onClicked: {} }
+ MenuItem { text: qsTr("Export Feeds"); onClicked: { var file=controller.exportOpml(); banner.text=qsTr("Feeds exported as "+file); banner.open() } }
MenuItem { text: qsTr("Invert Theme"); onClicked: { theme.inverted = !theme.inverted } }
MenuItem { text: qsTr("Add Feeds"); onClicked: { pageStack.push(addFeedPage) } }
MenuItem { text: qsTr("Update All Categories"); onClicked: controller.updateAll(); }
Settings {
id: settings
}
+
+ InfoBanner {
+ id: banner
+ //text: "This is an info banner with no icon"
+ }
}
and current_version[0] == date):
logger.debug("ALREADY DOWNLOADED %s (%s)"
% (entry["title"], entry["link"]))
+ ## This article is already present in the feed listing. Update the "updated" time, so it doesn't expire
+ self.db.execute("UPDATE feed SET updated=? WHERE id=?;",(currentTime,id))
+ try:
+ logger.debug("Updating already downloaded files for %s" %(id))
+ filename = configdir+self.key+".d/"+id+".html"
+ file = open(filename,"a")
+ utime(filename, None)
+ file.close()
+ images = self.db.execute("SELECT imagePath FROM images where id=?;", (id, )).fetchall()
+ for image in images:
+ file = open(image[0],"a")
+ utime(image[0], None)
+ file.close()
+ except:
+ logger.debug("Error in refreshing images for %s" % (id))
+ self.db.commit()
continue
if current_version is not None: