# HG changeset patch
# User casties
# Date 1358270132 -3600
# Node ID 7962e6891d99444615b62695ca066b51e78e74fc
# Parent 0c60562716547a0c96e20ba791297cf5d2e565e7
works with new notes and notesHandwritten.
diff -r 0c6056271654 -r 7962e6891d99 MpiwgXmlTextServer.py
--- a/MpiwgXmlTextServer.py Tue Dec 18 19:26:22 2012 +0100
+++ b/MpiwgXmlTextServer.py Tue Jan 15 18:15:32 2013 +0100
@@ -95,9 +95,12 @@
logging.debug("getTextInfo mode=%s"%mode)
field = ''
- if mode in ['pages', 'toc', 'figures', 'handwritten']:
+ if mode in ['pages', 'toc', 'figures', 'notes', 'handwritten']:
# translate mode to field param
- field = '&field=%s'%mode
+ if mode == 'handwritten':
+ field = '&field=notesHandwritten'
+ else:
+ field = '&field=%s'%mode
else:
mode = None
@@ -131,7 +134,9 @@
if sys is not None:
docinfo['numTextPages'] = getInt(getText(sys.find('countPages')))
docinfo['numFigureEntries'] = getInt(getText(sys.find('countFigures')))
- docinfo['numHandwritten'] = getInt(getText(sys.find('countHandwritten')))
+ docinfo['numHandwritten'] = getInt(getText(sys.find('countNotesHandwritten')))
+ docinfo['numNotes'] = getInt(getText(sys.find('countNotes')))
+ docinfo['numPlaces'] = getInt(getText(sys.find('countPlaces')))
docinfo['numTocEntries'] = getInt(getText(sys.find('countTocEntries')))
else:
@@ -161,7 +166,7 @@
docinfo['pageNumbers'] = pages
# toc
- elif lt == 'toc' or lt == 'figures' or lt == 'handwritten':
+ elif lt in ['toc', 'figures', 'notes', 'notesHandwritten']:
# contains tags with table of contents/figures
#