From bdab79bb02cf5fd5058c1c5a3a952e91c32f45a7 Mon Sep 17 00:00:00 2001 From: jeena Date: Wed, 24 Apr 2013 16:37:02 +0200 Subject: [PATCH] added more readme --- README.md | 33 ++++++++++++++++++++++++++++++++- feedthemonkey | 11 +++++++---- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8df675a..8a40ede 100644 --- a/README.md +++ b/README.md @@ -1 +1,32 @@ -Feed the Monkey is a desktop client for TinyTinyRSS. \ No newline at end of file += Feed the Monkey + +Feed the Monkey is a desktop client for [TinyTinyRSS](http://tt-rss.org). That means that it doesn't work as a standalone feed reader but only as a client for the TinyTinyRSS API which it uses to get the normalized feeds and to synchronize the "article read" marks. + +It is written in PyQt and uses Webkit to show the contents. + +== Installation + +You need to have PyQt installed and a account on a TinyTinyRSS instance. + +Download the zip file, unzip it and then run: + +`sudo python setup.py install` + +== Keyboard shortcuts + +The keyboard shortcuts are inspired by other feed readers which are inspired by the text editor vi. + +`j` or `→` show nex article +`k` or `←` show previous article +`n` or `Return` open current article in the default browser +`r` reload articles +`Ctrl Q` quit +`Ctrl +` zoom in +`Ctrl -` zoom out +`Ctrl 0` reset zoom + +== Trivia + +I just hacked together this one within one day so it is not feature complete yet and has no real error handling. + +Right now it only loads unread articles and shows them one after another. I might add a sidebar in the future, we will see. \ No newline at end of file diff --git a/feedthemonkey b/feedthemonkey index c646292..49c8429 100755 --- a/feedthemonkey +++ b/feedthemonkey @@ -49,7 +49,7 @@ class MainWindow(QtGui.QMainWindow): actionMenu.addAction(mkAction("&Reload", self.content.reload, "R")) actionMenu.addAction(mkAction("&Next", self.content.showNext, "J")) actionMenu.addAction(mkAction("&Previous", self.content.showPrevious, "K")) - actionMenu.addAction(mkAction("&Open in Browser", self.content.openCurrent, "Return")) + actionMenu.addAction(mkAction("&Open in Browser", self.content.openCurrent, "N")) viewMenu = mb.addMenu("&View") viewMenu.addAction(mkAction("Zoom &In", lambda: self.content.wb.setZoomFactor(self.content.wb.zoomFactor() + 0.2), "Ctrl++")) @@ -108,7 +108,7 @@ class MainWindow(QtGui.QMainWindow): dialog.exec_() def logOut(self): - self.content.evaluateJavaScript("setArticle()") + self.content.evaluateJavaScript("setArticle('logout')") self.tinyTinyRSS.logOut() self.tinyTinyRSS = None self.put("session_id", None) @@ -134,6 +134,7 @@ class Content(QtGui.QWidget): self.do_show_next = QtGui.QShortcut(QtCore.Qt.Key_Right, self, activated=self.showNext) self.do_show_previous = QtGui.QShortcut(QtCore.Qt.Key_Left, self, activated=self.showPrevious) + self.do_open = QtGui.QShortcut("Return", self, activated=self.openCurrent) self.wb.settings().setAttribute(QtWebKit.QWebSettings.PluginsEnabled, True) self.wb.settings().setIconDatabasePath(tempfile.mkdtemp()) @@ -233,6 +234,8 @@ class Content(QtGui.QWidget): $("article").innerHTML = "Loading "; + } else if (article == "logout") { + } else if(article) { $("date").innerHTML = (new Date(parseInt(article.updated, 10) * 1000)).toLocaleString(); @@ -273,6 +276,7 @@ class Content(QtGui.QWidget): } img { max-width: 100%; + height: auto; } article { line-height: 1.6; @@ -400,17 +404,16 @@ class Login(QtGui.QDialog): layout.addWidget(self.textPass) layout.addWidget(self.buttons) + class WorkerThread(QtCore.QThread): def __init__(self, parent, do_reload): super(WorkerThread, self).__init__(parent) self.do_reload = do_reload - self.isRunning = True def run(self): self.do_reload() self.emit(QtCore.SIGNAL("reload_done()")) - self.isRunning = False if __name__ == "__main__":