From a544a3e26d49e42662edc93a2c02eba4636a9360 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Fri, 8 Nov 2019 15:52:09 +0100 Subject: [PATCH] doc: indentation in sample program --- src/doc/user/usermanual.html | 28 ++++++++++++++-------------- src/doc/user/usermanual.xml | 29 +++++++++++++++-------------- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/doc/user/usermanual.html b/src/doc/user/usermanual.html index f1307bec..9ae4388d 100644 --- a/src/doc/user/usermanual.html +++ b/src/doc/user/usermanual.html @@ -2204,22 +2204,22 @@ metadatacmds = ;

If the 'metafix()' method is defined, it is called for each metadata field. A new MetaFixer object is created diff --git a/src/doc/user/usermanual.xml b/src/doc/user/usermanual.xml index 087fca65..6b7d3bc0 100644 --- a/src/doc/user/usermanual.xml +++ b/src/doc/user/usermanual.xml @@ -1456,26 +1456,27 @@ metadatacmds = ; tags = tmsu tags %f variable can be used to designate a file with Python code to edit the metadata fields (available for &RCL; 1.23.3 and later. 1.23.2 has equivalent code inside the handler script). Example: + import sys import re class MetaFixer(object): - def __init__(self): - pass + def __init__(self): + pass - def metafix(self, nm, txt): - if nm == 'bibtex:pages': - txt = re.sub(r'--', '-', txt) - elif nm == 'someothername': - # do something else - pass - elif nm == 'stillanother': - # etc. - pass + def metafix(self, nm, txt): + if nm == 'bibtex:pages': + txt = re.sub(r'--', '-', txt) + elif nm == 'someothername': + # do something else + pass + elif nm == 'stillanother': + # etc. + pass - return txt - def wrapup(self, metaheaders): - pass + return txt + def wrapup(self, metaheaders): + pass If the 'metafix()' method is defined, it is called for each