Bug 85532 - the addition of a HTML "summary" page
Summary: the addition of a HTML "summary" page
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-20 05:34 UTC by Charles Phoenix
Modified: 2004-11-01 22:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Phoenix 2004-07-20 05:34:26 UTC
Version:           1.0-beta5 "Pierre" (using KDE 3.2.3, Gentoo)
Compiler:          gcc version 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6)
OS:                Linux (i686) release 2.6.6-win4lin-r3

This idea comes from the basic functioning of AmphetaDesk.

Have the "engine" output an html summary (or summary pages by topic, feed, etc), very similar to Kontact's summary, with perhaps a little more info and style.

See AmphetaDesk screenshots for a general idea.
http://www.disobey.com/amphetadesk/screenshots.html
(btw, already has a database of rss feeds)

Advantages of this idea is it would be possible to create a "reading" list that could be quickly downloaded to a PDA or grabbed externally, or even emailed. Not to mention on could use Konqueror. Finally it is cross platform so it can be use at work on a Windows box or posted to a site.

So what are the problems with AmphetaDesk then? It uses a proxy that is running fulltime, not to mention it has no advance housekeeping functions - filters and storage.
Comment 1 Teemu Rytilahti 2004-11-01 22:54:07 UTC
CVS commit by rytilahti: 

Added beginnings of the summary view. Currently only shows "small" summary for feeds, but folder summary and more details 
coming hopefully soon.
FEATURE:85532


  M +7 -4      ChangeLog   1.70
  M +9 -1      src/akregator_view.cpp   1.148
  M +58 -0     src/articleviewer.cpp   1.60
  M +3 -0      src/articleviewer.h   1.25


--- kdenonbeta/akregator/ChangeLog  #1.69:1.70
@@ -6,9 +6,12 @@
 -----------------------------
 
+New features:
+#85532 - Add feed summary -tpr
+
 Changes:
-      - Do not allow user to stop feedlist loading to avoid data loss -tpr
-      - Do not show feedlist url in title -tpr
-      - Clear the statusbar when pressing Stop button -tpr
-      - make search bar optional -fo
+       - Do not allow user to stop feedlist loading to avoid data loss -tpr
+       - Do not show feedlist url in title -tpr
+       - Clear the statusbar when pressing Stop button -tpr
+       - make search bar optional -fo
 
 Bug fixes:

--- kdenonbeta/akregator/src/akregator_view.cpp  #1.147:1.148
@@ -856,6 +856,14 @@ void aKregatorView::slotNodeSelected(Tre
     if (m_viewMode == CombinedView)
         m_articleViewer->slotShowNode(node);
-    else
+    
+    else {
         m_articles->slotShowNode(node);
+        if(node->isGroup())
+            m_articleViewer->slotShowSummary(node);
+        else {
+            Feed *f = static_cast<Feed *>(node);
+            m_articleViewer->slotShowSummary(f);
+        }
+    }
 
     if (m_part->actionCollection()->action("feed_remove") )

--- kdenonbeta/akregator/src/articleviewer.cpp  #1.59:1.60
@@ -265,4 +265,62 @@ void ArticleViewer::endWriting()
 }
 
+void ArticleViewer::slotShowSummary(TreeNode *item)
+{
+    //for (QListViewItem *it = item->firstChild(); it; it = it->nextSibling())
+        
+    
+    /*begin();
+    write(m_htmlHead+text);
+    end();*/
+}
+
+void ArticleViewer::slotShowSummary(Feed *f)
+{
+    if(!f) return;
+    
+    m_currentText = QString("<div id=\"headerbox\" dir=\"%1\">\n").arg(QApplication::reverseLayout() ? "rtl" : "ltr");
+    m_currentText += QString("<div id=\"headertitle\" dir=\"%1\">%2</div>\n").arg(directionOf(f->title())).arg(f->title());
+    m_currentText += "</div>\n"; // /headerbox
+    
+    if (!f->image().isNull()) // image
+    {
+        m_currentText += QString("<div id=\"body\" style=\"height:%1px\">").arg(f->image().height()+10);
+        QString url=f->xmlUrl();
+        m_currentText += QString("<a href=\""+f->htmlUrl()+"\"><img id=\"headimage\" src=\""+m_imageDir+url.replace("/", "_").replace(":", "_")+".png\"></a>\n");
+    }
+    else m_currentText += "<div id=\"body\">";
+    
+    if(f->description() && !f->description().isEmpty()) {
+        m_currentText += QString("<div dir=\"%1\">").arg(directionOf(f->description()));
+        m_currentText += i18n("<b>Description:</b> %1").arg(f->description());
+        m_currentText += "</div>\n"; // /description
+    }
+    
+    /*if(f->language() && !f->language().isEmpty()) {
+        // language name code from kttsd
+        QString langName;
+        QString langFile = locate("locale", QString::fromLatin1("%1/entry.desktop").arg(f->language()));
+        if (!langFile.isNull() && !langFile.isEmpty()) {
+            KSimpleConfig entry(langFile);
+            entry.setGroup("KCM Locale");
+            langName = entry.readEntry("Name", QString::null);
+        }
+       // if(name.isEmpty()) langName = f->language();
+            
+        m_currentText += QString("<div dir=\"%1\">").arg(directionOf(f->language()));
+        m_currentText += i18n("<b>Language:</b> %1").arg((langName));
+        m_currentText += "</div>\n"; // /language
+    }*/
+
+    m_currentText += i18n("<b>Unread articles:</b> %1").arg(f->unread());
+    m_currentText += "</div>"; // /body
+    
+    m_currentText += "</body></html>";
+    
+    begin();
+    write(m_htmlHead+m_currentText);
+    end();
+}
+
 void ArticleViewer::slotShowArticle(const MyArticle& article)
 {

--- kdenonbeta/akregator/src/articleviewer.h  #1.24:1.25
@@ -66,4 +66,7 @@ namespace Akregator
             void slotClear();
             
+            void slotShowSummary(Feed *f);
+            void slotShowSummary(TreeNode *node);
+            
         protected:
             /** nobody uses this right now. Do we need it? -fo */