Esempio n. 1
0
 def html(self, s):
     return text2html(unicode(s, 'utf'))
Esempio n. 2
0
# Standard library imports
import sys

from PyQt4 import Qt

# Library imports
from notefinderlib.libnotetaking import *
from notefinderlib.creoleparser import text2html

from notefinderlib.notefinder.Message import Ui_MessageDialog
from notefinderlib.notefinder import notefinder_rc

notebook, note = sys.argv[1:3]
print notebook, note
n = Notebook(notebook)
t = n.get(note)
if n.markup == "Wiki":
    h = text2html(unicode(t, "utf"))
else:
    h = t

Application = Qt.QApplication(sys.argv)
Reminder = Qt.QDialog()
Reminder.setWindowTitle("Reminder: " + unicode(note, "utf"))
Reminder.ui = Ui_MessageDialog()
Reminder.ui.setupUi(Reminder)
Reminder.ui.iconLabel.setPixmap(Qt.QPixmap(":/icons/icon_small.png"))
Reminder.ui.message.setText(unicode("<html>%s</html>" % (h), "utf"))
Reminder.show()
sys.exit(Application.exec_())