Hi,
I have tried to package the new version, since it has been about a year
since the last version was uploaded to unstable (unsure when the new
upstream version was released).
Nevertheless I have attached a debdiff with the new changes (I am not
quite sure how else it should be done).
I hope this is of some use to update the package.
Kind regards
Roy Jamison
diff -Nru abby-0.4.7/abby.pro abby-0.4.8/abby.pro
--- abby-0.4.7/abby.pro 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/abby.pro 2010-01-18 16:10:57.000000000 +0000
@@ -1,8 +1,8 @@
######################################################################
-# Automatically generated by qmake (2.01a) Thu Dec 10 23:11:48 2009
+# Automatically generated by qmake (2.01a) Sat Jan 16 15:12:02 2010
######################################################################
-QT+=network xml
+QT+=xml network
TEMPLATE = app
TARGET =
DEPENDPATH += . rc src
@@ -10,6 +10,7 @@
# Input
HEADERS += src/aboutdlg.h \
+ src/exportdlg.h \
src/feededitdlg.h \
src/feedmgrdlg.h \
src/formatdlg.h \
@@ -17,10 +18,12 @@
src/mainwnd.h \
src/prefsdlg.h \
src/rssdlg.h \
+ src/rssparser.h \
src/scan.h \
src/scandlg.h \
src/util.h
FORMS += rc/aboutdlg.ui \
+ rc/exportdlg.ui \
rc/feededitdlg.ui \
rc/feedmgrdlg.ui \
rc/formatdlg.ui \
@@ -29,6 +32,7 @@
rc/rssdlg.ui \
rc/scandlg.ui
SOURCES += src/aboutdlg.cpp \
+ src/exportdlg.cpp \
src/feededitdlg.cpp \
src/feedmgrdlg.cpp \
src/formatdlg.cpp \
@@ -37,6 +41,7 @@
src/mainwnd.cpp \
src/prefsdlg.cpp \
src/rssdlg.cpp \
+ src/rssparser.cpp \
src/scan.cpp \
src/scandlg.cpp \
src/util.cpp
diff -Nru abby-0.4.7/ChangeLog abby-0.4.8/ChangeLog
--- abby-0.4.7/ChangeLog 1970-01-01 01:00:00.000000000 +0100
+++ abby-0.4.8/ChangeLog 2010-01-18 16:10:57.000000000 +0000
@@ -0,0 +1,289 @@
+Version 0.4.8
+(January 18, 2010⁾
+
+ User-visible changes:
+ * Add import/export list items under Edit menu
+ * Replace buggy RSS parser
+ # e.g. feed items appeared in channel titles
+ # fix segfault when fetch is called again
+
+ Developer-visible changes:
+ * Rewrite README
+ * Add src/rssparser(.cpp|.h)
+ * Rename CHANGES -> ChangeLog
+
+
+Version 0.4.7
+(December 18, 2009)
+
+ User-visible changes:
+ * Minimize to system tray (if available)
+ # Preferences: add "Minimize to system tray" checkbox
+ * Feed manager: add select/invert buttons
+ * RSS add support for multiple feeds using treeview
+ * Scan and RSS overhaul:
+ # Add progressbar
+ # Add log view
+ # Add abort functionality
+ # Links can now be dropped to the dialogs
+ * Log now includes (ISO) date/time stamp
+ * Add select all/invert selection buttons to:
+ # RSS dialog
+ # Scan dialog (closes issue #4)
+ * Remove unnecessary whitespace from scanned video titles
+ * Fix scan pattern to terminate at \n if found
+ # Mangled data seen when youtube front page was scanned
+ * Mainwindow: add (drag 'n) drop support (closes issue #3)
+
+ Known issues:
+ * w32: minimize to tray does not hide abby from the taskbar
+
+
+Version 0.4.6.1
+(December 3, 2009)
+
+ User-visible changes:
+ * Fixes version string in about dialog
+ * Adds missing sizegrip to format dialog
+
+
+Version 0.4.6
+(December 2, 2009)
+
+ User-visible changes:
+ * About dialog: change c/clive box title dynamically
+ * Adapt to cclive 0.5.6 changes
+ # --regexp
+ * Update the label
+ * Update editbox tooltip
+ * Remove "find all" checkbox
+ # --substitute
+ * Add label + editbox
+
+
+Version 0.4.5
+(November 21, 2009)
+
+ User-visible changes:
+ * Confirm exit if c/clive is still active
+ * c/clive autodetect, verify buttons (preferences)
+ * Autodetect c/clive from the path (if empty path)
+ * Feed manager:
+ # Allow use of feed names instead of links
+ # Use checkboxes for selection instead
+ # Fix defunct "clear list" button
+ # Remove "paste link" button
+ * Fix segfault when verifying path with non-c/clive commands
+
+ Developer-visible changes:
+ * Move cclive detection logic to src/util.(cpp|h) file
+ * Add NEWS file
+
+
+Version 0.4.4
+(October 5, 2009)
+
+ User-visible changes:
+ * New icons:
+ # File / Quit
+ # Help / About
+ * Fix: rss/scan: unicode chars should now display OK
+
+
+Version 0.4.3
+(August 29, 2009)
+
+ User-visible changes:
+ * Add: --regexp, --find-all support
+ # New in cclive 0.5.0
+ * Add: --filename-format support
+ * Remove: --title support
+ # No longer supported by cclive as of 0.5.0
+ * Start DL if new link is added after hitting "start dl" on empty list
+ * Show LANG locale setting in about dialog
+ * Fix: filename not shown when download starts
+ * Fix: typo in statustip "scan for video links"
+ * Fix: filename parsing when it contains whitespace
+ * Fix: switching c/clive executables without restarting
+
+ Developer-visible changes:
+ * Rewrite QProcess output parsing
+ # Fixes "filename parsing when it contains whitespace"
+ # Process exit code instead of parsing output
+ * Add INSTALL file
+ * Append --print-fname to clive options
+ # Fixes "filename not shown when download starts"
+ # Bumps clive prerequisite to 2.2.5
+
+
+Version 0.4.2
+(August 1, 2009)
+
+ User-visible changes:
+ * Change:
+ # Abort button to show statustip instead of tooltip
+ # Dynamically changing format dialog based on c/clive --hosts output
+ # Total progressbar: use "%current / %total" instead of "%percentage"
+ # Scan: hide column header
+ # RSS: ditto
+ # Improve c/clive executable checking (1)
+ * Display dialogbox where suitable
+ # Scan: relocate options group
+
+ Developer-visible changes:
+ * Improve c/clive executable checking (1)
+ # Remove excess code and unnecessary checks
+ * Add: support for --exec-run (c/clive 0.4.6+/2.2.3+)
+ * Tweak --hosts support
+ # c/clive 0.4.6+/2.2.3+ print supported formats with --hosts
+ # Bump prerequisites, see README
+ * Cleanup README
+ # Better description
+ # Misc. other tweaks
+ * abby.pro: include "QT += network xml"
+ # See README for the changed build instructions
+
+ Known-issues:
+ * http://youtube.com/rss/user/(username)/videos.rss
+ Links no longer work. Please see README ("Using abby").
+
+
+Version 0.4.1
+(July 11, 2009)
+
+ User-visible changes:
+ * Rollout experimental win32 binaries
+ * Add: Help / Supported hosts
+ * Fix: Preferences: various browse buttons
+ * Tweak:
+ 1. Various messagebox texts
+ 2. Various status/tool tips
+ 3. Scan dialog (+new functions)
+ 4. RSS dialog
+ * Enable/disable link list when download begins/ends
+ * Change: Open "Add link" dialog if list is empty and "Download" is clicked
+ 1. This previously showed a messagebox telling user to add a link
+
+ Developer-visible changes:
+ * src/scandlg.cpp: Use static messagebox function instead
+
+
+Version 0.4.0
+(July 5, 2009)
+
+ User-visible changes:
+ * Add: Scan feature to scan *any* web pages for video links
+ 1. Supports regular Youtube links and embedded ones
+ 2. Above means that it can be used to grab videos from Youtube playlists
+ 3. Intended to replace clivescan utility (of the clive-utils project)
+ * Add: Edit / Add / Paste (+key shortcut)
+ * Add: Clear list (button +menu item)
+ * Fix: RSS/Scan: Check for URL scheme in input link; insert if missing
+ * Fix: RSS/Scan: Disabling HTTP proxy is now respected
+ * Enable editing links in main window and RSS feed manager (double-click)
+ * Enable/disable misc. widgets at start and end
+ * Use 16x16 for all icons
+ * Update misc. tooltip messages
+
+
+Version 0.3.0
+(June 21, 2009)
+
+FOREWORD
+
+It is now also possible to download multiple videos on one go.
+This was previously limited by design.
+
+We are in the process of merging clive-utils into abby. RSS feed
+parsing (clivefeed) has already been implemented. Video link scan
+(clivescan) should be implemented in abby by 0.4.0.
+
+ User-visible changes:
+ * Add: --format=best support
+ * Add: RSS parsing (obsoletes clivefeed in clive-utils)
+ * Add: Keyboard shortcuts (e.g. add link, start download)
+ * Fix: Tab orders (e.g. main window: paste button)
+ * Change: Multi-link support
+ * Change: Video format selection
+ 1. Format dialog for hosts that support multiple video formats
+ 2. All other hosts default to "flv"
+ * Change: More responsive UI when closing Preferences while using clive
+ 1. invoke (c)clive after closing the preferences only if path was changed
+ * Change: Reflect --format ID changes to match recent (c)clive additions
+ * Remove: Youtube login support
+ 1. Until fixed in (c)clive
+ * Remove: Finnish translation
+ 1. Reintroduce translations when we are "stable"
+ * Remove: Continue partially downloaded file [box]
+ 1. Default to use --continue with all transfers
+ 2. Recent changes to Youtube and Google services allow flvs to be cont'd
+
+ Developer-visible changes:
+ * Change: cclive prerequisite -> 0.4.4
+ * Change: clive prerequisite -> 2.2.1
+ * Change: use --format for both (c)clive (reflect cclive changes)
+ 1. cclive previously used --download=format
+
+ Known-issues:
+ * Format dialog displays "mp4" for Google when using cclive
+ 1. mp4 support has been broken in cclive since 0.4.x
+
+
+Version 0.2.1
+(April 29, 2009)
+
+ User-visible changes:
+ * Add support for --connect-timeout, --connect-timeout-socks
+ ** cclive 0.3.2+
+ ** clive 2.1.11+
+ * Allow use of --limit-rate with clive
+ * Fix: Preferences: cclive/clive: Browse (button)
+
+
+Version 0.2.0
+(April 4, 2009)
+
+ User-visible changes:
+ * Add support for clive 2.1.10+
+ - abby can now be used as a front-end for clive (2.1.10+) as well
+ * Add support for Youtube HD (mp4_hd) format
+ - Added in cclive 0.3.1
+ - Added in clive 2.1.10
+ * Fix tooltips
+ - Typos, missing, etc.
+ * Fix duplicate key shortcuts
+ - English (&File - Video &Format)
+ - Finnish (multiple)
+ * Add paste button next to start button
+ * Change common buttons to use icons instead of text
+ * Change address bar: bind return key to Start button
+ * Change Preferences dialog to open centered and over the main window
+ - Dialog position previously saved and restored
+
+
+Version 0.1.1
+(March 17, 2009)
+
+ User-visible changes:
+ * Improve cclive process output handling and parsing
+ * Add support for new cclive options (0.2.4+)
+ - --title, --title-cclass
+ - --stream-exec, --stream
+ * Add missing statusbar messages for menu items
+ * Add more widget dynamics in Options
+ - "Start streaming at" stays hidden unless cclive was built WITH_PERL=yes
+ - If paths have been defined in Preferences
+ - "Start streaming at" is enabled if "Stream command" is defined
+ - "Run external command" is enabled if "External command" is defined
+ - When URL changes
+ - "Continue partially transferred file" checkbox is enabled/disabled
+ - "Video Format" combobox list is recreated based on URL
+ * Change default window sizes
+ * Change "Save video as" label to checkbox
+ * Clean up widget texts
+
+
+Version 0.1.0
+(March 1, 2009)
+
+ * Initial release
diff -Nru abby-0.4.7/CHANGES abby-0.4.8/CHANGES
--- abby-0.4.7/CHANGES 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/CHANGES 1970-01-01 01:00:00.000000000 +0100
@@ -1,274 +0,0 @@
-Version 0.4.7
-(December 18, 2009)
-
- User-visible changes:
- * Minimize to system tray (if available)
- # Preferences: add "Minimize to system tray" checkbox
- * Feed manager: add select/invert buttons
- * RSS add support for multiple feeds using treeview
- * Scan and RSS overhaul:
- # Add progressbar
- # Add log view
- # Add abort functionality
- # Links can now be dropped to the dialogs
- * Log now includes (ISO) date/time stamp
- * Add select all/invert selection buttons to:
- # RSS dialog
- # Scan dialog (closes issue #4)
- * Remove unnecessary whitespace from scanned video titles
- * Fix scan pattern to terminate at \n if found
- # Mangled data seen when youtube front page was scanned
- * Mainwindow: add (drag 'n) drop support (closes issue #3)
-
- Known issues:
- * w32: minimize to tray does not hide abby from the taskbar
-
-
-Version 0.4.6.1
-(December 3, 2009)
-
- User-visible changes:
- * Fixes version string in about dialog
- * Adds missing sizegrip to format dialog
-
-
-Version 0.4.6
-(December 2, 2009)
-
- User-visible changes:
- * About dialog: change c/clive box title dynamically
- * Adapt to cclive 0.5.6 changes
- # --regexp
- * Update the label
- * Update editbox tooltip
- * Remove "find all" checkbox
- # --substitute
- * Add label + editbox
-
-
-Version 0.4.5
-(November 21, 2009)
-
- User-visible changes:
- * Confirm exit if c/clive is still active
- * c/clive autodetect, verify buttons (preferences)
- * Autodetect c/clive from the path (if empty path)
- * Feed manager:
- # Allow use of feed names instead of links
- # Use checkboxes for selection instead
- # Fix defunct "clear list" button
- # Remove "paste link" button
- * Fix segfault when verifying path with non-c/clive commands
-
- Developer-visible changes:
- * Move cclive detection logic to src/util.(cpp|h) file
- * Add NEWS file
-
-
-Version 0.4.4
-(October 5, 2009)
-
- User-visible changes:
- * New icons:
- # File / Quit
- # Help / About
- * Fix: rss/scan: unicode chars should now display OK
-
-
-Version 0.4.3
-(August 29, 2009)
-
- User-visible changes:
- * Add: --regexp, --find-all support
- # New in cclive 0.5.0
- * Add: --filename-format support
- * Remove: --title support
- # No longer supported by cclive as of 0.5.0
- * Start DL if new link is added after hitting "start dl" on empty list
- * Show LANG locale setting in about dialog
- * Fix: filename not shown when download starts
- * Fix: typo in statustip "scan for video links"
- * Fix: filename parsing when it contains whitespace
- * Fix: switching c/clive executables without restarting
-
- Developer-visible changes:
- * Rewrite QProcess output parsing
- # Fixes "filename parsing when it contains whitespace"
- # Process exit code instead of parsing output
- * Add INSTALL file
- * Append --print-fname to clive options
- # Fixes "filename not shown when download starts"
- # Bumps clive prerequisite to 2.2.5
-
-
-Version 0.4.2
-(August 1, 2009)
-
- User-visible changes:
- * Change:
- # Abort button to show statustip instead of tooltip
- # Dynamically changing format dialog based on c/clive --hosts output
- # Total progressbar: use "%current / %total" instead of "%percentage"
- # Scan: hide column header
- # RSS: ditto
- # Improve c/clive executable checking (1)
- * Display dialogbox where suitable
- # Scan: relocate options group
-
- Developer-visible changes:
- * Improve c/clive executable checking (1)
- # Remove excess code and unnecessary checks
- * Add: support for --exec-run (c/clive 0.4.6+/2.2.3+)
- * Tweak --hosts support
- # c/clive 0.4.6+/2.2.3+ print supported formats with --hosts
- # Bump prerequisites, see README
- * Cleanup README
- # Better description
- # Misc. other tweaks
- * abby.pro: include "QT += network xml"
- # See README for the changed build instructions
-
- Known-issues:
- * http://youtube.com/rss/user/(username)/videos.rss
- Links no longer work. Please see README ("Using abby").
-
-
-Version 0.4.1
-(July 11, 2009)
-
- User-visible changes:
- * Rollout experimental win32 binaries
- * Add: Help / Supported hosts
- * Fix: Preferences: various browse buttons
- * Tweak:
- 1. Various messagebox texts
- 2. Various status/tool tips
- 3. Scan dialog (+new functions)
- 4. RSS dialog
- * Enable/disable link list when download begins/ends
- * Change: Open "Add link" dialog if list is empty and "Download" is clicked
- 1. This previously showed a messagebox telling user to add a link
-
- Developer-visible changes:
- * src/scandlg.cpp: Use static messagebox function instead
-
-
-Version 0.4.0
-(July 5, 2009)
-
- User-visible changes:
- * Add: Scan feature to scan *any* web pages for video links
- 1. Supports regular Youtube links and embedded ones
- 2. Above means that it can be used to grab videos from Youtube playlists
- 3. Intended to replace clivescan utility (of the clive-utils project)
- * Add: Edit / Add / Paste (+key shortcut)
- * Add: Clear list (button +menu item)
- * Fix: RSS/Scan: Check for URL scheme in input link; insert if missing
- * Fix: RSS/Scan: Disabling HTTP proxy is now respected
- * Enable editing links in main window and RSS feed manager (double-click)
- * Enable/disable misc. widgets at start and end
- * Use 16x16 for all icons
- * Update misc. tooltip messages
-
-
-Version 0.3.0
-(June 21, 2009)
-
-FOREWORD
-
-It is now also possible to download multiple videos on one go.
-This was previously limited by design.
-
-We are in the process of merging clive-utils into abby. RSS feed
-parsing (clivefeed) has already been implemented. Video link scan
-(clivescan) should be implemented in abby by 0.4.0.
-
- User-visible changes:
- * Add: --format=best support
- * Add: RSS parsing (obsoletes clivefeed in clive-utils)
- * Add: Keyboard shortcuts (e.g. add link, start download)
- * Fix: Tab orders (e.g. main window: paste button)
- * Change: Multi-link support
- * Change: Video format selection
- 1. Format dialog for hosts that support multiple video formats
- 2. All other hosts default to "flv"
- * Change: More responsive UI when closing Preferences while using clive
- 1. invoke (c)clive after closing the preferences only if path was changed
- * Change: Reflect --format ID changes to match recent (c)clive additions
- * Remove: Youtube login support
- 1. Until fixed in (c)clive
- * Remove: Finnish translation
- 1. Reintroduce translations when we are "stable"
- * Remove: Continue partially downloaded file [box]
- 1. Default to use --continue with all transfers
- 2. Recent changes to Youtube and Google services allow flvs to be cont'd
-
- Developer-visible changes:
- * Change: cclive prerequisite -> 0.4.4
- * Change: clive prerequisite -> 2.2.1
- * Change: use --format for both (c)clive (reflect cclive changes)
- 1. cclive previously used --download=format
-
- Known-issues:
- * Format dialog displays "mp4" for Google when using cclive
- 1. mp4 support has been broken in cclive since 0.4.x
-
-
-Version 0.2.1
-(April 29, 2009)
-
- User-visible changes:
- * Add support for --connect-timeout, --connect-timeout-socks
- ** cclive 0.3.2+
- ** clive 2.1.11+
- * Allow use of --limit-rate with clive
- * Fix: Preferences: cclive/clive: Browse (button)
-
-
-Version 0.2.0
-(April 4, 2009)
-
- User-visible changes:
- * Add support for clive 2.1.10+
- - abby can now be used as a front-end for clive (2.1.10+) as well
- * Add support for Youtube HD (mp4_hd) format
- - Added in cclive 0.3.1
- - Added in clive 2.1.10
- * Fix tooltips
- - Typos, missing, etc.
- * Fix duplicate key shortcuts
- - English (&File - Video &Format)
- - Finnish (multiple)
- * Add paste button next to start button
- * Change common buttons to use icons instead of text
- * Change address bar: bind return key to Start button
- * Change Preferences dialog to open centered and over the main window
- - Dialog position previously saved and restored
-
-
-Version 0.1.1
-(March 17, 2009)
-
- User-visible changes:
- * Improve cclive process output handling and parsing
- * Add support for new cclive options (0.2.4+)
- - --title, --title-cclass
- - --stream-exec, --stream
- * Add missing statusbar messages for menu items
- * Add more widget dynamics in Options
- - "Start streaming at" stays hidden unless cclive was built WITH_PERL=yes
- - If paths have been defined in Preferences
- - "Start streaming at" is enabled if "Stream command" is defined
- - "Run external command" is enabled if "External command" is defined
- - When URL changes
- - "Continue partially transferred file" checkbox is enabled/disabled
- - "Video Format" combobox list is recreated based on URL
- * Change default window sizes
- * Change "Save video as" label to checkbox
- * Clean up widget texts
-
-
-Version 0.1.0
-(March 1, 2009)
-
- * Initial release
diff -Nru abby-0.4.7/debian/changelog abby-0.4.8/debian/changelog
--- abby-0.4.7/debian/changelog 2010-11-11 23:38:26.000000000 +0000
+++ abby-0.4.8/debian/changelog 2010-11-11 23:38:26.000000000 +0000
@@ -1,3 +1,9 @@
+abby (0.4.8-0ubuntu1) natty; urgency=low
+
+ * New upstream release
+
+ -- Roy Jamison <[email protected]> Thu, 11 Nov 2010 23:32:53 +0000
+
abby (0.4.7-1) unstable; urgency=low
* New upstream version
diff -Nru abby-0.4.7/NEWS abby-0.4.8/NEWS
--- abby-0.4.7/NEWS 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/NEWS 2010-01-18 16:10:57.000000000 +0000
@@ -1,4 +1,11 @@
+Version 0.4.8
+-------------
+
+Replaced buggy RSS feed parser. Feeds should be parsed
+properly now. Added import and export URL list functionality.
+
+
Version 0.4.7
-------------
diff -Nru abby-0.4.7/rc/exportdlg.ui abby-0.4.8/rc/exportdlg.ui
--- abby-0.4.7/rc/exportdlg.ui 1970-01-01 01:00:00.000000000 +0100
+++ abby-0.4.8/rc/exportdlg.ui 2010-01-18 16:10:57.000000000 +0000
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ExportDialog</class>
+ <widget class="QDialog" name="ExportDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>164</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Export</string>
+ </property>
+ <property name="styleSheet">
+ <string/>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>&File:</string>
+ </property>
+ <property name="buddy">
+ <cstring>fileEdit</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="fileEdit"/>
+ </item>
+ <item>
+ <widget class="QPushButton" name="browseButton">
+ <property name="toolTip">
+ <string>Browse</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="abby.qrc">
+ <normaloff>:/folder-saved-search.png</normaloff>:/folder-saved-search.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>16</width>
+ <height>16</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0">
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>Options</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="appendBox">
+ <property name="text">
+ <string>&Append to file</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0">
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <tabstops>
+ <tabstop>fileEdit</tabstop>
+ <tabstop>browseButton</tabstop>
+ <tabstop>appendBox</tabstop>
+ <tabstop>buttonBox</tabstop>
+ </tabstops>
+ <resources>
+ <include location="abby.qrc"/>
+ </resources>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>ExportDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>227</x>
+ <y>137</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>163</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>ExportDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>295</x>
+ <y>143</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>163</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>browseButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ExportDialog</receiver>
+ <slot>onBrowse()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>374</x>
+ <y>23</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>199</x>
+ <y>81</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+ <slots>
+ <slot>onBrowse()</slot>
+ </slots>
+</ui>
diff -Nru abby-0.4.7/rc/mainwnd.ui abby-0.4.8/rc/mainwnd.ui
--- abby-0.4.7/rc/mainwnd.ui 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/rc/mainwnd.ui 2010-01-18 16:10:57.000000000 +0000
@@ -8,7 +8,7 @@
<x>0</x>
<y>0</y>
<width>545</width>
- <height>389</height>
+ <height>391</height>
</rect>
</property>
<property name="windowTitle">
@@ -741,6 +741,9 @@
<addaction name="action_Remove"/>
<addaction name="action_Clear"/>
<addaction name="separator"/>
+ <addaction name="action_Import"/>
+ <addaction name="action_Export"/>
+ <addaction name="separator"/>
<addaction name="action_Preferences"/>
</widget>
<widget class="QMenu" name="menuHelp">
@@ -918,6 +921,24 @@
<string>&Supported hosts...</string>
</property>
</action>
+ <action name="action_Import">
+ <property name="icon">
+ <iconset resource="abby.qrc">
+ <normaloff>:/document-open.png</normaloff>:/document-open.png</iconset>
+ </property>
+ <property name="text">
+ <string>Import...</string>
+ </property>
+ </action>
+ <action name="action_Export">
+ <property name="icon">
+ <iconset resource="abby.qrc">
+ <normaloff>:/document-save.png</normaloff>:/document-save.png</iconset>
+ </property>
+ <property name="text">
+ <string>Export...</string>
+ </property>
+ </action>
</widget>
<tabstops>
<tabstop>addButton</tabstop>
@@ -1265,6 +1286,38 @@
</hint>
</hints>
</connection>
+ <connection>
+ <sender>action_Import</sender>
+ <signal>activated()</signal>
+ <receiver>MainWindow</receiver>
+ <slot>onImport()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>-1</x>
+ <y>-1</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>272</x>
+ <y>195</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>action_Export</sender>
+ <signal>activated()</signal>
+ <receiver>MainWindow</receiver>
+ <slot>onExport()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>-1</x>
+ <y>-1</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>272</x>
+ <y>195</y>
+ </hint>
+ </hints>
+ </connection>
</connections>
<slots>
<slot>onStart()</slot>
@@ -1284,5 +1337,7 @@
<slot>onRemove()</slot>
<slot>onFormats()</slot>
<slot>onClear()</slot>
+ <slot>onImport()</slot>
+ <slot>onExport()</slot>
</slots>
</ui>
diff -Nru abby-0.4.7/README abby-0.4.8/README
--- abby-0.4.7/README 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/README 2010-01-18 16:10:57.000000000 +0000
@@ -1,5 +1,3 @@
-U
-
About
-----
@@ -15,90 +13,127 @@
Configuration
-------------
-You will need to set the path to either clive(1) or cclive(1) command.
-You can do this by opening the preferences (Edit/Preferences). Note that
-abby will check the path everytime it starts and prompts a notification
-if it cannot run the c/clive command.
+* abby will require path to either cclive or clive command
-You can confirm that c/clive was found by opening the about dialog (Help/
-About).
+* The path is detected from the $PATH by default
+* If the above fails, you are required to enter it manually by opening
+the program preferences (Edit / Preferences or ctrl-e).
-First download
---------------
+* Use the "Verify" button to verify the path to c/clive
-Once the path is set to c/clive, you can add a new link to the download
-list by clicking the "plus" button left to the list widget. abby will
-prompt for a video page link. Note that before anything gets added to the
-list, abby verifies the c/clive supports the specified video host.
+* abby uses Qt's QSettings class for storing the program settings
+ - on Linux/FreeBSD these settings are typically found under .config/abby/
+ - the location may vary for each platform, refer to the Qt documentation
-Now that you have added a video page link to the list, you can click the
-download button (bottom-right to the list widget). This starts the c/clive
-process. The download progress is presented using the progressbars and
-various labels but you can also view various process details by opening
-the "Log" tab.
+The essentials to get started with abby
+---------------------------------------
-Feature: RSS
-------------
+If you have not configured abby already, then see the "Configuration"
+section above.
-abby can parse RSS feeds. This feature can be accessed by clicking the
-"RSS". Once the dialog is open, you can enter a RSS feed link, for example:
- http://gdata.youtube.com/feeds/base/users/(username)/uploads?alt=rss
+* You can add video page links by:
-You can also append "&orderby=updated" to the URL.
+ - Hitting the "+" button
-And hit "Fetch". When the parsed items appear in the list, you can select
-each item to the download list by checking the box before the video title.
-By hitting "OK", each selected item will be added to the download list.
+ - Dropping them onto the window
-Note also the tiny button before the "Fetch" button. This opens another
-dialog (Feed manager) that can be used to save your feed links so that you
-can select them later without having to type them again. To re-use a link
-from "Feed manager", select a link from the list and hit "OK".
+ - Pasting them from the system clipboard
-Note that this feature is not Youtube specific, although the example link
-above was for Youtube. You can use the RSS parsing feature ultimately with
-any website that provides RSS content containing video page links to the
-c/clive supported websites.
+ - Parsing RSS feeds (covered further below)
+ - Scanning video pages (covered further below)
-Feature: Scan
--------------
+ - Importing them from files
+
+* Each time a new link is added to the list
+
+ - abby verifies that the c/clive supports the website
+
+ - abby ignores any duplicate links
+
+* Start the download by hitting the download button (or ctrl+d)
+
+
+Parsing RSS feeds
+-----------------
+
+You can access this feature by clicking the button with the RSS icon
+on it or by hitting ctrl+r. Some websites like youtube.com and
+video.google.com provide RSS feeds that can be parsed in abby.
+
+Example:
+ http://gdata.youtube.com/feeds/base/users/communitychannel/uploads?alt=rss
+
+Once the RSS dialog is open, you can add RSS feed links to the top list.
+As with the main window's video page link list (or download list), hit
+the "+" button, paste a link from the clipboard or drop links onto the
+dialog.
+
+It's also worth noting that you can access the "Feed manager" by hitting
+the "Feeds..." button. The manager can be used to save frequently visited
+RSS feeds.
-abby can scan for video page links from any URL. This feature can be accessed
-by clicking the button underneath the "RSS" button. The interface is somewhat
-similar to the RSS dialog except that you are presented with the "Fetch video
-title" option box.
-
-Before you can start the scan, you will need to add a link to the "Link:"
-field. This could be, for example, the front-page of Youtube website
-(http://youtube.com).
+Hit "Fetch" to continue. Once the parsing is complete, a list of found
+items are displayed in the bottom list, each feed item under appropriate
+feed channel.
+
+Check each item you want to add to the download list and hit "OK".
+
+
+Scanning for video page links
+-----------------------------
+
+The scan feature originates from the early days of clive and the clivescan
+program. It can be used to scan for "regular" Youtube video page links or
+embedded ones. The found links can then be added to the download list in
+the main window and downloaded.
+
+You can access the scan dialog by hitting either the scan button in the
+main window. Ctrl-s also opens the same dialog.
+
+Once the dialog is open, enter the URL you want to scan for video page
+links. For example: http://youtube.com
If the "Fetch video title" is checked, abby will perform the scan in two
-steps, first it will fetch the content from specified link and parses it for
-video page links, and then visits those links for page title information.
+steps:
-Hit the "Scan" button to start the scan process.
+ 1) First fetches the content from specified link and scans it for
+ video page links
-Once the process has completed, abby adds the detected video page links
-to the list widget from which you can check those items that you wish to
-download. Clicking the "OK" button will then transfer the selected items to
-the download list.
+ 2) It then visits (fetches and parses) each found link for the page title
-Note that the scan feature currently supports only Youtube links. This means
-that it only recognizes Youtube video page links from the scanned content.
+Hit the "Scan" button to start the scan process. Depending on the "Fetch
+video title" state, abby will either add the parsed video page title or
+the link itself to the list.
-And yes, it works with Youtube playlists.
+Once the process is complete, you can check each video from the list
+and hit "OK" to add them to the download list.
+To those wondering if you can use this feature to scan Youtube playlists,
+the answer is yes. Note however that you have to scan each page manually
+because abby is currently unable go over the playlist pages automatically.
-Notes
------
-abby supports keyboard shortcuts. These are visible in the menu. For example,
+Misc. notes
+-----------
+
+* abby supports keyboard shortcuts. These are visible in the menus. For example,
Alt+A would open the "Add link" dialog.
-You can edit list items by double clicking them. This applies to all windows
+* You can edit list items by double clicking them. This applies to all windows
and dialogs with list widgets.
+* You can paste multiple links by separating each link with a newline
+
+* Export saves all of the items in the list to a specified text file.
+Each link is separated with a newline.
+
+* Import parses text files line by line and expects each link to be
+separated with a newline.
+
+* Because c/clive parses input in a similar fashion, you can use the
+exported exported lists with c/clive, e.g.: cclive < exported.list
+
diff -Nru abby-0.4.7/src/exportdlg.cpp abby-0.4.8/src/exportdlg.cpp
--- abby-0.4.7/src/exportdlg.cpp 1970-01-01 01:00:00.000000000 +0100
+++ abby-0.4.8/src/exportdlg.cpp 2010-01-18 16:10:57.000000000 +0000
@@ -0,0 +1,40 @@
+/*
+* Copyright (C) 2009 Toni Gundogdu.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <QDialog>
+#include <QFileDialog>
+
+#include "exportdlg.h"
+
+ExportDialog::ExportDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+}
+
+void
+ExportDialog::onBrowse() {
+ const QString fname =
+ QFileDialog::getSaveFileName(this, tr("Choose file"));
+
+ if (fname.isEmpty())
+ return;
+
+ fileEdit->setText(fname);
+}
+
+
diff -Nru abby-0.4.7/src/exportdlg.h abby-0.4.8/src/exportdlg.h
--- abby-0.4.7/src/exportdlg.h 1970-01-01 01:00:00.000000000 +0100
+++ abby-0.4.8/src/exportdlg.h 2010-01-18 16:10:57.000000000 +0000
@@ -0,0 +1,35 @@
+/*
+* Copyright (C) 2009 Toni Gundogdu.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef exportdlg_h
+#define exportdlg_h
+
+#include "ui_exportdlg.h"
+
+class QDialog;
+
+class ExportDialog : public QDialog, public Ui::ExportDialog {
+ Q_OBJECT
+public:
+ ExportDialog(QWidget *parent);
+private slots:
+ void onBrowse();
+};
+
+#endif
+
+
diff -Nru abby-0.4.7/src/main.cpp abby-0.4.8/src/main.cpp
--- abby-0.4.7/src/main.cpp 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/src/main.cpp 2010-01-18 16:10:57.000000000 +0000
@@ -29,7 +29,7 @@
QCoreApplication::setOrganizationName (APPNAME);
QCoreApplication::setApplicationName (APPNAME);
- QCoreApplication::setApplicationVersion("0.4.7");
+ QCoreApplication::setApplicationVersion("0.4.8");
QCoreApplication::setOrganizationDomain("abby.googlecode.com");
QSettings settings;
diff -Nru abby-0.4.7/src/mainwnd.cpp abby-0.4.8/src/mainwnd.cpp
--- abby-0.4.7/src/mainwnd.cpp 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/src/mainwnd.cpp 2010-01-18 16:10:57.000000000 +0000
@@ -33,6 +33,7 @@
#include "scandlg.h"
#include "formatdlg.h"
#include "aboutdlg.h"
+#include "exportdlg.h"
#include "util.h"
#define critCcliveProcessFailed(parent, msg) \
@@ -895,4 +896,48 @@
);
}
+void
+MainWindow::onImport() {
+ QString fname =
+ QFileDialog::getOpenFileName(this, tr("Choose file"));
+
+ if (!fname.isEmpty()) {
+
+ QStringList lst;
+ if (!Util::importItems(this, lst, fname))
+ return;
+
+ for (QStringList::const_iterator iter = lst.begin();
+ iter != lst.end();
+ ++iter)
+ {
+ addPageLink(*iter);
+ }
+ }
+}
+
+void
+MainWindow::onExport() {
+
+ if (!linksList->count())
+ return;
+
+ ExportDialog dlg(this);
+ if (dlg.exec() == QDialog::Rejected)
+ return;
+
+ const QString path = dlg.fileEdit->text();
+
+ if (path.isEmpty()) {
+ QMessageBox::critical(
+ this,
+ QCoreApplication::applicationName(),
+ tr("Specify file name for the saved data")
+ );
+ return;
+ }
+
+ Util::exportItems(this, linksList, path, dlg.appendBox->isChecked());
+}
+
diff -Nru abby-0.4.7/src/mainwnd.h abby-0.4.8/src/mainwnd.h
--- abby-0.4.7/src/mainwnd.h 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/src/mainwnd.h 2010-01-18 16:10:57.000000000 +0000
@@ -54,6 +54,8 @@
void onProcFinished(int exitCode, QProcess::ExitStatus exitStatus);
void onItemDoubleClicked(QListWidgetItem *item);
void iconActivated(QSystemTrayIcon::ActivationReason);
+ void onImport();
+ void onExport();
private:
QStringMap hosts;
PreferencesDialog *prefs;
diff -Nru abby-0.4.7/src/rssdlg.cpp abby-0.4.8/src/rssdlg.cpp
--- abby-0.4.7/src/rssdlg.cpp 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/src/rssdlg.cpp 2010-01-18 16:10:57.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * abby Copyright (C) 2009 Toni Gundogdu.
+ * abby Copyright (C) 2009,2010 Toni Gundogdu.
* This file is part of abby.
*
* abby is free software: you can redistribute it and/or modify
@@ -23,6 +23,7 @@
#include <QDragEnterEvent>
#include "util.h"
+#include "rssparser.h"
#include "rssdlg.h"
#include "feedmgrdlg.h"
@@ -127,11 +128,39 @@
}
if (currentFeed >= 0) {
- parseRSS(mgr->getData());
+
+ RSSParser rss;
+
+ try {
+ rss.parse( mgr->getData() );
+
+ const RSSFeed *feed = rss.getFeed();
+
+ // Populate the tree.
+
+ QTreeWidgetItem *parent = new QTreeWidgetItem(itemsTree);
+ parent->setText(0, feed->title);
+
+ QLinkedListIterator<RSSItem*> iter(feed->items);
+
+ while (iter.hasNext()) {
+ RSSItem *item = iter.next();
+ QTreeWidgetItem *child = new QTreeWidgetItem(parent);
+ child->setCheckState(0, Qt::Unchecked);
+ child->setText(0, item->title);
+ child->setText(1, item->link);
+ }
+ }
+ catch (const RSSParserException& x) {
+ Util::appendLog(logEdit,
+ QString(tr("XML parsing error: %1: %2"))
+ .arg(x.lineNumber)
+ .arg(x.what)
+ );
+ }
if (++currentFeed == expectedFeeds) {
resetUI();
- mgr->deleteLater();
Util::appendLog(logEdit, tr("Done."));
return;
}
@@ -153,15 +182,14 @@
Util::appendLog(logEdit, tr("Fetch ... ")+url);
}
+#ifdef _1_
void
RSSDialog::parseRSS(const QString& rss) {
xml.clear();
QTreeWidgetItem *parent = 0;
QString feedTitle, lnk, tag, itemTitle;
-#ifdef _1_
QString pubDate;
-#endif
xml.addData(rss);
@@ -191,9 +219,7 @@
itemTitle.clear();
lnk.clear();
-#ifdef _1_
pubDate.clear();
-#endif
}
}
else if (xml.isCharacters() && !xml.isWhitespace()) {
@@ -202,10 +228,8 @@
itemTitle += tmp;
else if (tag == "link")
lnk += tmp;
-#ifdef _1_
else if (tag == "pubDate")
pubDate += tmp;
-#endif
}
}
@@ -219,6 +243,7 @@
);
}
}
+#endif
void
RSSDialog::enableWidgets(const bool state/*=true*/) {
diff -Nru abby-0.4.7/src/rssdlg.h abby-0.4.8/src/rssdlg.h
--- abby-0.4.7/src/rssdlg.h 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/src/rssdlg.h 2010-01-18 16:10:57.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * abby Copyright (C) 2009 Toni Gundogdu.
+ * abby Copyright (C) 2009,2010 Toni Gundogdu.
* This file is part of abby.
*
* abby is free software: you can redistribute it and/or modify
@@ -22,8 +22,6 @@
#include "httpmgr.h"
-#include <QXmlStreamReader>
-
class RSSDialog : public QDialog, public Ui::rssDialog {
Q_OBJECT
public:
@@ -44,13 +42,11 @@
void writeSettings();
private:
void readSettings();
- void parseRSS(const QString& rss);
void enableWidgets(const bool state=true);
void resetUI();
void addRSSLink(QString lnk);
private:
QPointer<QHttpManager> mgr;
- QXmlStreamReader xml;
int currentFeed;
int expectedFeeds;
protected:
diff -Nru abby-0.4.7/src/rssparser.cpp abby-0.4.8/src/rssparser.cpp
--- abby-0.4.7/src/rssparser.cpp 1970-01-01 01:00:00.000000000 +0100
+++ abby-0.4.8/src/rssparser.cpp 2010-01-18 16:10:57.000000000 +0000
@@ -0,0 +1,165 @@
+/*
+* Copyright (C) 2010 Toni Gundogdu.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "rssparser.h"
+
+RSSParser::RSSParser ()
+ : currItem(0), feed(0), is_image(false)
+{
+}
+
+RSSParser::~RSSParser() {
+ if (feed) {
+ while (!feed->items.isEmpty())
+ delete feed->items.takeFirst();
+ delete feed;
+ feed = 0;
+ }
+ currItem = 0;
+}
+
+void
+RSSParser::parse (const QString& data) {
+
+ xml.clear();
+ xml.addData(data);
+
+ feed = 0;
+ currItem = 0;
+ is_image = false;
+
+ while (!xml.atEnd()) {
+ xml.readNext();
+ if (xml.isStartElement())
+ atStartElement();
+ else if (xml.isEndElement())
+ atEndElement();
+ else if (xml.isCharacters() && !xml.isWhitespace())
+ atChar();
+ }
+ if (xml.error())
+ throw RSSParserException(xml);
+}
+
+#define cmp(what) \
+ (QString::compare(name,what,Qt::CaseInsensitive) == 0)
+
+void
+RSSParser::atStartElement() {
+
+ const QString name = xml.name().toString();
+
+ if (cmp("channel"))
+ feed = new RSSFeed;
+
+ else if (cmp("item") && feed) {
+ currItem = new RSSItem;
+ feed->items << currItem;
+ }
+
+ else if (cmp("image") && feed)
+ is_image = true;
+}
+
+void
+RSSParser::atEndElement() {
+
+ if (!feed) return;
+
+ const QString name = xml.name().toString();
+ const QString tmp = text.simplified();
+
+ if (cmp("item"))
+ currItem = 0;
+
+ else if (cmp("image"))
+ is_image = false;
+
+ else if (cmp("title")) {
+
+ if (currItem)
+ currItem->title = tmp;
+
+ else if (is_image)
+ feed->imageTitle = tmp;
+
+ else
+ feed->title = tmp;
+ }
+
+ else if (cmp("link")) {
+
+ if (currItem)
+ currItem->link = tmp;
+
+ else if (is_image)
+ feed->imageLink = tmp;
+
+ else
+ feed->link = tmp;
+ }
+
+ else if (cmp("description")) {
+
+ if (currItem)
+ currItem->description = tmp;
+
+ else
+ feed->description = tmp;
+ }
+
+ else if (cmp("url") && is_image)
+ feed->imageUrl = tmp;
+
+ else if (cmp("language"))
+ feed->language = tmp;
+
+ else if (cmp("generator"))
+ feed->generator = tmp;
+
+ else if (cmp("copyright"))
+ feed->copyright = tmp;
+
+ else if (cmp("pubDate") && currItem)
+ currItem->pubDate = tmp;
+
+#ifdef _1_
+ else if (cmp("category") && currItem) { }
+#endif
+
+ text.clear();
+}
+
+void
+RSSParser::atChar() {
+ text += xml.text().toString();
+}
+
+RSSParserException::RSSParserException(
+ const QXmlStreamReader& xml)
+{
+ what = xml.errorString();
+ lineNumber = xml.lineNumber();
+ errorCode = xml.error();
+}
+
+const RSSFeed*
+RSSParser::getFeed() const {
+ return feed;
+}
+
+
diff -Nru abby-0.4.7/src/rssparser.h abby-0.4.8/src/rssparser.h
--- abby-0.4.7/src/rssparser.h 1970-01-01 01:00:00.000000000 +0100
+++ abby-0.4.8/src/rssparser.h 2010-01-18 16:10:57.000000000 +0000
@@ -0,0 +1,80 @@
+/*
+* Copyright (C) 2010 Toni Gundogdu.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef rssparser_h
+#define rssparser_h
+
+#include <QXmlStreamReader>
+#include <QLinkedList>
+#include <QString>
+
+class RSSItem;
+class RSSParserException;
+
+class RSSItem {
+public:
+ QString title;
+ QString link;
+ QString description;
+ QString pubDate;
+};
+
+class RSSFeed {
+public:
+ QString title;
+ QString description;
+ QString link;
+ QString language;
+ QString generator;
+ QString copyright;
+ QString imageUrl;
+ QString imageTitle;
+ QString imageLink;
+ QLinkedList<RSSItem*> items;
+};
+
+class RSSParser {
+public:
+ RSSParser();
+ virtual ~RSSParser();
+public:
+ void parse(const QString& data);
+ const RSSFeed* getFeed() const;
+private:
+ void atStartElement();
+ void atEndElement();
+ void atChar();
+private:
+ QXmlStreamReader xml;
+ RSSItem *currItem;
+ RSSFeed *feed;
+ QString text;
+ bool is_image;
+};
+
+class RSSParserException {
+public:
+ RSSParserException(const QXmlStreamReader& xml);
+public:
+ QString what;
+ qint64 lineNumber;
+ QXmlStreamReader::Error errorCode;
+};
+
+#endif
+
+
diff -Nru abby-0.4.7/src/util.cpp abby-0.4.8/src/util.cpp
--- abby-0.4.7/src/util.cpp 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/src/util.cpp 2010-01-18 16:10:57.000000000 +0000
@@ -29,6 +29,8 @@
#include <QClipboard>
#include <QCoreApplication>
#include <QApplication>
+#include <QMessageBox>
+#include <QTextStream>
//#include <QDebug>
#include "util.h"
@@ -314,6 +316,71 @@
Util::addItem(w, lst[i]);
}
+static void
+msgbox_crit(
+ const QWidget *parent,
+ const QString msg)
+{
+ QMessageBox::critical(
+ const_cast<QWidget*>(parent),
+ QCoreApplication::applicationName(),
+ msg);
+}
+
+bool
+Util::importItems(
+ const QWidget *parent,
+ QStringList& lst,
+ const QString& path)
+{
+ QFile file(path);
+
+ if (!file.open(QFile::ReadOnly | QIODevice::Text)) {
+ msgbox_crit(parent,
+ QString( QObject::tr("File open error %1") ).arg( file.error() ));
+ return false;
+ }
+
+ QTextStream f(&file);
+
+ while (!f.atEnd())
+ lst.append(f.readLine().simplified());
+
+ return !lst.empty();
+}
+
+bool
+Util::exportItems(
+ const QWidget *parent,
+ const QListWidget *w,
+ const QString& path,
+ const bool& append)
+{
+ QFile file(path);
+
+ QFlags<QIODevice::OpenModeFlag> flags =
+ (QFile::WriteOnly | QIODevice::Text);
+
+ flags |=
+ append
+ ? QIODevice::Append
+ : QIODevice::Truncate;
+
+ if (!file.open(flags)) {
+ msgbox_crit(parent,
+ QString( QObject::tr("File open error %1") ).arg( file.error() ));
+ return false;
+ }
+
+ QTextStream out(&file);
+
+ const int size = w->count();
+ for (int i=0; i<size; ++i)
+ out << w->item(i)->text() << "\n";
+
+ return true;
+}
+
NoCcliveException::NoCcliveException(const QString& errmsg)
: errmsg(errmsg)
{
diff -Nru abby-0.4.7/src/util.h abby-0.4.8/src/util.h
--- abby-0.4.7/src/util.h 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/src/util.h 2010-01-18 16:10:57.000000000 +0000
@@ -54,6 +54,10 @@
static void removeSelectedItems(const QWidget *parent, const QListWidget *w);
static void clearItems(const QWidget *parent, const QListWidget *w);
static void paste(const QListWidget *w);
+ static bool importItems(const QWidget *parent,
+ QStringList& lst, const QString& path);
+ static bool exportItems(const QWidget *parent,
+ const QListWidget *w, const QString& path, const bool& append);
};
class NoCcliveException {
diff -Nru abby-0.4.7/TODO abby-0.4.8/TODO
--- abby-0.4.7/TODO 2009-12-18 10:55:51.000000000 +0000
+++ abby-0.4.8/TODO 2010-01-18 16:10:57.000000000 +0000
@@ -3,19 +3,25 @@
0.4.x
-----
-* w32: minimize to tray does not hide abby from taskbar
+
0.5.0
-----
-* cleanup: remove excess code
- - common code -> src/util.(cpp|h)
- - e.g. HTTP redirect code (rss/scan)
+* add support for multi-segment videos (will appear in cclive 0.6.0)
+ - clive is not planned to port these changes from cclive
-0.6.0
------
-* integrate with libquvi?
-Unspecified
------------
+Postponed: volunteers needed
+----------------------------
+
+This section lists items that will be postponed until a volunteer
+stands up to assist.
+
+* w32: minimize to tray does not hide abby from taskbar
+ - No idea how to fix this
+
* proper application icon to replace the current "TODO" icon
- 32x32 or higher (24bit preferably)
+ - There is a reason I'm a programmer
+
+