From bfab7d846265d174e11228292478474375e7a2ef Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 21 May 2019 22:34:24 -0400 Subject: [PATCH] Restore namazu template files. Andrew removed this as part of upgrading namazu and likely to deal with the issue that javascript was required to do subsequent searches. But this made subsequent searches broken in a more obvious way with or without javascript, and also made it so you couldn't sort the results. I think I can fix the javascript issue. --- .gitignore | 1 - cgi-bin/template | 1 - cgi-bin/template/NMZ.body | 190 +++++++++++++++++++++ cgi-bin/template/NMZ.body.in | 190 +++++++++++++++++++++ cgi-bin/template/NMZ.body.in.dist | 184 ++++++++++++++++++++ cgi-bin/template/NMZ.foot | 7 + cgi-bin/template/NMZ.foot.in | 7 + cgi-bin/template/NMZ.foot.in.dist | 7 + cgi-bin/template/NMZ.head | 81 +++++++++ cgi-bin/template/NMZ.head.in | 81 +++++++++ cgi-bin/template/NMZ.head.in.dist | 81 +++++++++ cgi-bin/template/NMZ.result.normal | 5 + cgi-bin/template/NMZ.result.normal.in | 5 + cgi-bin/template/NMZ.result.normal.in.dist | 5 + cgi-bin/template/NMZ.result.short | 2 + cgi-bin/template/NMZ.result.short.in | 2 + cgi-bin/template/NMZ.result.short.in.dist | 2 + cgi-bin/template/NMZ.tips | 60 +++++++ cgi-bin/template/NMZ.tips.in | 60 +++++++ cgi-bin/template/NMZ.tips.in.dist | 60 +++++++ 20 files changed, 1029 insertions(+), 2 deletions(-) delete mode 120000 cgi-bin/template create mode 100644 cgi-bin/template/NMZ.body create mode 100644 cgi-bin/template/NMZ.body.in create mode 100644 cgi-bin/template/NMZ.body.in.dist create mode 100644 cgi-bin/template/NMZ.foot create mode 100644 cgi-bin/template/NMZ.foot.in create mode 100644 cgi-bin/template/NMZ.foot.in.dist create mode 100644 cgi-bin/template/NMZ.head create mode 100644 cgi-bin/template/NMZ.head.in create mode 100644 cgi-bin/template/NMZ.head.in.dist create mode 100644 cgi-bin/template/NMZ.result.normal create mode 100644 cgi-bin/template/NMZ.result.normal.in create mode 100644 cgi-bin/template/NMZ.result.normal.in.dist create mode 100644 cgi-bin/template/NMZ.result.short create mode 100644 cgi-bin/template/NMZ.result.short.in create mode 100644 cgi-bin/template/NMZ.result.short.in.dist create mode 100644 cgi-bin/template/NMZ.tips create mode 100644 cgi-bin/template/NMZ.tips.in create mode 100644 cgi-bin/template/NMZ.tips.in.dist diff --git a/.gitignore b/.gitignore index 9a4930c..d9f6227 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ /.bash* /.gitconfig /log -/namazu # This is debug log file when "The \x22negative number\x22 problem occurred.\n" happens. # todo: we don't rotate this afaik, we should diff --git a/cgi-bin/template b/cgi-bin/template deleted file mode 120000 index 024a99c..0000000 --- a/cgi-bin/template +++ /dev/null @@ -1 +0,0 @@ -/usr/share/namazu/template/ \ No newline at end of file diff --git a/cgi-bin/template/NMZ.body b/cgi-bin/template/NMZ.body new file mode 100644 index 0000000..d9eef22 --- /dev/null +++ b/cgi-bin/template/NMZ.body @@ -0,0 +1,190 @@ +

Query

+ +

Long messages and words are ignored

+

+Messages longer than 100,000 letters or 500,000 bytes are ignored. Words +longer than 40 characters are ignored. Attachments are ignored. +

+ +

Single term query

+

+The query specifies only one term for retrieving all +documents which contain the term. e.g., +

+ +

+namazu +

+ +

AND query

+ +

+The query specifies two or more terms for retrieving all +documents which contain both terms. You can insert the +and operator between the terms. e.g., +

+ +

+Linux and Netscape +

+ +

+You can ommit the and operator. Terms which is +separated by one ore more spaces is assumed to be AND query. +

+ +

OR query

+

+The query specifies two or more terms for retrieving all +documents which contain either term. You can insert the +or operator between the terms. +e.g., +

+ +

+Linux or FreeBSD +

+ +

NOT query

+

+The query specifies two or more terms for retrieving all +documents which contain a first term but does't contain the +following terms. You can insert the not +operator between the terms to do NOT query. e.g., +

+ +

+Linux not UNIX +

+ + +

Grouping

+

+You can group queries by surrounding them by +parentheses. The parentheses should be separated by one or +more spaces. e.g., +

+ +

+( Linux or FreeBSD ) and Netscape not Windows +

+ +

Phrase searching

+

+You can search for a phrase which consists of two or more terms +by surrounding them with double quotes like +"..." or with braces like {...}. +In Namazu, precision of phrase searching is not 100 %, +so it causes wrong results occasionally. e.g., +

+ +

+{GNU Emacs} +

+ + + +

Substring matching

+

+The are three types of substring matching searching. +

+ +
+
Prefix matching +
inter* (terms which begin with inter) +
Inside matching +
*text* (terms which contain text) +
Suffix matching +
*net (terms which terminated +with net) +
+ + +

Regular expressions

+ +

+You can use regular expressions for pattern matching. The +regular expressions must be surrounded by slashes like /.../. Namazu uses Ruby's regular +regular expressions engine. It offers generally Perl compatible flavor. +e.g., +

+ +

+/pro(gram|blem)s?/ +

+ + +

Field-specified searching

+

+You can limit your search to specific fields such as +Subject:, From:, +Message-Id:. It's especially convenient for +Mail/News documents. e.g., +

+ + + +

Notes

+ + + diff --git a/cgi-bin/template/NMZ.body.in b/cgi-bin/template/NMZ.body.in new file mode 100644 index 0000000..d9eef22 --- /dev/null +++ b/cgi-bin/template/NMZ.body.in @@ -0,0 +1,190 @@ +

Query

+ +

Long messages and words are ignored

+

+Messages longer than 100,000 letters or 500,000 bytes are ignored. Words +longer than 40 characters are ignored. Attachments are ignored. +

+ +

Single term query

+

+The query specifies only one term for retrieving all +documents which contain the term. e.g., +

+ +

+namazu +

+ +

AND query

+ +

+The query specifies two or more terms for retrieving all +documents which contain both terms. You can insert the +and operator between the terms. e.g., +

+ +

+Linux and Netscape +

+ +

+You can ommit the and operator. Terms which is +separated by one ore more spaces is assumed to be AND query. +

+ +

OR query

+

+The query specifies two or more terms for retrieving all +documents which contain either term. You can insert the +or operator between the terms. +e.g., +

+ +

+Linux or FreeBSD +

+ +

NOT query

+

+The query specifies two or more terms for retrieving all +documents which contain a first term but does't contain the +following terms. You can insert the not +operator between the terms to do NOT query. e.g., +

+ +

+Linux not UNIX +

+ + +

Grouping

+

+You can group queries by surrounding them by +parentheses. The parentheses should be separated by one or +more spaces. e.g., +

+ +

+( Linux or FreeBSD ) and Netscape not Windows +

+ +

Phrase searching

+

+You can search for a phrase which consists of two or more terms +by surrounding them with double quotes like +"..." or with braces like {...}. +In Namazu, precision of phrase searching is not 100 %, +so it causes wrong results occasionally. e.g., +

+ +

+{GNU Emacs} +

+ + + +

Substring matching

+

+The are three types of substring matching searching. +

+ +
+
Prefix matching +
inter* (terms which begin with inter) +
Inside matching +
*text* (terms which contain text) +
Suffix matching +
*net (terms which terminated +with net) +
+ + +

Regular expressions

+ +

+You can use regular expressions for pattern matching. The +regular expressions must be surrounded by slashes like /.../. Namazu uses Ruby's regular +regular expressions engine. It offers generally Perl compatible flavor. +e.g., +

+ +

+/pro(gram|blem)s?/ +

+ + +

Field-specified searching

+

+You can limit your search to specific fields such as +Subject:, From:, +Message-Id:. It's especially convenient for +Mail/News documents. e.g., +

+ + + +

Notes

+ + + diff --git a/cgi-bin/template/NMZ.body.in.dist b/cgi-bin/template/NMZ.body.in.dist new file mode 100644 index 0000000..f7706f1 --- /dev/null +++ b/cgi-bin/template/NMZ.body.in.dist @@ -0,0 +1,184 @@ +

Query

+ +

Single term query

+

+The query specifies only one term for retrieving all +documents which contain the term. e.g., +

+ +

+namazu +

+ +

AND query

+ +

+The query specifies two or more terms for retrieving all +documents which contain both terms. You can insert the +and operator between the terms. e.g., +

+ +

+Linux and Netscape +

+ +

+You can ommit the and operator. Terms which is +separated by one ore more spaces is assumed to be AND query. +

+ +

OR query

+

+The query specifies two or more terms for retrieving all +documents which contain either term. You can insert the +or operator between the terms. +e.g., +

+ +

+Linux or FreeBSD +

+ +

NOT query

+

+The query specifies two or more terms for retrieving all +documents which contain a first term but does't contain the +following terms. You can insert the not +operator between the terms to do NOT query. e.g., +

+ +

+Linux not UNIX +

+ + +

Grouping

+

+You can group queries by surrounding them by +parentheses. The parentheses should be separated by one or +more spaces. e.g., +

+ +

+( Linux or FreeBSD ) and Netscape not Windows +

+ +

Phrase searching

+

+You can search for a phrase which consists of two or more terms +by surrounding them with double quotes like +"..." or with braces like {...}. +In Namazu, precision of phrase searching is not 100 %, +so it causes wrong results occasionally. e.g., +

+ +

+{GNU Emacs} +

+ + + +

Substring matching

+

+The are three types of substring matching searching. +

+ +
+
Prefix matching +
inter* (terms which begin with inter) +
Inside matching +
*text* (terms which contain text) +
Suffix matching +
*net (terms which terminated +with net) +
+ + +

Regular expressions

+ +

+You can use regular expressions for pattern matching. The +regular expressions must be surrounded by slashes like /.../. Namazu uses Ruby's regular +regular expressions engine. It offers generally Perl compatible flavor. +e.g., +

+ +

+/pro(gram|blem)s?/ +

+ + +

Field-specified searching

+

+You can limit your search to specific fields such as +Subject:, From:, +Message-Id:. It's especially convenient for +Mail/News documents. e.g., +

+ + + +

Notes

+ + + diff --git a/cgi-bin/template/NMZ.foot b/cgi-bin/template/NMZ.foot new file mode 100644 index 0000000..6e5abdb --- /dev/null +++ b/cgi-bin/template/NMZ.foot @@ -0,0 +1,7 @@ +
+
+This search system is powered by +Namazu +
+ + diff --git a/cgi-bin/template/NMZ.foot.in b/cgi-bin/template/NMZ.foot.in new file mode 100644 index 0000000..6e5abdb --- /dev/null +++ b/cgi-bin/template/NMZ.foot.in @@ -0,0 +1,7 @@ +
+
+This search system is powered by +Namazu +
+ + diff --git a/cgi-bin/template/NMZ.foot.in.dist b/cgi-bin/template/NMZ.foot.in.dist new file mode 100644 index 0000000..6e5abdb --- /dev/null +++ b/cgi-bin/template/NMZ.foot.in.dist @@ -0,0 +1,7 @@ +
+
+This search system is powered by +Namazu +
+ + diff --git a/cgi-bin/template/NMZ.head b/cgi-bin/template/NMZ.head new file mode 100644 index 0000000..e9f2743 --- /dev/null +++ b/cgi-bin/template/NMZ.head @@ -0,0 +1,81 @@ + + +Mail Archive Search + + + + + +
+

Search String: + + + +Display: + +Description: + +Sort: + +

+
diff --git a/cgi-bin/template/NMZ.head.in b/cgi-bin/template/NMZ.head.in new file mode 100644 index 0000000..6d7f091 --- /dev/null +++ b/cgi-bin/template/NMZ.head.in @@ -0,0 +1,81 @@ + + +Mail Archive Search + + + + + +
+

Search String: + + + +Display: + +Description: + +Sort: + +

+
diff --git a/cgi-bin/template/NMZ.head.in.dist b/cgi-bin/template/NMZ.head.in.dist new file mode 100644 index 0000000..6d7f091 --- /dev/null +++ b/cgi-bin/template/NMZ.head.in.dist @@ -0,0 +1,81 @@ + + +Mail Archive Search + + + + + +
+

Search String: + + + +Display: + +Description: + +Sort: + +

+
diff --git a/cgi-bin/template/NMZ.result.normal b/cgi-bin/template/NMZ.result.normal new file mode 100644 index 0000000..5830a7c --- /dev/null +++ b/cgi-bin/template/NMZ.result.normal @@ -0,0 +1,5 @@ +
${namazu::counter}. ${title} (score: ${namazu::score}) +
Author: HIDDEN +
Date: ${date} +
${summary} +
${uri} (${size} bytes)

diff --git a/cgi-bin/template/NMZ.result.normal.in b/cgi-bin/template/NMZ.result.normal.in new file mode 100644 index 0000000..5830a7c --- /dev/null +++ b/cgi-bin/template/NMZ.result.normal.in @@ -0,0 +1,5 @@ +
${namazu::counter}. ${title} (score: ${namazu::score}) +
Author: HIDDEN +
Date: ${date} +
${summary} +
${uri} (${size} bytes)

diff --git a/cgi-bin/template/NMZ.result.normal.in.dist b/cgi-bin/template/NMZ.result.normal.in.dist new file mode 100644 index 0000000..cd8d609 --- /dev/null +++ b/cgi-bin/template/NMZ.result.normal.in.dist @@ -0,0 +1,5 @@ +
${namazu::counter}. ${title} (score: ${namazu::score}) +
Author: ${author} +
Date: ${date} +
${summary} +
${uri} (${size} bytes)

diff --git a/cgi-bin/template/NMZ.result.short b/cgi-bin/template/NMZ.result.short new file mode 100644 index 0000000..7f087a9 --- /dev/null +++ b/cgi-bin/template/NMZ.result.short @@ -0,0 +1,2 @@ +
${namazu::counter}. ${title} (score: ${namazu::score}) +
${uri} (${size} bytes)

diff --git a/cgi-bin/template/NMZ.result.short.in b/cgi-bin/template/NMZ.result.short.in new file mode 100644 index 0000000..7f087a9 --- /dev/null +++ b/cgi-bin/template/NMZ.result.short.in @@ -0,0 +1,2 @@ +
${namazu::counter}. ${title} (score: ${namazu::score}) +
${uri} (${size} bytes)

diff --git a/cgi-bin/template/NMZ.result.short.in.dist b/cgi-bin/template/NMZ.result.short.in.dist new file mode 100644 index 0000000..7f087a9 --- /dev/null +++ b/cgi-bin/template/NMZ.result.short.in.dist @@ -0,0 +1,2 @@ +
${namazu::counter}. ${title} (score: ${namazu::score}) +
${uri} (${size} bytes)

diff --git a/cgi-bin/template/NMZ.tips b/cgi-bin/template/NMZ.tips new file mode 100644 index 0000000..b19d4d6 --- /dev/null +++ b/cgi-bin/template/NMZ.tips @@ -0,0 +1,60 @@ +

Tips on searching

+ +

+If you have trouble with searching, you can check the following tips. +

+ + diff --git a/cgi-bin/template/NMZ.tips.in b/cgi-bin/template/NMZ.tips.in new file mode 100644 index 0000000..b19d4d6 --- /dev/null +++ b/cgi-bin/template/NMZ.tips.in @@ -0,0 +1,60 @@ +

Tips on searching

+ +

+If you have trouble with searching, you can check the following tips. +

+ + diff --git a/cgi-bin/template/NMZ.tips.in.dist b/cgi-bin/template/NMZ.tips.in.dist new file mode 100644 index 0000000..b19d4d6 --- /dev/null +++ b/cgi-bin/template/NMZ.tips.in.dist @@ -0,0 +1,60 @@ +

Tips on searching

+ +

+If you have trouble with searching, you can check the following tips. +

+ + -- 2.25.1