From 51a6ece9a63764e7a57230081d299f36d3186918 Mon Sep 17 00:00:00 2001 From: Harishankar Date: Fri, 26 Nov 2010 14:03:28 +0530 Subject: [PATCH] New site functionality implemented * Added full functionality for the new site dialog box. * Re-organized application menus. --- biaweb_db.py | 236 ++++++++++++++++++++++++++++++++ main_window.py | 23 +++- main_window.ui | 146 ++++++++++---------- site_configuration_dialog.ui | 80 ++++++++++- ui_main_window.py | 128 ++++++++--------- ui_site_configuration_dialog.py | 55 +++++++- 6 files changed, 533 insertions(+), 135 deletions(-) create mode 100644 biaweb_db.py diff --git a/biaweb_db.py b/biaweb_db.py new file mode 100644 index 0000000..9be184d --- /dev/null +++ b/biaweb_db.py @@ -0,0 +1,236 @@ +# BiaWeb Website content manager (c) 2010 V.Harishankar +# Database handling functions + +import sqlite3 + +def create_db (dbname, site_title, site_url, keywords, description, copyright, + num_rss, dest_path): + try: + conn = sqlite3.connect (dbname) + c = conn.cursor () + c.execute ("CREATE TABLE IF NOT EXISTS \ + categories (cid INTEGER PRIMARY KEY, \ + name TEXT, desc TEXT, \ + stub TEXT);") + c.execute ("CREATE TABLE IF NOT EXISTS \ + articles (aid INTEGER PRIMARY KEY, \ + title TEXT, summary TEXT, keywords TEXT, \ + content TEXT, cdate NUMERIC, mdate NUMERIC, cid NUMERIC, \ + stub TEXT, rating NUMERIC);") + c.execute ("CREATE TABLE IF NOT EXISTS \ + config (config_name TEXT, config_param TEXT);") + + c.execute ("CREATE TABLE IF NOT EXISTS \ + templates (template_name TEXT, template_content);") + + template_main = """ + + + + ${site_title} + + + + + + + + + +
+ ${contents_bit} +
+ + + + """ + + template_article_bit = """

${article_title}

+
Created: ${article_cdate} | Last modified: ${article_mdate}
+
Rating: ${rating}
+
${article_contents}
+ """ + + template_news_item_bit = """

${news_title}

+
${news_datetime}
+
${news_description}
+ """ + + template_index_bit = """

Welcome to ${site_name}

+
+ Welcome to my site, ${site_name}. +
+

Latest Articles

+ ${news_updates} + """ + + template_table_bit = """

${category_title}

+

${category_desc}

+ + + + + + + + + + ${table_rows} + +
TitleCreated onRated
+ """ + + template_tablerow_bit = """ + ${title} + ${created} + ${rating} + + """ + + template_style = """body { + font-family: "Bitstream Vera Sans", Verdana, Arial, Sans Serif; + font-size: 0.9em; + background-color: #ffffff; + color: #000000; + margin: auto + } + #head { + width: 98%; + background-color: #efefef; + padding: 1%; + text-align: center; + } + + #main { + width: 73%; + padding: 1%; + float: left; + } + + #sidebar { + width: 23%; + padding: 1%; + float: right; + } + + #footer { + width: 100%; + padding-top: 5px; + padding-bottom: 5px; + font-size: 0.9em; + text-align: center; + float: left; + background-color: #efefef; + } + + .headerdesc { + font-variant: small-caps; + font-size: 1.1em; + } + + .content { + text-align: justify; + line-height: 1.1em; + } + + .categorytable { + width: 100%; + } + + .categorytable thead { + font-weight: bold; + } + + .modified { + font-size: 0.8em; + color: #666666; + } + + .rating { + font-size: 0.8em; + color: #666666; + } + + h1, h2, h3 { + font-family: "Bitstream Vera Serif", Serif; + padding: 0; + margin: 0; + margin-top: 5px; + margin-bottom: 5px; + } + + hr { + border: 0; + border-bottom: 1px solid; + border-color: #888888; + } + + h1 { + font-size: 2.4em; + color: #000099; + + } + h1 a, h1 a:hover, h1 a:visited, h2 a:active { + text-decoration: none; + } + h2 { + font-size: 1.4em; + background-color: #efefef; + } + h2 a, h2 a:hover, h2 a:visited, h2 a:active { + text-decoration: none; + } + h3 { + font-size: 1.2em; + a { + color: #0000dd; + } + a:visited { + color: #0000aa; + } + a:active, a:hover { + color: #0000ff; + }""" + + c.executemany ("INSERT INTO templates (template_name, template_content) VALUES (?, ?);", + [["main_template", template_main], + ["article_bit", template_article_bit], + ["news_bit", template_news_item_bit], + ["table_bit", template_table_bit], + ["tablerow_bit", template_tablerow_bit], + ["stylesheet", template_style], + ["index_bit", template_index_bit]]) + + c.executemany ("INSERT INTO config (config_name, config_param) VALUES (?, ?); ", + [["Website URL", site_url], + ["Website Title", site_title], + ["Keywords", keywords], + ["Description", description], + ["No. of RSS items", num_rss], + ["Destination path", dest_path], + ["Copyright", copyright]]) + + conn.commit () + conn.close () + return True + except sqlite3.Error: + return False diff --git a/main_window.py b/main_window.py index 6a856bb..3632075 100644 --- a/main_window.py +++ b/main_window.py @@ -4,6 +4,7 @@ import PyQt4 import ui_main_window import site_configuration_dialog as scd +import biaweb_db import sys class MainWindow (PyQt4.QtGui.QMainWindow, ui_main_window.Ui_MainWindow): @@ -14,7 +15,27 @@ class MainWindow (PyQt4.QtGui.QMainWindow, ui_main_window.Ui_MainWindow): def onFileNew (self): dlg = scd.SiteConfigDialog (self) - dlg.exec_ () + if dlg.exec_ () == PyQt4.QtGui.QDialog.Accepted: + site_title = str (dlg.site_title.text ()).strip () + site_url = str (dlg.site_url.text ()).strip () + keywords = str (dlg.keywords.text ()).strip () + destination = str (dlg.destination.text ()).strip () + description = str (dlg.description.toPlainText ()).strip () + num_rss = dlg.num_rss_items.value () + copyright = str (dlg.copyright.text ()).strip () + + savefilename = PyQt4.QtGui.QFileDialog.getSaveFileName (self, "Save site database to") + + if savefilename: + self.current_db = savefilename + self.setWindowTitle ("BiaWeb - " + self.current_db) + flag = biaweb_db.create_db (str (savefilename), site_title, site_url, keywords, description, + copyright, num_rss, destination) + if flag == True: + PyQt4.QtGui.QMessageBox.information (self, "Success", + "New site db successfully created") + else: + PyQt4.QtGui.QMessageBox.critical (self, "Error", "SQLite 3 error in creating database.") def onFileQuit (self): sys.exit (0) diff --git a/main_window.ui b/main_window.ui index 451959c..6d83adb 100644 --- a/main_window.ui +++ b/main_window.ui @@ -27,6 +27,28 @@ + + + + false + + + QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable + + + Categories + + + 1 + + + + + + + + + @@ -36,38 +58,6 @@ 25 - - - &File - - - - - - - - - &Category - - - - - - - - &Articles - - - - - - - - &Web - - - - &Help @@ -82,35 +72,41 @@ - - - + + + &Content + + + + + + + + + + + + &File + + + + &Export web + + + + + + + + + + + + + - - - - - false - - - QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable - - - Categories - - - 1 - - - - - - - - - Open existing site... @@ -124,49 +120,49 @@ Quit - + - &Add... + Add &category... Add a new category to the website structure - + - &Edit... + Edit categ&ory... Edit the selected category - + - &Delete + &Remove category Delete the selected category - + - &Add... + &Add article... Add an article to selected category - + - &Edit... + &Edit article... Edit the selected article - + - &Delete + &Delete article... Delete the selected article @@ -228,6 +224,16 @@ Modify or revert site templates + + + samth + + + + + asasas + + diff --git a/site_configuration_dialog.ui b/site_configuration_dialog.ui index 0b74288..49dc7dd 100644 --- a/site_configuration_dialog.ui +++ b/site_configuration_dialog.ui @@ -22,6 +22,12 @@ + + + 75 + true + + Name of the site @@ -29,6 +35,14 @@ + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Title of the site displayed in the header </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">of the generated website. <span style=" font-style:italic;">Required field</span></p></body></html> + My Site @@ -36,6 +50,12 @@ + + + 75 + true + + Site URL @@ -43,6 +63,12 @@ + + + 75 + true + + Keywords @@ -50,6 +76,11 @@ + + Site keywords. This influences only the main +site page. Individual articles will have their own +keywords. + some keywords here @@ -57,6 +88,12 @@ + + + 75 + true + + Description @@ -64,6 +101,14 @@ + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Description. This is displayed below the site title</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">in the generated HTML page. <span style=" font-style:italic;">Required field</span></p></body></html> + Qt::ScrollBarAlwaysOn @@ -84,13 +129,28 @@ + + + 75 + true + + Export destination - + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Desination to generate the HTML output when </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">exported. <span style=" font-style:italic;">Required field</span></p></body></html> + + @@ -118,6 +178,11 @@ + + Number of items to display in RSS feed for the site. +The RSS feed is updated every time you create a +new article and export it to HTML. + 1 @@ -128,6 +193,10 @@ + + Copyright text displayed on the footer of all +the generated pages of the website. + Copyright (C) year, your name here @@ -142,6 +211,15 @@ + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">URL of the site without the HTTP part. This is the </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">base href URL when exported and all site links are</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">relative to this. <span style=" font-style:italic;">Required field</span></p></body></html> + example.com diff --git a/ui_main_window.py b/ui_main_window.py index ef57651..3b83164 100644 --- a/ui_main_window.py +++ b/ui_main_window.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'main_window.ui' # -# Created: Thu Nov 25 18:25:57 2010 +# Created: Fri Nov 26 13:58:47 2010 # by: PyQt4 UI code generator 4.7.4 # # WARNING! All changes made in this file will be lost! @@ -24,22 +24,6 @@ class Ui_MainWindow(object): self.articles_list.setObjectName("articles_list") self.gridLayout.addWidget(self.articles_list, 1, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) - self.menubar = QtGui.QMenuBar(MainWindow) - self.menubar.setGeometry(QtCore.QRect(0, 0, 633, 25)) - self.menubar.setObjectName("menubar") - self.menu_File = QtGui.QMenu(self.menubar) - self.menu_File.setObjectName("menu_File") - self.menu_Category = QtGui.QMenu(self.menubar) - self.menu_Category.setObjectName("menu_Category") - self.menu_Articles = QtGui.QMenu(self.menubar) - self.menu_Articles.setObjectName("menu_Articles") - self.menu_Web = QtGui.QMenu(self.menubar) - self.menu_Web.setObjectName("menu_Web") - self.menu_About = QtGui.QMenu(self.menubar) - self.menu_About.setObjectName("menu_About") - self.menu_Settings = QtGui.QMenu(self.menubar) - self.menu_Settings.setObjectName("menu_Settings") - MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) @@ -56,22 +40,36 @@ class Ui_MainWindow(object): self.gridLayout_2.addWidget(self.categories_list, 0, 0, 1, 1) self.dockWidget_2.setWidget(self.dockWidgetContents_2) MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.dockWidget_2) + self.menubar = QtGui.QMenuBar(MainWindow) + self.menubar.setGeometry(QtCore.QRect(0, 0, 633, 25)) + self.menubar.setObjectName("menubar") + self.menu_About = QtGui.QMenu(self.menubar) + self.menu_About.setObjectName("menu_About") + self.menu_Settings = QtGui.QMenu(self.menubar) + self.menu_Settings.setObjectName("menu_Settings") + self.menu_Content = QtGui.QMenu(self.menubar) + self.menu_Content.setObjectName("menu_Content") + self.menu_File_2 = QtGui.QMenu(self.menubar) + self.menu_File_2.setObjectName("menu_File_2") + self.menu_Export_web = QtGui.QMenu(self.menu_File_2) + self.menu_Export_web.setObjectName("menu_Export_web") + MainWindow.setMenuBar(self.menubar) self.actionOpen_DB = QtGui.QAction(MainWindow) self.actionOpen_DB.setObjectName("actionOpen_DB") self.action_Quit = QtGui.QAction(MainWindow) self.action_Quit.setObjectName("action_Quit") - self.action_Add = QtGui.QAction(MainWindow) - self.action_Add.setObjectName("action_Add") - self.action_Edit = QtGui.QAction(MainWindow) - self.action_Edit.setObjectName("action_Edit") - self.action_Delete = QtGui.QAction(MainWindow) - self.action_Delete.setObjectName("action_Delete") - self.action_New = QtGui.QAction(MainWindow) - self.action_New.setObjectName("action_New") - self.action_Edit_2 = QtGui.QAction(MainWindow) - self.action_Edit_2.setObjectName("action_Edit_2") - self.action_Delete_2 = QtGui.QAction(MainWindow) - self.action_Delete_2.setObjectName("action_Delete_2") + self.action_AddCategory = QtGui.QAction(MainWindow) + self.action_AddCategory.setObjectName("action_AddCategory") + self.action_EditCategory = QtGui.QAction(MainWindow) + self.action_EditCategory.setObjectName("action_EditCategory") + self.action_RemoveCategory = QtGui.QAction(MainWindow) + self.action_RemoveCategory.setObjectName("action_RemoveCategory") + self.action_NewArticle = QtGui.QAction(MainWindow) + self.action_NewArticle.setObjectName("action_NewArticle") + self.action_EditArticle = QtGui.QAction(MainWindow) + self.action_EditArticle.setObjectName("action_EditArticle") + self.action_DeleteArticle = QtGui.QAction(MainWindow) + self.action_DeleteArticle.setObjectName("action_DeleteArticle") self.action_Generate_Site = QtGui.QAction(MainWindow) self.action_Generate_Site.setObjectName("action_Generate_Site") self.actionGenerate_Search_Index = QtGui.QAction(MainWindow) @@ -86,27 +84,32 @@ class Ui_MainWindow(object): self.action_Configuration.setObjectName("action_Configuration") self.actionTemplates = QtGui.QAction(MainWindow) self.actionTemplates.setObjectName("actionTemplates") - self.menu_File.addAction(self.actionNew_site) - self.menu_File.addAction(self.action_Open_site) - self.menu_File.addSeparator() - self.menu_File.addAction(self.action_Quit) - self.menu_Category.addAction(self.action_Add) - self.menu_Category.addAction(self.action_Edit) - self.menu_Category.addAction(self.action_Delete) - self.menu_Articles.addAction(self.action_New) - self.menu_Articles.addAction(self.action_Edit_2) - self.menu_Articles.addAction(self.action_Delete_2) - self.menu_Web.addAction(self.action_Generate_Site) - self.menu_Web.addAction(self.actionGenerate_Search_Index) + self.actionSamth = QtGui.QAction(MainWindow) + self.actionSamth.setObjectName("actionSamth") + self.actionAsasas = QtGui.QAction(MainWindow) + self.actionAsasas.setObjectName("actionAsasas") self.menu_About.addAction(self.action_About) self.menu_Settings.addAction(self.action_Configuration) self.menu_Settings.addSeparator() self.menu_Settings.addAction(self.actionTemplates) - self.menubar.addAction(self.menu_File.menuAction()) - self.menubar.addAction(self.menu_Category.menuAction()) - self.menubar.addAction(self.menu_Articles.menuAction()) + self.menu_Content.addAction(self.action_NewArticle) + self.menu_Content.addAction(self.action_EditArticle) + self.menu_Content.addAction(self.action_DeleteArticle) + self.menu_Content.addSeparator() + self.menu_Content.addAction(self.action_AddCategory) + self.menu_Content.addAction(self.action_EditCategory) + self.menu_Content.addAction(self.action_RemoveCategory) + self.menu_Export_web.addAction(self.action_Generate_Site) + self.menu_Export_web.addAction(self.actionGenerate_Search_Index) + self.menu_File_2.addAction(self.actionNew_site) + self.menu_File_2.addAction(self.action_Open_site) + self.menu_File_2.addSeparator() + self.menu_File_2.addAction(self.menu_Export_web.menuAction()) + self.menu_File_2.addSeparator() + self.menu_File_2.addAction(self.action_Quit) + self.menubar.addAction(self.menu_File_2.menuAction()) + self.menubar.addAction(self.menu_Content.menuAction()) self.menubar.addAction(self.menu_Settings.menuAction()) - self.menubar.addAction(self.menu_Web.menuAction()) self.menubar.addAction(self.menu_About.menuAction()) self.retranslateUi(MainWindow) @@ -117,28 +120,27 @@ class Ui_MainWindow(object): def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "BiaWeb - Static Website Content Manager", None, QtGui.QApplication.UnicodeUTF8)) self.label_2.setText(QtGui.QApplication.translate("MainWindow", "Articles in category", None, QtGui.QApplication.UnicodeUTF8)) - self.menu_File.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8)) - self.menu_Category.setTitle(QtGui.QApplication.translate("MainWindow", "&Category", None, QtGui.QApplication.UnicodeUTF8)) - self.menu_Articles.setTitle(QtGui.QApplication.translate("MainWindow", "&Articles", None, QtGui.QApplication.UnicodeUTF8)) - self.menu_Web.setTitle(QtGui.QApplication.translate("MainWindow", "&Web", None, QtGui.QApplication.UnicodeUTF8)) + self.dockWidget_2.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Categories", None, QtGui.QApplication.UnicodeUTF8)) self.menu_About.setTitle(QtGui.QApplication.translate("MainWindow", "&Help", None, QtGui.QApplication.UnicodeUTF8)) self.menu_Settings.setTitle(QtGui.QApplication.translate("MainWindow", "&Settings", None, QtGui.QApplication.UnicodeUTF8)) - self.dockWidget_2.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Categories", None, QtGui.QApplication.UnicodeUTF8)) + self.menu_Content.setTitle(QtGui.QApplication.translate("MainWindow", "&Content", None, QtGui.QApplication.UnicodeUTF8)) + self.menu_File_2.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8)) + self.menu_Export_web.setTitle(QtGui.QApplication.translate("MainWindow", "&Export web", None, QtGui.QApplication.UnicodeUTF8)) self.actionOpen_DB.setText(QtGui.QApplication.translate("MainWindow", "Open existing site...", None, QtGui.QApplication.UnicodeUTF8)) self.action_Quit.setText(QtGui.QApplication.translate("MainWindow", "&Quit", None, QtGui.QApplication.UnicodeUTF8)) self.action_Quit.setStatusTip(QtGui.QApplication.translate("MainWindow", "Quit", None, QtGui.QApplication.UnicodeUTF8)) - self.action_Add.setText(QtGui.QApplication.translate("MainWindow", "&Add...", None, QtGui.QApplication.UnicodeUTF8)) - self.action_Add.setStatusTip(QtGui.QApplication.translate("MainWindow", "Add a new category to the website structure", None, QtGui.QApplication.UnicodeUTF8)) - self.action_Edit.setText(QtGui.QApplication.translate("MainWindow", "&Edit...", None, QtGui.QApplication.UnicodeUTF8)) - self.action_Edit.setStatusTip(QtGui.QApplication.translate("MainWindow", "Edit the selected category", None, QtGui.QApplication.UnicodeUTF8)) - self.action_Delete.setText(QtGui.QApplication.translate("MainWindow", "&Delete", None, QtGui.QApplication.UnicodeUTF8)) - self.action_Delete.setStatusTip(QtGui.QApplication.translate("MainWindow", "Delete the selected category", None, QtGui.QApplication.UnicodeUTF8)) - self.action_New.setText(QtGui.QApplication.translate("MainWindow", "&Add...", None, QtGui.QApplication.UnicodeUTF8)) - self.action_New.setStatusTip(QtGui.QApplication.translate("MainWindow", "Add an article to selected category", None, QtGui.QApplication.UnicodeUTF8)) - self.action_Edit_2.setText(QtGui.QApplication.translate("MainWindow", "&Edit...", None, QtGui.QApplication.UnicodeUTF8)) - self.action_Edit_2.setStatusTip(QtGui.QApplication.translate("MainWindow", "Edit the selected article", None, QtGui.QApplication.UnicodeUTF8)) - self.action_Delete_2.setText(QtGui.QApplication.translate("MainWindow", "&Delete", None, QtGui.QApplication.UnicodeUTF8)) - self.action_Delete_2.setStatusTip(QtGui.QApplication.translate("MainWindow", "Delete the selected article", None, QtGui.QApplication.UnicodeUTF8)) + self.action_AddCategory.setText(QtGui.QApplication.translate("MainWindow", "Add &category...", None, QtGui.QApplication.UnicodeUTF8)) + self.action_AddCategory.setStatusTip(QtGui.QApplication.translate("MainWindow", "Add a new category to the website structure", None, QtGui.QApplication.UnicodeUTF8)) + self.action_EditCategory.setText(QtGui.QApplication.translate("MainWindow", "Edit categ&ory...", None, QtGui.QApplication.UnicodeUTF8)) + self.action_EditCategory.setStatusTip(QtGui.QApplication.translate("MainWindow", "Edit the selected category", None, QtGui.QApplication.UnicodeUTF8)) + self.action_RemoveCategory.setText(QtGui.QApplication.translate("MainWindow", "&Remove category", None, QtGui.QApplication.UnicodeUTF8)) + self.action_RemoveCategory.setStatusTip(QtGui.QApplication.translate("MainWindow", "Delete the selected category", None, QtGui.QApplication.UnicodeUTF8)) + self.action_NewArticle.setText(QtGui.QApplication.translate("MainWindow", "&Add article...", None, QtGui.QApplication.UnicodeUTF8)) + self.action_NewArticle.setStatusTip(QtGui.QApplication.translate("MainWindow", "Add an article to selected category", None, QtGui.QApplication.UnicodeUTF8)) + self.action_EditArticle.setText(QtGui.QApplication.translate("MainWindow", "&Edit article...", None, QtGui.QApplication.UnicodeUTF8)) + self.action_EditArticle.setStatusTip(QtGui.QApplication.translate("MainWindow", "Edit the selected article", None, QtGui.QApplication.UnicodeUTF8)) + self.action_DeleteArticle.setText(QtGui.QApplication.translate("MainWindow", "&Delete article...", None, QtGui.QApplication.UnicodeUTF8)) + self.action_DeleteArticle.setStatusTip(QtGui.QApplication.translate("MainWindow", "Delete the selected article", None, QtGui.QApplication.UnicodeUTF8)) self.action_Generate_Site.setText(QtGui.QApplication.translate("MainWindow", "Generate &Site...", None, QtGui.QApplication.UnicodeUTF8)) self.action_Generate_Site.setStatusTip(QtGui.QApplication.translate("MainWindow", "Export the site into a directory structure with static HTML files", None, QtGui.QApplication.UnicodeUTF8)) self.actionGenerate_Search_Index.setText(QtGui.QApplication.translate("MainWindow", "Generate Search &Index...", None, QtGui.QApplication.UnicodeUTF8)) @@ -153,4 +155,6 @@ class Ui_MainWindow(object): self.action_Configuration.setStatusTip(QtGui.QApplication.translate("MainWindow", "Modify the site configuration", None, QtGui.QApplication.UnicodeUTF8)) self.actionTemplates.setText(QtGui.QApplication.translate("MainWindow", "Templates...", None, QtGui.QApplication.UnicodeUTF8)) self.actionTemplates.setStatusTip(QtGui.QApplication.translate("MainWindow", "Modify or revert site templates", None, QtGui.QApplication.UnicodeUTF8)) + self.actionSamth.setText(QtGui.QApplication.translate("MainWindow", "samth", None, QtGui.QApplication.UnicodeUTF8)) + self.actionAsasas.setText(QtGui.QApplication.translate("MainWindow", "asasas", None, QtGui.QApplication.UnicodeUTF8)) diff --git a/ui_site_configuration_dialog.py b/ui_site_configuration_dialog.py index a26be9e..f230ebc 100644 --- a/ui_site_configuration_dialog.py +++ b/ui_site_configuration_dialog.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'site_configuration_dialog.ui' # -# Created: Thu Nov 25 18:49:44 2010 +# Created: Fri Nov 26 13:38:43 2010 # by: PyQt4 UI code generator 4.7.4 # # WARNING! All changes made in this file will be lost! @@ -18,21 +18,37 @@ class Ui_SiteConfigDialog(object): self.gridLayout = QtGui.QGridLayout(SiteConfigDialog) self.gridLayout.setObjectName("gridLayout") self.label = QtGui.QLabel(SiteConfigDialog) + font = QtGui.QFont() + font.setWeight(75) + font.setBold(True) + self.label.setFont(font) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 0, 1, 1) self.site_title = QtGui.QLineEdit(SiteConfigDialog) self.site_title.setObjectName("site_title") self.gridLayout.addWidget(self.site_title, 0, 1, 1, 7) self.label_2 = QtGui.QLabel(SiteConfigDialog) + font = QtGui.QFont() + font.setWeight(75) + font.setBold(True) + self.label_2.setFont(font) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) self.label_3 = QtGui.QLabel(SiteConfigDialog) + font = QtGui.QFont() + font.setWeight(75) + font.setBold(True) + self.label_3.setFont(font) self.label_3.setObjectName("label_3") self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1) self.keywords = QtGui.QLineEdit(SiteConfigDialog) self.keywords.setObjectName("keywords") self.gridLayout.addWidget(self.keywords, 2, 1, 1, 7) self.label_4 = QtGui.QLabel(SiteConfigDialog) + font = QtGui.QFont() + font.setWeight(75) + font.setBold(True) + self.label_4.setFont(font) self.label_4.setObjectName("label_4") self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1) self.description = QtGui.QPlainTextEdit(SiteConfigDialog) @@ -44,6 +60,10 @@ class Ui_SiteConfigDialog(object): self.label_6.setObjectName("label_6") self.gridLayout.addWidget(self.label_6, 4, 0, 1, 2) self.label_5 = QtGui.QLabel(SiteConfigDialog) + font = QtGui.QFont() + font.setWeight(75) + font.setBold(True) + self.label_5.setFont(font) self.label_5.setObjectName("label_5") self.gridLayout.addWidget(self.label_5, 5, 0, 1, 1) self.destination = QtGui.QLineEdit(SiteConfigDialog) @@ -92,17 +112,50 @@ class Ui_SiteConfigDialog(object): def retranslateUi(self, SiteConfigDialog): SiteConfigDialog.setWindowTitle(QtGui.QApplication.translate("SiteConfigDialog", "Site Configuration", None, QtGui.QApplication.UnicodeUTF8)) self.label.setText(QtGui.QApplication.translate("SiteConfigDialog", "Name of the site", None, QtGui.QApplication.UnicodeUTF8)) + self.site_title.setWhatsThis(QtGui.QApplication.translate("SiteConfigDialog", "\n" +"\n" +"

Title of the site displayed in the header

\n" +"

of the generated website. Required field

", None, QtGui.QApplication.UnicodeUTF8)) self.site_title.setText(QtGui.QApplication.translate("SiteConfigDialog", "My Site", None, QtGui.QApplication.UnicodeUTF8)) self.label_2.setText(QtGui.QApplication.translate("SiteConfigDialog", "Site URL", None, QtGui.QApplication.UnicodeUTF8)) self.label_3.setText(QtGui.QApplication.translate("SiteConfigDialog", "Keywords", None, QtGui.QApplication.UnicodeUTF8)) + self.keywords.setWhatsThis(QtGui.QApplication.translate("SiteConfigDialog", "Site keywords. This influences only the main\n" +"site page. Individual articles will have their own\n" +"keywords.", None, QtGui.QApplication.UnicodeUTF8)) self.keywords.setText(QtGui.QApplication.translate("SiteConfigDialog", "some keywords here", None, QtGui.QApplication.UnicodeUTF8)) self.label_4.setText(QtGui.QApplication.translate("SiteConfigDialog", "Description", None, QtGui.QApplication.UnicodeUTF8)) + self.description.setWhatsThis(QtGui.QApplication.translate("SiteConfigDialog", "\n" +"\n" +"

Description. This is displayed below the site title

\n" +"

in the generated HTML page. Required field

", None, QtGui.QApplication.UnicodeUTF8)) self.description.setPlainText(QtGui.QApplication.translate("SiteConfigDialog", "Your site\'s description here. This appears in the site header.", None, QtGui.QApplication.UnicodeUTF8)) self.label_6.setText(QtGui.QApplication.translate("SiteConfigDialog", "# of RSS feed items", None, QtGui.QApplication.UnicodeUTF8)) self.label_5.setText(QtGui.QApplication.translate("SiteConfigDialog", "Export destination", None, QtGui.QApplication.UnicodeUTF8)) + self.destination.setWhatsThis(QtGui.QApplication.translate("SiteConfigDialog", "\n" +"\n" +"

Desination to generate the HTML output when

\n" +"

exported. Required field

", None, QtGui.QApplication.UnicodeUTF8)) self.destination_browse_button.setText(QtGui.QApplication.translate("SiteConfigDialog", "browse...", None, QtGui.QApplication.UnicodeUTF8)) self.label_8.setText(QtGui.QApplication.translate("SiteConfigDialog", "http://", None, QtGui.QApplication.UnicodeUTF8)) + self.num_rss_items.setWhatsThis(QtGui.QApplication.translate("SiteConfigDialog", "Number of items to display in RSS feed for the site.\n" +"The RSS feed is updated every time you create a \n" +"new article and export it to HTML.", None, QtGui.QApplication.UnicodeUTF8)) + self.copyright.setWhatsThis(QtGui.QApplication.translate("SiteConfigDialog", "Copyright text displayed on the footer of all\n" +"the generated pages of the website.", None, QtGui.QApplication.UnicodeUTF8)) self.copyright.setText(QtGui.QApplication.translate("SiteConfigDialog", "Copyright (C) year, your name here", None, QtGui.QApplication.UnicodeUTF8)) self.label_7.setText(QtGui.QApplication.translate("SiteConfigDialog", "Copyright text", None, QtGui.QApplication.UnicodeUTF8)) + self.site_url.setWhatsThis(QtGui.QApplication.translate("SiteConfigDialog", "\n" +"\n" +"

URL of the site without the HTTP part. This is the

\n" +"

base href URL when exported and all site links are

\n" +"

relative to this. Required field

", None, QtGui.QApplication.UnicodeUTF8)) self.site_url.setText(QtGui.QApplication.translate("SiteConfigDialog", "example.com", None, QtGui.QApplication.UnicodeUTF8)) -- 2.20.1