Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F88875380
bibconvert-api.webdoc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Oct 21, 03:01
Size
2 KB
Mime Type
text/html
Expires
Wed, Oct 23, 03:01 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
21827005
Attached To
R3600 invenio-infoscience
bibconvert-api.webdoc
View Options
## -*- mode: html; coding: utf-8; -*-
## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
<!-- WebDoc-Page-Title: BibConvert API -->
<!-- WebDoc-Page-Navtrail: <a class="navtrail" href="<CFG_SITE_URL>/help/hacking">Hacking Invenio</a> > <a class="navtrail" href="bibconvert-internals">BibConvert Internals</a> -->
<!-- WebDoc-Page-Revision: $Id$ -->
<protect>
<pre>
Invenio BibConvert can be called from within your Python
programs via a high-level API.
BibConvert High-level API (subject to change)
Description:
The high-level access to the BibConvert formatting and value generation
allows to perform basic text formatting basde on BibConvert's metadata
conversion configuration language. There are two main functions accessible
via the BibConvert API: (i) The BibConvert formatter and (ii) The BibConvert
value generator. For detailed description of formatting functions and
generated values please have a look at the <a href=<CFG_SITE_URL>/help/admin/bibconvert-admin-guide>BibConvert Admin Guide</a>.
Signature:
def format_field(value_raw, "function(parameters)"):
"""
value_raw - text to be formatted
function - BibConvert formatting function
parameters - Comma separated parameters
output - formated text
def generate():
"""
"""
Examples:
>>> # import the function:
>>> from invenio.bibconvert import format_field, generate
>>> # format field
>>> out = format_field(value_raw,"")
>>> # generate value in requested format
>>> out = generate("DATE(%Y-%m-%dT%H:%M:%SZ)")
</pre>
</protect>
Event Timeline
Log In to Comment