else:
document = lib.document_for_rev(revision)
- return librarian.html.transform(document.data('xml'))
+ return librarian.html.transform(document.data('xml'), is_file=False)
except RevisionNotFound:
return response.EntityNotFound().django_response()
bookname = args[1]
print "Uploading '%s' as document '%s'" % (filename, bookname)
- print "Wth DC template" if options['dc'] else ""
+ print options['dc']
+ print "With DC template" if options['dc'] is not None else ""
print client.post( reverse("document_list_view"),\
{
'bookname': bookname,
'ocr_file': open(filename),
- 'generate_dc': options['dc'] } )
+ 'generate_dc': options['dc'] or False } )
'library_resource',
'document_resource',
'document_text_resource',
+ 'document_html_resource',
'document_dc_resource',
'document_merge',
'toolbar_buttons',
name="doctext_view"),
url(urlpath(r'documents', DOC, 'html', REVISION, format=False),
- document_text_resource, {'emitter_format': 'rawhtml'},
+ document_html_resource, {'emitter_format': 'rawhtml'},
name="dochtml_view"),
url(urlpath(r'documents', DOC, 'dc', REVISION),