added abiword + some oofice cleanup
This commit is contained in:
parent
2098c7afad
commit
fcf027b22f
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# @(#$Id: rclabw,v 1.1 2007-06-15 09:25:23 dockes Exp $ (C) 2004 J.F.Dockes
|
# @(#$Id: rclabw,v 1.2 2007-06-15 11:41:50 dockes Exp $ (C) 2004 J.F.Dockes
|
||||||
# Parts taken from Estraier:
|
# Parts taken from Estraier:
|
||||||
#================================================================
|
#================================================================
|
||||||
# Estraier: a personal full-text search system
|
# Estraier: a personal full-text search system
|
||||||
@ -97,7 +97,9 @@ encoding=`sed -e '/<?xml version=/s/"?>$//' \
|
|||||||
if test X$encoding = X ; then encoding=UTF-8;fi
|
if test X$encoding = X ; then encoding=UTF-8;fi
|
||||||
|
|
||||||
# Note: there can be newlines inside the description field, we don't want
|
# Note: there can be newlines inside the description field, we don't want
|
||||||
# them...
|
# them... Have 2 use 2 different selectors for the single-line and
|
||||||
|
# multiple-line cases because of the generic tag end (</m> for all meta
|
||||||
|
# tags)
|
||||||
descsedprog='
|
descsedprog='
|
||||||
/<m key="dc.description">\([^<]*\)<\/m>/ {
|
/<m key="dc.description">\([^<]*\)<\/m>/ {
|
||||||
s//\1/
|
s//\1/
|
||||||
@ -149,7 +151,7 @@ creator=`sed -n -e "$metasedprog" "$infile"`
|
|||||||
# a single line in the xml (no multiple <p> per line, no embedded newlines
|
# a single line in the xml (no multiple <p> per line, no embedded newlines
|
||||||
# in text).
|
# in text).
|
||||||
contentsedprog='
|
contentsedprog='
|
||||||
/<p /{
|
/<p[ >]/{
|
||||||
s/<[^>]*>/ /g
|
s/<[^>]*>/ /g
|
||||||
p
|
p
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# @(#$Id: rclsoff,v 1.10 2007-06-08 13:51:09 dockes Exp $ (C) 2004 J.F.Dockes
|
# @(#$Id: rclsoff,v 1.11 2007-06-15 11:41:50 dockes Exp $ (C) 2004 J.F.Dockes
|
||||||
# Parts taken from Estraier:
|
# Parts taken from Estraier:
|
||||||
#================================================================
|
#================================================================
|
||||||
# Estraier: a personal full-text search system
|
# Estraier: a personal full-text search system
|
||||||
@ -127,26 +127,45 @@ cd $tmpdir/rclsofftmp
|
|||||||
descsedprog='/<dc:description>/,/<\/dc:description>/{
|
descsedprog='/<dc:description>/,/<\/dc:description>/{
|
||||||
s!.*<dc:description>!!
|
s!.*<dc:description>!!
|
||||||
s!</dc:description>.*!!
|
s!</dc:description>.*!!
|
||||||
|
H
|
||||||
|
${
|
||||||
|
g
|
||||||
|
s/\n/ /g
|
||||||
p
|
p
|
||||||
}
|
}
|
||||||
|
}
|
||||||
'
|
'
|
||||||
description=`sed -n -e "$descsedprog" < meta.xml | tr '\n' ' '`
|
description=`sed -n -e "$descsedprog" meta.xml`
|
||||||
|
#echo description "$description"
|
||||||
|
|
||||||
subject=`sed -e "s/\"/'/" -e 's/.*<dc:subject>\([^<]*\).*/\1/p;d' < meta.xml`
|
# Takes tag name as parameter and creates sed program to extract single
|
||||||
|
# line meta tags values.
|
||||||
|
setmetasedprog() {
|
||||||
|
metasedprog="s/\"/'/g"'
|
||||||
|
/.*<'"$1"'>\([^<]*\).*/s//\1/p
|
||||||
|
'
|
||||||
|
}
|
||||||
|
|
||||||
title=`sed -e "s/\"/'/" -e 's/.*<dc:title>\([^<]*\).*/\1/p;d' < meta.xml`
|
setmetasedprog dc:subject
|
||||||
|
subject=`sed -n -e "$metasedprog" meta.xml`
|
||||||
|
#echo subject: $subject
|
||||||
|
|
||||||
keywords=`sed -e "s/\"/'/" -e 's/.*<meta:keyword>\([^<]*\).*/\1/p;d' \
|
setmetasedprog dc:title
|
||||||
< meta.xml`
|
title=`sed -n -e "$metasedprog" meta.xml`
|
||||||
|
#echo title: $title
|
||||||
|
|
||||||
|
setmetasedprog meta:keyword
|
||||||
|
keywords=`sed -n -e "$metasedprog" meta.xml`
|
||||||
|
#echo keywords: $keywords
|
||||||
|
|
||||||
|
setmetasedprog dc:creator
|
||||||
|
creator=`sed -n -e "$metasedprog" meta.xml`
|
||||||
|
#echo creator: $creator
|
||||||
|
|
||||||
# Note: next expr inserts a newline at each end of paragraph (for preview)
|
# Note: next expr inserts a newline at each end of paragraph (for preview)
|
||||||
content="`sed -e 's!</text:p>!\\
|
content="`sed -e 's!</text:p>!\\
|
||||||
!g' -e 's/<[^>]*>/ /g' < content.xml`"
|
!g' -e 's/<[^>]*>/ /g' < content.xml`"
|
||||||
|
|
||||||
#echo description "$description"
|
|
||||||
#echo subject "$subject"
|
|
||||||
#echo title "$title"
|
|
||||||
#echo keywords "$keywords"
|
|
||||||
#echo content "$content"
|
#echo content "$content"
|
||||||
|
|
||||||
# output the result
|
# output the result
|
||||||
@ -155,6 +174,7 @@ echo '<title>' "$title" '</title>'
|
|||||||
echo '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">'
|
echo '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">'
|
||||||
echo '<meta name="description" content="' "$description $subject" '">'
|
echo '<meta name="description" content="' "$description $subject" '">'
|
||||||
echo '<meta name="keywords" content="' "$keywords" '">'
|
echo '<meta name="keywords" content="' "$keywords" '">'
|
||||||
|
echo '<meta name="author" content="' "$creator" '">'
|
||||||
echo '</head><body><p>'
|
echo '</head><body><p>'
|
||||||
|
|
||||||
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
|
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# @(#$Id: mimeconf,v 1.27 2007-06-08 13:51:09 dockes Exp $ (C) 2004 J.F.Dockes
|
# @(#$Id: mimeconf,v 1.28 2007-06-15 11:41:50 dockes Exp $ (C) 2004 J.F.Dockes
|
||||||
|
|
||||||
# Recoll : associations of mime types to processing filters.
|
# Recoll : associations of mime types to processing filters.
|
||||||
# There are different sections for decompression, 'interning' for indexing
|
# There are different sections for decompression, 'interning' for indexing
|
||||||
@ -41,6 +41,7 @@ application/vnd.sun.xml.math = exec rclsoff
|
|||||||
application/vnd.sun.xml.writer = exec rclsoff
|
application/vnd.sun.xml.writer = exec rclsoff
|
||||||
application/vnd.sun.xml.writer.global = exec rclsoff
|
application/vnd.sun.xml.writer.global = exec rclsoff
|
||||||
application/vnd.sun.xml.writer.template = exec rclsoff
|
application/vnd.sun.xml.writer.template = exec rclsoff
|
||||||
|
application/x-abiword = exec rclabw
|
||||||
application/x-dvi = exec rcldvi
|
application/x-dvi = exec rcldvi
|
||||||
application/x-lyx = exec rcllyx
|
application/x-lyx = exec rcllyx
|
||||||
application/x-kword = exec rclkwd
|
application/x-kword = exec rclkwd
|
||||||
@ -73,6 +74,8 @@ application/vnd.sun.xml.impress.template = presentation
|
|||||||
application/vnd.sun.xml.writer = wordprocessing
|
application/vnd.sun.xml.writer = wordprocessing
|
||||||
application/vnd.sun.xml.writer.global = wordprocessing
|
application/vnd.sun.xml.writer.global = wordprocessing
|
||||||
application/vnd.sun.xml.writer.template = wordprocessing
|
application/vnd.sun.xml.writer.template = wordprocessing
|
||||||
|
application/x-abiword = wordprocessing
|
||||||
|
application/x-kword = wordprocessing
|
||||||
application/x-fsdirectory = folder
|
application/x-fsdirectory = folder
|
||||||
application/x-dvi = document
|
application/x-dvi = document
|
||||||
audio/mpeg = sownd
|
audio/mpeg = sownd
|
||||||
@ -88,13 +91,16 @@ text/x-c = source
|
|||||||
|
|
||||||
[categories]
|
[categories]
|
||||||
|
|
||||||
texts = application/msword \
|
texts = \
|
||||||
|
application/msword \
|
||||||
application/pdf \
|
application/pdf \
|
||||||
application/postscript \
|
application/postscript \
|
||||||
application/vnd.sun.xml.writer \
|
application/vnd.sun.xml.writer \
|
||||||
application/vnd.sun.xml.writer.global \
|
application/vnd.sun.xml.writer.global \
|
||||||
application/vnd.sun.xml.writer.template \
|
application/vnd.sun.xml.writer.template \
|
||||||
|
application/x-abiword \
|
||||||
application/x-dvi \
|
application/x-dvi \
|
||||||
|
application/x-kword \
|
||||||
application/x-lyx \
|
application/x-lyx \
|
||||||
application/x-scribus \
|
application/x-scribus \
|
||||||
image/vnd.djvu \
|
image/vnd.djvu \
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# @(#$Id: mimemap,v 1.22 2007-06-08 13:51:09 dockes Exp $ (C) 2004 J.F.Dockes
|
# @(#$Id: mimemap,v 1.23 2007-06-15 11:41:50 dockes Exp $ (C) 2004 J.F.Dockes
|
||||||
# Recoll: associations of file name extensions to mime types
|
# Recoll: associations of file name extensions to mime types
|
||||||
|
|
||||||
.txt = text/plain
|
.txt = text/plain
|
||||||
@ -54,6 +54,7 @@
|
|||||||
.sxg = application/vnd.sun.xml.writer.global
|
.sxg = application/vnd.sun.xml.writer.global
|
||||||
.stw = application/vnd.sun.xml.writer.template
|
.stw = application/vnd.sun.xml.writer.template
|
||||||
|
|
||||||
|
.abw = application/x-abiword
|
||||||
.lyx = application/x-lyx
|
.lyx = application/x-lyx
|
||||||
.sla = application/x-scribus
|
.sla = application/x-scribus
|
||||||
.scd = application/x-scribus
|
.scd = application/x-scribus
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# @(#$Id: mimeview,v 1.5 2007-06-08 13:59:55 dockes Exp $ (C) 2004 J.F.Dockes
|
# @(#$Id: mimeview,v 1.6 2007-06-15 11:41:50 dockes Exp $ (C) 2004 J.F.Dockes
|
||||||
|
|
||||||
## ##########################################
|
## ##########################################
|
||||||
# External viewers, launched by the recoll GUI when you click on a result
|
# External viewers, launched by the recoll GUI when you click on a result
|
||||||
@ -9,6 +9,7 @@
|
|||||||
application/x-all = xdg-open %f
|
application/x-all = xdg-open %f
|
||||||
|
|
||||||
application/x-kword = kword %f
|
application/x-kword = kword %f
|
||||||
|
application/x-abiword = abiword %f
|
||||||
|
|
||||||
application/msword = openoffice %f
|
application/msword = openoffice %f
|
||||||
application/pdf = xpdf %f
|
application/pdf = xpdf %f
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user