コード例 #1
0
ファイル: debug.py プロジェクト: d98mp/samsokning
def main():
    writer = HTMLwriter()
    writer.startBasicPage()
#    performSearch('Ljuden från kosmos', writer)
#    performSearch('Herman Melville', writer)
#    performSearch('mozart', writer)
    performSearch('Baskervilles hund', writer)
#    performSearch('gris', writer)
    writer.closeBasicPage()
コード例 #2
0
def main():
    writer = HTMLwriter()
    writer.startBasicPage()
    #    performSearch('Ljuden från kosmos', writer)
    #    performSearch('Herman Melville', writer)
    #    performSearch('mozart', writer)
    performSearch('Baskervilles hund', writer)
    #    performSearch('gris', writer)
    writer.closeBasicPage()
コード例 #3
0
ファイル: samsok.py プロジェクト: d98mp/samsokning
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    Samsok is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.

import cgi  
import cgitb

from html import HTMLwriter
from search import performSearch
        

cgitb.enable()     
HTMLmachine = HTMLwriter()
HTMLmachine.startBasicPage()
HTMLmachine.outputSearchbox()
storage = []
form = cgi.FieldStorage()

if "search" in form:
    performSearch(form['search'].value, HTMLmachine)

HTMLmachine.closeBasicPage()
コード例 #4
0
ファイル: samsok.py プロジェクト: emilhem/samsokning
#    You should have received a copy of the GNU General Public License
#    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.

import cgi
import cgitb
cgitb.enable()

# First off, modify the path to allow any locally installed packages
import config
import sys
import os
import json
for folder in json.loads(
        config.parser.get(config.defaultSection, 'localLibFolders')):
    sys.path.append(os.path.abspath(folder))

from html import HTMLwriter
from search import performSearch

if __name__ == '__main__':
    HTMLmachine = HTMLwriter()
    HTMLmachine.startBasicPage()
    HTMLmachine.outputSearchbox()
    storage = []
    form = cgi.FieldStorage()

    if "search" in form:
        performSearch(form['search'].value, HTMLmachine)

    HTMLmachine.closeBasicPage()