From 226b2dbbfd3006f636984d99d1c572e2b06ba6c4 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 10 May 2014 14:15:13 +0900 Subject: [PATCH 1/3] add chajadan's readme.dev note --- README.development | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.development b/README.development index aa135c7ff..69970209a 100644 --- a/README.development +++ b/README.development @@ -5,10 +5,7 @@ tools (specifically pyrcc4 and pyuic4). These are often contained in a separate package on Linux, such as 'pyqt4-dev-tools' on Debian/Ubuntu. On a Mac they are part of the PyQt source install. -WINDOWS USERS: I have not tested the UI build script on Windows, so you'll need -to fix any problems you encounter on your own. If you can't figure it out, you -can still use the source packages of Anki, which contain pre-built copies -of the UI. +Windows users, please see the note at the bottom of this file before proceeding. To use the development version: @@ -42,3 +39,20 @@ Before contributing code, please read the LICENSE file. If you'd like to contribute translations, please see the translations section of http://ankisrs.net/docs/manual.html#_contributing + +WINDOWS USERS: + +I have not tested the build scripts on Windows, so you'll need to solve any +problems you encounter on your own. The easiest way is to use a source +tarball instead of git, as that way you don't need to build the UI yourself. +If you do want to use git, a user contributed the following, which should get +you most of the way there: + + 1) Install "git bash". + 2) In the tools directory, modify build_ui.sh. Locate the line that reads + "pyuic4 $i -o $py" and alter it to be of the following form: + "" "" $i -o $py + These two paths must point to your python executable, and to pyuic.py, on your + system. Typical paths would be: + = C:\\Python27\\python.exe + = C:\\Python27\\Lib\\site-packages\\PyQt4\\uic\\pyuic.py From 7134da4cd67f6b467b5974c5e83c6049e0ecac59 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 12 May 2014 15:45:21 +0900 Subject: [PATCH 2/3] enable houssam's fav code --- aqt/browser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aqt/browser.py b/aqt/browser.py index ae4f0439e..955e77855 100644 --- a/aqt/browser.py +++ b/aqt/browser.py @@ -367,6 +367,7 @@ class Browser(QMainWindow): self.setupEditor() self.updateFont() self.onUndoState(self.mw.form.actionUndo.isEnabled()) + self.form.searchEdit.setLineEdit(FavouritesLineEdit(self.mw, self)) self.form.searchEdit.setFocus() self.form.searchEdit.lineEdit().setText("is:current") self.form.searchEdit.lineEdit().selectAll() From a83769b258ef1c8fb310122aec3c19d605788c29 Mon Sep 17 00:00:00 2001 From: rubyu Date: Wed, 21 May 2014 14:52:43 +0900 Subject: [PATCH 3/3] Fixes an issue fields are not being escaped in doExport(). --- anki/exporting.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/anki/exporting.py b/anki/exporting.py index 2cbdfc53e..f61871d6c 100644 --- a/anki/exporting.py +++ b/anki/exporting.py @@ -20,10 +20,12 @@ class Exporter(object): file.close() def escapeText(self, text): - "Escape newlines, tabs and CSS." + "Escape newlines, tabs, CSS and quotechar." text = text.replace("\n", "
") text = text.replace("\t", " " * 8) text = re.sub("(?i)", "", text) + if "\"" in text: + text = "\"" + text.replace("\"", "\"\"") + "\"" return text def cardIds(self):