rclpdf: restore pdfextrametafix function and add test
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import sys
|
||||
import re
|
||||
|
||||
class MetaFixer(object):
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def metafix(self, nm, txt):
|
||||
#print("Metafixer: mfix: nm [%s] txt [%s]" % (nm, txt), file=sys.stderr)
|
||||
if nm == 'pdf:Producer':
|
||||
txt += " metafixerunique"
|
||||
elif nm == 'someothername':
|
||||
# do something else
|
||||
pass
|
||||
elif nm == 'stillanother':
|
||||
# etc.
|
||||
pass
|
||||
|
||||
return txt
|
||||
|
||||
def wrapup(self, metaheaders):
|
||||
#print("Metafixer: wrapup: %s" % metaheaders, file=sys.stderr)
|
||||
pass
|
||||
@@ -39,6 +39,8 @@ daemSkippedPaths = \
|
||||
unac_except_trans = åå Åå ää Ää öö Öö üü Üü ßss œoe Œoe æae ÆAE fifi flfl
|
||||
|
||||
pdfextrameta = pdf:Producer dc:identifier
|
||||
pdfextrametafix = /home/dockes/projets/fulltext/recoll/tests/config/pdfemf.py
|
||||
|
||||
[/home/dockes/projets/fulltext/testrecoll/pdf]
|
||||
pdfocr = 1
|
||||
pdfocrlang = eng
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ initvariables $0
|
||||
# defaults field file, and this can't be overruled afaics, so
|
||||
# url is prefixed for the dc:identifier search to work
|
||||
recollq dc:identifier:10.12345/sampledoi
|
||||
recollq 'pdf:Producer:"GPL Ghostscript 9.18"'
|
||||
recollq 'pdf:Producer:"GPL Ghostscript 9.18" metafixerunique'
|
||||
recollq '"bubbleupnp server to simulate openhome"'
|
||||
|
||||
) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout
|
||||
|
||||
Reference in New Issue
Block a user