From eefb75b9cd610f681fd60ca7864b37f6963150e6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 13 Jul 2007 03:00:20 +0100 Subject: clean --- CHANGELOG | 4 + data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi | 1741 ++++++++++--------- data/sisu/conf/cgi-bin/sisu_search_sqlite.cgi | 1747 ++++++++++---------- data/sisu/conf/editor-syntax-etc/README | 92 ++ .../conf/editor-syntax-etc/diakonos/diakonos.conf | 977 +++++++++++ data/sisu/conf/editor-syntax-etc/gedit/sisu.lang | 124 ++ data/sisu/conf/editor-syntax-etc/kate/sisu.xml | 176 ++ data/sisu/conf/editor-syntax-etc/nano/nanorc | 220 +++ .../conf/editor-syntax-etc/nedit/sisu_nedit.pats | 79 + .../editor-syntax-etc/vim/addons/colors/slate.vim | 55 + .../conf/editor-syntax-etc/vim/addons/filetype.vim | 8 + .../editor-syntax-etc/vim/addons/ftplugin/sisu.vim | 177 ++ .../editor-syntax-etc/vim/addons/syntax/sisu.vim | 171 ++ data/sisu/conf/syntax/README | 92 -- data/sisu/conf/syntax/diakonos.conf | 977 ----------- data/sisu/conf/syntax/nanorc | 220 --- data/sisu/conf/syntax/sisu-mode.el | 235 --- data/sisu/conf/syntax/sisu.lang | 124 -- data/sisu/conf/syntax/sisu.xml | 176 -- data/sisu/conf/syntax/sisu_nedit.pats | 79 - data/sisu/conf/vim/addons/colors/slate.vim | 55 - data/sisu/conf/vim/addons/filetype.vim | 8 - data/sisu/conf/vim/addons/ftplugin/sisu.vim | 177 -- data/sisu/conf/vim/addons/syntax/sisu.vim | 171 -- 24 files changed, 3802 insertions(+), 4083 deletions(-) create mode 100644 data/sisu/conf/editor-syntax-etc/README create mode 100644 data/sisu/conf/editor-syntax-etc/diakonos/diakonos.conf create mode 100644 data/sisu/conf/editor-syntax-etc/gedit/sisu.lang create mode 100644 data/sisu/conf/editor-syntax-etc/kate/sisu.xml create mode 100644 data/sisu/conf/editor-syntax-etc/nano/nanorc create mode 100644 data/sisu/conf/editor-syntax-etc/nedit/sisu_nedit.pats create mode 100644 data/sisu/conf/editor-syntax-etc/vim/addons/colors/slate.vim create mode 100644 data/sisu/conf/editor-syntax-etc/vim/addons/filetype.vim create mode 100644 data/sisu/conf/editor-syntax-etc/vim/addons/ftplugin/sisu.vim create mode 100644 data/sisu/conf/editor-syntax-etc/vim/addons/syntax/sisu.vim delete mode 100644 data/sisu/conf/syntax/README delete mode 100644 data/sisu/conf/syntax/diakonos.conf delete mode 100644 data/sisu/conf/syntax/nanorc delete mode 100644 data/sisu/conf/syntax/sisu-mode.el delete mode 100644 data/sisu/conf/syntax/sisu.lang delete mode 100644 data/sisu/conf/syntax/sisu.xml delete mode 100644 data/sisu/conf/syntax/sisu_nedit.pats delete mode 100644 data/sisu/conf/vim/addons/colors/slate.vim delete mode 100644 data/sisu/conf/vim/addons/filetype.vim delete mode 100644 data/sisu/conf/vim/addons/ftplugin/sisu.vim delete mode 100644 data/sisu/conf/vim/addons/syntax/sisu.vim diff --git a/CHANGELOG b/CHANGELOG index 2be64787..deef2a9f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -40,6 +40,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.55.3.orig.tar.gz * diakonos * gedit * kate, kwrite + * renamed directory "syntax" "editor-syntax-etc" + * vim directory moved into editor-syntax-etc + + * debian install, correctly map moved vim directory %% sisu_0.55.2.orig.tar.gz (2007-07-07:27/6) http://www.jus.uio.no/sisu/pkg/src/sisu_0.55.2.orig.tar.gz diff --git a/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi b/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi index 521621b6..c196c756 100644 --- a/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi +++ b/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi @@ -6,918 +6,899 @@ * http://www.jus.uio.no/sisu/SiSU/download * Description: generates naive cgi search form for search of sisu database (pgsql) - * $Id$ + * Name: SiSU generated sample cgi search form - Copyright (C) 2006 Ralph Amissah - Copyright (C) 2005 Ralph Amissah (first release edition) - Copyright (C) 1997 Ralph Amissah (first edition) + * Description: generated sample cgi search form for SiSU + (SiSU is a framework for document structuring, publishing and search) - * License: GPL 3 or later + * Author: Ralph Amissah + + * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007 Ralph Amissah All Rights Reserved. + + * License: GPL 3 or later: - Summary of GPL 3 + SiSU, a framework for document structuring, publishing and search - This program is free software; you can redistribute it and/or modify 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. + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007 Ralph Amissah - This program 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. + This program is free software: you can redistribute it and/or modify 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. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + This program 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. - If you have Internet connection, the latest version of the GPL should be - available at these locations: - http://www.fsf.org/licenses/gpl.html - http://www.gnu.org/copyleft/gpl.html - http://www.jus.uio.no/sisu/gpl3.fsf + You should have received a copy of the GNU General Public License along with + this program. If not, see . - SiSU was first released to the public on January 4th 2005 + If you have Internet connection, the latest version of the GPL should be + available at these locations: + + + - SiSU uses: + * SiSU uses: + * Standard SiSU markup syntax, + * Standard SiSU meta-markup syntax, and the + * Standard SiSU object citation numbering and system - * Standard SiSU markup syntax, - * Standard SiSU meta-markup syntax, and the - * Standard SiSU object citation numbering and system + * Hompages: + + - © Ralph Amissah 1997, current 2006. - All Rights Reserved. + * Download: + - * Ralph Amissah ralph@amissah.com - Ralph Amissah ralph.amissah@gmail.com + * Ralph Amissah + + =end -require 'cgi' -require 'fcgi' -require 'dbi' -@version='sisu_search_pgsql' -@url_base="http://corundum:8081/_sisu/image" -host=%x{echo $HOSTNAME}.chomp! -@hosturl="http://#{host}" + - ':8081' -@base="#@hosturl/cgi-bin/#@version.cgi" -user='ralph' -class Form - def initialize(base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_searched,checked_url,checked_echo,checked_sql,checked_all,checked_none,checked_ignore,search_note,the_can='') - search_note='' if checked_searched !~/\S/ - the_can='' if checked_url !~/\S/ - search_field='' if checked_echo !~/\S/ - @base,@search_field,@selected_db,@checked_index,@checked_text,@checked_tip,@checked_searched,@checked_url,@checked_echo,@checked_sql,@checked_all,@checked_none,@checked_ignore,@search_note,@the_can=base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_searched,checked_url,checked_echo,checked_sql,checked_all,checked_none,checked_ignore,search_note,the_can - @tip=if checked_tip =~/\S/ - 'text:__; keywords:__; title:__; author:__; subject:__; description:__; publisher:__; contributor:__; date:__; type:__; format:__; identifier:__; source:__; language:__; relation:__; coverage:__; rights:__; comment:__; abstract:__; ' - else '' - end - end - def submission_form - search_form=<<-WOK - - -
- - - -
- - -
-

-
- - index - text - -

-

+ require 'cgi' + require 'fcgi' + require 'dbi' + @version='sisu_search_pgsql' + @image_src="http://localhost/sisu/_sisu/image" + @hosturl_db="http://localhost" + @hosturl_files="http://www.jus.uio.no" + @port="5432" + user='' + @@limit,@@offset=1000,0 + @base="#@hosturl_db/cgi-bin/#@version.cgi" + @@canned_search_url=@base + @color_heading='#DDFFAA' + @color_match='#ffff48' + class Form + def initialize(base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can='') + search_note='' if checked_searched !~/\S/ + the_can='' if checked_url !~/\S/ + search_field='' if checked_echo !~/\S/ + @base,@search_field,@selected_db,@checked_index,@checked_text,@checked_tip,@checked_stats,@checked_searched,@checked_url,@checked_case,@checked_echo,@checked_sql,@checked_all,@checked_none,@checked_selected,@checked_default,@search_note,@the_can=base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can + @tip=if checked_tip =~/\S/ + 'text:__; keywords:__; title:__; author:__; subject:__; description:__; publisher:__; contributor:__; date:__; type:__; format:__; identifier:__; source:__; language:__; relation:__; coverage:__; rights:__; comment:__; abstract:__; filename:__;
' + else '' + end + end + def submission_form + search_form=<<-WOK + + + + + SiSU search form (sample): SiSU information Structuring Universe + + + + + + + + + + -
SiSU --> + +
- #@search_note -
- #@tip -
- - echo - searched - url - search fields available - sql statement - -
- use selected - check all - check none -
- -#@the_can -WOK - end -end -class Search_request #% search_for - attr_accessor :text1,:keywords,:title,:author,:subject,:description,:publisher,:contributor,:date,:type,:format,:identifier,:source,:language,:relation,:coverage,:rights,:comment,:abstract,:owner,:date_created,:date_issued,:date_modified,:date_available,:date_valid - def initialize(search_field='',q='') - @search_field,@q=search_field,q - @text1=@keywords=@title=@author=@subject=@description=@publisher=@contributor=@date=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@comment=@abstract=@owner=@date_created=@date_issued=@date_modified=@date_available=@date_valid='' - if @search_field=~/\S/ - @text1=text_to_match('text:') - @keywords=text_to_match('key(?:words?)?:') - @title=text_to_match('title:') # DublinCore 1 - title - @author=text_to_match('(?:author|creator)s?:') # DublinCore 2 - creator/author - @subject=text_to_match('subj(?:ect)?:') # DublinCore 3 - subject - @description=text_to_match('description:') # DublinCore 4 - description - @publisher=text_to_match('pub(?:lisher)?:') # DublinCore 5 - publisher - @contributor=text_to_match('contributor:') # DublinCore 6 - contributor - @date=text_to_match('date:') # DublinCore 7 - date dd-mm-yy - @type=text_to_match('type:') # DublinCore 8 - type - @format=text_to_match('format:') # DublinCore 9 - format - @identifier=text_to_match('identifier:') # DublinCore 10 - identifier - @source=text_to_match('source:') # DublinCore 11 - source - @language=text_to_match('language:') # DublinCore 12 - language - @relation=text_to_match('relation:') # DublinCore 13 - relation - @coverage=text_to_match('coverage:') # DublinCore 14 - coverage - @rights=text_to_match('rights:') # DublinCore 15 - rights - @comment=text_to_match('comment:') - @abstract=text_to_match('abs(?:tract)?:') - @owner=text_to_match('owner:') - @date_created=text_to_match('date_created:') - @date_issued=text_to_match('date_issued:') - @date_modified=text_to_match('date_modified:') - @date_available=text_to_match('date_available:') - @date_valid=text_to_match('date_valid:') - @text1=text_to_match unless @keywords or @author or @title or @text1 or @comment or @abstract or @rights or @subject or @publisher or @date - else - @text1=q['s1'] if q['s1']=~/\S/ - @keywords=q['key'] if q['key']=~/\S/ - @title=q['ti'] if q['ti']=~/\S/ - @author=q['au'] if q['au']=~/\S/ - @subject=q['sj'] if q['sj']=~/\S/ - @description=q['dsc'] if q['dsc']=~/\S/ - @publisher=q['pb'] if q['pb']=~/\S/ - @contributor=q['cntr'] if q['cntr']=~/\S/ - @date=q['dt'] if q['dt']=~/\S/ - @type=q['ty'] if q['ty']=~/\S/ - @identifier=q['id'] if q['id']=~/\S/ - @source=q['src'] if q['src']=~/\S/ - @language=q['lang'] if q['lang']=~/\S/ - @relation=q['rel'] if q['rel']=~/\S/ - @coverage=q['cov'] if q['cov']=~/\S/ - @rights=q['cr'] if q['cr']=~/\S/ - @comment=q['co'] if q['co']=~/\S/ - @abstract=q['ab'] if q['ab']=~/\S/ - @date_created=q['dtc'] if q['dtc']=~/\S/ - @date_issued=q['dti'] if q['dti']=~/\S/ - @date_modified=q['dtm'] if q['dtm']=~/\S/ - @date_available=q['dta'] if q['dta']=~/\S/ - @date_valid=q['dtv'] if q['dtv']=~/\S/ - end - end - def text_to_match(identifier='') - m=Hash.new - m[:string]=/#{identifier}\s*(.+?)/ - m[:string]=/#{identifier}\s*(.+?)(?:;|\n|\r|$)/ - m[:word]=/#{identifier}[\s(]*(\S+)/ - search_string=if @search_field =~m[:word] - search_string=if @search_field =~m[:braces]: m[:braces].match(@search_field)[1] - elsif @search_field =~m[:string]: m[:string].match(@search_field)[1] - else - str=m[:word].match(@search_field)[1] - str.gsub!(/[()]/,'') - str +
+
+ + +
+ + + #@tip + #@search_note + #@the_can +
+ + + + + to search: select which database to search (drop-down menu below); enter your search query (in the form above); and click on the search button (below) +
+ + + index + text / grep + case sensitive +
+ echo query + result stats + search url + searched + available fields + sql statement +
+ checks: + default + selected + all + none +
+ + +
+ WOK + end end - search_string.strip! - search_string.gsub!(/\s+/,'+') - search_string - #else - # "__" - end - end -end -class Dbi_search_string - def initialize(l,t,q) - @l,@t,@q=l,t,q - end - def string - search=Hash.new - search[:search]=Array.new - search[:flag]=false - if @t =~/\S+/ or @q =~/\S+/ - if @t =~/\S+/: unescaped_search=CGI.unescape(@t) - elsif @q =~/\S+/: unescaped_search=CGI.unescape(@q) + class Search_request #% search_for + attr_accessor :text1,:keywords,:title,:author,:subject,:description,:publisher,:contributor,:date,:type,:format,:identifier,:source,:language,:relation,:coverage,:rights,:comment,:abstract,:owner,:date_created,:date_issued,:date_modified,:date_available,:date_valid,:filename + def initialize(search_field='',q='') + @search_field,@q=search_field,q + @text1=@keywords=@title=@author=@subject=@description=@publisher=@contributor=@date=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@comment=@abstract=@owner=@date_created=@date_issued=@date_modified=@date_available=@date_valid=@filename='' + if @search_field=~/\S/ + @text1=text_to_match('text:') + @keywords=text_to_match('key(?:words?)?:') + @title=text_to_match('title:') # DublinCore 1 - title + @author=text_to_match('(?:author|creator)s?:') # DublinCore 2 - creator/author + @subject=text_to_match('subj(?:ect)?:') # DublinCore 3 - subject + @description=text_to_match('description:') # DublinCore 4 - description + @publisher=text_to_match('pub(?:lisher)?:') # DublinCore 5 - publisher + @contributor=text_to_match('contributor:') # DublinCore 6 - contributor + @date=text_to_match('date:') # DublinCore 7 - date dd-mm-yy + @type=text_to_match('type:') # DublinCore 8 - type + @format=text_to_match('format:') # DublinCore 9 - format + @identifier=text_to_match('identifier:') # DublinCore 10 - identifier + @source=text_to_match('source:') # DublinCore 11 - source + @language=text_to_match('language:') # DublinCore 12 - language + @relation=text_to_match('relation:') # DublinCore 13 - relation + @coverage=text_to_match('coverage:') # DublinCore 14 - coverage + @rights=text_to_match('rights:') # DublinCore 15 - rights + @comment=text_to_match('comment:') + @abstract=text_to_match('abs(?:tract)?:') + @owner=text_to_match('owner:') + @date_created=text_to_match('date_created:') + @date_issued=text_to_match('date_issued:') + @date_modified=text_to_match('date_modified:') + @date_available=text_to_match('date_available:') + @date_valid=text_to_match('date_valid:') + @filename=text_to_match('filename:') + @text1=text_to_match unless @keywords or @author or @title or @text1 or @comment or @abstract or @rights or @subject or @publisher or @date or @filename + else + @text1=q['s1'] if q['s1']=~/\S/ + @keywords=q['key'] if q['key']=~/\S/ + @title=q['ti'] if q['ti']=~/\S/ + @author=q['au'] if q['au']=~/\S/ + @subject=q['sj'] if q['sj']=~/\S/ + @description=q['dsc'] if q['dsc']=~/\S/ + @publisher=q['pb'] if q['pb']=~/\S/ + @contributor=q['cntr'] if q['cntr']=~/\S/ + @date=q['dt'] if q['dt']=~/\S/ + @type=q['ty'] if q['ty']=~/\S/ + @identifier=q['id'] if q['id']=~/\S/ + @source=q['src'] if q['src']=~/\S/ + @language=q['lang'] if q['lang']=~/\S/ + @relation=q['rel'] if q['rel']=~/\S/ + @coverage=q['cov'] if q['cov']=~/\S/ + @rights=q['cr'] if q['cr']=~/\S/ + @comment=q['co'] if q['co']=~/\S/ + @abstract=q['ab'] if q['ab']=~/\S/ + @date_created=q['dtc'] if q['dtc']=~/\S/ + @date_issued=q['dti'] if q['dti']=~/\S/ + @date_modified=q['dtm'] if q['dtm']=~/\S/ + @date_available=q['dta'] if q['dta']=~/\S/ + @date_valid=q['dtv'] if q['dtv']=~/\S/ + @filename=q['fns'] if q['fns']=~/\S/ + @@limit=q['ltd'] if q['ltd']=~/\d+/ # 1000 + @@offset=q['off'] if q['off']=~/\d+/ # 0 + end + end + def text_to_match(identifier='') + m={ + :string => /#{identifier}\s*(.+?)/, + :string => /#{identifier}\s*(.+?)(?:;|\n|\r|$)/, + :word => /#{identifier}[\s(]*(\S+)/ + } + search_string=if @search_field =~m[:word] + search_string=if @search_field =~m[:braces]; m[:braces].match(@search_field)[1] + elsif @search_field =~m[:string]; m[:string].match(@search_field)[1] + else + str=m[:word].match(@search_field)[1] + str.gsub!(/[()]/,'') + str + end + search_string.strip! + search_string.gsub!(/\s+/,'+') + search_string + #else + # "__" + end + end end - search_construct=Array.new - unescaped_search.gsub!(/\s*(AND|OR)\s*/,"' \) \\1 #@l~\( '") - unescaped_search.gsub!(/(.+)/,"#@l~\( '\\1' \)") - search_construct << unescaped_search - search_construct=search_construct.join(' ') - search[:search] << search_construct - search[:flag]=true - search - end - search - end -end -class Dbi_search_statement - attr_reader :text_search_flag,:sql_select_body_format,:sql_select_endnotes_format - def initialize(conn,search_for,q) - @conn=conn - @text_search_flag=false - search=Hash.new - search[:text],search[:endnotes]=Array.new,Array.new - st=Dbi_search_string.new('documents.clean',search_for.text1,q['s1']).string - se=Dbi_search_string.new('endnotes.clean',search_for.text1,q['s1']).string - @text_search_flag=st[:flag] - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << se[:search] - end - st=Dbi_search_string.new('metadata.keywords',search_for.keywords,q['key']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.title',search_for.title,q['ti']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.creator',search_for.author,q['au']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.subject',search_for.subject,q['sj']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.description',search_for.description,q['dsc']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.publisher',search_for.publisher,q['pb']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.contributor',search_for.contributor,q['cntr']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.date',search_for.date,q['dt']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.type',search_for.type,q['ty']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.identifier',search_for.identifier,q['id']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.source',search_for.source,q['src']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.language',search_for.language,q['lang']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.relation',search_for.relation,q['rel']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.coverage',search_for.coverage,q['cov']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.rights',search_for.rights,q['cr']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.comment',search_for.comment,q['co']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.abstract',search_for.abstract,q['ab']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - @search_text,@search_endnotes=Array.new,Array.new - #% - search[:text].each{|x| @search_text << "#{x} AND " } - search[:endnotes].each{|x| @search_endnotes << "#{x} AND " } - @search_text=@search_text.to_s.gsub!(/AND\s+$/,'') - @search_endnotes=@search_endnotes.to_s.gsub!(/AND\s+$/,'') - end - def sql_select_body - %{SELECT metadata.title, metadata.creator, metadata.filename, metadata.suffix, documents.body, documents.seg, documents.ocn, metadata.tid FROM documents, metadata WHERE (#@search_text) AND documents.metadata_tid = metadata.tid ORDER BY metadata.title, documents.ocn ;} - end - def sql_select_endnotes - %{SELECT metadata.title, metadata.creator, metadata.filename, endnotes.body, endnotes.nr, endnotes.ocn, endnotes.metadata_tid FROM metadata, endnotes WHERE (#@search_endnotes) AND metadata.tid = endnotes.metadata_tid ORDER BY metadata.title, endnotes.nr ;} - end - def sql_select_body_format - %{#{sql_select_body}} - end - def sql_select_endnotes_format - %{#{sql_select_endnotes}} - end - def contents - @conn.select_all(sql_select_body) - end - def endnotes - @conn.select_all(sql_select_endnotes) - end -end -class Tail - def tail - <<-'WOK' -


-
- - - +

- presentations' look and feel
- generated by
- SiSU on Debian/Gnu/Linux or a FreeBSD & Ruby - better ways, well actually, Way Better!
- SiSU
- version 0.36
2006w07/6 (20060218)
- - - © Ralph Amissah
- 1993, current 2007
- GPL 3
- w3 since October 3 1993
- ralph@amissah.com
-

-
- -

Developed
using Ruby
on Debian/Gnu/Linux software infrastructure,
with the usual GPL (or OSS) suspects.
Better - "performance, reliability, scalability, security
& total cost of ownership"
[not to mention flexibility & choice]

<<Way Better!>>

- - - - - -

- If you have problems viewing pages on this site please update your browser: + class Dbi_search_string + def initialize(l,t,q,cse=false) + @l,@t,@q,@c=l,t,q,cse + end + def string + search={ :search => [],:flag => false } + if @t =~/\S+/ or @q =~/\S+/ + if @t =~/\S+/; unescaped_search=CGI.unescape(@t) + elsif @q =~/\S+/; unescaped_search=CGI.unescape(@q) + end + search_construct=[] + if @c + unescaped_search.gsub!(/\s*(AND|OR)\s*/,"' \) \\1 #@l~\( '") + unescaped_search.gsub!(/(.+)/,"#@l~\( '\\1' \)") + else + unescaped_search.gsub!(/\s*(AND|OR)\s*/,"' \) \\1 #@l~*\( '") + unescaped_search.gsub!(/(.+)/,"#@l~*\( '\\1' \)") + end + search_construct << unescaped_search + search_construct=search_construct.join(' ') + search[:search] << search_construct + search[:flag]=true + search + end + search + end + end + class Dbi_search_statement + attr_reader :text_search_flag,:sql_select_body_format,:sql_select_endnotes_format,:sql_offset,:sql_limit + def initialize(conn,search_for,q,c) + @conn=conn + @text_search_flag=false + @sql_statement={ :body=>'',:endnotes=>'',:range=>'' } + #@offset||=@@offset + #@offset+=@@limit + search={ :text => [],:endnotes => [] } + cse=if c =~/\S/; true + else false + end + st=Dbi_search_string.new('documents.clean',search_for.text1,q['s1'],cse).string + se=Dbi_search_string.new('endnotes.clean',search_for.text1,q['s1'],cse).string + @text_search_flag=st[:flag] + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << se[:search] + end + st=Dbi_search_string.new('metadata.keywords',search_for.keywords,q['key'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.title',search_for.title,q['ti'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.creator',search_for.author,q['au'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.subject',search_for.subject,q['sj'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.description',search_for.description,q['dsc'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.publisher',search_for.publisher,q['pb'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.contributor',search_for.contributor,q['cntr'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.date',search_for.date,q['dt'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.type',search_for.type,q['ty'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.identifier',search_for.identifier,q['id'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.source',search_for.source,q['src'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.language',search_for.language,q['lang'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.relation',search_for.relation,q['rel'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.coverage',search_for.coverage,q['cov'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.rights',search_for.rights,q['cr'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.comment',search_for.comment,q['co'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.abstract',search_for.abstract,q['ab'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.filename',search_for.filename,q['fns'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + @@limit=q['ltd'] if q['ltd']=~/\d+/ # 1000 + @@offset=q['off'] if q['off']=~/\d+/ # 0 + @search_text,@search_endnotes=[],[] + #% + search[:text].each{|x| @search_text << "#{x} AND " } + @search_text=@search_text.to_s.gsub!(/AND\s+$/,'') + @search_text.gsub!(/(documents\.clean~\(\s*'[^']+'\s*\)\s+(?:(?:AND|OR)\s+documents\.clean~\(\s*'[^']+'\s*\))+)/,'(\1)') + search[:endnotes].each{|x| @search_endnotes << "#{x} AND " } + @search_endnotes=@search_endnotes.to_s.gsub!(/AND\s+$/,'') + @search_endnotes.gsub!(/(endnotes\.clean~\(\s*'[^']+'\s*\)\s+(?:(?:AND|OR)\s+endnotes\.clean~\(\s*'[^']+'\s*\))+)/,'(\1)') + end + def sql_offset + @@offset + end + def sql_limit + @@limit + end + def sql_canned_search + @offset_next=sql_offset.to_i + sql_limit.to_i + @offset_previous=sql_offset.to_i - sql_limit.to_i + def current + @@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + sql_offset.to_s + end + def next + @@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + @offset_next.to_s + end + def previous + @offset_previous >= 0 ? (@@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + @offset_previous.to_s) : '' + end + def start + @@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + 0.to_s + end + self + end + def sql_canned_search_url(ok) + if ok + can=sql_canned_search + page=(sql_offset.to_i + sql_limit.to_i)/sql_limit.to_i + case page.to_s + when /^1$/ + %{



+ pg. #{page.to_s} +   > +
} + when /^2$/ + %{

+ <   + pg. #{page.to_s} +   > +
} + else + %{

+ |<   + <   + pg. #{page.to_s} +   > +
} + end + else '' + end + end + def sql_select_body + limit ||=@@limit + offset ||=@@offset + @sql_statement[:body]=%{SELECT metadata.title, metadata.subtitle, metadata.creator, metadata.filename, metadata.suffix, documents.body, documents.seg, documents.ocn, metadata.tid FROM documents, metadata WHERE (#@search_text) AND documents.metadata_tid = metadata.tid ORDER BY metadata.title, metadata.filename, documents.ocn} + @sql_statement[:range]=%{LIMIT #{limit} OFFSET #{offset} ;} + select=@sql_statement[:body] + ' ' + @sql_statement[:range] + select + end + def sql_select_endnotes + limit ||=@@limit + offset ||=@@offset + @sql_statement[:endnotes]=%{SELECT metadata.title, metadata.subtitle, metadata.creator, metadata.filename, endnotes.body, endnotes.nr, endnotes.ocn, endnotes.metadata_tid FROM metadata, endnotes WHERE (#@search_endnotes) AND metadata.tid = endnotes.metadata_tid ORDER BY metadata.title, metadata.filename, endnotes.nr} + @sql_statement[:range]=%{LIMIT #{limit} OFFSET #{offset} ;} + select=@sql_statement[:endnotes] + ' ' + @sql_statement[:range] + select + end + def sql_select_body_format + %{#{sql_select_body}} + end + def sql_select_endnotes_format + %{#{sql_select_endnotes}} + end + def contents + @conn.select_all(sql_select_body) + end + def endnotes + @conn.select_all(sql_select_endnotes) + end + end + def tail + <<-'WOK' +


+ + +
+

+ + SiSU + +

+
+ +

+ Generated by + + SiSU 0.55.3 2007-07-10 (2007w28/2) +
+ + SiSU © Ralph Amissah + 1993, current 2007. + All Rights Reserved. +
+ + SiSU + is software for document structuring, publishing and search, +
+ + www.jus.uio.no/sisu + + and + + www.sisudoc.org + +
+ w3 since October 3 1993 + + ralph@amissah.com + +

+
+

+ SiSU using: +
Standard SiSU markup syntax, +
Standard SiSU meta-markup syntax, and the +
Standard SiSU object citation numbering and system, (object/text positioning system) +
+ © Ralph Amissah 1997, current 2007. + All Rights Reserved.

-
- - - -
-

- -If you have problems viewing pages on this site please update your browser: - -

-
- - - - - - - - - - - - - - - - - - - -
-

- - -Epiphany - Epiphany - -® | - -

-
-

- - -Galeon - Galeon - -® | - -

-
-

- - -MS I-Explorer -I-Explorer - -® | - -

-
-

- - -Kazehakase -® |

-
-

- - -Konqueror -Konqueror -® |

-
-

- - -Mozilla -Mozilla - - -Firefox -Firefox - -® | - -

-
-

- - -Netscape -Netscape - -® | - -

-
-

- - -Opera -Opera - -® | - -

-
-

- - -Safari -Safari - -® - -

-
- - - - - - - - - - - - - - - - - -
-

- -for console/text viewing: - -

-
-

- - -elinks - | - -

-
-

- - -links2 - | - -

-
-

- - -w3m - - -

-
-

- -for lightweight gui (X) viewing try: - -

-
-

- - -Dillo - |

-
-

- - -Epiphany - Epiphany - -® | - -

-
-

- - -Galeon - Galeon - | - -

-
-

- - -links2 -g - - -

-
-
- - - - -
-

- -& for - -pdf - -viewings of this site we recommend stand alone viewers -
-(rather than web browser plugins): -
-

- - - - - - - - -
-

- - -Adobe Acrobat Reader -Acrobat Reader - -® - | - -

-
-

- - -Evince -Evince - -® - -

-
-

- - GhostView® , - -GV® - -& - -GSview® - - | - -

-
-

- - -Xpdf - Xpdf - -® - -

+ +
+

+ + GPLv3 + +

+
+

+ SiSU is released under + GPL v3 + or later, + + http://www.gnu.org/licenses/gpl.html + +

+
+

+ SiSU, developed using + + Ruby + + on + + Debian/Gnu/Linux + + software infrastructure, + with the usual GPL (or OSS) suspects. +
+ Better - "performance, reliability, scalability, security & total cost of ownership" + [not to mention flexibility & choice] +
+ Get With the Future + + Way Better! + +

- -
- -WOK - end -end -@counter_txt_doc,@counter_txt_ocn,@counter_endn_doc,@counter_endn_ocn=0,0,0,0 -@counters_txt,@counters_endn,@sql_select_body,@sql_select_endnotes='','','','' -FCGI.each_cgi do |cgi| - begin # all code goes in begin section - @search=Hash.new - @search[:text],@search[:endnotes]=Array.new,Array.new - q=CGI.new - @db=if cgi['db'] =~/\S+/: - @stub=/SiSU_(\S+)/.match(cgi['db'])[1] - cgi['db'] - else - @stub='sisu' - 'SiSU_sisu' - end - checked_url,checked_searched,checked_tip,checked_echo,checked_sql,checked_all,checked_none,checked_ignore,selected_db='','','','','','','','' - if cgi['view']=~/text/: checked_index,checked_text='','checked' - else checked_index,checked_text='checked','' - end - checked_url='checked' if cgi['url'] =~/\S/ or cgi['u'].to_i==1 - checked_searched='checked' if cgi['searched'] =~/\S/ - checked_tip='checked' if cgi['tip'] =~/\S/ - checked_echo='checked' if cgi['echo'] =~/\S/ - checked_sql='checked' if cgi['sql'] =~/\S/ - if cgi['checks'] =~/check_all/ or cgi['check_all'] =~/\S/ or cgi['a'].to_i==1 - checked_all=checked_url=checked_searched=checked_tip=checked_echo=checked_sql='checked' - checked_none='' - elsif cgi['checks'] =~/check_none/ #or cgi['a'].to_i==0 - checked_none='checked' - checked_all=checked_url=checked_searched=checked_tip=checked_echo=checked_sql='' - else checked_ignore='checked' - end - selected_db=case cgi['db'] - when /SiSU_document_samples_sisu_markup/: '' - when /SiSU_sisu/: '' - end - dbi="dbi:Pg:database=#{@db};port=5432" - @conn=DBI.connect(dbi,user) - search_field=cgi['find'] if cgi['find'] # =~/\S+/ - @search_for=Search_request.new(search_field,q) #.analyze #% search_for - #% searches - #Canned_search.new(@base,@search_for.text1,cgi) - if @search_for.text1=~/\S+/ or @search_for.author=~/\S+/ #and search_field =~/\S/ - s1='s1=' + CGI.escape(@search_for.text1) if @search_for.text1=~/\S/ - key='key=' + CGI.escape(@search_for.keywords) if @search_for.keywords=~/\S/ - ti='&ti=' + CGI.escape(@search_for.title) if @search_for.title=~/\S/ - au='&au=' + CGI.escape(@search_for.author) if @search_for.author=~/\S/ - sj='&sj=' + CGI.escape(@search_for.subject) if @search_for.subject=~/\S/ - dsc='&dsc=' + CGI.escape(@search_for.description) if @search_for.description=~/\S/ - pb='&pb=' + CGI.escape(@search_for.publisher) if @search_for.publisher=~/\S/ - cntr='&cntr=' + CGI.escape(@search_for.contributor) if @search_for.contributor=~/\S/ - dt='&dt=' + CGI.escape(@search_for.date) if @search_for.date=~/\S/ - ty='&ty=' + CGI.escape(@search_for.type) if @search_for.type=~/\S/ - id='&id=' + CGI.escape(@search_for.identifier) if @search_for.identifier=~/\S/ - src='&src=' + CGI.escape(@search_for.source) if @search_for.source=~/\S/ - lang='&lang=' + CGI.escape(@search_for.language) if @search_for.language=~/\S/ - rel='&rel=' + CGI.escape(@search_for.relation) if @search_for.relation=~/\S/ - cov='&cov=' + CGI.escape(@search_for.coverage) if @search_for.coverage=~/\S/ - cr='&cr=' + CGI.escape(@search_for.rights) if @search_for.rights=~/\S/ - co='&co=' + CGI.escape(@search_for.comment) if @search_for.comment=~/\S/ - ab='&ab=' + CGI.escape(@search_for.abstract) if @search_for.abstract=~/\S/ - dtc='&dtc=' + CGI.escape(@search_for.date_created) if @search_for.date_created=~/\S/ - dti='&dti=' + CGI.escape(@search_for.date_issued) if @search_for.date_issued=~/\S/ - dtm='&dtm=' + CGI.escape(@search_for.date_modified) if @search_for.date_modified=~/\S/ - dta='&dta=' + CGI.escape(@search_for.date_available) if @search_for.date_available=~/\S/ - dtv='&dtv=' + CGI.escape(@search_for.date_valid) if @search_for.date_valid=~/\S/ - canned_search_url=if checked_all =~/checked/ - "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}&db=#{cgi['db']}&view=#{cgi['view']}&a=1" - else "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}&db=#{cgi['db']}&view=#{cgi['view']}&u=1&e=1" - end - @search[:text][1]=%{documents.clean~'#{@search_for.text1}'} #s1 - @search[:endnotes][1]=%{endnotes.clean~'#{@search_for.text1}'} #s1 - canned_note='previous search url:' - else - canned_search_url="#@base?s1=United+Nations&db=documents&view=index" - canned_note='search url example:' - end - if search_field =~/\S+/ - analyze_format=search_field.gsub(/\s*\n/,'; ') - elsif checked_all =~/checked/ or checked_url =~/checked/ - canned_search=canned_search_url.scan(/(?:s1|au|ti)=[^&]+/) - af=canned_search.join('; ') - af.gsub!(/s1=/,'text: ') - af.gsub!(/au=/,'author: ') - af.gsub!(/ti=/,'title: ') - af.gsub!(/%2B/,' ') - analyze_format=af - st=af.split(/\s*;\s*/) - search_field=st.join("\n") - end - green=%{} - the_can=%{#{canned_note}
#{canned_search_url}

} - p_text=p_keywords=p_title=p_author=p_subject=p_description=p_publisher=p_contributor=p_date=p_type=p_format=p_identifier=p_source=p_language=p_relation=p_coverage=p_rights=p_comment=p_abstract=p_subject='' - p_text=%{text: #{green}#{@search_for.text1}

} if @search_for.text1 =~/\S+/ - p_keywords=%{keywords: #{green}#{@search_for.keywords}
} if @search_for.keywords =~/\S+/ - p_title=%{title: #{green}#{@search_for.title}
} if @search_for.title =~/\S+/ - p_author=%{author: #{green}#{@search_for.author}
} if @search_for.author =~/\S+/ - p_subject=%{subject: #{green}#{@search_for.subject}
} if @search_for.subject =~/\S+/ - p_description=%{description: #{green}#{@search_for.description}
} if @search_for.description =~/\S+/ - p_publisher=%{publisher: #{green}#{@search_for.publisher}
} if @search_for.publisher =~/\S+/ - p_contributor=%{contributor: #{green}#{@search_for.contributor}
} if @search_for.contributor =~/\S+/ - p_date=%{date: #{green}#{@search_for.date}
} if @search_for.date =~/\S+/ - p_type=%{type: #{green}#{@search_for.type}
} if @search_for.type =~/\S+/ - p_format=%{format: #{green}#{@search_for.format}
} if @search_for.format =~/\S+/ - p_identifier=%{identifier: #{green}#{@search_for.identifier}
} if @search_for.identifier =~/\S+/ - p_source=%{source: #{green}#{@search_for.source}
} if @search_for.source =~/\S+/ - p_language=%{language: #{green}#{@search_for.language}
} if @search_for.language =~/\S+/ - p_relation=%{relation: #{green}#{@search_for.relation}
} if @search_for.relation =~/\S+/ - p_coverage=%{coverage: #{green}#{@search_for.coverage}
} if @search_for.coverage =~/\S+/ - p_rights=%{rights: #{green}#{@search_for.rights}
} if @search_for.rights =~/\S+/ - p_comment=%{comment: #{green}#{@search_for.comment}
} if @search_for.comment =~/\S+/ - p_abstract=%{abstract: #{green}#{@search_for.abstract}
} if @search_for.abstract =~/\S+/ - search_note=<<-WOK - -
previous selection:
-database: #{green}#@db
; selected view: #{green}#{cgi['view']}
-search string: "#{green}#{analyze_format}"
-#{p_text} #{p_keywords} #{p_title} #{p_author} #{p_subject} #{p_description} #{p_publisher} #{p_contributor} #{p_date} #{p_type} #{p_format} #{p_identifier} #{p_source} #{p_language} #{p_relation} #{p_coverage} #{p_rights} #{p_comment} #{p_abstract} - -WOK - #eg = %{canned search e.g.:
#{url}
find: #{analyze}
database: #{database}} - #dbi_canning - @header=Form.new(@base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_searched,checked_url,checked_echo,checked_sql,checked_all,checked_none,checked_ignore,search_note,the_can).submission_form #% form - @tail=Tail.new.tail - unless q['s1'] =~/\S/ or q['au'] =~/\S/ or @search[:text][1] =~/\S/ - print "Content-type: text/html\n\n" - puts (@header+@tail) - else #% searches - s1=if @search_for.text1 =~/\S/ - @search_for.text1 - else 'Unavailable' - end - @search[:text]<<%{documents.clean~'#{CGI.unescape(s1)}'} - @search[:endnotes]<<%{endnotes.clean~'#{CGI.unescape(s1)}'} - #dbi_request - dbi_statement=Dbi_search_statement.new(@conn,@search_for,q) - @text_search_flag=false - @text_search_flag=dbi_statement.text_search_flag - s_contents=dbi_statement.contents - s_endnotes=dbi_statement.endnotes - @body_main=Array.new - @endnotes=Array.new - oldtid=0 - if @text_search_flag - if checked_sql =~/\S/ - sql_select_body=dbi_statement.sql_select_body_format - sql_select_endnotes=dbi_statement.sql_select_endnotes_format - else sql_select_body,sql_select_endnotes='','' - end - @body_main << "



Main Text:
" << sql_select_body - @endnotes << "



Endnotes:
" << sql_select_endnotes - else + + + WOK end - #text_objects_body - s_contents.each do |c| #% text body - location=c["filename"][/(.+?)\.ss[ftms]/, 1] - file_suffix=c["filename"][/.+?\.(ss[ftms])/, 1] - #metadata_found_body - if c["tid"].to_i != oldtid.to_i - title=%{#{c["title"]} by #{c["creator"]} pdf portraitpdf landscape
} if file_suffix=~/s/ #hmm watch file_suffix - if @text_search_flag: title='

'+title - else title='
'+title - end - @counter_txt_doc+=1 - oldtid=c["tid"].to_i - else title='' - end - if @text_search_flag - if cgi['view']=~/text/ #% txt body - text=if c["suffix"] !~/1/ #seg - if @search_for.text1 =~/\S+/ or q['s1'] =~/\S+/ #% only this branch is working !! - if @search_for.text1 =~/\S+/: unescaped_search=CGI.unescape(@search_for.text1) - elsif q['s1'] =~/\S+/: unescaped_search=CGI.unescape(q['s1']) + @tail=tail + @counter_txt_doc,@counter_txt_ocn,@counter_endn_doc,@counter_endn_ocn=0,0,0,0 + @counters_txt,@counters_endn,@sql_select_body,@sql_select_endnotes='','','','' + FCGI.each_cgi do |cgi| + begin # all code goes in begin section + @search={ :text => [],:endnotes => [] } + q=CGI.new + @db=if cgi['db'] =~/\S+/; + @stub=/SiSU_(\S+)/.match(cgi['db'])[1] + cgi['db'] + else + @stub='sisu' + 'SiSU_sisu' + end + checked_url,checked_stats,checked_searched,checked_tip,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,selected_db='','','','','','','','','' + if cgi['view']=~/text/; checked_index,checked_text='','checked' + else checked_index,checked_text='checked','' + end + checked_echo='checked' if cgi['echo'] =~/\S/ + checked_stats='checked' if cgi['stats'] =~/\S/ + checked_url='checked' if cgi['url'] =~/\S/ or cgi['u'].to_i==1 + checked_searched='checked' if cgi['searched'] =~/\S/ + checked_tip='checked' if cgi['tip'] =~/\S/ + checked_case='checked' if cgi['casesense'] =~/\S/ + checked_sql='checked' if cgi['sql'] =~/\S/ + if cgi['checks'] =~/check_all/ or cgi['check_all'] =~/\S/ or cgi['a'].to_i==1 + checked_all='checked' + checked_echo=checked_stats=checked_url=checked_searched=checked_tip=checked_sql='checked' + checked_none='' + elsif cgi['checks'] =~/check_none/ + checked_none='checked' + checked_all=checked_url=checked_stats=checked_searched=checked_tip=checked_echo=checked_sql='' + elsif cgi['checks'] =~/check_selected/ + checked_selected='checked' + elsif cgi['checks'] =~/check_default/ + checked_default='checked' + checked_echo=checked_stats=checked_url='checked' + checked_searched=checked_tip=checked_case=checked_sql='' + else + checked_selected='checked' + checked_echo=checked_stats=checked_url='checked' + checked_searched=checked_tip=checked_case=checked_sql='' + end + selected_db=case cgi['db'] + when /SiSU_pace/; '' + when /SiSU_sisu/; '' + end + dbi="dbi:Pg:database=#{@db};port=#{@port}" + @conn=DBI.connect(dbi,user) + search_field=cgi['find'] if cgi['find'] # =~/\S+/ + @search_for=Search_request.new(search_field,q) #.analyze #% search_for + #% searches + #Canned_search.new(@base,@search_for.text1,cgi) + if @search_for.text1=~/\S+/ or @search_for.author=~/\S+/ #and search_field =~/\S/ + s1='s1=' + CGI.escape(@search_for.text1) if @search_for.text1=~/\S/ + key='key=' + CGI.escape(@search_for.keywords) if @search_for.keywords=~/\S/ + ti='&ti=' + CGI.escape(@search_for.title) if @search_for.title=~/\S/ + au='&au=' + CGI.escape(@search_for.author) if @search_for.author=~/\S/ + sj='&sj=' + CGI.escape(@search_for.subject) if @search_for.subject=~/\S/ + dsc='&dsc=' + CGI.escape(@search_for.description) if @search_for.description=~/\S/ + pb='&pb=' + CGI.escape(@search_for.publisher) if @search_for.publisher=~/\S/ + cntr='&cntr=' + CGI.escape(@search_for.contributor) if @search_for.contributor=~/\S/ + dt='&dt=' + CGI.escape(@search_for.date) if @search_for.date=~/\S/ + ty='&ty=' + CGI.escape(@search_for.type) if @search_for.type=~/\S/ + id='&id=' + CGI.escape(@search_for.identifier) if @search_for.identifier=~/\S/ + src='&src=' + CGI.escape(@search_for.source) if @search_for.source=~/\S/ + lang='&lang=' + CGI.escape(@search_for.language) if @search_for.language=~/\S/ + rel='&rel=' + CGI.escape(@search_for.relation) if @search_for.relation=~/\S/ + cov='&cov=' + CGI.escape(@search_for.coverage) if @search_for.coverage=~/\S/ + cr='&cr=' + CGI.escape(@search_for.rights) if @search_for.rights=~/\S/ + co='&co=' + CGI.escape(@search_for.comment) if @search_for.comment=~/\S/ + ab='&ab=' + CGI.escape(@search_for.abstract) if @search_for.abstract=~/\S/ + dtc='&dtc=' + CGI.escape(@search_for.date_created) if @search_for.date_created=~/\S/ + dti='&dti=' + CGI.escape(@search_for.date_issued) if @search_for.date_issued=~/\S/ + dtm='&dtm=' + CGI.escape(@search_for.date_modified) if @search_for.date_modified=~/\S/ + dta='&dta=' + CGI.escape(@search_for.date_available) if @search_for.date_available=~/\S/ + dtv='&dtv=' + CGI.escape(@search_for.date_valid) if @search_for.date_valid=~/\S/ + fns='&fns=' + CGI.escape(@search_for.filename) if @search_for.filename=~/\S/ + @@canned_search_url=if checked_all =~/checked/ + "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}&a=1" + else "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}" + end + @canned_base_url="#@base?#{s1}&db=#{cgi['db']}" + if checked_case=~/\S/ + @search[:text][1]=%{documents.clean~'#{@search_for.text1}'} #s1 + @search[:endnotes][1]=%{endnotes.clean~'#{@search_for.text1}'} #s1 + else + @search[:text][1]=%{documents.clean~*'#{@search_for.text1}'} #s1 + @search[:endnotes][1]=%{endnotes.clean~*'#{@search_for.text1}'} #s1 + end + canned_note='search url:' + else + @@canned_search_url="#@base?s1=United+Nations&db=documents&view=index" + canned_note='search url example:' + end + if search_field =~/\S+/ + analyze_format=search_field.gsub(/\s*\n/,'; ') + elsif checked_all =~/checked/ or checked_url =~/checked/ + canned_search=@@canned_search_url.scan(/(?:s1|au|ti|fns)=[^&]+/) + af=canned_search.join('; ') + af.gsub!(/s1=/,'text: ') + af.gsub!(/au=/,'author: ') + af.gsub!(/ti=/,'title: ') + af.gsub!(/fns=/,'filename: ') + af.gsub!(/%2B/,' ') + analyze_format=af + st=af.split(/\s*;\s*/) + search_field=st.join("\n") + end + green=%{} + canned_search_url_txt=CGI.escapeHTML(@@canned_search_url) + the_can=%{#{canned_note} #{canned_search_url_txt}
} + p_text=p_keywords=p_title=p_author=p_subject=p_description=p_publisher=p_contributor=p_date=p_type=p_format=p_identifier=p_source=p_language=p_relation=p_coverage=p_rights=p_comment=p_abstract=p_subject=p_filename='' + p_text=%{text: #{green}#{@search_for.text1}

} if @search_for.text1 =~/\S+/ + p_keywords=%{keywords: #{green}#{@search_for.keywords}
} if @search_for.keywords =~/\S+/ + p_title=%{title: #{green}#{@search_for.title}
} if @search_for.title =~/\S+/ + p_author=%{author: #{green}#{@search_for.author}
} if @search_for.author =~/\S+/ + p_subject=%{subject: #{green}#{@search_for.subject}
} if @search_for.subject =~/\S+/ + p_description=%{description: #{green}#{@search_for.description}
} if @search_for.description =~/\S+/ + p_publisher=%{publisher: #{green}#{@search_for.publisher}
} if @search_for.publisher =~/\S+/ + p_contributor=%{contributor: #{green}#{@search_for.contributor}
} if @search_for.contributor =~/\S+/ + p_date=%{date: #{green}#{@search_for.date}
} if @search_for.date =~/\S+/ + p_type=%{type: #{green}#{@search_for.type}
} if @search_for.type =~/\S+/ + p_format=%{format: #{green}#{@search_for.format}
} if @search_for.format =~/\S+/ + p_identifier=%{identifier: #{green}#{@search_for.identifier}
} if @search_for.identifier =~/\S+/ + p_source=%{source: #{green}#{@search_for.source}
} if @search_for.source =~/\S+/ + p_language=%{language: #{green}#{@search_for.language}
} if @search_for.language =~/\S+/ + p_relation=%{relation: #{green}#{@search_for.relation}
} if @search_for.relation =~/\S+/ + p_coverage=%{coverage: #{green}#{@search_for.coverage}
} if @search_for.coverage =~/\S+/ + p_rights=%{rights: #{green}#{@search_for.rights}
} if @search_for.rights =~/\S+/ + p_comment=%{comment: #{green}#{@search_for.comment}
} if @search_for.comment =~/\S+/ + p_abstract=%{abstract: #{green}#{@search_for.abstract}
} if @search_for.abstract =~/\S+/ + p_filename=%{filename: #{green}#{@search_for.filename}
} if @search_for.filename =~/\S+/ + search_note=<<-WOK + + database: #{green}#@db; selected view: #{green}#{cgi['view']} + search string: "#{green}#{analyze_format}"
+ #{p_text} #{p_keywords} #{p_title} #{p_author} #{p_subject} #{p_description} #{p_publisher} #{p_contributor} #{p_date} #{p_type} #{p_format} #{p_identifier} #{p_source} #{p_language} #{p_relation} #{p_coverage} #{p_rights} #{p_comment} #{p_abstract} #{p_filename} + + WOK + #eg = %{canned search e.g.:
#{url}
find: #{analyze}
database: #{database}} + #dbi_canning + @header=Form.new(@base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can).submission_form #% form + unless q['s1'] =~/\S/ or q['au'] =~/\S/ or @search[:text][1] =~/\S/ + print "Content-type: text/html\n\n" + puts (@header+@tail) + else #% searches + s1=if @search_for.text1 =~/\S/ + @search_for.text1 + else 'Unavailable' + end + if checked_case=~/\S/ + @search[:text]<<%{documents.clean~'#{CGI.unescape(s1)}'} + @search[:endnotes]<<%{endnotes.clean~'#{CGI.unescape(s1)}'} + else + @search[:text]<<%{documents.clean~*'#{CGI.unescape(s1)}'} + @search[:endnotes]<<%{endnotes.clean~*'#{CGI.unescape(s1)}'} + end + #dbi_request + dbi_statement=Dbi_search_statement.new(@conn,@search_for,q,checked_case) + @text_search_flag=false + @text_search_flag=dbi_statement.text_search_flag + s_contents=dbi_statement.contents + s_endnotes=dbi_statement.endnotes + @body_main,@endnotes=[],[] + @search_regx=nil + oldtid=0 + if @text_search_flag + if checked_sql =~/\S/ + sql_select_body=dbi_statement.sql_select_body_format + sql_select_endnotes=dbi_statement.sql_select_endnotes_format + else sql_select_body,sql_select_endnotes='','' + end + @body_main << '



Main Text:
' << sql_select_body + @endnotes << '



Endnotes:
' << sql_select_endnotes + else + end + #text_objects_body + s_contents.each do |c| #% text body + location=c['filename'][/(.+?)\.(?:_?sst|ssm)$/,1] + file_suffix=c['filename'][/.+?\.(_?sst|ssm)$/,1] + lang=if location =~ /\S+?~(\S\S\S?)$/ + l=location[/\S+?~(\S\S\S?)$/,1] + location.gsub!(/(\S+?)~\S\S\S?/,'\1') + l=".#{l}" + else '' + end + #metadata_found_body + if c['tid'].to_i != oldtid.to_i + ti=if c['subtitle'] =~/\S+/; "#{c['title']} - #{c['subtitle']}" + else c['title'] + end + can_txt_srch=if cgi['view']=~/index/; %{red bullet } + else %{red bullet } + end + title=%{toc html #{ti} by #{c['creator']} #{can_txt_srch}toc html pdf portrait pdf landscape odf manifest
} if file_suffix=~/s/ #hmm watch file_suffix + if @text_search_flag; title='

'+title + else title='
'+title + end + @counter_txt_doc+=1 + oldtid=c['tid'].to_i + else title='' + end + if @text_search_flag + if cgi['view']=~/text/ #% txt body + text=if c['suffix'] !~/1/ #seg + if @search_for.text1 =~/\S+/ or q['s1'] =~/\S+/ #% only this branch is working !! + unescaped_search=if @search_for.text1 =~/\S+/; CGI.unescape(@search_for.text1) + elsif q['s1'] =~/\S+/; CGI.unescape(q['s1']) + else nil + end + @search_regx=if unescaped_search #check + search_regex=[] + build=unescaped_search.scan(/\S+/).each do |g| + if g.to_s =~/(AND|OR)/ + search_regex << '|' + else search_regex << %{#{g.to_s}} + end + end + search_regex=search_regex.join(' ') + search_regex=search_regex.gsub(/\s*\|\s*/,'|') + Regexp.new(search_regex, Regexp::IGNORECASE) + else nil + end + else nil + end + matched_para=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) + matched=c['body'].gsub(/(<\s]+#{@search_regx}[^>]+?>|#@search_regx)/mi,%{\\1}) + else c['body'] + end + %{

ocn #{c['ocn']}:

#{matched_para}} + elsif c['suffix'] =~/1/ #doc + %{#{title}

ocn #{c['ocn']}:#{c['body']}} + end + @counter_txt_ocn+=1 + output=if c['seg'] =~/\S+/; title+text + else text end - search_regex=Array.new - build=unescaped_search.scan(/\S+/).each do |g| - if g.to_s =~/(AND|OR)/ - search_regex << '|' - else search_regex << %{#{g.to_s}} - end + elsif cgi['view']=~/index/ #% idx body + if c['suffix'] !~/1/ #seg + index=%{#{c['ocn']}, } if @text_search_flag + elsif c['suffix'] =~/1/ #doc + index=%{#{c['ocn']}, } + end + if c['seg'] =~/\S+/ + if @text_search_flag + @counter_txt_ocn+=1 + output=title+index + end + else + @counter_txt_ocn+=1 + output=unless c['suffix'] =~/1/; title+index + else %{#{title}#{c['ocn'].sort}, } + end end - search_regex=search_regex.join(' ') - search_regex=search_regex.gsub(/\s*\|\s*/,'|') - @search_regx=search_regex.to_s end - matched_para=c["body"].gsub(/(#@search_regx)/i,%{\\1}) - %{


ocn #{c["ocn"]}:

#{matched_para}} - elsif c["suffix"] =~/1/ #doc - %{#{title}

ocn #{c["ocn"]}:#{c["body"]}} + else output=title end - @counter_txt_ocn+=1 - output=if c["seg"] =~/\S+/: title+text - else text + @counters_txt=if @counter_txt_doc > 0 + if checked_stats =~/\S/ + @@lt_t=if @counter_txt_ocn == dbi_statement.sql_limit.to_i + over='over' + true + else + over='' + false + end + %{


Found in the main body of #@counter_txt_doc documents, and at #{over} #@counter_txt_ocn locations within.
} + else '' + end + else '' end - elsif cgi['view']=~/index/ #% idx body - if c["suffix"] !~/1/ #seg - index=%{#{c["ocn"]}, } if @text_search_flag - elsif c["suffix"] =~/1/ #doc - index=%{#{c["ocn"]}, } + @body_main << output #+ details + end + #text_objects_endnote + oldtid = 0 + s_endnotes.each do |e| #% endnotes + location=e['filename'][/(.+?)\.(?:_?sst|ssm)$/,1] + file_suffix=e['filename'][/.+?\.(_?sst|ssm)$/,1] + lang=if location =~ /\S+?~(\S\S\S?)$/ + l=location[/\S+?~(\S\S\S?)$/,1] + location.gsub!(/(\S+?)~\S\S\S?/,'\1') + l=".#{l}" + else '' end - if c["seg"] =~/\S+/ - if @text_search_flag - @counter_txt_ocn+=1 - output=title+index + #metadata_found_endnotes + if @text_search_flag + if e['metadata_tid'].to_i != oldtid.to_i + ti=if e['subtitle'] =~/\S+/; "#{e['title']} - #{e['subtitle']}" + else e['title'] + end + can_txt_srch=if cgi['view']=~/index/; %{red bullet } + else %{red bullet } + end + title=%{

toc html #{ti} by #{e['creator']} #{can_txt_srch}toc html pdf portraitpdf landscape odf manifest
} if file_suffix=~/s/ + @counter_endn_doc+=1 + oldtid=e['metadata_tid'].to_i + else title = '' + end + if cgi['view']=~/text/ #% txt endnotes + @counter_endn_ocn+=1 + matched_endnote=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) + matched=e['body'].gsub(/(<\s]+#{@search_regx}[^>]+?>|#@search_regx)/mi,%{\\1}) + else e['body'] + end + output=%{#{title}
note #{e['nr']} referred to from ocn #{e['ocn']}: #{matched_endnote}} + elsif cgi['view']=~/index/ #% idx endnotes + @counter_endn_ocn+=1 + output=%{#{title}#{e['nr']}#{e['ocn']}], } end - else - @counter_txt_ocn+=1 - output=unless c["suffix"] =~/1/: title+index - else %{#{title}#{c["ocn"].sort}, } + @counters_endn=if @counter_endn_doc > 0 + if checked_stats =~/\S/ + @@lt_e=if @counter_endn_ocn == dbi_statement.sql_limit.to_i + over='over' + true + else + over='' + false + end + %{Found in the endnotes of #@counter_endn_doc documents, and at #{over} #@counter_endn_ocn locations within.
} + else '' + end end + @endnotes << output #+ details + else @endnotes=[] #does not take out yet end end - else output=title + offset=dbi_statement.sql_offset.to_s + limit=dbi_statement.sql_limit.to_s + @@lt_t ||=false; @@lt_e ||=false + canned=if (@@lt_t or @@lt_e) + dbi_statement.sql_canned_search_url(true).to_s + else + dbi_statement.sql_canned_search_url(false).to_s + end + limit=dbi_statement.sql_limit.to_s + cgi.out{@header + @counters_txt + @counters_endn + @body_main.join + @endnotes.join + canned + @tail} #% print cgi_output_header+counters+body+endnotes end - @counters_txt=if @counter_txt_doc > 0 - %{Found in the main body of #@counter_txt_doc documents, and at #@counter_txt_ocn locations within.
} - else '' - end - @body_main << output #+ details - end - #text_objects_endnote - oldtid = 0 - s_endnotes.each do |e| #% endnotes - location=e["filename"][/(.+?)\.ss[ftms]/, 1] - file_suffix=e["filename"][/.+?\.(ss[ftms])/, 1] - #metadata_found_endnotes - if @text_search_flag - if e["metadata_tid"].to_i != oldtid.to_i - title=%{

#{e["title"]} by #{e["creator"]} pdf portraitpdf landscape
} if file_suffix=~/s/ - @counter_endn_doc+=1 - oldtid=e["metadata_tid"].to_i - else title = '' - end - if cgi['view']=~/text/ #% txt endnotes - @counter_endn_ocn+=1 - matched_endnote=e["body"].gsub(/(#@search_regx)/i,%{\\1}) - output=%{#{title}
note #{e["nr"]} referred to from ocn #{e["ocn"]}: #{matched_endnote}} - elsif cgi['view']=~/index/ #% idx endnotes - @counter_endn_ocn+=1 - output=%{#{title}#{e["nr"]}#{e["ocn"]}], } - end - @counters_endn=if @counter_endn_doc > 0 - %{Found in the endnotes of #@counter_endn_doc documents, and at #@counter_endn_ocn locations within.
} - end - @endnotes << output #+ details - else @endnotes=Array.new #does not take out yet + rescue Exception => e + s='
' + CGI::escapeHTML(e.backtrace.reverse.join("\n"))
+          s << CGI::escapeHTML(e.message) + '
' + cgi.out{s} + next + ensure # eg. disconnect from server + @conn.disconnect if @conn end end - cgi.out{@header + @counters_txt + @counters_endn + @body_main.join + @endnotes.join + @tail} #% print cgi_output_header+counters+body+endnotes - end - rescue Exception => e - s='
' + CGI::escapeHTML(e.backtrace.reverse.join("\n"))
-    s << CGI::escapeHTML(e.message) + '
' - cgi.out{s} - next - ensure # eg. disconnect from server - @conn.disconnect if @conn - end -end diff --git a/data/sisu/conf/cgi-bin/sisu_search_sqlite.cgi b/data/sisu/conf/cgi-bin/sisu_search_sqlite.cgi index 692d8802..34bb3748 100644 --- a/data/sisu/conf/cgi-bin/sisu_search_sqlite.cgi +++ b/data/sisu/conf/cgi-bin/sisu_search_sqlite.cgi @@ -6,927 +6,896 @@ * http://www.jus.uio.no/sisu/SiSU/download * Description: generates naive cgi search form for search of sisu database (sqlite) - * $Id$ + * Name: SiSU generated sample cgi search form - Copyright (C) 2006 Ralph Amissah - Copyright (C) 2005 Ralph Amissah (first release edition) - Copyright (C) 1997 Ralph Amissah (first edition) + * Description: generated sample cgi search form for SiSU + (SiSU is a framework for document structuring, publishing and search) - * License: GPL 3 or later + * Author: Ralph Amissah + + * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007 Ralph Amissah All Rights Reserved. + + * License: GPL 3 or later: - Summary of GPL 3 + SiSU, a framework for document structuring, publishing and search - This program is free software; you can redistribute it and/or modify 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. + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007 Ralph Amissah - This program 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. + This program is free software: you can redistribute it and/or modify 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. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + This program 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. - If you have Internet connection, the latest version of the GPL should be - available at these locations: - http://www.fsf.org/licenses/gpl.html - http://www.gnu.org/copyleft/gpl.html - http://www.jus.uio.no/sisu/gpl3.fsf + You should have received a copy of the GNU General Public License along with + this program. If not, see . - SiSU was first released to the public on January 4th 2005 + If you have Internet connection, the latest version of the GPL should be + available at these locations: + + + - SiSU uses: + * SiSU uses: + * Standard SiSU markup syntax, + * Standard SiSU meta-markup syntax, and the + * Standard SiSU object citation numbering and system - * Standard SiSU markup syntax, - * Standard SiSU meta-markup syntax, and the - * Standard SiSU object citation numbering and system + * Hompages: + + - © Ralph Amissah 1997, current 2006. - All Rights Reserved. + * Download: + - * Ralph Amissah ralph@amissah.com - Ralph Amissah ralph.amissah@gmail.com + * Ralph Amissah + + =end -require 'cgi' -require 'fcgi' -require 'dbi' -@version='sisu_search_sqlite' -@url_base="http://corundum:8081/_sisu/image" -host=%x{echo $HOSTNAME}.chomp! -@hosturl="http://#{host}" + - ':8081' -@base="#@hosturl/cgi-bin/#@version.cgi" -class Form - def initialize(base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_searched,checked_url,checked_echo,checked_sql,checked_all,checked_none,checked_ignore,search_note,the_can='') - search_note='' if checked_searched !~/\S/ - the_can='' if checked_url !~/\S/ - search_field='' if checked_echo !~/\S/ - @base,@search_field,@selected_db,@checked_index,@checked_text,@checked_tip,@checked_searched,@checked_url,@checked_echo,@checked_sql,@checked_all,@checked_none,@checked_ignore,@search_note,@the_can=base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_searched,checked_url,checked_echo,checked_sql,checked_all,checked_none,checked_ignore,search_note,the_can - @tip=if checked_tip =~/\S/ - 'text:__; keywords:__; title:__; author:__; subject:__; description:__; publisher:__; contributor:__; date:__; type:__; format:__; identifier:__; source:__; language:__; relation:__; coverage:__; rights:__; comment:__; abstract:__; ' - else '' - end - end - def submission_form - search_form=<<-WOK - - -
- - - -
- - -
-

-
- - index - text - -

-

+ require 'cgi' + require 'fcgi' + require 'dbi' + @version='sisu_search_sqlite' + @image_src="http://localhost/sisu/_sisu/image" + @hosturl_db="http://localhost" + @hosturl_files="http://www.jus.uio.no" + @@limit,@@offset=1000,0 + @base="#@hosturl_db/cgi-bin/#@version.cgi" + @@canned_search_url=@base + @color_heading='#DDFFAA' + @color_match='#ffff48' + class Form + def initialize(base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can='') + search_note='' if checked_searched !~/\S/ + the_can='' if checked_url !~/\S/ + search_field='' if checked_echo !~/\S/ + @base,@search_field,@selected_db,@checked_index,@checked_text,@checked_tip,@checked_stats,@checked_searched,@checked_url,@checked_case,@checked_echo,@checked_sql,@checked_all,@checked_none,@checked_selected,@checked_default,@search_note,@the_can=base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can + @tip=if checked_tip =~/\S/ + 'text:__; keywords:__; title:__; author:__; subject:__; description:__; publisher:__; contributor:__; date:__; type:__; format:__; identifier:__; source:__; language:__; relation:__; coverage:__; rights:__; comment:__; abstract:__; filename:__;
' + else '' + end + end + def submission_form + search_form=<<-WOK + + + + + SiSU search form (sample): SiSU information Structuring Universe + + + + + + + + + + -
SiSU --> + +
- #@search_note -
- #@tip -
- - echo - searched - url - search fields available - sql statement - -
- use selected - check all - check none -
- -#@the_can -WOK - end -end -class Search_request #% search_for - attr_accessor :text1,:keywords,:title,:author,:subject,:description,:publisher,:contributor,:date,:type,:format,:identifier,:source,:language,:relation,:coverage,:rights,:comment,:abstract,:owner,:date_created,:date_issued,:date_modified,:date_available,:date_valid - def initialize(search_field='',q='') - @search_field,@q=search_field,q - @text1=@keywords=@title=@author=@subject=@description=@publisher=@contributor=@date=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@comment=@abstract=@owner=@date_created=@date_issued=@date_modified=@date_available=@date_valid='' - if @search_field=~/\S/ - @text1=text_to_match('text:') - @keywords=text_to_match('key(?:words?)?:') - @title=text_to_match('title:') # DublinCore 1 - title - @author=text_to_match('(?:author|creator)s?:') # DublinCore 2 - creator/author - @subject=text_to_match('subj(?:ect)?:') # DublinCore 3 - subject - @description=text_to_match('description:') # DublinCore 4 - description - @publisher=text_to_match('pub(?:lisher)?:') # DublinCore 5 - publisher - @contributor=text_to_match('contributor:') # DublinCore 6 - contributor - @date=text_to_match('date:') # DublinCore 7 - date dd-mm-yy - @type=text_to_match('type:') # DublinCore 8 - type - @format=text_to_match('format:') # DublinCore 9 - format - @identifier=text_to_match('identifier:') # DublinCore 10 - identifier - @source=text_to_match('source:') # DublinCore 11 - source - @language=text_to_match('language:') # DublinCore 12 - language - @relation=text_to_match('relation:') # DublinCore 13 - relation - @coverage=text_to_match('coverage:') # DublinCore 14 - coverage - @rights=text_to_match('rights:') # DublinCore 15 - rights - @comment=text_to_match('comment:') - @abstract=text_to_match('abs(?:tract)?:') - @owner=text_to_match('owner:') - @date_created=text_to_match('date_created:') - @date_issued=text_to_match('date_issued:') - @date_modified=text_to_match('date_modified:') - @date_available=text_to_match('date_available:') - @date_valid=text_to_match('date_valid:') - @text1=text_to_match unless @keywords or @author or @title or @text1 or @comment or @abstract or @rights or @subject or @publisher or @date - else - @text1=q['s1'] if q['s1']=~/\S/ - @keywords=q['key'] if q['key']=~/\S/ - @title=q['ti'] if q['ti']=~/\S/ - @author=q['au'] if q['au']=~/\S/ - @subject=q['sj'] if q['sj']=~/\S/ - @description=q['dsc'] if q['dsc']=~/\S/ - @publisher=q['pb'] if q['pb']=~/\S/ - @contributor=q['cntr'] if q['cntr']=~/\S/ - @date=q['dt'] if q['dt']=~/\S/ - @type=q['ty'] if q['ty']=~/\S/ - @identifier=q['id'] if q['id']=~/\S/ - @source=q['src'] if q['src']=~/\S/ - @language=q['lang'] if q['lang']=~/\S/ - @relation=q['rel'] if q['rel']=~/\S/ - @coverage=q['cov'] if q['cov']=~/\S/ - @rights=q['cr'] if q['cr']=~/\S/ - @comment=q['co'] if q['co']=~/\S/ - @abstract=q['ab'] if q['ab']=~/\S/ - @date_created=q['dtc'] if q['dtc']=~/\S/ - @date_issued=q['dti'] if q['dti']=~/\S/ - @date_modified=q['dtm'] if q['dtm']=~/\S/ - @date_available=q['dta'] if q['dta']=~/\S/ - @date_valid=q['dtv'] if q['dtv']=~/\S/ - end - end - def text_to_match(identifier='') - m=Hash.new - m[:string]=/#{identifier}\s*(.+?)/ - m[:string]=/#{identifier}\s*(.+?)(?:;|\n|\r|$)/ - m[:word]=/#{identifier}[\s(]*(\S+)/ - search_string=if @search_field =~m[:word] - search_string=if @search_field =~m[:braces]: m[:braces].match(@search_field)[1] - elsif @search_field =~m[:string]: m[:string].match(@search_field)[1] - else - str=m[:word].match(@search_field)[1] - str.gsub!(/[()]/,'') - str +
+
+ + +
+ + + #@tip + #@search_note + #@the_can +
+
+ + + + to search: select which database to search (drop-down menu below); enter your search query (in the form above); and click on the search button (below) +
+ + + index + text / grep +
+ echo query + result stats + search url + searched + available fields + sql statement +
+ checks: + default + selected + all + none +
+
+ + WOK + end end - search_string.strip! - search_string.gsub!(/\s+/,'+') - search_string - #else - # "__" - end - end -end -class Dbi_search_string - def initialize(l,t,q) - @l,@t,@q=l,t,q - end - def string - search=Hash.new - search[:search]=Array.new - search[:flag]=false - if @t =~/\S+/ or @q =~/\S+/ - if @t =~/\S+/: unescaped_search=CGI.unescape(@t) - elsif @q =~/\S+/: unescaped_search=CGI.unescape(@q) + class Search_request #% search_for + attr_accessor :text1,:keywords,:title,:author,:subject,:description,:publisher,:contributor,:date,:type,:format,:identifier,:source,:language,:relation,:coverage,:rights,:comment,:abstract,:owner,:date_created,:date_issued,:date_modified,:date_available,:date_valid,:filename + def initialize(search_field='',q='') + @search_field,@q=search_field,q + @text1=@keywords=@title=@author=@subject=@description=@publisher=@contributor=@date=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@comment=@abstract=@owner=@date_created=@date_issued=@date_modified=@date_available=@date_valid=@filename='' + if @search_field=~/\S/ + @text1=text_to_match('text:') + @keywords=text_to_match('key(?:words?)?:') + @title=text_to_match('title:') # DublinCore 1 - title + @author=text_to_match('(?:author|creator)s?:') # DublinCore 2 - creator/author + @subject=text_to_match('subj(?:ect)?:') # DublinCore 3 - subject + @description=text_to_match('description:') # DublinCore 4 - description + @publisher=text_to_match('pub(?:lisher)?:') # DublinCore 5 - publisher + @contributor=text_to_match('contributor:') # DublinCore 6 - contributor + @date=text_to_match('date:') # DublinCore 7 - date dd-mm-yy + @type=text_to_match('type:') # DublinCore 8 - type + @format=text_to_match('format:') # DublinCore 9 - format + @identifier=text_to_match('identifier:') # DublinCore 10 - identifier + @source=text_to_match('source:') # DublinCore 11 - source + @language=text_to_match('language:') # DublinCore 12 - language + @relation=text_to_match('relation:') # DublinCore 13 - relation + @coverage=text_to_match('coverage:') # DublinCore 14 - coverage + @rights=text_to_match('rights:') # DublinCore 15 - rights + @comment=text_to_match('comment:') + @abstract=text_to_match('abs(?:tract)?:') + @owner=text_to_match('owner:') + @date_created=text_to_match('date_created:') + @date_issued=text_to_match('date_issued:') + @date_modified=text_to_match('date_modified:') + @date_available=text_to_match('date_available:') + @date_valid=text_to_match('date_valid:') + @filename=text_to_match('filename:') + @text1=text_to_match unless @keywords or @author or @title or @text1 or @comment or @abstract or @rights or @subject or @publisher or @date or @filename + else + @text1=q['s1'] if q['s1']=~/\S/ + @keywords=q['key'] if q['key']=~/\S/ + @title=q['ti'] if q['ti']=~/\S/ + @author=q['au'] if q['au']=~/\S/ + @subject=q['sj'] if q['sj']=~/\S/ + @description=q['dsc'] if q['dsc']=~/\S/ + @publisher=q['pb'] if q['pb']=~/\S/ + @contributor=q['cntr'] if q['cntr']=~/\S/ + @date=q['dt'] if q['dt']=~/\S/ + @type=q['ty'] if q['ty']=~/\S/ + @identifier=q['id'] if q['id']=~/\S/ + @source=q['src'] if q['src']=~/\S/ + @language=q['lang'] if q['lang']=~/\S/ + @relation=q['rel'] if q['rel']=~/\S/ + @coverage=q['cov'] if q['cov']=~/\S/ + @rights=q['cr'] if q['cr']=~/\S/ + @comment=q['co'] if q['co']=~/\S/ + @abstract=q['ab'] if q['ab']=~/\S/ + @date_created=q['dtc'] if q['dtc']=~/\S/ + @date_issued=q['dti'] if q['dti']=~/\S/ + @date_modified=q['dtm'] if q['dtm']=~/\S/ + @date_available=q['dta'] if q['dta']=~/\S/ + @date_valid=q['dtv'] if q['dtv']=~/\S/ + @filename=q['fns'] if q['fns']=~/\S/ + @@limit=q['ltd'] if q['ltd']=~/\d+/ # 1000 + @@offset=q['off'] if q['off']=~/\d+/ # 0 + end + end + def text_to_match(identifier='') + m={ + :string => /#{identifier}\s*(.+?)/, + :string => /#{identifier}\s*(.+?)(?:;|\n|\r|$)/, + :word => /#{identifier}[\s(]*(\S+)/ + } + search_string=if @search_field =~m[:word] + search_string=if @search_field =~m[:braces]; m[:braces].match(@search_field)[1] + elsif @search_field =~m[:string]; m[:string].match(@search_field)[1] + else + str=m[:word].match(@search_field)[1] + str.gsub!(/[()]/,'') + str + end + search_string.strip! + search_string.gsub!(/\s+/,'+') + search_string + #else + # "__" + end + end end - search_construct=Array.new - unescaped_search.gsub!(/\s*(AND|OR)\s*/,"%' \) \\1 #@l LIKE \( '%") - unescaped_search.gsub!(/(.+)/,"#@l LIKE \( '%\\1%' \)") - search_construct << unescaped_search - search_construct=search_construct.join(' ') - search[:search] << search_construct - search[:flag]=true - search - end - search - end -end -class Dbi_search_statement - attr_reader :text_search_flag,:sql_select_body_format,:sql_select_endnotes_format - def initialize(conn,search_for,q) - @conn=conn - @text_search_flag=false - search=Hash.new - search[:text],search[:endnotes]=Array.new,Array.new - st=Dbi_search_string.new('documents.clean',search_for.text1,q['s1']).string - se=Dbi_search_string.new('endnotes.clean',search_for.text1,q['s1']).string - @text_search_flag=st[:flag] - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << se[:search] - end - st=Dbi_search_string.new('metadata.keywords',search_for.keywords,q['key']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.title',search_for.title,q['ti']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.creator',search_for.author,q['au']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.subject',search_for.subject,q['sj']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.description',search_for.description,q['dsc']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.publisher',search_for.publisher,q['pb']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.contributor',search_for.contributor,q['cntr']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.date',search_for.date,q['dt']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.type',search_for.type,q['ty']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.identifier',search_for.identifier,q['id']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.source',search_for.source,q['src']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.language',search_for.language,q['lang']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.relation',search_for.relation,q['rel']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.coverage',search_for.coverage,q['cov']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.rights',search_for.rights,q['cr']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.comment',search_for.comment,q['co']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - st=Dbi_search_string.new('metadata.abstract',search_for.abstract,q['ab']).string - if st[:flag] - search[:text] << st[:search] - search[:endnotes] << st[:search] - end - @search_text,@search_endnotes=Array.new,Array.new - #% - search[:text].each{|x| @search_text << "#{x} AND " } - search[:endnotes].each{|x| @search_endnotes << "#{x} AND " } - @search_text=@search_text.to_s.gsub!(/AND\s+$/,'') - @search_endnotes=@search_endnotes.to_s.gsub!(/AND\s+$/,'') - end - def sql_select_body - %{SELECT metadata.title, metadata.creator, metadata.filename, metadata.suffix, documents.body, documents.seg, documents.ocn, metadata.tid FROM documents, metadata WHERE #{@search_text} AND documents.metadata_tid = metadata.tid ORDER BY metadata.title, documents.ocn ;} - end - def sql_select_endnotes - %{SELECT metadata.title, metadata.creator, metadata.filename, endnotes.body, endnotes.nr, endnotes.ocn, endnotes.metadata_tid FROM metadata, endnotes WHERE #{@search_endnotes} AND metadata.tid = endnotes.metadata_tid ORDER BY metadata.title, endnotes.nr ;} - end - def sql_select_body_format - %{#{sql_select_body}} - end - def sql_select_endnotes_format - %{#{sql_select_endnotes}} - end - def contents - @conn.select_all(sql_select_body) - end - def endnotes - @conn.select_all(sql_select_endnotes) - end -end -class Tail - def tail - <<-'WOK' -


-
- - - \|\|

- presentations' look and feel
- generated by
- SiSU on Debian/Gnu/Linux or a FreeBSD & Ruby - better ways, well actually, Way Better!
- SiSU
- version 0.36
2006w07/6 (20060218)
- - - © Ralph Amissah
- 1993, current 2007
- GPL 3
- w3 since October 3 1993
- ralph@amissah.com
-

-
- -

Developed
using Ruby
on Debian/Gnu/Linux software infrastructure,
with the usual GPL (or OSS) suspects.
Better - "performance, reliability, scalability, security
& total cost of ownership"
[not to mention flexibility & choice]

<<Way Better!>>

- - - - - -

- If you have problems viewing pages on this site please update your browser: + class Dbi_search_string + def initialize(l,t,q,cse=false) + @l,@t,@q=l,t,q + end + def string + search={ :search => [],:flag => false } + if @t =~/\S+/ or @q =~/\S+/ + if @t =~/\S+/; unescaped_search=CGI.unescape(@t) + elsif @q =~/\S+/; unescaped_search=CGI.unescape(@q) + end + search_construct=[] + unescaped_search.gsub!(/\s*(AND|OR)\s*/,"%' \) \\1 #@l LIKE \( '%") + unescaped_search.gsub!(/(.+)/,"#@l LIKE \( '%\\1%' \)") + search_construct << unescaped_search + search_construct=search_construct.join(' ') + search[:search] << search_construct + search[:flag]=true + search + end + search + end + end + class Dbi_search_statement + attr_reader :text_search_flag,:sql_select_body_format,:sql_select_endnotes_format,:sql_offset,:sql_limit + def initialize(conn,search_for,q,c) + @conn=conn + @text_search_flag=false + @sql_statement={ :body=>'',:endnotes=>'',:range=>'' } + #@offset||=@@offset + #@offset+=@@limit + search={ :text => [],:endnotes => [] } + cse=if c =~/\S/; true + else false + end + st=Dbi_search_string.new('documents.clean',search_for.text1,q['s1'],cse).string + se=Dbi_search_string.new('endnotes.clean',search_for.text1,q['s1'],cse).string + @text_search_flag=st[:flag] + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << se[:search] + end + st=Dbi_search_string.new('metadata.keywords',search_for.keywords,q['key'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.title',search_for.title,q['ti'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.creator',search_for.author,q['au'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.subject',search_for.subject,q['sj'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.description',search_for.description,q['dsc'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.publisher',search_for.publisher,q['pb'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.contributor',search_for.contributor,q['cntr'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.date',search_for.date,q['dt'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.type',search_for.type,q['ty'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.identifier',search_for.identifier,q['id'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.source',search_for.source,q['src'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.language',search_for.language,q['lang'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.relation',search_for.relation,q['rel'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.coverage',search_for.coverage,q['cov'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.rights',search_for.rights,q['cr'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.comment',search_for.comment,q['co'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.abstract',search_for.abstract,q['ab'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + st=Dbi_search_string.new('metadata.filename',search_for.filename,q['fns'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end + @@limit=q['ltd'] if q['ltd']=~/\d+/ # 1000 + @@offset=q['off'] if q['off']=~/\d+/ # 0 + @search_text,@search_endnotes=[],[] + #% + search[:text].each{|x| @search_text << "#{x} AND " } + @search_text=@search_text.to_s.gsub!(/AND\s+$/,'') + @search_text.gsub!(/(documents\.clean\s+LIKE\s+\(\s*'%[^']+%'\s*\)\s+(?:(?:AND|OR)\s+documents\.clean\s+LIKE\s+\(\s*'%[^']+%'\s*\))+)/,'(\1)') + search[:endnotes].each{|x| @search_endnotes << "#{x} AND " } + @search_endnotes=@search_endnotes.to_s.gsub!(/AND\s+$/,'') + @search_text.gsub!(/(endnotes\.clean\s+LIKE\s+\(\s*'%[^']+%'\s*\)\s+(?:(?:AND|OR)\s+endnotes\.clean\s+LIKE\s+\(\s*'%[^']+%'\s*\))+)/,'(\1)') + end + def sql_offset + @@offset + end + def sql_limit + @@limit + end + def sql_canned_search + @offset_next=sql_offset.to_i + sql_limit.to_i + @offset_previous=sql_offset.to_i - sql_limit.to_i + def current + @@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + sql_offset.to_s + end + def next + @@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + @offset_next.to_s + end + def previous + @offset_previous >= 0 ? (@@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + @offset_previous.to_s) : '' + end + def start + @@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + 0.to_s + end + self + end + def sql_canned_search_url(ok) + if ok + can=sql_canned_search + page=(sql_offset.to_i + sql_limit.to_i)/sql_limit.to_i + case page.to_s + when /^1$/ + %{



+ pg. #{page.to_s} +   > +
} + when /^2$/ + %{

+ <   + pg. #{page.to_s} +   > +
} + else + %{

+ |<   + <   + pg. #{page.to_s} +   > +
} + end + else '' + end + end + def sql_select_body + limit ||=@@limit + offset ||=@@offset + @sql_statement[:body]=%{SELECT metadata.title, metadata.subtitle, metadata.creator, metadata.filename, metadata.suffix, documents.body, documents.seg, documents.ocn, metadata.tid FROM documents, metadata WHERE #{@search_text} AND documents.metadata_tid = metadata.tid ORDER BY metadata.title, metadata.filename, documents.ocn} + @sql_statement[:range]=%{LIMIT #{limit} OFFSET #{offset} ;} + select=@sql_statement[:body] + ' ' + @sql_statement[:range] + select + end + def sql_select_endnotes + limit ||=@@limit + offset ||=@@offset + @sql_statement[:endnotes]= %{SELECT metadata.title, metadata.subtitle, metadata.creator, metadata.filename, endnotes.body, endnotes.nr, endnotes.ocn, endnotes.metadata_tid FROM metadata, endnotes WHERE #{@search_endnotes} AND metadata.tid = endnotes.metadata_tid ORDER BY metadata.title, metadata.filename, endnotes.nr} + @sql_statement[:range]=%{LIMIT #{limit} OFFSET #{offset} ;} + select=@sql_statement[:endnotes] + ' ' + @sql_statement[:range] + select + end + def sql_select_body_format + %{#{sql_select_body}} + end + def sql_select_endnotes_format + %{#{sql_select_endnotes}} + end + def contents + @conn.select_all(sql_select_body) + end + def endnotes + @conn.select_all(sql_select_endnotes) + end + end + def tail + <<-'WOK' +


+ + +
+

+ + SiSU + +

+
+ +

+ Generated by + + SiSU 0.55.3 2007-07-10 (2007w28/2) +
+ + SiSU © Ralph Amissah + 1993, current 2007. + All Rights Reserved. +
+ + SiSU + is software for document structuring, publishing and search, +
+ + www.jus.uio.no/sisu + + and + + www.sisudoc.org + +
+ w3 since October 3 1993 + + ralph@amissah.com + +

+
+

+ SiSU using: +
Standard SiSU markup syntax, +
Standard SiSU meta-markup syntax, and the +
Standard SiSU object citation numbering and system, (object/text positioning system) +
+ © Ralph Amissah 1997, current 2007. + All Rights Reserved.

-
- - - -
-

- -If you have problems viewing pages on this site please update your browser: - -

-
- - - - - - - - - - - - - - - - - - - -
-

- - -Epiphany - Epiphany - -® | - -

-
-

- - -Galeon - Galeon - -® | - -

-
-

- - -MS I-Explorer -I-Explorer - -® | - -

-
-

- - -Kazehakase -® |

-
-

- - -Konqueror -Konqueror -® |

-
-

- - -Mozilla -Mozilla - - -Firefox -Firefox - -® | - -

-
-

- - -Netscape -Netscape - -® | - -

-
-

- - -Opera -Opera - -® | - -

-
-

- - -Safari -Safari - -® - -

-
- - - - - - - - - - - - - - - - - -
-

- -for console/text viewing: - -

-
-

- - -elinks - | - -

-
-

- - -links2 - | - -

-
-

- - -w3m - - -

-
-

- -for lightweight gui (X) viewing try: - -

-
-

- - -Dillo - |

-
-

- - -Epiphany - Epiphany - -® | - -

-
-

- - -Galeon - Galeon - | - -

-
-

- - -links2 -g - - -

-
-
- - - - -
-

- -& for - -pdf - -viewings of this site we recommend stand alone viewers -
-(rather than web browser plugins): -
-

- - - - - - - - -
-

- - -Adobe Acrobat Reader -Acrobat Reader - -® - | - -

-
-

- - -Evince -Evince - -® - -

-
-

- - GhostView® , - -GV® - -& - -GSview® - - | - -

-
-

- - -Xpdf - Xpdf - -® - -

+ +
+

+ + GPLv3 + +

+
+

+ SiSU is released under + GPL v3 + or later, + + http://www.gnu.org/licenses/gpl.html + +

+
+

+ SiSU, developed using + + Ruby + + on + + Debian/Gnu/Linux + + software infrastructure, + with the usual GPL (or OSS) suspects. +
+ Better - "performance, reliability, scalability, security & total cost of ownership" + [not to mention flexibility & choice] +
+ Get With the Future + + Way Better! + +

- -
- -WOK - end -end -@counter_txt_doc,@counter_txt_ocn,@counter_endn_doc,@counter_endn_ocn=0,0,0,0 -@counters_txt,@counters_endn,@sql_select_body,@sql_select_endnotes='','','','' -FCGI.each_cgi do |cgi| - begin # all code goes in begin section - @search=Hash.new - @search[:text],@search[:endnotes]=Array.new,Array.new - q=CGI.new - @db=if cgi['db'] =~/\S+/: - @stub=/SiSU_(\S+)/.match(cgi['db'])[1] - cgi['db'] - else - @stub='sisu' - 'SiSU_sisu' - end - checked_url,checked_searched,checked_tip,checked_echo,checked_sql,checked_all,checked_none,checked_ignore,selected_db='','','','','','','','' - if cgi['view']=~/text/: checked_index,checked_text='','checked' - else checked_index,checked_text='checked','' - end - checked_url='checked' if cgi['url'] =~/\S/ or cgi['u'].to_i==1 - checked_searched='checked' if cgi['searched'] =~/\S/ - checked_tip='checked' if cgi['tip'] =~/\S/ - checked_echo='checked' if cgi['echo'] =~/\S/ - checked_sql='checked' if cgi['sql'] =~/\S/ - if cgi['checks'] =~/check_all/ or cgi['check_all'] =~/\S/ or cgi['a'].to_i==1 - checked_all=checked_url=checked_searched=checked_tip=checked_echo=checked_sql='checked' - checked_none='' - elsif cgi['checks'] =~/check_none/ #or cgi['a'].to_i==0 - checked_none='checked' - checked_all=checked_url=checked_searched=checked_tip=checked_echo=checked_sql='' - else checked_ignore='checked' - end - selected_db=case cgi['db'] - when /SiSU_document_samples_sisu_markup/: '' - when /SiSU_sisu/: '' - end - db_name='sisu_sqlite.db' - db_sqlite=case cgi['db'] - when /SiSU_document_samples_sisu_markup/: "/home/ralph/sisu_www/document_samples_sisu_markup/sisu_sqlite.db" - when /SiSU_sisu/: "/home/ralph/sisu_www/sisu/sisu_sqlite.db" - end - @dbi="DBI:SQLite:#{db_sqlite}" #sqlite3 ? - @conn=DBI.connect(@dbi) - search_field=cgi['find'] if cgi['find'] # =~/\S+/ - @search_for=Search_request.new(search_field,q) #.analyze #% search_for - #% searches - #Canned_search.new(@base,@search_for.text1,cgi) - if @search_for.text1=~/\S+/ or @search_for.author=~/\S+/ #and search_field =~/\S/ - s1='s1=' + CGI.escape(@search_for.text1) if @search_for.text1=~/\S/ - key='key=' + CGI.escape(@search_for.keywords) if @search_for.keywords=~/\S/ - ti='&ti=' + CGI.escape(@search_for.title) if @search_for.title=~/\S/ - au='&au=' + CGI.escape(@search_for.author) if @search_for.author=~/\S/ - sj='&sj=' + CGI.escape(@search_for.subject) if @search_for.subject=~/\S/ - dsc='&dsc=' + CGI.escape(@search_for.description) if @search_for.description=~/\S/ - pb='&pb=' + CGI.escape(@search_for.publisher) if @search_for.publisher=~/\S/ - cntr='&cntr=' + CGI.escape(@search_for.contributor) if @search_for.contributor=~/\S/ - dt='&dt=' + CGI.escape(@search_for.date) if @search_for.date=~/\S/ - ty='&ty=' + CGI.escape(@search_for.type) if @search_for.type=~/\S/ - id='&id=' + CGI.escape(@search_for.identifier) if @search_for.identifier=~/\S/ - src='&src=' + CGI.escape(@search_for.source) if @search_for.source=~/\S/ - lang='&lang=' + CGI.escape(@search_for.language) if @search_for.language=~/\S/ - rel='&rel=' + CGI.escape(@search_for.relation) if @search_for.relation=~/\S/ - cov='&cov=' + CGI.escape(@search_for.coverage) if @search_for.coverage=~/\S/ - cr='&cr=' + CGI.escape(@search_for.rights) if @search_for.rights=~/\S/ - co='&co=' + CGI.escape(@search_for.comment) if @search_for.comment=~/\S/ - ab='&ab=' + CGI.escape(@search_for.abstract) if @search_for.abstract=~/\S/ - dtc='&dtc=' + CGI.escape(@search_for.date_created) if @search_for.date_created=~/\S/ - dti='&dti=' + CGI.escape(@search_for.date_issued) if @search_for.date_issued=~/\S/ - dtm='&dtm=' + CGI.escape(@search_for.date_modified) if @search_for.date_modified=~/\S/ - dta='&dta=' + CGI.escape(@search_for.date_available) if @search_for.date_available=~/\S/ - dtv='&dtv=' + CGI.escape(@search_for.date_valid) if @search_for.date_valid=~/\S/ - canned_search_url=if checked_all =~/checked/ - "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}&db=#{cgi['db']}&view=#{cgi['view']}&a=1" - else "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}&db=#{cgi['db']}&view=#{cgi['view']}&u=1&e=1" + + + WOK end - @search[:text][1]=%{documents.clean~'#{@search_for.text1}'} #s1 - @search[:endnotes][1]=%{endnotes.clean~'#{@search_for.text1}'} #s1 - canned_note='previous search url:' - else - canned_search_url="#@base?s1=United+Nations&db=documents&view=index" - canned_note='search url example:' - end - if search_field =~/\S+/ - analyze_format=search_field.gsub(/\s*\n/,'; ') - elsif checked_all =~/checked/ or checked_url =~/checked/ - canned_search=canned_search_url.scan(/(?:s1|au|ti)=[^&]+/) - af=canned_search.join('; ') - af.gsub!(/s1=/,'text: ') - af.gsub!(/au=/,'author: ') - af.gsub!(/ti=/,'title: ') - af.gsub!(/%2B/,' ') - analyze_format=af - st=af.split(/\s*;\s*/) - search_field=st.join("\n") - end - green=%{} - the_can=%{#{canned_note}
#{canned_search_url}

} - p_text=p_keywords=p_title=p_author=p_subject=p_description=p_publisher=p_contributor=p_date=p_type=p_format=p_identifier=p_source=p_language=p_relation=p_coverage=p_rights=p_comment=p_abstract=p_subject='' - p_text=%{text: #{green}#{@search_for.text1}

} if @search_for.text1 =~/\S+/ - p_keywords=%{keywords: #{green}#{@search_for.keywords}
} if @search_for.keywords =~/\S+/ - p_title=%{title: #{green}#{@search_for.title}
} if @search_for.title =~/\S+/ - p_author=%{author: #{green}#{@search_for.author}
} if @search_for.author =~/\S+/ - p_subject=%{subject: #{green}#{@search_for.subject}
} if @search_for.subject =~/\S+/ - p_description=%{description: #{green}#{@search_for.description}
} if @search_for.description =~/\S+/ - p_publisher=%{publisher: #{green}#{@search_for.publisher}
} if @search_for.publisher =~/\S+/ - p_contributor=%{contributor: #{green}#{@search_for.contributor}
} if @search_for.contributor =~/\S+/ - p_date=%{date: #{green}#{@search_for.date}
} if @search_for.date =~/\S+/ - p_type=%{type: #{green}#{@search_for.type}
} if @search_for.type =~/\S+/ - p_format=%{format: #{green}#{@search_for.format}
} if @search_for.format =~/\S+/ - p_identifier=%{identifier: #{green}#{@search_for.identifier}
} if @search_for.identifier =~/\S+/ - p_source=%{source: #{green}#{@search_for.source}
} if @search_for.source =~/\S+/ - p_language=%{language: #{green}#{@search_for.language}
} if @search_for.language =~/\S+/ - p_relation=%{relation: #{green}#{@search_for.relation}
} if @search_for.relation =~/\S+/ - p_coverage=%{coverage: #{green}#{@search_for.coverage}
} if @search_for.coverage =~/\S+/ - p_rights=%{rights: #{green}#{@search_for.rights}
} if @search_for.rights =~/\S+/ - p_comment=%{comment: #{green}#{@search_for.comment}
} if @search_for.comment =~/\S+/ - p_abstract=%{abstract: #{green}#{@search_for.abstract}
} if @search_for.abstract =~/\S+/ - search_note=<<-WOK - -
previous selection:
-database: #{green}#@db
; selected view: #{green}#{cgi['view']}
-search string: "#{green}#{analyze_format}"
-#{p_text} #{p_keywords} #{p_title} #{p_author} #{p_subject} #{p_description} #{p_publisher} #{p_contributor} #{p_date} #{p_type} #{p_format} #{p_identifier} #{p_source} #{p_language} #{p_relation} #{p_coverage} #{p_rights} #{p_comment} #{p_abstract} - -WOK - #eg = %{canned search e.g.:
#{url}
find: #{analyze}
database: #{database}} - #dbi_canning - @header=Form.new(@base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_searched,checked_url,checked_echo,checked_sql,checked_all,checked_none,checked_ignore,search_note,the_can).submission_form #% form - @tail=Tail.new.tail - unless q['s1'] =~/\S/ or q['au'] =~/\S/ or @search[:text][1] =~/\S/ - print "Content-type: text/html\n\n" - puts (@header+@tail) - else #% searches - s1=if @search_for.text1 =~/\S/ - @search_for.text1 - else 'Unavailable' - end - @search[:text]<<%{documents.clean~'#{CGI.unescape(s1)}'} - @search[:endnotes]<<%{endnotes.clean~'#{CGI.unescape(s1)}'} - #dbi_request - dbi_statement=Dbi_search_statement.new(@conn,@search_for,q) - @text_search_flag=false - @text_search_flag=dbi_statement.text_search_flag - s_contents=dbi_statement.contents - s_endnotes=dbi_statement.endnotes - @body_main=Array.new - @endnotes=Array.new - oldtid=0 - if @text_search_flag - if checked_sql =~/\S/ - sql_select_body=dbi_statement.sql_select_body_format - sql_select_endnotes=dbi_statement.sql_select_endnotes_format - else sql_select_body,sql_select_endnotes='','' - end - @body_main << "



Main Text:
" << sql_select_body - @endnotes << "



Endnotes:
" << sql_select_endnotes - else - end - #text_objects_body - s_contents.each do |c| #% text body - location=c["filename"][/(.+?)\.ss[ftm]/, 1] - file_suffix=c["filename"][/.+?\.(ss[ftm])/, 1] - #metadata_found_body - if c["tid"].to_i != oldtid.to_i - title=%{#{c["title"]} by #{c["creator"]} pdf portraitpdf landscape
} if file_suffix=~/s/ #hmm watch file_suffix - if @text_search_flag: title='

'+title - else title='
'+title - end - @counter_txt_doc+=1 - oldtid=c["tid"].to_i - else title='' - end - if @text_search_flag - if cgi['view']=~/text/ #% txt body - text=if c["suffix"] !~/1/ #seg - if @search_for.text1 =~/\S+/ or q['s1'] =~/\S+/ #% only this branch is working !! - if @search_for.text1 =~/\S+/: unescaped_search=CGI.unescape(@search_for.text1) - elsif q['s1'] =~/\S+/: unescaped_search=CGI.unescape(q['s1']) + @tail=tail + @counter_txt_doc,@counter_txt_ocn,@counter_endn_doc,@counter_endn_ocn=0,0,0,0 + @counters_txt,@counters_endn,@sql_select_body,@sql_select_endnotes='','','','' + FCGI.each_cgi do |cgi| + begin # all code goes in begin section + @search={ :text => [],:endnotes => [] } + q=CGI.new + @db=if cgi['db'] =~/\S+/; + @stub=/SiSU_(\S+)/.match(cgi['db'])[1] + cgi['db'] + else + @stub='sisu' + 'SiSU_sisu' + end + checked_url,checked_stats,checked_searched,checked_tip,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,selected_db='','','','','','','','','' + if cgi['view']=~/text/; checked_index,checked_text='','checked' + else checked_index,checked_text='checked','' + end + checked_echo='checked' if cgi['echo'] =~/\S/ + checked_stats='checked' if cgi['stats'] =~/\S/ + checked_url='checked' if cgi['url'] =~/\S/ or cgi['u'].to_i==1 + checked_searched='checked' if cgi['searched'] =~/\S/ + checked_tip='checked' if cgi['tip'] =~/\S/ + checked_case='checked' if cgi['casesense'] =~/\S/ + checked_sql='checked' if cgi['sql'] =~/\S/ + if cgi['checks'] =~/check_all/ or cgi['check_all'] =~/\S/ or cgi['a'].to_i==1 + checked_all='checked' + checked_echo=checked_stats=checked_url=checked_searched=checked_tip=checked_sql='checked' + checked_none='' + elsif cgi['checks'] =~/check_none/ + checked_none='checked' + checked_all=checked_url=checked_stats=checked_searched=checked_tip=checked_echo=checked_sql='' + elsif cgi['checks'] =~/check_selected/ + checked_selected='checked' + elsif cgi['checks'] =~/check_default/ + checked_default='checked' + checked_echo=checked_stats=checked_url='checked' + checked_searched=checked_tip=checked_case=checked_sql='' + else + checked_selected='checked' + checked_echo=checked_stats=checked_url='checked' + checked_searched=checked_tip=checked_case=checked_sql='' + end + selected_db=case cgi['db'] + when /SiSU_pace/; '' + when /SiSU_sisu/; '' + end + db_name='sisu_sqlite.db' + db_sqlite=case cgi['db'] + when /SiSU_pace/; "/home/ralph/sisu_www/pace/sisu_sqlite.db" + when /SiSU_sisu/; "/home/ralph/sisu_www/sisu/sisu_sqlite.db" + end + @dbi="DBI:SQLite:#{db_sqlite}" #sqlite3 ? + @conn=DBI.connect(@dbi) + search_field=cgi['find'] if cgi['find'] # =~/\S+/ + @search_for=Search_request.new(search_field,q) #.analyze #% search_for + #% searches + #Canned_search.new(@base,@search_for.text1,cgi) + if @search_for.text1=~/\S+/ or @search_for.author=~/\S+/ #and search_field =~/\S/ + s1='s1=' + CGI.escape(@search_for.text1) if @search_for.text1=~/\S/ + key='key=' + CGI.escape(@search_for.keywords) if @search_for.keywords=~/\S/ + ti='&ti=' + CGI.escape(@search_for.title) if @search_for.title=~/\S/ + au='&au=' + CGI.escape(@search_for.author) if @search_for.author=~/\S/ + sj='&sj=' + CGI.escape(@search_for.subject) if @search_for.subject=~/\S/ + dsc='&dsc=' + CGI.escape(@search_for.description) if @search_for.description=~/\S/ + pb='&pb=' + CGI.escape(@search_for.publisher) if @search_for.publisher=~/\S/ + cntr='&cntr=' + CGI.escape(@search_for.contributor) if @search_for.contributor=~/\S/ + dt='&dt=' + CGI.escape(@search_for.date) if @search_for.date=~/\S/ + ty='&ty=' + CGI.escape(@search_for.type) if @search_for.type=~/\S/ + id='&id=' + CGI.escape(@search_for.identifier) if @search_for.identifier=~/\S/ + src='&src=' + CGI.escape(@search_for.source) if @search_for.source=~/\S/ + lang='&lang=' + CGI.escape(@search_for.language) if @search_for.language=~/\S/ + rel='&rel=' + CGI.escape(@search_for.relation) if @search_for.relation=~/\S/ + cov='&cov=' + CGI.escape(@search_for.coverage) if @search_for.coverage=~/\S/ + cr='&cr=' + CGI.escape(@search_for.rights) if @search_for.rights=~/\S/ + co='&co=' + CGI.escape(@search_for.comment) if @search_for.comment=~/\S/ + ab='&ab=' + CGI.escape(@search_for.abstract) if @search_for.abstract=~/\S/ + dtc='&dtc=' + CGI.escape(@search_for.date_created) if @search_for.date_created=~/\S/ + dti='&dti=' + CGI.escape(@search_for.date_issued) if @search_for.date_issued=~/\S/ + dtm='&dtm=' + CGI.escape(@search_for.date_modified) if @search_for.date_modified=~/\S/ + dta='&dta=' + CGI.escape(@search_for.date_available) if @search_for.date_available=~/\S/ + dtv='&dtv=' + CGI.escape(@search_for.date_valid) if @search_for.date_valid=~/\S/ + fns='&fns=' + CGI.escape(@search_for.filename) if @search_for.filename=~/\S/ + @@canned_search_url=if checked_all =~/checked/ + "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}&a=1" + else "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}" + end + @canned_base_url="#@base?#{s1}&db=#{cgi['db']}" + if checked_case=~/\S/ + @search[:text][1]=%{documents.clean~'#{@search_for.text1}'} #s1 + @search[:endnotes][1]=%{endnotes.clean~'#{@search_for.text1}'} #s1 + else + @search[:text][1]=%{documents.clean~*'#{@search_for.text1}'} #s1 + @search[:endnotes][1]=%{endnotes.clean~*'#{@search_for.text1}'} #s1 + end + canned_note='search url:' + else + @@canned_search_url="#@base?s1=United+Nations&db=documents&view=index" + canned_note='search url example:' + end + if search_field =~/\S+/ + analyze_format=search_field.gsub(/\s*\n/,'; ') + elsif checked_all =~/checked/ or checked_url =~/checked/ + canned_search=@@canned_search_url.scan(/(?:s1|au|ti|fns)=[^&]+/) + af=canned_search.join('; ') + af.gsub!(/s1=/,'text: ') + af.gsub!(/au=/,'author: ') + af.gsub!(/ti=/,'title: ') + af.gsub!(/fns=/,'filename: ') + af.gsub!(/%2B/,' ') + analyze_format=af + st=af.split(/\s*;\s*/) + search_field=st.join("\n") + end + green=%{} + canned_search_url_txt=CGI.escapeHTML(@@canned_search_url) + the_can=%{#{canned_note} #{canned_search_url_txt}
} + p_text=p_keywords=p_title=p_author=p_subject=p_description=p_publisher=p_contributor=p_date=p_type=p_format=p_identifier=p_source=p_language=p_relation=p_coverage=p_rights=p_comment=p_abstract=p_subject=p_filename='' + p_text=%{text: #{green}#{@search_for.text1}

} if @search_for.text1 =~/\S+/ + p_keywords=%{keywords: #{green}#{@search_for.keywords}
} if @search_for.keywords =~/\S+/ + p_title=%{title: #{green}#{@search_for.title}
} if @search_for.title =~/\S+/ + p_author=%{author: #{green}#{@search_for.author}
} if @search_for.author =~/\S+/ + p_subject=%{subject: #{green}#{@search_for.subject}
} if @search_for.subject =~/\S+/ + p_description=%{description: #{green}#{@search_for.description}
} if @search_for.description =~/\S+/ + p_publisher=%{publisher: #{green}#{@search_for.publisher}
} if @search_for.publisher =~/\S+/ + p_contributor=%{contributor: #{green}#{@search_for.contributor}
} if @search_for.contributor =~/\S+/ + p_date=%{date: #{green}#{@search_for.date}
} if @search_for.date =~/\S+/ + p_type=%{type: #{green}#{@search_for.type}
} if @search_for.type =~/\S+/ + p_format=%{format: #{green}#{@search_for.format}
} if @search_for.format =~/\S+/ + p_identifier=%{identifier: #{green}#{@search_for.identifier}
} if @search_for.identifier =~/\S+/ + p_source=%{source: #{green}#{@search_for.source}
} if @search_for.source =~/\S+/ + p_language=%{language: #{green}#{@search_for.language}
} if @search_for.language =~/\S+/ + p_relation=%{relation: #{green}#{@search_for.relation}
} if @search_for.relation =~/\S+/ + p_coverage=%{coverage: #{green}#{@search_for.coverage}
} if @search_for.coverage =~/\S+/ + p_rights=%{rights: #{green}#{@search_for.rights}
} if @search_for.rights =~/\S+/ + p_comment=%{comment: #{green}#{@search_for.comment}
} if @search_for.comment =~/\S+/ + p_abstract=%{abstract: #{green}#{@search_for.abstract}
} if @search_for.abstract =~/\S+/ + p_filename=%{filename: #{green}#{@search_for.filename}
} if @search_for.filename =~/\S+/ + search_note=<<-WOK + + database: #{green}#@db; selected view: #{green}#{cgi['view']} + search string: "#{green}#{analyze_format}"
+ #{p_text} #{p_keywords} #{p_title} #{p_author} #{p_subject} #{p_description} #{p_publisher} #{p_contributor} #{p_date} #{p_type} #{p_format} #{p_identifier} #{p_source} #{p_language} #{p_relation} #{p_coverage} #{p_rights} #{p_comment} #{p_abstract} #{p_filename} + + WOK + #eg = %{canned search e.g.:
#{url}
find: #{analyze}
database: #{database}} + #dbi_canning + @header=Form.new(@base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can).submission_form #% form + unless q['s1'] =~/\S/ or q['au'] =~/\S/ or @search[:text][1] =~/\S/ + print "Content-type: text/html\n\n" + puts (@header+@tail) + else #% searches + s1=if @search_for.text1 =~/\S/ + @search_for.text1 + else 'Unavailable' + end + if checked_case=~/\S/ + @search[:text]<<%{documents.clean~'#{CGI.unescape(s1)}'} + @search[:endnotes]<<%{endnotes.clean~'#{CGI.unescape(s1)}'} + else + @search[:text]<<%{documents.clean~*'#{CGI.unescape(s1)}'} + @search[:endnotes]<<%{endnotes.clean~*'#{CGI.unescape(s1)}'} + end + #dbi_request + dbi_statement=Dbi_search_statement.new(@conn,@search_for,q,checked_case) + @text_search_flag=false + @text_search_flag=dbi_statement.text_search_flag + s_contents=dbi_statement.contents + s_endnotes=dbi_statement.endnotes + @body_main,@endnotes=[],[] + @search_regx=nil + oldtid=0 + if @text_search_flag + if checked_sql =~/\S/ + sql_select_body=dbi_statement.sql_select_body_format + sql_select_endnotes=dbi_statement.sql_select_endnotes_format + else sql_select_body,sql_select_endnotes='','' + end + @body_main << '



Main Text:
' << sql_select_body + @endnotes << '



Endnotes:
' << sql_select_endnotes + else + end + #text_objects_body + s_contents.each do |c| #% text body + location=c['filename'][/(.+?)\.(?:_?sst|ssm)$/,1] + file_suffix=c['filename'][/.+?\.(_?sst|ssm)$/,1] + lang=if location =~ /\S+?~(\S\S\S?)$/ + l=location[/\S+?~(\S\S\S?)$/,1] + location.gsub!(/(\S+?)~\S\S\S?/,'\1') + l=".#{l}" + else '' + end + #metadata_found_body + if c['tid'].to_i != oldtid.to_i + ti=if c['subtitle'] =~/\S+/; "#{c['title']} - #{c['subtitle']}" + else c['title'] + end + can_txt_srch=if cgi['view']=~/index/; %{red bullet } + else %{red bullet } + end + title=%{toc html #{ti} by #{c['creator']} #{can_txt_srch}toc html pdf portrait pdf landscape odf manifest
} if file_suffix=~/s/ #hmm watch file_suffix + if @text_search_flag; title='

'+title + else title='
'+title + end + @counter_txt_doc+=1 + oldtid=c['tid'].to_i + else title='' + end + if @text_search_flag + if cgi['view']=~/text/ #% txt body + text=if c['suffix'] !~/1/ #seg + if @search_for.text1 =~/\S+/ or q['s1'] =~/\S+/ #% only this branch is working !! + unescaped_search=if @search_for.text1 =~/\S+/; CGI.unescape(@search_for.text1) + elsif q['s1'] =~/\S+/; CGI.unescape(q['s1']) + else nil + end + @search_regx=if unescaped_search #check + search_regex=[] + build=unescaped_search.scan(/\S+/).each do |g| + if g.to_s =~/(AND|OR)/ + search_regex << '|' + else search_regex << %{#{g.to_s}} + end + end + search_regex=search_regex.join(' ') + search_regex=search_regex.gsub(/\s*\|\s*/,'|') + Regexp.new(search_regex, Regexp::IGNORECASE) + else nil + end + else nil + end + matched_para=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) + matched=c['body'].gsub(/(<\s]+#{@search_regx}[^>]+?>|#@search_regx)/mi,%{\\1}) + else c['body'] + end + %{

ocn #{c['ocn']}:

#{matched_para}} + elsif c['suffix'] =~/1/ #doc + %{#{title}

ocn #{c['ocn']}:#{c['body']}} + end + @counter_txt_ocn+=1 + output=if c['seg'] =~/\S+/; title+text + else text end - search_regex=Array.new - build=unescaped_search.scan(/\S+/).each do |g| - if g.to_s =~/(AND|OR)/ - search_regex << '|' - else search_regex << %{#{g.to_s}} - end + elsif cgi['view']=~/index/ #% idx body + if c['suffix'] !~/1/ #seg + index=%{#{c['ocn']}, } if @text_search_flag + elsif c['suffix'] =~/1/ #doc + index=%{#{c['ocn']}, } + end + if c['seg'] =~/\S+/ + if @text_search_flag + @counter_txt_ocn+=1 + output=title+index + end + else + @counter_txt_ocn+=1 + output=unless c['suffix'] =~/1/; title+index + else %{#{title}#{c['ocn'].sort}, } + end end - search_regex=search_regex.join(' ') - search_regex=search_regex.gsub(/\s*\|\s*/,'|') - @search_regx=search_regex.to_s end - matched_para=c["body"].gsub(/(#@search_regx)/i,%{\\1}) - %{


ocn #{c["ocn"]}:

#{matched_para}} - elsif c["suffix"] =~/1/ #doc - %{#{title}

ocn #{c["ocn"]}:#{c["body"]}} + else output=title end - @counter_txt_ocn+=1 - output=if c["seg"] =~/\S+/: title+text - else text + @counters_txt=if @counter_txt_doc > 0 + if checked_stats =~/\S/ + @@lt_t=if @counter_txt_ocn == dbi_statement.sql_limit.to_i + over='over' + true + else + over='' + false + end + %{


Found in the main body of #@counter_txt_doc documents, and at #{over} #@counter_txt_ocn locations within.
} + else '' + end + else '' end - elsif cgi['view']=~/index/ #% idx body - if c["suffix"] !~/1/ #seg - index=%{#{c["ocn"]}, } if @text_search_flag - elsif c["suffix"] =~/1/ #doc - index=%{#{c["ocn"]}, } + @body_main << output #+ details + end + #text_objects_endnote + oldtid = 0 + s_endnotes.each do |e| #% endnotes + location=e['filename'][/(.+?)\.(?:_?sst|ssm)$/,1] + file_suffix=e['filename'][/.+?\.(_?sst|ssm)$/,1] + lang=if location =~ /\S+?~(\S\S\S?)$/ + l=location[/\S+?~(\S\S\S?)$/,1] + location.gsub!(/(\S+?)~\S\S\S?/,'\1') + l=".#{l}" + else '' end - if c["seg"] =~/\S+/ - if @text_search_flag - @counter_txt_ocn+=1 - output=title+index + #metadata_found_endnotes + if @text_search_flag + if e['metadata_tid'].to_i != oldtid.to_i + ti=if e['subtitle'] =~/\S+/; "#{e['title']} - #{e['subtitle']}" + else e['title'] + end + can_txt_srch=if cgi['view']=~/index/; %{red bullet } + else %{red bullet } + end + title=%{

toc html #{ti} by #{e['creator']} #{can_txt_srch}toc html pdf portraitpdf landscape odf manifest
} if file_suffix=~/s/ + @counter_endn_doc+=1 + oldtid=e['metadata_tid'].to_i + else title = '' + end + if cgi['view']=~/text/ #% txt endnotes + @counter_endn_ocn+=1 + matched_endnote=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) + matched=e['body'].gsub(/(<\s]+#{@search_regx}[^>]+?>|#@search_regx)/mi,%{\\1}) + else e['body'] + end + output=%{#{title}
note #{e['nr']} referred to from ocn #{e['ocn']}: #{matched_endnote}} + elsif cgi['view']=~/index/ #% idx endnotes + @counter_endn_ocn+=1 + output=%{#{title}#{e['nr']}#{e['ocn']}], } end - else - @counter_txt_ocn+=1 - output=unless c["suffix"] =~/1/: title+index - else %{#{title}#{c["ocn"].sort}, } + @counters_endn=if @counter_endn_doc > 0 + if checked_stats =~/\S/ + @@lt_e=if @counter_endn_ocn == dbi_statement.sql_limit.to_i + over='over' + true + else + over='' + false + end + %{Found in the endnotes of #@counter_endn_doc documents, and at #{over} #@counter_endn_ocn locations within.
} + else '' + end end + @endnotes << output #+ details + else @endnotes=[] #does not take out yet end end - else output=title + offset=dbi_statement.sql_offset.to_s + limit=dbi_statement.sql_limit.to_s + @@lt_t ||=false; @@lt_e ||=false + canned=if (@@lt_t or @@lt_e) + dbi_statement.sql_canned_search_url(true).to_s + else + dbi_statement.sql_canned_search_url(false).to_s + end + limit=dbi_statement.sql_limit.to_s + cgi.out{@header + @counters_txt + @counters_endn + @body_main.join + @endnotes.join + canned + @tail} #% print cgi_output_header+counters+body+endnotes end - @counters_txt=if @counter_txt_doc > 0 - %{Found in the main body of #@counter_txt_doc documents, and at #@counter_txt_ocn locations within.
} - else '' - end - @body_main << output #+ details - end - #text_objects_endnote - oldtid = 0 - s_endnotes.each do |e| #% endnotes - location=e["filename"][/(.+?)\.ss[ftm]/, 1] - file_suffix=e["filename"][/.+?\.(ss[ftm])/, 1] - #metadata_found_endnotes - if @text_search_flag - if e["metadata_tid"].to_i != oldtid.to_i - title=%{

#{e["title"]} by #{e["creator"]} pdf portraitpdf landscape
} if file_suffix=~/s/ - @counter_endn_doc+=1 - oldtid=e["metadata_tid"].to_i - else title = '' - end - if cgi['view']=~/text/ #% txt endnotes - @counter_endn_ocn+=1 - matched_endnote=e["body"].gsub(/(#@search_regx)/i,%{\\1}) - output=%{#{title}
note #{e["nr"]} referred to from ocn #{e["ocn"]}: #{matched_endnote}} - elsif cgi['view']=~/index/ #% idx endnotes - @counter_endn_ocn+=1 - output=%{#{title}#{e["nr"]}#{e["ocn"]}], } - end - @counters_endn=if @counter_endn_doc > 0 - %{Found in the endnotes of #@counter_endn_doc documents, and at #@counter_endn_ocn locations within.
} - end - @endnotes << output #+ details - else @endnotes=Array.new #does not take out yet + rescue Exception => e + s='
' + CGI::escapeHTML(e.backtrace.reverse.join("\n"))
+          s << CGI::escapeHTML(e.message) + '
' + cgi.out{s} + next + ensure # eg. disconnect from server + @conn.disconnect if @conn end end - cgi.out{@header + @counters_txt + @counters_endn + @body_main.join + @endnotes.join + @tail} #% print cgi_output_header+counters+body+endnotes - end - rescue Exception => e - s='
' + CGI::escapeHTML(e.backtrace.reverse.join("\n"))
-    s << CGI::escapeHTML(e.message) + '
' - cgi.out{s} - next - ensure # eg. disconnect from server - @conn.disconnect if @conn - end -end diff --git a/data/sisu/conf/editor-syntax-etc/README b/data/sisu/conf/editor-syntax-etc/README new file mode 100644 index 00000000..9fde1d1e --- /dev/null +++ b/data/sisu/conf/editor-syntax-etc/README @@ -0,0 +1,92 @@ +This directory + sisu-examples/sisu-examples/config/syntax_hi/ + /usr/share/sisu-examples/sisu-examples/config/syntax_hi +contains rudimentary sisu syntax highlighting files for: + +* (g)vim + * package: sisu-vim + * status: largely done + * comments: not found here + a vim syntax highlighting and folds component of sisu exists, + see sisu-vim + +* gedit +* gobby + file: sisu.lang + place in: + /usr/share/gtksourceview-1.0/language-specs + or + ~/.gnome2/gtksourceview-1.0/language-specs + * status: very basic syntax highlighting + * comments: this editor features display line wrap and is used by Goby! + +* nano + file: nanorc + save as: + ~/.nanorc + includes: + * status: basic syntax highlighting + * comments: assumes dark background + no display line-wrap + does line breaks + +* diakonos (an editor written in ruby) + file: diakonos.conf + save as: + ~/.diakonos/diakonos.conf + includes: + * status: basic syntax highlighting + * comments: assumes dark background + no display line-wrap + +* kate & kwrite http://kate.kde.org + file: sisu.xml + place in: + /usr/share/apps/katepart/syntax + or + ~/.kde/share/apps/katepart/syntax + [settings::configure kate::{highlighting,filetypes}] + [tools::highlighting::{markup,scripts}::SiSU] + +* nedit + file: sisu_nedit.pats + nedit -import sisu_nedit.pats + * status: a very clumsy first attempt + [not really done] + * comments: this editor features display line wrap + +* emacs + files: sisu-mode.el + to file ~/.emacs add the following 2 lines: + (add-to-list 'load-path "/usr/share/sisu-examples/config/syntax_hi") + (require 'sisu-mode.el) + [not done / not yet included] + +* vim & gvim + files: sisu-vim + package is the most comprehensive sisu syntax highlighting and editor + environment provided to date (is for vim/ gvim, and is separate from the + contents of this directory) + on debian: + aptitude install sisu-vim + * status: this includes: + syntax highlighting + vim folds + some error checking + * comments: this editor features display line wrap + +NOTE: + +[SiSU parses files with long lines or line breaks, +but, display linewrap (without line-breaks) is a +convenient editor feature to have for sisu markup] + +kde-config --prefix +KDEDIR/share/apps/katepart/syntax/ +KDEHOME/share/apps/katepart/syntax +[In the configure dialog in kate, go to the "Editor->highlighting" page and +>select a highlight to change the mimetype/pattern associations for it.] +/etc/mime.types +/usr/share/mime/text +# +# * aeditor (an editor written in ruby) diff --git a/data/sisu/conf/editor-syntax-etc/diakonos/diakonos.conf b/data/sisu/conf/editor-syntax-etc/diakonos/diakonos.conf new file mode 100644 index 00000000..c7fa686b --- /dev/null +++ b/data/sisu/conf/editor-syntax-etc/diakonos/diakonos.conf @@ -0,0 +1,977 @@ +logfile ~/.diakonos/diakonos.log + +# When the cursor is view.margin.y lines or less from the top or +# bottom line, repeatedly scroll the screen view.jump.y lines until +# the cursor is more than view.margin.y lines from the top and +# bottom line. +# Similarly for view.margin.x and view.jump.x, with respect to the +# left-most and right-most screen columns. +view.margin.x 10 +view.margin.y 5 +view.jump.x 10 +view.jump.y 5 +view.scroll_amount 3 +view.lookback 200 +view.nonfilelines.visible false +view.nonfilelines.character ~ + +# bol_behaviour: This specifies where the cursor should go when the +# beginning-of-line key (the default is the Home key) is pressed. +# zero: Always move to the left-most column of the line +# first-char: Always move to the left-most non-whitespace character +# alternating-zero: As with 'zero', unless the cursor is +# already there, in which case, as with 'first-char'. +# alternating-first-char: As with 'first-char', unless the cursor is +# already there, in which case, as with 'zero'. +# bol_behavior is a synonym for bol_behaviour. +bol_behaviour alternating-first-char + +# Ensures saved files end with a newline character by adding it if necessary. +eof_newline false + +# Specifies whether the cursor should be at the end (false) of found text, or the +# beginning (true). +found_cursor_start false + +max_clips 30 + +# The maximum number of undo lines held in memory per file +# Smaller files will be able to have more undo levels. +max_undo_lines 100000 + +convert_tabs false + +diff_command diff -U 5 + +# Whether or not to use /usr/bin/file to determine whether files are readable +# before opening them. +use_magic_file false + +# --------------------------------------------------------------------- +# Status Line + +# Use "% syntax" as placeholders +# e.g. %d for decimal integers, %s for strings +status.left -- %s %s%s%s -- (%s) - +status.right - Buf %d of %d --- L%3d/%3d C%2d -- +# The string to use to fill in the space between the left and right sides +# of the status line. +status.filler - +status.modified_str (modified) +status.selecting_str (selecting) +status.unnamed_str (unnamed file) +status.read_only_str (read-only) +# status.vars: any subset of: +# line row num_lines col filename modified type buffer_number num_buffers selecting read_only +status.vars filename modified read_only selecting type buffer_number num_buffers row num_lines col +status.format inverse + +# --------------------------------------------------------------------- +# Context Line + +# The context line shows the wrapping context of the cursor, with respect to +# indentation. This shows the current code block(s) that the cursor is in. + +context.visible false +context.combined false +context.max_levels 4 +context.format inverse +context.separator | +context.separator.format red inverse +#context.max_segment_width 10 + +# --------------------------------------------------------------------- +# Interaction Line + +# Duration of "alert" blink (in seconds) when user has made an invalid choice +interaction.blink_duration 0.05 +interaction.blink_string *********************************************************** +# Time to wait (in seconds) before accepting user keystrokes when prompting for +# a choice which has no default +interaction.choice_delay 3 + +# --------------------------------------------------------------------- +# Key Configuration +# key [...]; [[,...]] +# If no function is specified, it unmaps any previous mapping. +# i.e. key [...]; +# can be "keycode##" to specify specific keycodes. +# e.g. key keycode8;delete +# Note the lack of space after the word keycode. + +# To obtain the string to use for any keychain, use the printKeychain command +# (default alt+k). + +# The shell, execute and pasteShellResult commands can take variables: + +# $f current buffer's filepath +# $F all current buffer filepaths, space-separated +# $i get a string from user input +# $c temp file containing current clipboard text +# $s temp file containing currently selected text + +key left;cursorLeft +key esc [ D;cursorLeft +key right;cursorRight +key esc [ C;cursorRight +key up;cursorUp +key esc [ A;cursorUp +key down;cursorDown +key esc [ B;cursorDown +key home;cursorBOL +key esc O H;cursorBOL +key esc [ H;cursorBOL +key esc [ 1 ~ cursorBOL +key end;cursorEOL +key esc O F;cursorEOL +key esc [ F;cursorEOL +key esc [ 4 ~;cursorEOL +key pageup;pageUp +key pagedown;pageDown +key ctrl+a;cursorBOL +key ctrl+e;cursorEOL +key alt+<;cursorBOF +key alt+>;cursorEOF +key alt+,;cursorTOV +key alt+.;cursorBOV +key ctrl+j;cursorReturn +key ctrl+l;cursorReturn "forward" +key alt+n;scrollDown +key alt+p;scrollUp +key esc up;scrollUp +key esc [ 1 ; 3 A scrollUp +key esc [ 1 ; 5 A scrollUp +key keycode520 scrollUp +key esc down;scrollDown +key esc [ 1 ; 3 B scrollDown +key esc [ 1 ; 5 B scrollDown +key keycode513 scrollDown +key esc right;seek /(?:^|\W)(\w)|\w(\W|$)/ +key esc [ 1 ; 3 C seek /\w(\W|$)|(?:^|\W)(\w)/ +key esc [ 1 ; 5 C seek /\w(\W|$)|(?:^|\W)(\w)/ +key keycode517 seek /\w(\W|$)|(?:^|\W)(\w)/ +key esc left;seek /\w(\W|$)|(?:^|\W)(\w)/, "up" +key esc [ 1 ; 3 D seek /\w(\W|$)|(?:^|\W)(\w)/, "up" +key esc [ 1 ; 5 D seek /\w(\W|$)|(?:^|\W)(\w)/, "up" +key keycode515 seek /\w(\W|$)|(?:^|\W)(\w)/, "up" + +key ctrl+g;goToLineAsk +key alt+b alt+b;toggleBookmark +key alt+b alt+n;goToNextBookmark +key alt+b alt+p;goToPreviousBookmark +key alt+b alt+a;addNamedBookmark +key alt+b alt+r;removeNamedBookmark +key alt+b alt+g;goToNamedBookmark +key alt+b alt+!;addNamedBookmark 1 +key alt+b alt+@;addNamedBookmark 2 +key alt+b alt+#;addNamedBookmark 3 +key alt+b alt+$;addNamedBookmark 4 +key alt+b alt+%;addNamedBookmark 5 +key alt+b alt+1;goToNamedBookmark 1 +key alt+b alt+2;goToNamedBookmark 2 +key alt+b alt+3;goToNamedBookmark 3 +key alt+b alt+4;goToNamedBookmark 4 +key alt+b alt+5;goToNamedBookmark 5 +key alt+t;goToTag +key alt+);goToTagUnderCursor +key alt+(;popTag + +key backspace;backspace +key ctrl+h;backspace +key del;delete +#key ctrl+k;deleteLine +key ctrl+k;deleteAndStoreLine +key ctrl+alt+k;deleteToEOL +key esc del;collapseWhitespace +key esc [ 3 ; 3 ~ collapseWhitespace +key enter;carriageReturn +key tab;parsedIndent +#key tab;indent +#key ctrl+alt+l;unindent +key alt+i;indent +key esc i;indent +key esc I;unindent +key keycode353 unindent +#key tab;insertSpaces 4 +#key tab;insertTab +key ctrl+t;insertTab + +key f1 help +key esc O P help +key esc [ 1 1 ~ help +key esc [ [ A help +key f11;loadConfiguration +key esc [ 2 3 ~;loadConfiguration +key f12;openFile "~/.diakonos/diakonos.conf" +key esc [ 2 4 ~;openFile "~/.diakonos/diakonos.conf" + +key ctrl+alt+r;redraw +key esc C;toggleSessionSetting 'context.visible', DO_REDRAW +key ctrl+alt+d;toggleSessionSetting 'display' + +key ctrl+n;newFile +key ctrl+o;openFileAsk +key ctrl+s;saveFile +key alt+s;saveFileAs +key ctrl+w;closeFile +key ctrl+alt+o;revert +key alt+!;setReadOnly +key ctrl+q;quit +key esc T;setBufferType + +key alt+1;switchToBufferNumber 1 +key alt+2;switchToBufferNumber 2 +key alt+3;switchToBufferNumber 3 +key alt+4;switchToBufferNumber 4 +key alt+5;switchToBufferNumber 5 +key alt+6;switchToBufferNumber 6 +key alt+7;switchToBufferNumber 7 +key alt+8;switchToBufferNumber 8 +key alt+9;switchToBufferNumber 9 +key alt+0;switchToBufferNumber 10 +key alt+-;switchToPreviousBuffer +key alt+=;switchToNextBuffer + +key ctrl+space;anchorSelection +#key ctrl+space;toggleSelection +key ctrl+c;copySelection +key ctrl+x;cutSelection +key alt+u;removeSelection +key ctrl+alt+v;showClips +key ctrl+v;paste +key ctrl+y;unundo +key ctrl+z;undo +#key ctrl+z;suspend +key suspend;undo +#key suspend;suspend + +key ctrl+f;find +#key ctrl+f;find "down", CASE_SENSITIVE +key alt+f;find "down", CASE_SENSITIVE +#key alt+f;findExact +key ctrl+alt+f;find "up" +#key ctrl+alt+f;find "up", CASE_SENSITIVE +key f3;findAgain "down" +key esc [ [ C findAgain "down" +key esc O R;findAgain "down" +key esc [ 1 3 ~;findAgain "down" +key f15;findAgain "up" +key esc [ 2 8 ~ findAgain "up" +key esc O 2 R;findAgain "up" +key ctrl+r;searchAndReplace +key ctrl+alt+u;clearMatches + +key f2 shell +key esc O Q shell +key esc [ 1 2 ~ shell +key esc [ [ B shell +key f8;execute +key esc F;execute "glark '$i' $F | less" +key esc d shell "diff -U 5 -w -b $c $s" +#key esc F;shell "grep -n '$i' $F" +#key esc F;execute "grep -n '$i' $F | less" +key f14 evaluate +key esc O 2 Q evaluate +esc [ 2 6 ~ evaluate +key ctrl+alt+c;shell "ruby -c $f" +key ctrl+alt+d;shell "php -l $f" + +# To use the following: +# 1) Copy to the clipboard some Ruby code which operates on stdin text and outputs to stdout. +# 2) Select (highlight) some text to operate on. +# 3) Activate this pasteShellResult command. +# 4) The selected text should now be replaced with the script's results. +key ctrl+alt+p;pasteShellResult "cat $s | ruby $c" +#key ctrl+alt+p;pasteShellResult "cat $s | perl $c" +#key ctrl+alt+p;pasteShellResult "cat $s | python $c" +#key ctrl+alt+p;pasteShellResult "cat $s | sed -f $c" +#key ctrl+alt+p;pasteShellResult "cat $s | awk -f $c" + +key alt+k printKeychain +key alt+m;toggleMacroRecording +key f4 playMacro +key esc O S playMacro +key esc [ 1 4 ~ playMacro +key esc [ [ D playMacro +key f5 loadScript +key esc [ 1 5 ~ loadScript +key esc [ [ E loadScript +key f6;repeatLast +key esc [ 1 7 ~;repeatLast +key f7;operateOnEachLine +key f19;operateOnString +key esc f7;operateOnLines + +# Emacs-like keychains + +#key ctrl+s;find +#key ctrl+x ctrl+c;quit +#key ctrl+x ctrl+f;openFileAsk +#key ctrl+x ctrl+s;saveFile + +# --------------------------------------------------------------------- +# Colour Definitions +# +# colour +# +# For a list of colour names, see the list of format codes in the +# Language Definitions section, below. +# This colour command is only used when you want to set a different background +# colour than the terminal default. +# +# color is a synonym for colour. +colour 8 white blue +colour 9 white red +colour 10 white magenta +colour 11 yellow blue +colour 12 white green +colour 13 white brown +colour 14 black cyan +colour 15 yellow red + +# --------------------------------------------------------------------- +# Language Definitions +# For syntax highlighting and indentation. + +# lang..tokens.[.case_insensitive] +# lang..tokens..format +# can be any subset of: +# normal black red green brown blue magenta cyan white standout underline inverse blink dim bold +# The numbers of colour pairs (as defined by the configuration command "colour") +# can also be used as format codes. +# +# indent.roundup: If a line's indentation is not evenly divisible by the +# indent.size, and indent.roundup is true, then the non-integer indentation +# level will be rounded up. If indent.roundup is false, then it will be +# rounded down. +# e.g. given an indent.size of 4, and a line with 6 spaces, indent.roundup +# true will make Diakonos consider the line indented 2 levels. With +# indent.roundup false, it will be considered indented 1 level. +# +# The filemask can also be used to specify specific filenames which +# don't conform to the standard extensions for a language. + +# Text (default) + +lang.text.format.default white +lang.text.format.selection inverse +lang.text.format.found yellow inverse +lang.text.indent.size 2 +lang.text.indent.auto true +lang.text.indent.roundup false +#lang.text.indent.using_tabs true +lang.text.tabsize 8 + +lang.xml.filemask \.(xml|rdl|aiml|xhtml)$ +lang.xml.format.default white +lang.xml.format.selection inverse +lang.xml.format.found yellow inverse +lang.xml.tabsize 8 +lang.xml.indent.size 4 +lang.xml.indent.auto true +lang.xml.indent.roundup true +#lang.xml.indent.using_tabs true +lang.xml.tokens.entities &\S+?; +lang.xml.tokens.entities.format magenta bold +lang.xml.tokens.code.open (<)(?:[^%]|$) +lang.xml.tokens.code.close (?:[^%]|^)(>) +lang.xml.tokens.code.format white bold +lang.xml.tokens.code.change_to xml_tag +lang.xml.tokens.comments.open () +lang.xml.tokens.comments.format 8 +lang.xml.tokens.comments.change_to xml_comment +lang.xml.tokens.template.open \[@-- +lang.xml.tokens.template.close --@\] +lang.xml.tokens.template.format brown +lang.xml.tokens.template.change_to perl +lang.xml_tag.format.default white bold +lang.xml_tag.format.selection inverse +lang.xml_tag.format.found yellow inverse +lang.xml_tag.tabsize 8 +lang.xml_tag.indent.size 4 +lang.xml_tag.indent.auto true +lang.xml_tag.indent.roundup true +#lang.xml_tag.indent.using_tabs true +lang.xml_tag.tokens.doublequoted_strings (\".*?[^\\]\") +lang.xml_tag.tokens.doublequoted_strings.format green bold +lang.xml_tag.tokens.singlequoted_strings ('.*?[^\\]') +lang.xml_tag.tokens.singlequoted_strings.format green bold +lang.xml_tag.tokens.symbols ([@!#$%^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.xml_tag.tokens.symbols.format white +lang.xml_comment.format.default 8 +lang.xml_comment.format.selection inverse +lang.xml_comment.format.found yellow inverse +lang.xml_comment.tabsize 8 +lang.xml_comment.indent.size 4 +lang.xml_comment.indent.auto true +lang.xml_comment.indent.roundup true +#lang.xml_comment.indent.using_tabs true + +lang.html.filemask \.(r?html?|php|asp)$ +lang.html.format.default white +lang.html.format.selection inverse +lang.html.format.found yellow inverse +lang.html.tabsize 8 +lang.html.indent.size 4 +lang.html.indent.auto true +lang.html.indent.roundup true +#lang.html.indent.using_tabs true +lang.html.tokens.code.open (<)(?:[^%]|$) +lang.html.tokens.code.close (?:[^%]|^)(>) +lang.html.tokens.code.format white bold +lang.html.tokens.code.change_to html_tag +lang.html.tokens.entities &\S+?; +lang.html.tokens.entities.format magenta bold +lang.html.tokens.eruby.open <% +lang.html.tokens.eruby.close %> +lang.html.tokens.eruby.format 9 bold +lang.html.tokens.eruby.change_to ruby +lang.html.tokens.php.open <\?(?:php)? +lang.html.tokens.php.close \?> +lang.html.tokens.php.format 10 bold +lang.html.tokens.php.change_to php +lang.html.tokens.comments.open () +lang.html.tokens.comments.format 8 +lang.html.tokens.comments.change_to html_comment +lang.html_tag.format.default white bold +lang.html_tag.format.selection inverse +lang.html_tag.format.found yellow inverse +lang.html_tag.tabsize 8 +lang.html_tag.indent.size 4 +lang.html_tag.indent.auto true +lang.html_tag.indent.roundup true +#lang.html_tag.indent.using_tabs true +lang.html_tag.tokens.attribute (href) +lang.html_tag.tokens.attribute.format green bold +lang.html_tag.tokens.elements.case_insensitive \b(A|ABBR|ACRONYM|ADDRES|APPLET|AREA|B|BASE|BASEFONT|BDO|BIG|BLOCKQUOTE|BODY|BR|BUTTON|CAPTION|CENTER|CITE|CODE|COL|COLGROUP|DD|DEL|DFN|DIR|DIV|DL|DT|EM|FIELDSET|FONT|FORM|FRAME|FRAMESET|H1|H2|H3|H4|H5|H6|HEAD|HR|HTML|I|IFRAME|IMG|INPUT|INS|ISINDEX|KBD|LABEL|LEGEND|LI|LINK|MAP|MENU|META|NOFRAMES|NOSCRIPT|OBJECT|OL|OPTGROUP|OPTION|P|PARAM|PRE|Q|S|SAMP|SCRIPT|SELECT|SMALL|SPAN|STRIKE|STRONG|STYLE|SUB|SUP|TABLE|TBODY|TD|TEXTAREA|TFOOT|TH|THEAD|TITLE|TR|TT|U|UL|VA)\b +lang.html_tag.tokens.elements.format cyan +lang.html_tag.tokens.attributes.case_insensitive \b(abbr|accept-charset|accept|accesskey|action|align|alink|alt|archive|axis|background|bgcolor|border|cellpadding|cellspacing|char|charoff|charset|checked|cite|class|classid|clear|code|codebase|codetype|color|cols|colspan|compact|content|coords|data|datetime|declare|defer|dir|disabled|enctype|face|for|frame|frameborder|headers|height|href|href|hreflang|hspace|http-equiv|id|ismap|label|lang|language|link|longdesc|marginheight|marginwidth|maxlength|media|method|multiple|name|nohref|noresize|noshade|nowrap|object|onblur|onchange|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onselect|onsubmit|onunload|profile|prompt|readonly|rel|rev|rows|rowspan|rules|scheme|scope|scrolling|selected|shape|size|span|src|standby|start|style|summary|tabindex|target|text|title|type|usemap|valign|value|valuetype|version|vlink|vspace|width)\b +lang.html_tag.tokens.attributes.format white +lang.html_tag.tokens.doublequoted_strings (\".*?[^\\]\") +lang.html_tag.tokens.doublequoted_strings.format green bold +lang.html_tag.tokens.singlequoted_strings ('.*?[^\\]') +lang.html_tag.tokens.singlequoted_strings.format green bold +lang.html_tag.tokens.symbols ([@!#$%^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.html_tag.tokens.symbols.format white +lang.html_comment.format.default 8 +lang.html_comment.format.selection inverse +lang.html_comment.format.found yellow inverse +lang.html_comment.tabsize 8 +lang.html_comment.indent.size 4 +lang.html_comment.indent.auto true +lang.html_comment.indent.roundup true +#lang.html_comment.indent.using_tabs true + +# CSS + +lang.css.filemask \.css$ +lang.css.format.default white +lang.css.format.selection inverse +lang.css.format.found yellow inverse +lang.css.tabsize 8 +lang.css.indent.size 4 +lang.css.indent.auto true +lang.css.indent.roundup true +#lang.css.indent.using_tabs true +lang.css.indent.indenters (\{) +lang.css.indent.unindenters (\}) +lang.css.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) +lang.css.tokens.properties \b(azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-collapse|border-color|border-spacing|border-style|border-top|border-bottom|border-right|border-left|border-top-color|border-top-style|border-top-width|border-width|border|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-right|margin-top|margin-left|margin-bottom|margin|max-height|max-width|min-height|min-width|orphans|outline-color|outline-style|outline-width|outline|overflow|padding-top|padding-left|padding-right|padding-bottom|padding|page-break-after|page-break-before|page-break-inside|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|table-layout|text-align|text-decoration|text-indent|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index): +lang.css.tokens.properties.format white bold +lang.css.tokens.colours #[A-Fa-f0-9]{6}|\b(?:aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\b +lang.css.tokens.colours.format yellow bold +lang.css.tokens.long_comments.open \/\* +lang.css.tokens.long_comments.close \*\/ +lang.css.tokens.long_comments.format 8 bold +lang.css.tokens.numbers \b([0-9]+\.[0-9]+|[0-9]+) +lang.css.tokens.numbers.format blue bold +lang.css.tokens.units [^A-Za-z](em|pt|px)\b +lang.css.tokens.units.format cyan +lang.css.tokens.html_elements.case_insensitive \b(A|ABBR|ACRONYM|ADDRES|APPLET|AREA|B|BASE|BASEFONT|BDO|BIG|BLOCKQUOTE|BODY|BR|BUTTON|CAPTION|CENTER|CITE|CODE|COL|COLGROUP|DD|DEL|DFN|DIR|DIV|DL|DT|FIELDSET|FORM|FRAME|FRAMESET|H1|H2|H3|H4|H5|H6|HEAD|HR|HTML|I|IFRAME|IMG|INPUT|INS|ISINDEX|KBD|LABEL|LEGEND|LI|LINK|MAP|MENU|META|NOFRAMES|NOSCRIPT|OBJECT|OL|OPTGROUP|OPTION|P|PARAM|PRE|Q|S|SAMP|SCRIPT|SELECT|SMALL|SPAN|STRIKE|STRONG|STYLE|SUB|SUP|TABLE|TBODY|TD|TEXTAREA|TFOOT|TH|THEAD|TITLE|TR|TT|U|UL|VA)\b +lang.css.tokens.html_elements.format green +lang.css.tokens.values \b(auto|block|inherit|inline|larger|none|smaller|solid)\b +lang.css.tokens.values.format blue bold + +# Ruby + +lang.ruby.filemask (?:[Rr]akefile)|(?:\.(?:rb|gem(?:spec)?)$) +lang.ruby.bangmask ruby +lang.ruby.format.default white bold +lang.ruby.format.selection inverse +lang.ruby.format.found yellow inverse +lang.ruby.tokens.reserved_words \b(__FILE__|and|def|end|in|or|self|unless|__LINE__|begin|defined\?|ensure|module|redo|super|until|BEGIN|break|do|false|next|rescue|then|when|END|case|else|for|nil|retry|true|while|alias|class|elsif|if|not|return|undef|yield)\b +lang.ruby.tokens.reserved_words.format white +lang.ruby.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b +lang.ruby.tokens.constants.format yellow bold +lang.ruby.tokens.symbols [@!#$%^&*()\[\]{}/?=+\-\\|,<.>;:~] +lang.ruby.tokens.symbols.format white +lang.ruby.tokens.class_variables (@[A-Za-z_][A-Za-z_0-9]*) +lang.ruby.tokens.class_variables.format white bold +lang.ruby.tokens.comments (#.*) +lang.ruby.tokens.comments.format 8 bold +lang.ruby.tokens.regular_expressions (\/.+?[^\\]\/) +lang.ruby.tokens.regular_expressions.format red bold +lang.ruby.tokens.doublequoted_strings (\".*?[^\\]\"|\"\") +lang.ruby.tokens.doublequoted_strings.format green bold +lang.ruby.tokens.singlequoted_strings ('.*?[^\\]'|'') +lang.ruby.tokens.singlequoted_strings.format green bold +lang.ruby.tokens.backquoted_strings (`.*?[^\\]`|``) +lang.ruby.tokens.backquoted_strings.format red bold +lang.ruby.tokens.character_codes \W(\?\S) +lang.ruby.tokens.character_codes.format magenta bold +lang.ruby.tokens.long_comments.open ^=begin +lang.ruby.tokens.long_comments.close ^=end +lang.ruby.tokens.long_comments.format 8 bold +lang.ruby.tokens.sql_string.open (<<-EOSQL) +lang.ruby.tokens.sql_string.close (EOSQL) +lang.ruby.tokens.sql_string.format 1 +lang.ruby.tokens.sql_string.change_to sql +lang.ruby.indent.size 4 +lang.ruby.indent.auto true +lang.ruby.indent.roundup true +#lang.ruby.indent.using_tabs true +lang.ruby.indent.indenters \b(do|def|begin|ensure|when|case|else|for|while|elsif|if|class|module|rescue)\b|([{\[(]$|\{\s*\|[\w\s,]*\|\s*$) +lang.ruby.indent.unindenters \b(end|else|when|rescue)\b|(^\s+[\]})]) +lang.ruby.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(`.+?[^\\]`)|(\/.+?[^\\]\/)|(^\s*#.*)|\S\s+if +lang.ruby.indent.ignore ^\s*$ +lang.ruby.context.ignore ^=(begin|end)$ + +# PHP + +lang.php.filemask \.php\d?$ +lang.php.bangmask php +lang.php.format.default white bold +lang.php.format.selection inverse +lang.php.format.found yellow inverse +lang.php.tokens.doublequoted_strings (\".*?[^\\]\") +lang.php.tokens.doublequoted_strings.format green bold +lang.php.tokens.singlequoted_strings ('.*?[^\\]') +lang.php.tokens.singlequoted_strings.format green bold +lang.php.tokens.reserved_words \b(NULL|E_ALL|__wakeup|not|endwhile|__sleep|new|endswitch|__LINE__|list|endif|__FILE__|global|endforeach|while|include_once|endfor|virtual|include|enddeclare|xor|if|empty|var|elseif|TRUE|else|this|echo|stdClass|die|switch|do|static|default|return|function|declare|require_once|foreach|continue|require|for|class|print|FALSE|cfunction|PHP_VERSION|extends|case|exit|break|PHP_OS|eval|argc|parent|E_WARNING|as|or|E_ERROR|argv|old_function|E_PARSE|and)\b +lang.php.tokens.reserved_words.format white +lang.php.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b +lang.php.tokens.constants.format yellow bold +lang.php.tokens.comments (\/\/.*) +lang.php.tokens.comments.format 8 bold +lang.php.tokens.preprocessor (^\s*#.*) +lang.php.tokens.preprocessor.format yellow bold +lang.php.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.php.tokens.symbols.format white +lang.php.tokens.long_comments.open \/\* +lang.php.tokens.long_comments.close \*\/ +lang.php.tokens.long_comments.format 8 bold +lang.php.tokens.sql_string.open (<<;:~] +lang.perl.tokens.symbols.format white +lang.perl.tokens.regular_expressions (\/.+?[^\\]\/) +lang.perl.tokens.regular_expressions.format red bold +lang.perl.tokens.doublequoted_strings (\".*?[^\\]\") +lang.perl.tokens.doublequoted_strings.format green bold +lang.perl.tokens.singlequoted_strings ('.*?[^\\]') +lang.perl.tokens.singlequoted_strings.format green bold +lang.perl.tokens.backquoted_strings (`.*?[^\\]`) +lang.perl.tokens.backquoted_strings.format red bold +lang.perl.tokens.reserved_words \b(unless|until|else|for|while|foreach|if|return|do|next|elsif|last|redo|continue|sub|goto)\b +lang.perl.tokens.reserved_words.format white +lang.perl.tokens.builtins \b(abs|accept|alarm|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|connect|continue|cos|crypt|dbmclose|dbmopen|defined|delete|die|do|dump|each|endgrent|endhostent|endnetent|endprotoent|endpwent|endservent|eof|eval|exec|exists|exit|exp|fcntl|fileno|flock|fork|format|formline|getc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|goto|grep|hex|import|index|int|ioctl|join|keys|kill|last|lc|lcfirst|length|link|listen|local|localtime|lock|log|lstat|m|map|mkdir|msgctl|msgget|msgrcv|msgsnd|my|next|no|oct|open|opendir|ord|our|pack|package|pipe|pop|pos|print|printf|prototype|push|q|qq|qr|quotemeta|qw|qx|rand|read|readdir|readline|readlink|readpipe|recv|redo|ref|rename|require|reset|return|reverse|rewinddir|rindex|rmdir|s|scalar|seek|seekdir|select|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|study|sub|substr|symlink|syscall|sysopen|sysread|sysseek|system|syswrite|tell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unlink|unpack|unshift|untie|use|utime|values|vec|wait|waitpid|wantarray|warn|write|y)\b +lang.perl.tokens.builtins.format cyan bold +lang.perl.tokens.array_variables \s(@[A-Za-z_][A-Za-z_0-9]*)\b +lang.perl.tokens.array_variables.format red bold +lang.perl.tokens.hash_variables \s(%[A-Za-z_][A-Za-z_0-9]*)\b +lang.perl.tokens.hash_variables.format magenta bold +lang.perl.indent.size 4 +lang.perl.indent.auto true +lang.perl.indent.roundup true +#lang.perl.indent.using_tabs true +lang.perl.indent.indenters (case|[{\[(]$) +lang.perl.indent.unindenters (case|^\s+[\]})]) +#lang.perl.indent.indenters \b(unless|else|for|while|foreach|if|do|elsif|sub)\b +#lang.perl.indent.unindenters \b(else)\b +lang.perl.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(`.+?[^\\]`)|(\/.+?[^\\]\/)|(^\s*#.*) +lang.perl.indent.ignore ^\s*$ +lang.perl.context.ignore ^(.+:|\s*\{?)$ + +# Python + +lang.python.filemask \.py$ +lang.python.bangmask python +lang.python.format.default white bold +lang.python.format.selection inverse +lang.python.format.found yellow inverse +lang.python.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b +lang.python.tokens.constants.format yellow bold +lang.python.tokens.symbols [@!#$%^&*()\[\]{}/?=+\-\\|,<.>;:~] +lang.python.tokens.symbols.format white +lang.python.tokens.comments (#.*) +lang.python.tokens.comments.format 8 bold +lang.python.tokens.doublequoted_strings (\".*?[^\\]\") +lang.python.tokens.doublequoted_strings.format green bold +lang.python.tokens.singlequoted_strings ('.*?[^\\]') +lang.python.tokens.singlequoted_strings.format green bold +lang.python.tokens.backquoted_strings (`.*?[^\\]`) +lang.python.tokens.backquoted_strings.format red bold +lang.python.tokens.reserved_words \b(and|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|yield)\b +lang.python.tokens.reserved_words.format white +lang.python.indent.size 4 +lang.python.indent.auto true +lang.python.indent.roundup true +#lang.python.indent.using_tabs true +lang.python.indent.indenters \b(class|def|elif|else|except|finally|for|if|try|while)\b +#lang.python.indent.indenters : +lang.python.indent.unindenters \b(else|elif|except)\b +lang.python.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(`.+?[^\\]`)|(^\s*#.*) +lang.python.indent.ignore ^\s*$ + +# Java + +lang.java.filemask \.java$ +lang.java.format.default white bold +lang.java.format.selection inverse +lang.java.format.found yellow inverse +lang.java.tokens.doublequoted_strings (\".*?[^\\]\") +lang.java.tokens.doublequoted_strings.format green bold +lang.java.tokens.singlequoted_strings ('.*?[^\\]') +lang.java.tokens.singlequoted_strings.format green bold +lang.java.tokens.reserved_words \b(abstract|do|if|package|synchronized|boolean|double|implements|private|this|break|else|import|protected|throw|byte|extends|instanceof|public|throws|case|false|int|return|transient|catch|final|interface|short|true|char|finally|long|static|try|class|float|native|strictfp|void|const|for|new|super|volatile|continue|goto|null|switch|while|default|assert)\b +lang.java.tokens.reserved_words.format white +lang.java.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b +lang.java.tokens.constants.format yellow bold +lang.java.tokens.comments (\/\/.*) +lang.java.tokens.comments.format 8 bold +lang.java.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.java.tokens.symbols.format white +lang.java.tokens.long_comments.open \/\* +lang.java.tokens.long_comments.close \*\/ +lang.java.tokens.long_comments.format 8 bold +lang.java.indent.size 4 +lang.java.indent.auto true +lang.java.indent.roundup false +#lang.java.indent.using_tabs true +lang.java.indent.indenters (\{) +lang.java.indent.unindenters (\}) +lang.java.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) +lang.java.indent.ignore ^(.+:|\s*?)$ +lang.java.context.ignore ^(.+:|\s*\{?)$ + +# C + +lang.c.filemask \.(c(pp|xx)?|h)$ +lang.c.format.default white bold +lang.c.format.selection inverse +lang.c.format.found yellow inverse +lang.c.tokens.doublequoted_strings (\".*?[^\\]\") +lang.c.tokens.doublequoted_strings.format green bold +lang.c.tokens.singlequoted_strings ('.*?[^\\]') +lang.c.tokens.singlequoted_strings.format green bold +lang.c.tokens.reserved_words \b(if|double|break|else|byte|case|int|return|short|char|long|static|void|for|super|continue|goto|switch|while)\b +lang.c.tokens.reserved_words.format white +lang.c.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b +lang.c.tokens.constants.format yellow bold +lang.c.tokens.comments (\/\/.*) +lang.c.tokens.comments.format 8 bold +lang.c.tokens.preprocessor (^\s*#.*) +lang.c.tokens.preprocessor.format yellow bold +lang.c.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.c.tokens.symbols.format white +lang.c.tokens.long_comments.open \/\* +lang.c.tokens.long_comments.close \*\/ +lang.c.tokens.long_comments.format 8 bold +lang.c.indent.size 4 +lang.c.indent.auto true +lang.c.indent.roundup false +#lang.c.indent.using_tabs true +lang.c.indent.indenters (case|[{\[(]$) +lang.c.indent.unindenters (case|^\s+[\]})]) +lang.c.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) +lang.c.indent.ignore ^(.+:|\s*?)$ +lang.c.context.ignore ^(.+:|\s*\{?)$ + +# Configuration files + +lang.conf.filemask (?:\.conf(?:ig)?|\.cfg|\.cnf|user_prefs|XF86Config)$ +lang.conf.format.default white +lang.conf.format.selection inverse +lang.conf.format.found yellow inverse +lang.conf.tokens.commands ^\s*([^\s=]+) +lang.conf.tokens.commands.format cyan bold +lang.conf.tokens.comments (^\s*#.*) +lang.conf.tokens.comments.format yellow bold +lang.conf.tokens.doublequoted_strings (\".*?[^\\]\") +lang.conf.tokens.doublequoted_strings.format green bold +lang.conf.tokens.singlequoted_strings ('.*?[^\\]') +lang.conf.tokens.singlequoted_strings.format green bold +lang.conf.indent.size 4 +lang.conf.indent.auto true +lang.conf.indent.roundup true +#lang.conf.indent.using_tabs true + +# crontab + +lang.crontab.filemask (?:^|\/)crontab$ +lang.crontab.format.default white +lang.crontab.format.selection inverse +lang.crontab.format.found yellow inverse +lang.crontab.tokens.comments (^\s*#.*) +lang.crontab.tokens.comments.format yellow bold +lang.crontab.tokens.schedule ^((?:[0-9\/*,-]+\s+){5}) +lang.crontab.tokens.schedule.format cyan bold +lang.crontab.tokens.commands ^(\S+=.+) +lang.crontab.tokens.commands.format cyan +lang.crontab.indent.size 4 +lang.crontab.indent.auto true +lang.crontab.indent.roundup true +#lang.crontab.indent.using_tabs true + +lang.fstab.filemask ^fstab$ +lang.fstab.format.default white +lang.fstab.format.selection inverse +lang.fstab.format.found yellow inverse +lang.fstab.tokens.comments (^\s*#.*) +lang.fstab.tokens.comments.format yellow bold +lang.fstab.indent.size 4 +lang.fstab.indent.auto true +lang.fstab.indent.roundup true +#lang.fstab.indent.using_tabs true + +# SQL + +lang.sql.filemask \.sql$ +lang.sql.format.default white bold +lang.sql.format.selection inverse +lang.sql.format.found yellow inverse +lang.sql.indent.size 4 +lang.sql.indent.auto true +lang.sql.indent.roundup true +#lang.sql.indent.using_tabs true +lang.sql.tokens.reserved_words.case_insensitive \b(ABSOLUTE|ACCESS|ACTION|ADD|ADMIN|AFTER|ALIAS|ALL|ALLOCATE|AND|ANY|ARE|AS|ASC|ASSERTION|AT|AUDIT|AUTHORIZATION|AVG|BEFORE|BEGIN|BETWEEN|BIT_LENGTH|BOTH|BREADTH|BY|CASCADE|CASCADED|CASE|CAST|CATALOG|CHAR_LENGTH|CHARACTER_LENGTH|CHECK|CLASS|CLOSE|CLUSTER|COALESCE|COBOL|COLLATE|COLLATION|COLUMN|COMPLETION|COMPRESS|COMPUTED|CONCAT|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONSTRUCTOR|CONTINUE|CONVERT|CORRESPONDING|COUNT|CROSS|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURRENT|CURSOR|CYCLE|DATA|DAY|DBHIGH|DBKEY|DBLOW|DBMAC|DEALLOCATE|DECLARE|DECODE|DEFAULT|DEFERRABLE|DEFERRED|DEPTH|DEREF|DESC|DESCRIBE|DESCRIPTOR|DESTROY|DESTRUCTOR|DIAGNOSTICS|DICTIONARY|DISCONNECT|DISTINCT|DO|DOMAIN|EACH|ELEMENT|ELSE|ELSEIF|END-EXEC|END|EQUALS|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXISTS|EXTERNAL|EXTERNALLY|EXTRACT|FALSE|FILE|FIRST|FOR|FOREIGN|FORTRAN|FOUND|FROM|FULL|FUNCTION|GENERAL|GET|GLOBAL|GO|GOTO|GROUP|HAVING|HOUR|IDENTIFIED|IDENTITY|IF|IGNORE|IMMEDIATE|IN|INCREMENT|INDEX|INDICATOR|INITIAL|INITIALLY|INNER|INOUT|INPUT|INSENSITIVE|INSTEAD|INTERSECT|INTERVAL|INTO|IS|ISOLATION|JOIN|KEY|LABEL|LANGUAGE|LAST|LEADING|LEAVE|LEFT|LESS|LEVEL|LIKE|LIMIT|LOCAL|LOCK|LOOP|LOWER|MATCH|MAX|MAXEXTENTS|MIN|MINUS|MINUTE|MLSLABEL|MLS_LABEL_FORMAT|MODE|MODIFY|MODULE|MONTH|MOVE|MULTISET|NAMES|NATIONAL|NATURAL|NEW_TABLE|NEXT|NO|NOAUDIT|NOCOMPRESS|NONE|NOT|NOWAIT|NULL|NULLIF|NUMBER|NVL|OCTET_LENGTH|OF|OFF|OFFLINE|OID|OLD|OLD_TABLE|ON|ONLINE|ONLY|OPEN|OPERATION|OPERATORS|OPTION|OR|ORDER|OTHERS|OUT|OUTER|OUTPUT|OVERLAPS|PAD|PARAMETER|PARTIAL|PASCAL|PCTFREE|PENDANT|PLI|POSITION|PRECISION|PREORDER|PRESERVE|PRIMARY|PRIOR|PRIVATE|PRIVILEGES|PROCEDURE|PROTECTED|PUBLIC|RAW|READ|READUP|REAL|RECORD|RECURSIVE|REF|REFERENCES|REFERENCING|RELATIVE|RENAME|REPLACE|REPRESENTATION|RESIGNAL|RESOURCE|RESTRICT|RETURN|RETURNS|RIGHT|ROLE|ROUTINE|ROW|ROWID|ROWNUM|ROWS|SAVEPOINT|SCHEMA|SCROLL|SEARCH|SECOND|SECTION|SENSITIVE|SEQUENCE|SESSION|SESSION_USER|SET|SHARE|SIGNAL|SIMILAR|SIZE|SOME|SPACE|SPECIFIC|SQL|SQLCODE|SQLERROR|SQLEXCEPTION|SQLSTATE|SQLWARNING|START|STRUCTURE|SUBSTRING|SUCCESSFUL|SUM|SYNONYM|SYSDATE|SYSTEM_USER|TABLE|TEMPLATE|TEMPORARY|TEST|THAN|THEN|THERE|SQ92|TIMEZONE_HOUR|TIMEZONE_MINUTE|TO|TRAILING|TRANSACTION|TRANSLATE|TRANSLATION|TRIGGER|TRIM|TRUE|TUPLE|TYPE|UID|UNDER|UNION|UNIQUE|UNKNOWN|UPPER|USAGE|USER|USING|VALIDATE|VALUE|VALUES|VARIABLE|VARIANT|VIRTUAL|VARYING|VIEW|VISIBLE|VOID|WAIT|WHEN|WHENEVER|WHERE|WHILE|WITH|WITHOUT|WORK|WRITE|WRITEDOWN|WRITEUP|YEAR|ZONE)\b +lang.sql.tokens.reserved_words.format white +lang.sql.tokens.commands.case_insensitive \b(ALTER|COMMENT|COMMIT|CREATE|DELETE|DROP|EXEC|EXECUTE|FETCH|GRANT|INSERT|PERFORM|PREPARE|REVOKE|ROLLBACK|SELECT|UPDATE)\b +lang.sql.tokens.commands.format cyan +lang.sql.tokens.data_types.case_insensitive \b(BIT|BOOLEAN|CHAR|CHARACTER|DATE|DEC|DECIMAL|DOUBLE|FLOAT|INT|INTEGER|INTERVAL|LONG|NCHAR|NUMBER|NUMERIC|REAL|RECORD|ROW|SMALLINT|STRUCTURE|TIME|TIMESTAMP|TUPLE|VARCHAR|VARCHAR2)\b +lang.sql.tokens.data_types.format brown +lang.sql.tokens.comments (--.*) +lang.sql.tokens.comments.format 8 bold +lang.sql.tokens.singlequoted_strings ('.*?[^\\]') +lang.sql.tokens.singlequoted_strings.format green bold +lang.sql.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.sql.tokens.symbols.format white +lang.sql.tokens.typos (==) +lang.sql.tokens.typos.format 15 bold +lang.sql.indent.indenters ((?:\(|BEGIN|DECLARE|FROM|LOOP|ORDER BY|SELECT|SET|WHERE)$) +lang.sql.indent.unindenters (^\s+(?:\)|;|BEGIN|DECLARE|END)) +lang.sql.indent.preventers (\".+?[^\\]\")|('.+?[^\\]') +lang.sql.context.ignore ^(\W+)$ + +# Bash + +lang.bash.filemask (?:\.(?:ebuild|bash_profile|bashrc))$ +lang.bash.bangmask (?:ba)?sh\b +lang.bash.format.default white bold +lang.bash.format.selection inverse +lang.bash.format.found yellow inverse +lang.bash.indent.size 4 +lang.bash.indent.auto true +lang.bash.indent.roundup true +#lang.bash.indent.using_tabs true +lang.bash.tabsize 4 +lang.bash.tokens.comments (^\s*#.*) +lang.bash.tokens.comments.format 8 bold +lang.bash.tokens.singlequoted_strings ('.*?[^\\]') +lang.bash.tokens.singlequoted_strings.format green bold +lang.bash.tokens.doublequoted_strings (\".*?[^\\]\") +lang.bash.tokens.doublequoted_strings.format green bold +lang.bash.tokens.backquoted_strings (`.*?[^\\]`) +lang.bash.tokens.backquoted_strings.format red bold +lang.bash.indent.indenters (\{) +lang.bash.indent.unindenters (\}) +lang.bash.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) +lang.bash.indent.ignore ^(.+:|\s*?)$ + +# Tcl + +lang.tcl.filemask \.tcl$ +lang.tcl.bangmask tcl +lang.tcl.format.default white bold +lang.tcl.format.selection inverse +lang.tcl.format.found yellow inverse +lang.tcl.indent.size 4 +lang.tcl.indent.auto true +lang.tcl.indent.roundup true +#lang.tcl.indent.using_tabs true +lang.tcl.tabsize 4 +lang.tcl.tokens.comments (^\s*#.*) +lang.tcl.tokens.comments.format 8 bold +lang.tcl.tokens.reserved_words \b(encoding|incr|pid|tcl_endOfWord|Tcl|eof|info|tcl_findLibrary|after|error|interp|pkg_mkIndex|tcl_startOfNextWord|append|eval|join|proc|tcl_startOfPreviousWord|array|exec|lappend|puts|tcl_wordBreakAfter|auto_execok|exit|lassign|pwd|tcl_wordBreakBefore|auto_import|expr|lindex|re_syntax|tcltest|auto_load|fblocked|linsert|read|tclvars|auto_mkindex|fconfigure|list|regexp|tell|auto_mkindex_old|fcopy|llength|registry|time|auto_qualify|file|load|regsub|trace|auto_reset|fileevent|lrange|rename|unknown|bgerror|filename|lrepeat|resource|unload|binary|flush|lreplace|return|unset|break|for|lsearch|scan|update|catch|foreach|lset|seek|uplevel|cd|format|lsort|set|upvar|clock|gets|memory|socket|variable|close|glob|msgcat|source|vwait|concat|global|namespace|split|while|continue|history|open|string|dde|http|package|subst|dict|if|parray|switch)\b +lang.tcl.tokens.reserved_words.format white +lang.tcl.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.tcl.tokens.symbols.format white +lang.tcl.tokens.variables (\$[A-Za-z_][A-Za-z_0-9]*)\b +lang.tcl.tokens.variables.format yellow bold +lang.tcl.tokens.doublequoted_strings (\".*?[^\\]\") +lang.tcl.tokens.doublequoted_strings.format green bold +lang.tcl.indent.indenters (\{) +lang.tcl.indent.unindenters (\}) +lang.tcl.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) + +lang.diff.filemask (?:\.(?:diff|patch))$ +lang.diff.format.default white +lang.diff.format.selection inverse +lang.diff.format.found yellow inverse +lang.diff.indent.size 4 +lang.diff.indent.auto false +#lang.diff.indent.using_tabs true +lang.diff.tabsize 4 +lang.diff.tokens.oldfile (^--- .+$) +lang.diff.tokens.oldfile.format red bold +lang.diff.tokens.newfile (^\+\+\+ .+$) +lang.diff.tokens.newfile.format green bold +lang.diff.tokens.oldline (^-.+$) +lang.diff.tokens.oldline.format red bold +lang.diff.tokens.newline (^\+.+$) +lang.diff.tokens.newline.format green bold +lang.diff.tokens.location (^@@.+$) +lang.diff.tokens.location.format green +lang.diff.tokens.filediff (^Only in .+$) +lang.diff.tokens.filediff.format magenta bold +lang.diff.tokens.diff_command (^diff .+$) +lang.diff.tokens.diff_command.format 13 bold + +lang.yaml.filemask (?:\.ya?ml)$ +lang.yaml.bangmask ^--- +lang.yaml.format.default white bold +lang.yaml.format.selection inverse +lang.yaml.format.found yellow inverse +lang.yaml.indent.size 4 +lang.yaml.indent.auto false +lang.yaml.indent.roundup false +lang.yaml.tabsize 8 +lang.yaml.tokens.value_indicator (:)(?: |$) +lang.yaml.tokens.value_indicator.format white +lang.yaml.tokens.key_indicator (\? ) +lang.yaml.tokens.key_indicator.format white +lang.yaml.tokens.nested_series (?:^|[^-])(- ) +lang.yaml.tokens.nested_series.format magenta bold +lang.yaml.tokens.series_separator (,) +lang.yaml.tokens.series_separator.format white +lang.yaml.tokens.inline_series ([\[\]]) +lang.yaml.tokens.inline_series.format white +lang.yaml.tokens.inline_keyed ([{}]) +lang.yaml.tokens.inline_keyed.format white +lang.yaml.tokens.doublequoted_strings (\".*?[^\\]\"|\"\") +lang.yaml.tokens.doublequoted_strings.format green bold +lang.yaml.tokens.singlequoted_strings ('.*?[^\\]'|'') +lang.yaml.tokens.singlequoted_strings.format green bold +lang.yaml.tokens.block_scalar (\|[0-9+-]*)$ +lang.yaml.tokens.block_scalar.format blue bold +lang.yaml.tokens.folded_scalar (>[0-9+-]*)$ +lang.yaml.tokens.folded_scalar.format blue bold +lang.yaml.tokens.document_header ^(---.*)$ +lang.yaml.tokens.document_header.format 10 bold +lang.yaml.tokens.document_terminator ^(\.\.\.) +lang.yaml.tokens.document_terminator.format 10 +lang.yaml.tokens.directive_indicator ^(%.*) +lang.yaml.tokens.directive_indicator.format 10 +lang.yaml.tokens.comment_indicator (#.+) +lang.yaml.tokens.comment_indicator.format 8 bold +lang.yaml.tokens.anchor_indicator (&\w+) +lang.yaml.tokens.anchor_indicator.format red bold +lang.yaml.tokens.alias_indicator (\*\w+) +lang.yaml.tokens.alias_indicator.format yellow +lang.yaml.tokens.tag (!\w*) +lang.yaml.tokens.tag.format yellow bold +lang.yaml.tokens.null (~|null) +lang.yaml.tokens.null.format red +lang.yaml.indent.size 4 +lang.yaml.indent.auto true +lang.yaml.indent.roundup true +lang.yaml.indent.indenters :$ +lang.yaml.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(`.+?[^\\]`)|(^\s*#.*) +lang.yaml.indent.ignore ^\s*$ + +#% SiSU +lang.sisu.filemask \.(?:sst|ssm|ssi|[_-]sst)$ +lang.sisu.format.default white +lang.sisu.tokens.comment ^%+\s+.* +lang.sisu.tokens.comment.format 8 +#langsisu.tokens.comments.format 8 bold +lang.sisu.tokens.header ^(@\S+?:|0~\S+)\s+.* +lang.sisu.tokens.header.format cyan +lang.sisu.tokens.heading ^:?[A-C1-9]~(?:\S+)?\s+.* +lang.sisu.tokens.heading.format yellow bold +#lang.sisu.tokens.heading.format white inverse +lang.sisu.tokens.headings.case_insensitive ^(?:Chapter|Part|Section|Book|Article|Preamble|Appendix)\s.* +lang.sisu.tokens.headings.format white bold +lang.sisu.tokens.bullet ^_[1-9]?\*\s+ +lang.sisu.tokens.bullet.format yellow +lang.sisu.tokens.indent ^_[1-9]\s+ +lang.sisu.tokens.indent.format yellow +lang.sisu.tokens.link \{.+?\}(?:https?://\S+|\.\./\S+|image) +lang.sisu.tokens.link.format cyan +lang.sisu.tokens.url http://\S+ +lang.sisu.tokens.url.format blue bold +lang.sisu.tokens.line_bold ^!_\s+.* +lang.sisu.tokens.line_bold.format white bold +lang.sisu.tokens.font_bold (([!*])\{.+?\}\2) +lang.sisu.tokens.font_bold.format white bold +lang.sisu.tokens.font_modify (([/_^,+-])\{.+?\}\2) +lang.sisu.tokens.font_modify.format brown +lang.sisu.tokens.page_break <:(?:pb|np)> +lang.sisu.tokens.page_break.format white bold inverse +lang.sisu.tokens.br <:?br> +lang.sisu.tokens.br.format white bold inverse +lang.sisu.tokens.endnote_mark ~\^(?:\s|$) +lang.sisu.tokens.endnote_mark.format green +lang.sisu.tokens.endnote_content ^\^~\s.+ +lang.sisu.tokens.endnote_content.format green +#lang.sisu.tokens.endnote.open ~\{ +#lang.sisu.tokens.endnote.close \}~ +lang.sisu.tokens.endnotes ~\{.+?\}~ +lang.sisu.tokens.endnotes.format green +lang.sisu.tokens.group.open ^group\{ +lang.sisu.tokens.group.close ^\}group +lang.sisu.tokens.group.format green +lang.sisu.tokens.poem.open ^poem\{ +lang.sisu.tokens.poem.close ^\}poem +lang.sisu.tokens.poem.format green +lang.sisu.tokens.code.open ^code\{ +lang.sisu.tokens.code.close ^\}code +lang.sisu.tokens.code.format green +lang.sisu.tokens.error \s+$|<\S{2}\S+?>|[a-zA-Z0-9,.::?!&><]+http://\S+|http://\S+< +#lang.sisu.tokens.error \s+$|<\S+?>|[a-zA-Z0-9,.::?!&><]+http://\S+|http://\S+< +lang.sisu.tokens.error.format magenta reverse + +# Custom configuration files can be included. +# If a setting is specified again, it overrides the previous setting given +# higher up in the configuration file(s). + +include ~/.diakonos/cucumber.conf diff --git a/data/sisu/conf/editor-syntax-etc/gedit/sisu.lang b/data/sisu/conf/editor-syntax-etc/gedit/sisu.lang new file mode 100644 index 00000000..b11766cb --- /dev/null +++ b/data/sisu/conf/editor-syntax-etc/gedit/sisu.lang @@ -0,0 +1,124 @@ + + + + + + + ^0~\S|^\@\S+:\s + \n\n + + + + ^(:[A-C]|[1-6])~[ a-Z0-9,.;:!?"'\/()-]+ + + + + ^(!_|_[1-9]|_[1-9]?\*)\s + + + + ~\{ + \}~ + + + + [*]\{ + \}[*] + + + + !\{ + \}! + + + + /\{ + \}/ + + + + _\{ + \}_ + + + + \^{ + \}\^ + + + + ,{ + \}, + + + + [+]\{ + \}[+] + + + + [-]\{ + \}[-] + + + + [*]\S+[*] + + + + \{[^}]+\}(https?:\/\/\S+|image)\s + + + + \s\*~\S+ + + + + \bhttps?:\/\/\S+ + + + + ^%+\s. + + + + ^code\{\s*$ + ^\}code\s*$ + + + + ^poem\{\s*$ + ^\}poem\s*$ + + + + ^group\{\s*$ + ^\}group\s*$ + + + + ^alt\{\s*$ + ^\}alt\s*$ + + + + <:(pb|np)> + + + + <:?br> + + + + ~\^(\s|$) + + + + ^\^~\s.+ + + + diff --git a/data/sisu/conf/editor-syntax-etc/kate/sisu.xml b/data/sisu/conf/editor-syntax-etc/kate/sisu.xml new file mode 100644 index 00000000..61135285 --- /dev/null +++ b/data/sisu/conf/editor-syntax-etc/kate/sisu.xml @@ -0,0 +1,176 @@ + + + + + + class + const + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/sisu/conf/editor-syntax-etc/nano/nanorc b/data/sisu/conf/editor-syntax-etc/nano/nanorc new file mode 100644 index 00000000..213a0c26 --- /dev/null +++ b/data/sisu/conf/editor-syntax-etc/nano/nanorc @@ -0,0 +1,220 @@ +## Sample initialization file for GNU nano +## Please note that you must have configured nano with --enable-nanorc +## for this file to be read! Also note that characters specially +## interpreted by the shell should not be escaped here. +## +## To make sure a value is not enabled, use "unset
\|\|
\|
" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(https\?://\|\.\.\/\)\S\+" + "metaverse specific + syn match sisu_ocn contains=@NoSpell "<\~\d\+;\w\d\+;\w\d\+>" + syn match sisu_marktail "<\~#>" + syn match sisu_markpara contains=@NoSpell "<:i[1-9]>" + syn match sisu_link " \*\~\S\+" + syn match sisu_action "^<:insert\d\+>" + syn match sisu_contain "<:e>" +endif +"% 9 URLs Numbers: and ASCII Codes +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" +"% 8 Tuned Error - is error if not already matched +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "]" +"% 7 Simple Enclosed Markup: +" Simple Markup: +"% url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" +"% header +syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^0\~\(\S\+\|[^-]\)" end="$" +syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^0\~\(tags\?\|date\)\s\+"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^@\S\+:[+-]\?\s"rs=e-1 end="$" +syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^@\(tags\?\|date\):\s\+"rs=e-1 end="\n$" +"% headings +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$" +"% grouped text +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n\n" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\(alt\|group\|poem\){" end="^}\(alt\|group\|poem\)" +syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code" +"% endnotes +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n\n" +"% links and images +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|\.\./\)\S\+" oneline +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline +"% some line operations +syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$" +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" +syn region sisu_comment matchgroup=sisu_comment start="^%\{1,2\} " end="$" +"% font face curly brackets +syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" +syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="" end="" oneline +"% single words bold italicise etc. "workon +syn region sisu_control contains=sisu_error matchgroup=sisu_control start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"% misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline +"% metaverse html (flagged as errors for filetype sisu) +syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\n" oneline +syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\n" oneline +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\n" oneline +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\n" oneline +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\\\\\|\\'" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_html start="" end="" oneline +"% metaverse <:> +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:Table.\{-}>" end="<:Table[-_]end>" +syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="<:code>" end="<:code[-_]end>" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:alt>" end="<:alt[-_]end>" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:poem>" end="<:poem[-_]end>" +"% 6 Expensive Mode +" Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? +"% 5 Headers: and Headings (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" +"% 4 Errors? +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace " \s*$" +syn match sisu_error contains=sisu_error,sisu_error_wspace "[^ (}]https\?:\S\+" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error "https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n\n" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n\n" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^[0-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[0-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^()]\{-}\n\n" +"% 3 Error Exceptions? +syn match sisu_control "\n\n" "contains=ALL +syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "
https\?:\S\+\|https\?:\S\+
" +syn match sisu_error "[><]https\?:\S\+\|https\?:\S\+[><]" +"% 2 Definitions - Define the default highlighting. +if version >= 508 || !exists("did_sisu_syntax_inits") + if version < 508 + let did_sisu_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif +"% 1 Defined + HiLink sisu_normal Normal + HiLink sisu_header PreProc + HiLink sisu_header_content Statement + HiLink sisu_heading Title + HiLink sisu_structure Operator + HiLink sisu_contain Include + HiLink sisu_mark_endnote Include + HiLink sisu_link NonText + HiLink sisu_linked String + HiLink sisu_fontface Include + HiLink sisu_strikeout DiffDelete + HiLink sisu_content_alt Special + HiLink sisu_content_endnote Special + HiLink sisu_control Define + HiLink sisu_ocn Include + HiLink sisu_number Number + HiLink sisu_identifier Function + HiLink sisu_underline Underlined + HiLink sisu_markpara Include + HiLink sisu_marktail Include + HiLink sisu_mark Identifier + HiLink sisu_break Structure + HiLink sisu_html Type + HiLink sisu_action Identifier + HiLink sisu_comment Comment + HiLink sisu_error_wspace Error + HiLink sisu_error Error + delcommand HiLink +endif +let b:current_syntax = "sisu" diff --git a/data/sisu/conf/syntax/README b/data/sisu/conf/syntax/README deleted file mode 100644 index 9fde1d1e..00000000 --- a/data/sisu/conf/syntax/README +++ /dev/null @@ -1,92 +0,0 @@ -This directory - sisu-examples/sisu-examples/config/syntax_hi/ - /usr/share/sisu-examples/sisu-examples/config/syntax_hi -contains rudimentary sisu syntax highlighting files for: - -* (g)vim - * package: sisu-vim - * status: largely done - * comments: not found here - a vim syntax highlighting and folds component of sisu exists, - see sisu-vim - -* gedit -* gobby - file: sisu.lang - place in: - /usr/share/gtksourceview-1.0/language-specs - or - ~/.gnome2/gtksourceview-1.0/language-specs - * status: very basic syntax highlighting - * comments: this editor features display line wrap and is used by Goby! - -* nano - file: nanorc - save as: - ~/.nanorc - includes: - * status: basic syntax highlighting - * comments: assumes dark background - no display line-wrap - does line breaks - -* diakonos (an editor written in ruby) - file: diakonos.conf - save as: - ~/.diakonos/diakonos.conf - includes: - * status: basic syntax highlighting - * comments: assumes dark background - no display line-wrap - -* kate & kwrite http://kate.kde.org - file: sisu.xml - place in: - /usr/share/apps/katepart/syntax - or - ~/.kde/share/apps/katepart/syntax - [settings::configure kate::{highlighting,filetypes}] - [tools::highlighting::{markup,scripts}::SiSU] - -* nedit - file: sisu_nedit.pats - nedit -import sisu_nedit.pats - * status: a very clumsy first attempt - [not really done] - * comments: this editor features display line wrap - -* emacs - files: sisu-mode.el - to file ~/.emacs add the following 2 lines: - (add-to-list 'load-path "/usr/share/sisu-examples/config/syntax_hi") - (require 'sisu-mode.el) - [not done / not yet included] - -* vim & gvim - files: sisu-vim - package is the most comprehensive sisu syntax highlighting and editor - environment provided to date (is for vim/ gvim, and is separate from the - contents of this directory) - on debian: - aptitude install sisu-vim - * status: this includes: - syntax highlighting - vim folds - some error checking - * comments: this editor features display line wrap - -NOTE: - -[SiSU parses files with long lines or line breaks, -but, display linewrap (without line-breaks) is a -convenient editor feature to have for sisu markup] - -kde-config --prefix -KDEDIR/share/apps/katepart/syntax/ -KDEHOME/share/apps/katepart/syntax -[In the configure dialog in kate, go to the "Editor->highlighting" page and ->select a highlight to change the mimetype/pattern associations for it.] -/etc/mime.types -/usr/share/mime/text -# -# * aeditor (an editor written in ruby) diff --git a/data/sisu/conf/syntax/diakonos.conf b/data/sisu/conf/syntax/diakonos.conf deleted file mode 100644 index c7fa686b..00000000 --- a/data/sisu/conf/syntax/diakonos.conf +++ /dev/null @@ -1,977 +0,0 @@ -logfile ~/.diakonos/diakonos.log - -# When the cursor is view.margin.y lines or less from the top or -# bottom line, repeatedly scroll the screen view.jump.y lines until -# the cursor is more than view.margin.y lines from the top and -# bottom line. -# Similarly for view.margin.x and view.jump.x, with respect to the -# left-most and right-most screen columns. -view.margin.x 10 -view.margin.y 5 -view.jump.x 10 -view.jump.y 5 -view.scroll_amount 3 -view.lookback 200 -view.nonfilelines.visible false -view.nonfilelines.character ~ - -# bol_behaviour: This specifies where the cursor should go when the -# beginning-of-line key (the default is the Home key) is pressed. -# zero: Always move to the left-most column of the line -# first-char: Always move to the left-most non-whitespace character -# alternating-zero: As with 'zero', unless the cursor is -# already there, in which case, as with 'first-char'. -# alternating-first-char: As with 'first-char', unless the cursor is -# already there, in which case, as with 'zero'. -# bol_behavior is a synonym for bol_behaviour. -bol_behaviour alternating-first-char - -# Ensures saved files end with a newline character by adding it if necessary. -eof_newline false - -# Specifies whether the cursor should be at the end (false) of found text, or the -# beginning (true). -found_cursor_start false - -max_clips 30 - -# The maximum number of undo lines held in memory per file -# Smaller files will be able to have more undo levels. -max_undo_lines 100000 - -convert_tabs false - -diff_command diff -U 5 - -# Whether or not to use /usr/bin/file to determine whether files are readable -# before opening them. -use_magic_file false - -# --------------------------------------------------------------------- -# Status Line - -# Use "% syntax" as placeholders -# e.g. %d for decimal integers, %s for strings -status.left -- %s %s%s%s -- (%s) - -status.right - Buf %d of %d --- L%3d/%3d C%2d -- -# The string to use to fill in the space between the left and right sides -# of the status line. -status.filler - -status.modified_str (modified) -status.selecting_str (selecting) -status.unnamed_str (unnamed file) -status.read_only_str (read-only) -# status.vars: any subset of: -# line row num_lines col filename modified type buffer_number num_buffers selecting read_only -status.vars filename modified read_only selecting type buffer_number num_buffers row num_lines col -status.format inverse - -# --------------------------------------------------------------------- -# Context Line - -# The context line shows the wrapping context of the cursor, with respect to -# indentation. This shows the current code block(s) that the cursor is in. - -context.visible false -context.combined false -context.max_levels 4 -context.format inverse -context.separator | -context.separator.format red inverse -#context.max_segment_width 10 - -# --------------------------------------------------------------------- -# Interaction Line - -# Duration of "alert" blink (in seconds) when user has made an invalid choice -interaction.blink_duration 0.05 -interaction.blink_string *********************************************************** -# Time to wait (in seconds) before accepting user keystrokes when prompting for -# a choice which has no default -interaction.choice_delay 3 - -# --------------------------------------------------------------------- -# Key Configuration -# key [...]; [[,...]] -# If no function is specified, it unmaps any previous mapping. -# i.e. key [...]; -# can be "keycode##" to specify specific keycodes. -# e.g. key keycode8;delete -# Note the lack of space after the word keycode. - -# To obtain the string to use for any keychain, use the printKeychain command -# (default alt+k). - -# The shell, execute and pasteShellResult commands can take variables: - -# $f current buffer's filepath -# $F all current buffer filepaths, space-separated -# $i get a string from user input -# $c temp file containing current clipboard text -# $s temp file containing currently selected text - -key left;cursorLeft -key esc [ D;cursorLeft -key right;cursorRight -key esc [ C;cursorRight -key up;cursorUp -key esc [ A;cursorUp -key down;cursorDown -key esc [ B;cursorDown -key home;cursorBOL -key esc O H;cursorBOL -key esc [ H;cursorBOL -key esc [ 1 ~ cursorBOL -key end;cursorEOL -key esc O F;cursorEOL -key esc [ F;cursorEOL -key esc [ 4 ~;cursorEOL -key pageup;pageUp -key pagedown;pageDown -key ctrl+a;cursorBOL -key ctrl+e;cursorEOL -key alt+<;cursorBOF -key alt+>;cursorEOF -key alt+,;cursorTOV -key alt+.;cursorBOV -key ctrl+j;cursorReturn -key ctrl+l;cursorReturn "forward" -key alt+n;scrollDown -key alt+p;scrollUp -key esc up;scrollUp -key esc [ 1 ; 3 A scrollUp -key esc [ 1 ; 5 A scrollUp -key keycode520 scrollUp -key esc down;scrollDown -key esc [ 1 ; 3 B scrollDown -key esc [ 1 ; 5 B scrollDown -key keycode513 scrollDown -key esc right;seek /(?:^|\W)(\w)|\w(\W|$)/ -key esc [ 1 ; 3 C seek /\w(\W|$)|(?:^|\W)(\w)/ -key esc [ 1 ; 5 C seek /\w(\W|$)|(?:^|\W)(\w)/ -key keycode517 seek /\w(\W|$)|(?:^|\W)(\w)/ -key esc left;seek /\w(\W|$)|(?:^|\W)(\w)/, "up" -key esc [ 1 ; 3 D seek /\w(\W|$)|(?:^|\W)(\w)/, "up" -key esc [ 1 ; 5 D seek /\w(\W|$)|(?:^|\W)(\w)/, "up" -key keycode515 seek /\w(\W|$)|(?:^|\W)(\w)/, "up" - -key ctrl+g;goToLineAsk -key alt+b alt+b;toggleBookmark -key alt+b alt+n;goToNextBookmark -key alt+b alt+p;goToPreviousBookmark -key alt+b alt+a;addNamedBookmark -key alt+b alt+r;removeNamedBookmark -key alt+b alt+g;goToNamedBookmark -key alt+b alt+!;addNamedBookmark 1 -key alt+b alt+@;addNamedBookmark 2 -key alt+b alt+#;addNamedBookmark 3 -key alt+b alt+$;addNamedBookmark 4 -key alt+b alt+%;addNamedBookmark 5 -key alt+b alt+1;goToNamedBookmark 1 -key alt+b alt+2;goToNamedBookmark 2 -key alt+b alt+3;goToNamedBookmark 3 -key alt+b alt+4;goToNamedBookmark 4 -key alt+b alt+5;goToNamedBookmark 5 -key alt+t;goToTag -key alt+);goToTagUnderCursor -key alt+(;popTag - -key backspace;backspace -key ctrl+h;backspace -key del;delete -#key ctrl+k;deleteLine -key ctrl+k;deleteAndStoreLine -key ctrl+alt+k;deleteToEOL -key esc del;collapseWhitespace -key esc [ 3 ; 3 ~ collapseWhitespace -key enter;carriageReturn -key tab;parsedIndent -#key tab;indent -#key ctrl+alt+l;unindent -key alt+i;indent -key esc i;indent -key esc I;unindent -key keycode353 unindent -#key tab;insertSpaces 4 -#key tab;insertTab -key ctrl+t;insertTab - -key f1 help -key esc O P help -key esc [ 1 1 ~ help -key esc [ [ A help -key f11;loadConfiguration -key esc [ 2 3 ~;loadConfiguration -key f12;openFile "~/.diakonos/diakonos.conf" -key esc [ 2 4 ~;openFile "~/.diakonos/diakonos.conf" - -key ctrl+alt+r;redraw -key esc C;toggleSessionSetting 'context.visible', DO_REDRAW -key ctrl+alt+d;toggleSessionSetting 'display' - -key ctrl+n;newFile -key ctrl+o;openFileAsk -key ctrl+s;saveFile -key alt+s;saveFileAs -key ctrl+w;closeFile -key ctrl+alt+o;revert -key alt+!;setReadOnly -key ctrl+q;quit -key esc T;setBufferType - -key alt+1;switchToBufferNumber 1 -key alt+2;switchToBufferNumber 2 -key alt+3;switchToBufferNumber 3 -key alt+4;switchToBufferNumber 4 -key alt+5;switchToBufferNumber 5 -key alt+6;switchToBufferNumber 6 -key alt+7;switchToBufferNumber 7 -key alt+8;switchToBufferNumber 8 -key alt+9;switchToBufferNumber 9 -key alt+0;switchToBufferNumber 10 -key alt+-;switchToPreviousBuffer -key alt+=;switchToNextBuffer - -key ctrl+space;anchorSelection -#key ctrl+space;toggleSelection -key ctrl+c;copySelection -key ctrl+x;cutSelection -key alt+u;removeSelection -key ctrl+alt+v;showClips -key ctrl+v;paste -key ctrl+y;unundo -key ctrl+z;undo -#key ctrl+z;suspend -key suspend;undo -#key suspend;suspend - -key ctrl+f;find -#key ctrl+f;find "down", CASE_SENSITIVE -key alt+f;find "down", CASE_SENSITIVE -#key alt+f;findExact -key ctrl+alt+f;find "up" -#key ctrl+alt+f;find "up", CASE_SENSITIVE -key f3;findAgain "down" -key esc [ [ C findAgain "down" -key esc O R;findAgain "down" -key esc [ 1 3 ~;findAgain "down" -key f15;findAgain "up" -key esc [ 2 8 ~ findAgain "up" -key esc O 2 R;findAgain "up" -key ctrl+r;searchAndReplace -key ctrl+alt+u;clearMatches - -key f2 shell -key esc O Q shell -key esc [ 1 2 ~ shell -key esc [ [ B shell -key f8;execute -key esc F;execute "glark '$i' $F | less" -key esc d shell "diff -U 5 -w -b $c $s" -#key esc F;shell "grep -n '$i' $F" -#key esc F;execute "grep -n '$i' $F | less" -key f14 evaluate -key esc O 2 Q evaluate -esc [ 2 6 ~ evaluate -key ctrl+alt+c;shell "ruby -c $f" -key ctrl+alt+d;shell "php -l $f" - -# To use the following: -# 1) Copy to the clipboard some Ruby code which operates on stdin text and outputs to stdout. -# 2) Select (highlight) some text to operate on. -# 3) Activate this pasteShellResult command. -# 4) The selected text should now be replaced with the script's results. -key ctrl+alt+p;pasteShellResult "cat $s | ruby $c" -#key ctrl+alt+p;pasteShellResult "cat $s | perl $c" -#key ctrl+alt+p;pasteShellResult "cat $s | python $c" -#key ctrl+alt+p;pasteShellResult "cat $s | sed -f $c" -#key ctrl+alt+p;pasteShellResult "cat $s | awk -f $c" - -key alt+k printKeychain -key alt+m;toggleMacroRecording -key f4 playMacro -key esc O S playMacro -key esc [ 1 4 ~ playMacro -key esc [ [ D playMacro -key f5 loadScript -key esc [ 1 5 ~ loadScript -key esc [ [ E loadScript -key f6;repeatLast -key esc [ 1 7 ~;repeatLast -key f7;operateOnEachLine -key f19;operateOnString -key esc f7;operateOnLines - -# Emacs-like keychains - -#key ctrl+s;find -#key ctrl+x ctrl+c;quit -#key ctrl+x ctrl+f;openFileAsk -#key ctrl+x ctrl+s;saveFile - -# --------------------------------------------------------------------- -# Colour Definitions -# -# colour -# -# For a list of colour names, see the list of format codes in the -# Language Definitions section, below. -# This colour command is only used when you want to set a different background -# colour than the terminal default. -# -# color is a synonym for colour. -colour 8 white blue -colour 9 white red -colour 10 white magenta -colour 11 yellow blue -colour 12 white green -colour 13 white brown -colour 14 black cyan -colour 15 yellow red - -# --------------------------------------------------------------------- -# Language Definitions -# For syntax highlighting and indentation. - -# lang..tokens.[.case_insensitive] -# lang..tokens..format -# can be any subset of: -# normal black red green brown blue magenta cyan white standout underline inverse blink dim bold -# The numbers of colour pairs (as defined by the configuration command "colour") -# can also be used as format codes. -# -# indent.roundup: If a line's indentation is not evenly divisible by the -# indent.size, and indent.roundup is true, then the non-integer indentation -# level will be rounded up. If indent.roundup is false, then it will be -# rounded down. -# e.g. given an indent.size of 4, and a line with 6 spaces, indent.roundup -# true will make Diakonos consider the line indented 2 levels. With -# indent.roundup false, it will be considered indented 1 level. -# -# The filemask can also be used to specify specific filenames which -# don't conform to the standard extensions for a language. - -# Text (default) - -lang.text.format.default white -lang.text.format.selection inverse -lang.text.format.found yellow inverse -lang.text.indent.size 2 -lang.text.indent.auto true -lang.text.indent.roundup false -#lang.text.indent.using_tabs true -lang.text.tabsize 8 - -lang.xml.filemask \.(xml|rdl|aiml|xhtml)$ -lang.xml.format.default white -lang.xml.format.selection inverse -lang.xml.format.found yellow inverse -lang.xml.tabsize 8 -lang.xml.indent.size 4 -lang.xml.indent.auto true -lang.xml.indent.roundup true -#lang.xml.indent.using_tabs true -lang.xml.tokens.entities &\S+?; -lang.xml.tokens.entities.format magenta bold -lang.xml.tokens.code.open (<)(?:[^%]|$) -lang.xml.tokens.code.close (?:[^%]|^)(>) -lang.xml.tokens.code.format white bold -lang.xml.tokens.code.change_to xml_tag -lang.xml.tokens.comments.open () -lang.xml.tokens.comments.format 8 -lang.xml.tokens.comments.change_to xml_comment -lang.xml.tokens.template.open \[@-- -lang.xml.tokens.template.close --@\] -lang.xml.tokens.template.format brown -lang.xml.tokens.template.change_to perl -lang.xml_tag.format.default white bold -lang.xml_tag.format.selection inverse -lang.xml_tag.format.found yellow inverse -lang.xml_tag.tabsize 8 -lang.xml_tag.indent.size 4 -lang.xml_tag.indent.auto true -lang.xml_tag.indent.roundup true -#lang.xml_tag.indent.using_tabs true -lang.xml_tag.tokens.doublequoted_strings (\".*?[^\\]\") -lang.xml_tag.tokens.doublequoted_strings.format green bold -lang.xml_tag.tokens.singlequoted_strings ('.*?[^\\]') -lang.xml_tag.tokens.singlequoted_strings.format green bold -lang.xml_tag.tokens.symbols ([@!#$%^&*()\[\]{}/?=+\-\\|,<.>;:]) -lang.xml_tag.tokens.symbols.format white -lang.xml_comment.format.default 8 -lang.xml_comment.format.selection inverse -lang.xml_comment.format.found yellow inverse -lang.xml_comment.tabsize 8 -lang.xml_comment.indent.size 4 -lang.xml_comment.indent.auto true -lang.xml_comment.indent.roundup true -#lang.xml_comment.indent.using_tabs true - -lang.html.filemask \.(r?html?|php|asp)$ -lang.html.format.default white -lang.html.format.selection inverse -lang.html.format.found yellow inverse -lang.html.tabsize 8 -lang.html.indent.size 4 -lang.html.indent.auto true -lang.html.indent.roundup true -#lang.html.indent.using_tabs true -lang.html.tokens.code.open (<)(?:[^%]|$) -lang.html.tokens.code.close (?:[^%]|^)(>) -lang.html.tokens.code.format white bold -lang.html.tokens.code.change_to html_tag -lang.html.tokens.entities &\S+?; -lang.html.tokens.entities.format magenta bold -lang.html.tokens.eruby.open <% -lang.html.tokens.eruby.close %> -lang.html.tokens.eruby.format 9 bold -lang.html.tokens.eruby.change_to ruby -lang.html.tokens.php.open <\?(?:php)? -lang.html.tokens.php.close \?> -lang.html.tokens.php.format 10 bold -lang.html.tokens.php.change_to php -lang.html.tokens.comments.open () -lang.html.tokens.comments.format 8 -lang.html.tokens.comments.change_to html_comment -lang.html_tag.format.default white bold -lang.html_tag.format.selection inverse -lang.html_tag.format.found yellow inverse -lang.html_tag.tabsize 8 -lang.html_tag.indent.size 4 -lang.html_tag.indent.auto true -lang.html_tag.indent.roundup true -#lang.html_tag.indent.using_tabs true -lang.html_tag.tokens.attribute (href) -lang.html_tag.tokens.attribute.format green bold -lang.html_tag.tokens.elements.case_insensitive \b(A|ABBR|ACRONYM|ADDRES|APPLET|AREA|B|BASE|BASEFONT|BDO|BIG|BLOCKQUOTE|BODY|BR|BUTTON|CAPTION|CENTER|CITE|CODE|COL|COLGROUP|DD|DEL|DFN|DIR|DIV|DL|DT|EM|FIELDSET|FONT|FORM|FRAME|FRAMESET|H1|H2|H3|H4|H5|H6|HEAD|HR|HTML|I|IFRAME|IMG|INPUT|INS|ISINDEX|KBD|LABEL|LEGEND|LI|LINK|MAP|MENU|META|NOFRAMES|NOSCRIPT|OBJECT|OL|OPTGROUP|OPTION|P|PARAM|PRE|Q|S|SAMP|SCRIPT|SELECT|SMALL|SPAN|STRIKE|STRONG|STYLE|SUB|SUP|TABLE|TBODY|TD|TEXTAREA|TFOOT|TH|THEAD|TITLE|TR|TT|U|UL|VA)\b -lang.html_tag.tokens.elements.format cyan -lang.html_tag.tokens.attributes.case_insensitive \b(abbr|accept-charset|accept|accesskey|action|align|alink|alt|archive|axis|background|bgcolor|border|cellpadding|cellspacing|char|charoff|charset|checked|cite|class|classid|clear|code|codebase|codetype|color|cols|colspan|compact|content|coords|data|datetime|declare|defer|dir|disabled|enctype|face|for|frame|frameborder|headers|height|href|href|hreflang|hspace|http-equiv|id|ismap|label|lang|language|link|longdesc|marginheight|marginwidth|maxlength|media|method|multiple|name|nohref|noresize|noshade|nowrap|object|onblur|onchange|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onselect|onsubmit|onunload|profile|prompt|readonly|rel|rev|rows|rowspan|rules|scheme|scope|scrolling|selected|shape|size|span|src|standby|start|style|summary|tabindex|target|text|title|type|usemap|valign|value|valuetype|version|vlink|vspace|width)\b -lang.html_tag.tokens.attributes.format white -lang.html_tag.tokens.doublequoted_strings (\".*?[^\\]\") -lang.html_tag.tokens.doublequoted_strings.format green bold -lang.html_tag.tokens.singlequoted_strings ('.*?[^\\]') -lang.html_tag.tokens.singlequoted_strings.format green bold -lang.html_tag.tokens.symbols ([@!#$%^&*()\[\]{}/?=+\-\\|,<.>;:]) -lang.html_tag.tokens.symbols.format white -lang.html_comment.format.default 8 -lang.html_comment.format.selection inverse -lang.html_comment.format.found yellow inverse -lang.html_comment.tabsize 8 -lang.html_comment.indent.size 4 -lang.html_comment.indent.auto true -lang.html_comment.indent.roundup true -#lang.html_comment.indent.using_tabs true - -# CSS - -lang.css.filemask \.css$ -lang.css.format.default white -lang.css.format.selection inverse -lang.css.format.found yellow inverse -lang.css.tabsize 8 -lang.css.indent.size 4 -lang.css.indent.auto true -lang.css.indent.roundup true -#lang.css.indent.using_tabs true -lang.css.indent.indenters (\{) -lang.css.indent.unindenters (\}) -lang.css.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) -lang.css.tokens.properties \b(azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-collapse|border-color|border-spacing|border-style|border-top|border-bottom|border-right|border-left|border-top-color|border-top-style|border-top-width|border-width|border|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-right|margin-top|margin-left|margin-bottom|margin|max-height|max-width|min-height|min-width|orphans|outline-color|outline-style|outline-width|outline|overflow|padding-top|padding-left|padding-right|padding-bottom|padding|page-break-after|page-break-before|page-break-inside|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|table-layout|text-align|text-decoration|text-indent|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index): -lang.css.tokens.properties.format white bold -lang.css.tokens.colours #[A-Fa-f0-9]{6}|\b(?:aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\b -lang.css.tokens.colours.format yellow bold -lang.css.tokens.long_comments.open \/\* -lang.css.tokens.long_comments.close \*\/ -lang.css.tokens.long_comments.format 8 bold -lang.css.tokens.numbers \b([0-9]+\.[0-9]+|[0-9]+) -lang.css.tokens.numbers.format blue bold -lang.css.tokens.units [^A-Za-z](em|pt|px)\b -lang.css.tokens.units.format cyan -lang.css.tokens.html_elements.case_insensitive \b(A|ABBR|ACRONYM|ADDRES|APPLET|AREA|B|BASE|BASEFONT|BDO|BIG|BLOCKQUOTE|BODY|BR|BUTTON|CAPTION|CENTER|CITE|CODE|COL|COLGROUP|DD|DEL|DFN|DIR|DIV|DL|DT|FIELDSET|FORM|FRAME|FRAMESET|H1|H2|H3|H4|H5|H6|HEAD|HR|HTML|I|IFRAME|IMG|INPUT|INS|ISINDEX|KBD|LABEL|LEGEND|LI|LINK|MAP|MENU|META|NOFRAMES|NOSCRIPT|OBJECT|OL|OPTGROUP|OPTION|P|PARAM|PRE|Q|S|SAMP|SCRIPT|SELECT|SMALL|SPAN|STRIKE|STRONG|STYLE|SUB|SUP|TABLE|TBODY|TD|TEXTAREA|TFOOT|TH|THEAD|TITLE|TR|TT|U|UL|VA)\b -lang.css.tokens.html_elements.format green -lang.css.tokens.values \b(auto|block|inherit|inline|larger|none|smaller|solid)\b -lang.css.tokens.values.format blue bold - -# Ruby - -lang.ruby.filemask (?:[Rr]akefile)|(?:\.(?:rb|gem(?:spec)?)$) -lang.ruby.bangmask ruby -lang.ruby.format.default white bold -lang.ruby.format.selection inverse -lang.ruby.format.found yellow inverse -lang.ruby.tokens.reserved_words \b(__FILE__|and|def|end|in|or|self|unless|__LINE__|begin|defined\?|ensure|module|redo|super|until|BEGIN|break|do|false|next|rescue|then|when|END|case|else|for|nil|retry|true|while|alias|class|elsif|if|not|return|undef|yield)\b -lang.ruby.tokens.reserved_words.format white -lang.ruby.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b -lang.ruby.tokens.constants.format yellow bold -lang.ruby.tokens.symbols [@!#$%^&*()\[\]{}/?=+\-\\|,<.>;:~] -lang.ruby.tokens.symbols.format white -lang.ruby.tokens.class_variables (@[A-Za-z_][A-Za-z_0-9]*) -lang.ruby.tokens.class_variables.format white bold -lang.ruby.tokens.comments (#.*) -lang.ruby.tokens.comments.format 8 bold -lang.ruby.tokens.regular_expressions (\/.+?[^\\]\/) -lang.ruby.tokens.regular_expressions.format red bold -lang.ruby.tokens.doublequoted_strings (\".*?[^\\]\"|\"\") -lang.ruby.tokens.doublequoted_strings.format green bold -lang.ruby.tokens.singlequoted_strings ('.*?[^\\]'|'') -lang.ruby.tokens.singlequoted_strings.format green bold -lang.ruby.tokens.backquoted_strings (`.*?[^\\]`|``) -lang.ruby.tokens.backquoted_strings.format red bold -lang.ruby.tokens.character_codes \W(\?\S) -lang.ruby.tokens.character_codes.format magenta bold -lang.ruby.tokens.long_comments.open ^=begin -lang.ruby.tokens.long_comments.close ^=end -lang.ruby.tokens.long_comments.format 8 bold -lang.ruby.tokens.sql_string.open (<<-EOSQL) -lang.ruby.tokens.sql_string.close (EOSQL) -lang.ruby.tokens.sql_string.format 1 -lang.ruby.tokens.sql_string.change_to sql -lang.ruby.indent.size 4 -lang.ruby.indent.auto true -lang.ruby.indent.roundup true -#lang.ruby.indent.using_tabs true -lang.ruby.indent.indenters \b(do|def|begin|ensure|when|case|else|for|while|elsif|if|class|module|rescue)\b|([{\[(]$|\{\s*\|[\w\s,]*\|\s*$) -lang.ruby.indent.unindenters \b(end|else|when|rescue)\b|(^\s+[\]})]) -lang.ruby.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(`.+?[^\\]`)|(\/.+?[^\\]\/)|(^\s*#.*)|\S\s+if -lang.ruby.indent.ignore ^\s*$ -lang.ruby.context.ignore ^=(begin|end)$ - -# PHP - -lang.php.filemask \.php\d?$ -lang.php.bangmask php -lang.php.format.default white bold -lang.php.format.selection inverse -lang.php.format.found yellow inverse -lang.php.tokens.doublequoted_strings (\".*?[^\\]\") -lang.php.tokens.doublequoted_strings.format green bold -lang.php.tokens.singlequoted_strings ('.*?[^\\]') -lang.php.tokens.singlequoted_strings.format green bold -lang.php.tokens.reserved_words \b(NULL|E_ALL|__wakeup|not|endwhile|__sleep|new|endswitch|__LINE__|list|endif|__FILE__|global|endforeach|while|include_once|endfor|virtual|include|enddeclare|xor|if|empty|var|elseif|TRUE|else|this|echo|stdClass|die|switch|do|static|default|return|function|declare|require_once|foreach|continue|require|for|class|print|FALSE|cfunction|PHP_VERSION|extends|case|exit|break|PHP_OS|eval|argc|parent|E_WARNING|as|or|E_ERROR|argv|old_function|E_PARSE|and)\b -lang.php.tokens.reserved_words.format white -lang.php.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b -lang.php.tokens.constants.format yellow bold -lang.php.tokens.comments (\/\/.*) -lang.php.tokens.comments.format 8 bold -lang.php.tokens.preprocessor (^\s*#.*) -lang.php.tokens.preprocessor.format yellow bold -lang.php.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) -lang.php.tokens.symbols.format white -lang.php.tokens.long_comments.open \/\* -lang.php.tokens.long_comments.close \*\/ -lang.php.tokens.long_comments.format 8 bold -lang.php.tokens.sql_string.open (<<;:~] -lang.perl.tokens.symbols.format white -lang.perl.tokens.regular_expressions (\/.+?[^\\]\/) -lang.perl.tokens.regular_expressions.format red bold -lang.perl.tokens.doublequoted_strings (\".*?[^\\]\") -lang.perl.tokens.doublequoted_strings.format green bold -lang.perl.tokens.singlequoted_strings ('.*?[^\\]') -lang.perl.tokens.singlequoted_strings.format green bold -lang.perl.tokens.backquoted_strings (`.*?[^\\]`) -lang.perl.tokens.backquoted_strings.format red bold -lang.perl.tokens.reserved_words \b(unless|until|else|for|while|foreach|if|return|do|next|elsif|last|redo|continue|sub|goto)\b -lang.perl.tokens.reserved_words.format white -lang.perl.tokens.builtins \b(abs|accept|alarm|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|connect|continue|cos|crypt|dbmclose|dbmopen|defined|delete|die|do|dump|each|endgrent|endhostent|endnetent|endprotoent|endpwent|endservent|eof|eval|exec|exists|exit|exp|fcntl|fileno|flock|fork|format|formline|getc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|goto|grep|hex|import|index|int|ioctl|join|keys|kill|last|lc|lcfirst|length|link|listen|local|localtime|lock|log|lstat|m|map|mkdir|msgctl|msgget|msgrcv|msgsnd|my|next|no|oct|open|opendir|ord|our|pack|package|pipe|pop|pos|print|printf|prototype|push|q|qq|qr|quotemeta|qw|qx|rand|read|readdir|readline|readlink|readpipe|recv|redo|ref|rename|require|reset|return|reverse|rewinddir|rindex|rmdir|s|scalar|seek|seekdir|select|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|study|sub|substr|symlink|syscall|sysopen|sysread|sysseek|system|syswrite|tell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unlink|unpack|unshift|untie|use|utime|values|vec|wait|waitpid|wantarray|warn|write|y)\b -lang.perl.tokens.builtins.format cyan bold -lang.perl.tokens.array_variables \s(@[A-Za-z_][A-Za-z_0-9]*)\b -lang.perl.tokens.array_variables.format red bold -lang.perl.tokens.hash_variables \s(%[A-Za-z_][A-Za-z_0-9]*)\b -lang.perl.tokens.hash_variables.format magenta bold -lang.perl.indent.size 4 -lang.perl.indent.auto true -lang.perl.indent.roundup true -#lang.perl.indent.using_tabs true -lang.perl.indent.indenters (case|[{\[(]$) -lang.perl.indent.unindenters (case|^\s+[\]})]) -#lang.perl.indent.indenters \b(unless|else|for|while|foreach|if|do|elsif|sub)\b -#lang.perl.indent.unindenters \b(else)\b -lang.perl.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(`.+?[^\\]`)|(\/.+?[^\\]\/)|(^\s*#.*) -lang.perl.indent.ignore ^\s*$ -lang.perl.context.ignore ^(.+:|\s*\{?)$ - -# Python - -lang.python.filemask \.py$ -lang.python.bangmask python -lang.python.format.default white bold -lang.python.format.selection inverse -lang.python.format.found yellow inverse -lang.python.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b -lang.python.tokens.constants.format yellow bold -lang.python.tokens.symbols [@!#$%^&*()\[\]{}/?=+\-\\|,<.>;:~] -lang.python.tokens.symbols.format white -lang.python.tokens.comments (#.*) -lang.python.tokens.comments.format 8 bold -lang.python.tokens.doublequoted_strings (\".*?[^\\]\") -lang.python.tokens.doublequoted_strings.format green bold -lang.python.tokens.singlequoted_strings ('.*?[^\\]') -lang.python.tokens.singlequoted_strings.format green bold -lang.python.tokens.backquoted_strings (`.*?[^\\]`) -lang.python.tokens.backquoted_strings.format red bold -lang.python.tokens.reserved_words \b(and|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|yield)\b -lang.python.tokens.reserved_words.format white -lang.python.indent.size 4 -lang.python.indent.auto true -lang.python.indent.roundup true -#lang.python.indent.using_tabs true -lang.python.indent.indenters \b(class|def|elif|else|except|finally|for|if|try|while)\b -#lang.python.indent.indenters : -lang.python.indent.unindenters \b(else|elif|except)\b -lang.python.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(`.+?[^\\]`)|(^\s*#.*) -lang.python.indent.ignore ^\s*$ - -# Java - -lang.java.filemask \.java$ -lang.java.format.default white bold -lang.java.format.selection inverse -lang.java.format.found yellow inverse -lang.java.tokens.doublequoted_strings (\".*?[^\\]\") -lang.java.tokens.doublequoted_strings.format green bold -lang.java.tokens.singlequoted_strings ('.*?[^\\]') -lang.java.tokens.singlequoted_strings.format green bold -lang.java.tokens.reserved_words \b(abstract|do|if|package|synchronized|boolean|double|implements|private|this|break|else|import|protected|throw|byte|extends|instanceof|public|throws|case|false|int|return|transient|catch|final|interface|short|true|char|finally|long|static|try|class|float|native|strictfp|void|const|for|new|super|volatile|continue|goto|null|switch|while|default|assert)\b -lang.java.tokens.reserved_words.format white -lang.java.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b -lang.java.tokens.constants.format yellow bold -lang.java.tokens.comments (\/\/.*) -lang.java.tokens.comments.format 8 bold -lang.java.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) -lang.java.tokens.symbols.format white -lang.java.tokens.long_comments.open \/\* -lang.java.tokens.long_comments.close \*\/ -lang.java.tokens.long_comments.format 8 bold -lang.java.indent.size 4 -lang.java.indent.auto true -lang.java.indent.roundup false -#lang.java.indent.using_tabs true -lang.java.indent.indenters (\{) -lang.java.indent.unindenters (\}) -lang.java.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) -lang.java.indent.ignore ^(.+:|\s*?)$ -lang.java.context.ignore ^(.+:|\s*\{?)$ - -# C - -lang.c.filemask \.(c(pp|xx)?|h)$ -lang.c.format.default white bold -lang.c.format.selection inverse -lang.c.format.found yellow inverse -lang.c.tokens.doublequoted_strings (\".*?[^\\]\") -lang.c.tokens.doublequoted_strings.format green bold -lang.c.tokens.singlequoted_strings ('.*?[^\\]') -lang.c.tokens.singlequoted_strings.format green bold -lang.c.tokens.reserved_words \b(if|double|break|else|byte|case|int|return|short|char|long|static|void|for|super|continue|goto|switch|while)\b -lang.c.tokens.reserved_words.format white -lang.c.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b -lang.c.tokens.constants.format yellow bold -lang.c.tokens.comments (\/\/.*) -lang.c.tokens.comments.format 8 bold -lang.c.tokens.preprocessor (^\s*#.*) -lang.c.tokens.preprocessor.format yellow bold -lang.c.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) -lang.c.tokens.symbols.format white -lang.c.tokens.long_comments.open \/\* -lang.c.tokens.long_comments.close \*\/ -lang.c.tokens.long_comments.format 8 bold -lang.c.indent.size 4 -lang.c.indent.auto true -lang.c.indent.roundup false -#lang.c.indent.using_tabs true -lang.c.indent.indenters (case|[{\[(]$) -lang.c.indent.unindenters (case|^\s+[\]})]) -lang.c.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) -lang.c.indent.ignore ^(.+:|\s*?)$ -lang.c.context.ignore ^(.+:|\s*\{?)$ - -# Configuration files - -lang.conf.filemask (?:\.conf(?:ig)?|\.cfg|\.cnf|user_prefs|XF86Config)$ -lang.conf.format.default white -lang.conf.format.selection inverse -lang.conf.format.found yellow inverse -lang.conf.tokens.commands ^\s*([^\s=]+) -lang.conf.tokens.commands.format cyan bold -lang.conf.tokens.comments (^\s*#.*) -lang.conf.tokens.comments.format yellow bold -lang.conf.tokens.doublequoted_strings (\".*?[^\\]\") -lang.conf.tokens.doublequoted_strings.format green bold -lang.conf.tokens.singlequoted_strings ('.*?[^\\]') -lang.conf.tokens.singlequoted_strings.format green bold -lang.conf.indent.size 4 -lang.conf.indent.auto true -lang.conf.indent.roundup true -#lang.conf.indent.using_tabs true - -# crontab - -lang.crontab.filemask (?:^|\/)crontab$ -lang.crontab.format.default white -lang.crontab.format.selection inverse -lang.crontab.format.found yellow inverse -lang.crontab.tokens.comments (^\s*#.*) -lang.crontab.tokens.comments.format yellow bold -lang.crontab.tokens.schedule ^((?:[0-9\/*,-]+\s+){5}) -lang.crontab.tokens.schedule.format cyan bold -lang.crontab.tokens.commands ^(\S+=.+) -lang.crontab.tokens.commands.format cyan -lang.crontab.indent.size 4 -lang.crontab.indent.auto true -lang.crontab.indent.roundup true -#lang.crontab.indent.using_tabs true - -lang.fstab.filemask ^fstab$ -lang.fstab.format.default white -lang.fstab.format.selection inverse -lang.fstab.format.found yellow inverse -lang.fstab.tokens.comments (^\s*#.*) -lang.fstab.tokens.comments.format yellow bold -lang.fstab.indent.size 4 -lang.fstab.indent.auto true -lang.fstab.indent.roundup true -#lang.fstab.indent.using_tabs true - -# SQL - -lang.sql.filemask \.sql$ -lang.sql.format.default white bold -lang.sql.format.selection inverse -lang.sql.format.found yellow inverse -lang.sql.indent.size 4 -lang.sql.indent.auto true -lang.sql.indent.roundup true -#lang.sql.indent.using_tabs true -lang.sql.tokens.reserved_words.case_insensitive \b(ABSOLUTE|ACCESS|ACTION|ADD|ADMIN|AFTER|ALIAS|ALL|ALLOCATE|AND|ANY|ARE|AS|ASC|ASSERTION|AT|AUDIT|AUTHORIZATION|AVG|BEFORE|BEGIN|BETWEEN|BIT_LENGTH|BOTH|BREADTH|BY|CASCADE|CASCADED|CASE|CAST|CATALOG|CHAR_LENGTH|CHARACTER_LENGTH|CHECK|CLASS|CLOSE|CLUSTER|COALESCE|COBOL|COLLATE|COLLATION|COLUMN|COMPLETION|COMPRESS|COMPUTED|CONCAT|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONSTRUCTOR|CONTINUE|CONVERT|CORRESPONDING|COUNT|CROSS|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURRENT|CURSOR|CYCLE|DATA|DAY|DBHIGH|DBKEY|DBLOW|DBMAC|DEALLOCATE|DECLARE|DECODE|DEFAULT|DEFERRABLE|DEFERRED|DEPTH|DEREF|DESC|DESCRIBE|DESCRIPTOR|DESTROY|DESTRUCTOR|DIAGNOSTICS|DICTIONARY|DISCONNECT|DISTINCT|DO|DOMAIN|EACH|ELEMENT|ELSE|ELSEIF|END-EXEC|END|EQUALS|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXISTS|EXTERNAL|EXTERNALLY|EXTRACT|FALSE|FILE|FIRST|FOR|FOREIGN|FORTRAN|FOUND|FROM|FULL|FUNCTION|GENERAL|GET|GLOBAL|GO|GOTO|GROUP|HAVING|HOUR|IDENTIFIED|IDENTITY|IF|IGNORE|IMMEDIATE|IN|INCREMENT|INDEX|INDICATOR|INITIAL|INITIALLY|INNER|INOUT|INPUT|INSENSITIVE|INSTEAD|INTERSECT|INTERVAL|INTO|IS|ISOLATION|JOIN|KEY|LABEL|LANGUAGE|LAST|LEADING|LEAVE|LEFT|LESS|LEVEL|LIKE|LIMIT|LOCAL|LOCK|LOOP|LOWER|MATCH|MAX|MAXEXTENTS|MIN|MINUS|MINUTE|MLSLABEL|MLS_LABEL_FORMAT|MODE|MODIFY|MODULE|MONTH|MOVE|MULTISET|NAMES|NATIONAL|NATURAL|NEW_TABLE|NEXT|NO|NOAUDIT|NOCOMPRESS|NONE|NOT|NOWAIT|NULL|NULLIF|NUMBER|NVL|OCTET_LENGTH|OF|OFF|OFFLINE|OID|OLD|OLD_TABLE|ON|ONLINE|ONLY|OPEN|OPERATION|OPERATORS|OPTION|OR|ORDER|OTHERS|OUT|OUTER|OUTPUT|OVERLAPS|PAD|PARAMETER|PARTIAL|PASCAL|PCTFREE|PENDANT|PLI|POSITION|PRECISION|PREORDER|PRESERVE|PRIMARY|PRIOR|PRIVATE|PRIVILEGES|PROCEDURE|PROTECTED|PUBLIC|RAW|READ|READUP|REAL|RECORD|RECURSIVE|REF|REFERENCES|REFERENCING|RELATIVE|RENAME|REPLACE|REPRESENTATION|RESIGNAL|RESOURCE|RESTRICT|RETURN|RETURNS|RIGHT|ROLE|ROUTINE|ROW|ROWID|ROWNUM|ROWS|SAVEPOINT|SCHEMA|SCROLL|SEARCH|SECOND|SECTION|SENSITIVE|SEQUENCE|SESSION|SESSION_USER|SET|SHARE|SIGNAL|SIMILAR|SIZE|SOME|SPACE|SPECIFIC|SQL|SQLCODE|SQLERROR|SQLEXCEPTION|SQLSTATE|SQLWARNING|START|STRUCTURE|SUBSTRING|SUCCESSFUL|SUM|SYNONYM|SYSDATE|SYSTEM_USER|TABLE|TEMPLATE|TEMPORARY|TEST|THAN|THEN|THERE|SQ92|TIMEZONE_HOUR|TIMEZONE_MINUTE|TO|TRAILING|TRANSACTION|TRANSLATE|TRANSLATION|TRIGGER|TRIM|TRUE|TUPLE|TYPE|UID|UNDER|UNION|UNIQUE|UNKNOWN|UPPER|USAGE|USER|USING|VALIDATE|VALUE|VALUES|VARIABLE|VARIANT|VIRTUAL|VARYING|VIEW|VISIBLE|VOID|WAIT|WHEN|WHENEVER|WHERE|WHILE|WITH|WITHOUT|WORK|WRITE|WRITEDOWN|WRITEUP|YEAR|ZONE)\b -lang.sql.tokens.reserved_words.format white -lang.sql.tokens.commands.case_insensitive \b(ALTER|COMMENT|COMMIT|CREATE|DELETE|DROP|EXEC|EXECUTE|FETCH|GRANT|INSERT|PERFORM|PREPARE|REVOKE|ROLLBACK|SELECT|UPDATE)\b -lang.sql.tokens.commands.format cyan -lang.sql.tokens.data_types.case_insensitive \b(BIT|BOOLEAN|CHAR|CHARACTER|DATE|DEC|DECIMAL|DOUBLE|FLOAT|INT|INTEGER|INTERVAL|LONG|NCHAR|NUMBER|NUMERIC|REAL|RECORD|ROW|SMALLINT|STRUCTURE|TIME|TIMESTAMP|TUPLE|VARCHAR|VARCHAR2)\b -lang.sql.tokens.data_types.format brown -lang.sql.tokens.comments (--.*) -lang.sql.tokens.comments.format 8 bold -lang.sql.tokens.singlequoted_strings ('.*?[^\\]') -lang.sql.tokens.singlequoted_strings.format green bold -lang.sql.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) -lang.sql.tokens.symbols.format white -lang.sql.tokens.typos (==) -lang.sql.tokens.typos.format 15 bold -lang.sql.indent.indenters ((?:\(|BEGIN|DECLARE|FROM|LOOP|ORDER BY|SELECT|SET|WHERE)$) -lang.sql.indent.unindenters (^\s+(?:\)|;|BEGIN|DECLARE|END)) -lang.sql.indent.preventers (\".+?[^\\]\")|('.+?[^\\]') -lang.sql.context.ignore ^(\W+)$ - -# Bash - -lang.bash.filemask (?:\.(?:ebuild|bash_profile|bashrc))$ -lang.bash.bangmask (?:ba)?sh\b -lang.bash.format.default white bold -lang.bash.format.selection inverse -lang.bash.format.found yellow inverse -lang.bash.indent.size 4 -lang.bash.indent.auto true -lang.bash.indent.roundup true -#lang.bash.indent.using_tabs true -lang.bash.tabsize 4 -lang.bash.tokens.comments (^\s*#.*) -lang.bash.tokens.comments.format 8 bold -lang.bash.tokens.singlequoted_strings ('.*?[^\\]') -lang.bash.tokens.singlequoted_strings.format green bold -lang.bash.tokens.doublequoted_strings (\".*?[^\\]\") -lang.bash.tokens.doublequoted_strings.format green bold -lang.bash.tokens.backquoted_strings (`.*?[^\\]`) -lang.bash.tokens.backquoted_strings.format red bold -lang.bash.indent.indenters (\{) -lang.bash.indent.unindenters (\}) -lang.bash.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) -lang.bash.indent.ignore ^(.+:|\s*?)$ - -# Tcl - -lang.tcl.filemask \.tcl$ -lang.tcl.bangmask tcl -lang.tcl.format.default white bold -lang.tcl.format.selection inverse -lang.tcl.format.found yellow inverse -lang.tcl.indent.size 4 -lang.tcl.indent.auto true -lang.tcl.indent.roundup true -#lang.tcl.indent.using_tabs true -lang.tcl.tabsize 4 -lang.tcl.tokens.comments (^\s*#.*) -lang.tcl.tokens.comments.format 8 bold -lang.tcl.tokens.reserved_words \b(encoding|incr|pid|tcl_endOfWord|Tcl|eof|info|tcl_findLibrary|after|error|interp|pkg_mkIndex|tcl_startOfNextWord|append|eval|join|proc|tcl_startOfPreviousWord|array|exec|lappend|puts|tcl_wordBreakAfter|auto_execok|exit|lassign|pwd|tcl_wordBreakBefore|auto_import|expr|lindex|re_syntax|tcltest|auto_load|fblocked|linsert|read|tclvars|auto_mkindex|fconfigure|list|regexp|tell|auto_mkindex_old|fcopy|llength|registry|time|auto_qualify|file|load|regsub|trace|auto_reset|fileevent|lrange|rename|unknown|bgerror|filename|lrepeat|resource|unload|binary|flush|lreplace|return|unset|break|for|lsearch|scan|update|catch|foreach|lset|seek|uplevel|cd|format|lsort|set|upvar|clock|gets|memory|socket|variable|close|glob|msgcat|source|vwait|concat|global|namespace|split|while|continue|history|open|string|dde|http|package|subst|dict|if|parray|switch)\b -lang.tcl.tokens.reserved_words.format white -lang.tcl.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) -lang.tcl.tokens.symbols.format white -lang.tcl.tokens.variables (\$[A-Za-z_][A-Za-z_0-9]*)\b -lang.tcl.tokens.variables.format yellow bold -lang.tcl.tokens.doublequoted_strings (\".*?[^\\]\") -lang.tcl.tokens.doublequoted_strings.format green bold -lang.tcl.indent.indenters (\{) -lang.tcl.indent.unindenters (\}) -lang.tcl.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) - -lang.diff.filemask (?:\.(?:diff|patch))$ -lang.diff.format.default white -lang.diff.format.selection inverse -lang.diff.format.found yellow inverse -lang.diff.indent.size 4 -lang.diff.indent.auto false -#lang.diff.indent.using_tabs true -lang.diff.tabsize 4 -lang.diff.tokens.oldfile (^--- .+$) -lang.diff.tokens.oldfile.format red bold -lang.diff.tokens.newfile (^\+\+\+ .+$) -lang.diff.tokens.newfile.format green bold -lang.diff.tokens.oldline (^-.+$) -lang.diff.tokens.oldline.format red bold -lang.diff.tokens.newline (^\+.+$) -lang.diff.tokens.newline.format green bold -lang.diff.tokens.location (^@@.+$) -lang.diff.tokens.location.format green -lang.diff.tokens.filediff (^Only in .+$) -lang.diff.tokens.filediff.format magenta bold -lang.diff.tokens.diff_command (^diff .+$) -lang.diff.tokens.diff_command.format 13 bold - -lang.yaml.filemask (?:\.ya?ml)$ -lang.yaml.bangmask ^--- -lang.yaml.format.default white bold -lang.yaml.format.selection inverse -lang.yaml.format.found yellow inverse -lang.yaml.indent.size 4 -lang.yaml.indent.auto false -lang.yaml.indent.roundup false -lang.yaml.tabsize 8 -lang.yaml.tokens.value_indicator (:)(?: |$) -lang.yaml.tokens.value_indicator.format white -lang.yaml.tokens.key_indicator (\? ) -lang.yaml.tokens.key_indicator.format white -lang.yaml.tokens.nested_series (?:^|[^-])(- ) -lang.yaml.tokens.nested_series.format magenta bold -lang.yaml.tokens.series_separator (,) -lang.yaml.tokens.series_separator.format white -lang.yaml.tokens.inline_series ([\[\]]) -lang.yaml.tokens.inline_series.format white -lang.yaml.tokens.inline_keyed ([{}]) -lang.yaml.tokens.inline_keyed.format white -lang.yaml.tokens.doublequoted_strings (\".*?[^\\]\"|\"\") -lang.yaml.tokens.doublequoted_strings.format green bold -lang.yaml.tokens.singlequoted_strings ('.*?[^\\]'|'') -lang.yaml.tokens.singlequoted_strings.format green bold -lang.yaml.tokens.block_scalar (\|[0-9+-]*)$ -lang.yaml.tokens.block_scalar.format blue bold -lang.yaml.tokens.folded_scalar (>[0-9+-]*)$ -lang.yaml.tokens.folded_scalar.format blue bold -lang.yaml.tokens.document_header ^(---.*)$ -lang.yaml.tokens.document_header.format 10 bold -lang.yaml.tokens.document_terminator ^(\.\.\.) -lang.yaml.tokens.document_terminator.format 10 -lang.yaml.tokens.directive_indicator ^(%.*) -lang.yaml.tokens.directive_indicator.format 10 -lang.yaml.tokens.comment_indicator (#.+) -lang.yaml.tokens.comment_indicator.format 8 bold -lang.yaml.tokens.anchor_indicator (&\w+) -lang.yaml.tokens.anchor_indicator.format red bold -lang.yaml.tokens.alias_indicator (\*\w+) -lang.yaml.tokens.alias_indicator.format yellow -lang.yaml.tokens.tag (!\w*) -lang.yaml.tokens.tag.format yellow bold -lang.yaml.tokens.null (~|null) -lang.yaml.tokens.null.format red -lang.yaml.indent.size 4 -lang.yaml.indent.auto true -lang.yaml.indent.roundup true -lang.yaml.indent.indenters :$ -lang.yaml.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(`.+?[^\\]`)|(^\s*#.*) -lang.yaml.indent.ignore ^\s*$ - -#% SiSU -lang.sisu.filemask \.(?:sst|ssm|ssi|[_-]sst)$ -lang.sisu.format.default white -lang.sisu.tokens.comment ^%+\s+.* -lang.sisu.tokens.comment.format 8 -#langsisu.tokens.comments.format 8 bold -lang.sisu.tokens.header ^(@\S+?:|0~\S+)\s+.* -lang.sisu.tokens.header.format cyan -lang.sisu.tokens.heading ^:?[A-C1-9]~(?:\S+)?\s+.* -lang.sisu.tokens.heading.format yellow bold -#lang.sisu.tokens.heading.format white inverse -lang.sisu.tokens.headings.case_insensitive ^(?:Chapter|Part|Section|Book|Article|Preamble|Appendix)\s.* -lang.sisu.tokens.headings.format white bold -lang.sisu.tokens.bullet ^_[1-9]?\*\s+ -lang.sisu.tokens.bullet.format yellow -lang.sisu.tokens.indent ^_[1-9]\s+ -lang.sisu.tokens.indent.format yellow -lang.sisu.tokens.link \{.+?\}(?:https?://\S+|\.\./\S+|image) -lang.sisu.tokens.link.format cyan -lang.sisu.tokens.url http://\S+ -lang.sisu.tokens.url.format blue bold -lang.sisu.tokens.line_bold ^!_\s+.* -lang.sisu.tokens.line_bold.format white bold -lang.sisu.tokens.font_bold (([!*])\{.+?\}\2) -lang.sisu.tokens.font_bold.format white bold -lang.sisu.tokens.font_modify (([/_^,+-])\{.+?\}\2) -lang.sisu.tokens.font_modify.format brown -lang.sisu.tokens.page_break <:(?:pb|np)> -lang.sisu.tokens.page_break.format white bold inverse -lang.sisu.tokens.br <:?br> -lang.sisu.tokens.br.format white bold inverse -lang.sisu.tokens.endnote_mark ~\^(?:\s|$) -lang.sisu.tokens.endnote_mark.format green -lang.sisu.tokens.endnote_content ^\^~\s.+ -lang.sisu.tokens.endnote_content.format green -#lang.sisu.tokens.endnote.open ~\{ -#lang.sisu.tokens.endnote.close \}~ -lang.sisu.tokens.endnotes ~\{.+?\}~ -lang.sisu.tokens.endnotes.format green -lang.sisu.tokens.group.open ^group\{ -lang.sisu.tokens.group.close ^\}group -lang.sisu.tokens.group.format green -lang.sisu.tokens.poem.open ^poem\{ -lang.sisu.tokens.poem.close ^\}poem -lang.sisu.tokens.poem.format green -lang.sisu.tokens.code.open ^code\{ -lang.sisu.tokens.code.close ^\}code -lang.sisu.tokens.code.format green -lang.sisu.tokens.error \s+$|<\S{2}\S+?>|[a-zA-Z0-9,.::?!&><]+http://\S+|http://\S+< -#lang.sisu.tokens.error \s+$|<\S+?>|[a-zA-Z0-9,.::?!&><]+http://\S+|http://\S+< -lang.sisu.tokens.error.format magenta reverse - -# Custom configuration files can be included. -# If a setting is specified again, it overrides the previous setting given -# higher up in the configuration file(s). - -include ~/.diakonos/cucumber.conf diff --git a/data/sisu/conf/syntax/nanorc b/data/sisu/conf/syntax/nanorc deleted file mode 100644 index 213a0c26..00000000 --- a/data/sisu/conf/syntax/nanorc +++ /dev/null @@ -1,220 +0,0 @@ -## Sample initialization file for GNU nano -## Please note that you must have configured nano with --enable-nanorc -## for this file to be read! Also note that characters specially -## interpreted by the shell should not be escaped here. -## -## To make sure a value is not enabled, use "unset
\|\|
\|\|
\|
" - syn match sisu_control "\"" - syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" - syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" - syn match sisu_link contains=@NoSpell "\(https\?://\|\.\.\/\)\S\+" - "metaverse specific - syn match sisu_ocn contains=@NoSpell "<\~\d\+;\w\d\+;\w\d\+>" - syn match sisu_marktail "<\~#>" - syn match sisu_markpara contains=@NoSpell "<:i[1-9]>" - syn match sisu_link " \*\~\S\+" - syn match sisu_action "^<:insert\d\+>" - syn match sisu_contain "<:e>" -endif -"% 9 URLs Numbers: and ASCII Codes -syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" -syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" -"% 8 Tuned Error - is error if not already matched -syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" -syn match sisu_error contains=sisu_error "]" -"% 7 Simple Enclosed Markup: -" Simple Markup: -"% url/link -syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" -"% header -syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^0\~\(\S\+\|[^-]\)" end="$" -syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^0\~\(tags\?\|date\)\s\+"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^@\S\+:[+-]\?\s"rs=e-1 end="$" -syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^@\(tags\?\|date\):\s\+"rs=e-1 end="\n$" -"% headings -syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$" -"% grouped text -syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" -syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n\n" -syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\(alt\|group\|poem\){" end="^}\(alt\|group\|poem\)" -syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code" -"% endnotes -syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" -syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" -syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n\n" -"% links and images -syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|\.\./\)\S\+" oneline -syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline -syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline -"% some line operations -syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$" -syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" -syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" -syn region sisu_comment matchgroup=sisu_comment start="^%\{1,2\} " end="$" -"% font face curly brackets -syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" -syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" -syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" -syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" -syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" -syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" -syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," -syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" -syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="" end="" oneline -"% single words bold italicise etc. "workon -syn region sisu_control contains=sisu_error matchgroup=sisu_control start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline -syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline -"% misc -syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline -"% metaverse html (flagged as errors for filetype sisu) -syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\n" oneline -syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\n" oneline -syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\n" oneline -syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\n" oneline -syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\\\\\|\\'" oneline -syn region sisu_identifier contains=sisu_error matchgroup=sisu_html start="" end="" oneline -"% metaverse <:> -syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:Table.\{-}>" end="<:Table[-_]end>" -syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="<:code>" end="<:code[-_]end>" -syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:alt>" end="<:alt[-_]end>" -syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:poem>" end="<:poem[-_]end>" -"% 6 Expensive Mode -" Expensive Mode: -if !exists("sisu_no_expensive") -else " not Expensive - syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline -endif " Expensive? -"% 5 Headers: and Headings (Document Instructions) -syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" -syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" -"% 4 Errors? -syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+" -syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" -syn match sisu_error_wspace contains=sisu_error_wspace " \s*$" -syn match sisu_error contains=sisu_error,sisu_error_wspace "[^ (}]https\?:\S\+" -syn match sisu_error contains=sisu_error_wspace "\t\+" -syn match sisu_error contains=sisu_error "https\?:\S\+[}><]" -syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n\n" -syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n\n" -syn match sisu_error contains=sisu_error "\s\+.{{" -syn match sisu_error contains=sisu_error "^\~\s*$" -syn match sisu_error contains=sisu_error "^[0-9]\~\s*$" -syn match sisu_error contains=sisu_error "^[0-9]\~\S\+\s*$" -syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" -syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" -syn match sisu_error contains=sisu_error "{\~^\S\+" -syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" -syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" -syn match sisu_error contains=sisu_error "" -"errors for filetype sisu, though not error in 'metaverse': -syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" -syn match sisu_error "/\?<\([biu]\)>[^()]\{-}\n\n" -"% 3 Error Exceptions? -syn match sisu_control "\n\n" "contains=ALL -syn match sisu_control " //" -syn match sisu_error "%{" -syn match sisu_error "
https\?:\S\+\|https\?:\S\+
" -syn match sisu_error "[><]https\?:\S\+\|https\?:\S\+[><]" -"% 2 Definitions - Define the default highlighting. -if version >= 508 || !exists("did_sisu_syntax_inits") - if version < 508 - let did_sisu_syntax_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif -"% 1 Defined - HiLink sisu_normal Normal - HiLink sisu_header PreProc - HiLink sisu_header_content Statement - HiLink sisu_heading Title - HiLink sisu_structure Operator - HiLink sisu_contain Include - HiLink sisu_mark_endnote Include - HiLink sisu_link NonText - HiLink sisu_linked String - HiLink sisu_fontface Include - HiLink sisu_strikeout DiffDelete - HiLink sisu_content_alt Special - HiLink sisu_content_endnote Special - HiLink sisu_control Define - HiLink sisu_ocn Include - HiLink sisu_number Number - HiLink sisu_identifier Function - HiLink sisu_underline Underlined - HiLink sisu_markpara Include - HiLink sisu_marktail Include - HiLink sisu_mark Identifier - HiLink sisu_break Structure - HiLink sisu_html Type - HiLink sisu_action Identifier - HiLink sisu_comment Comment - HiLink sisu_error_wspace Error - HiLink sisu_error Error - delcommand HiLink -endif -let b:current_syntax = "sisu" -- cgit v1.2.3