Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F84434206
bibformat_bfx_engine_config.py
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
Sun, Sep 22, 21:05
Size
5 KB
Mime Type
text/x-python
Expires
Tue, Sep 24, 21:05 (2 d)
Engine
blob
Format
Raw Data
Handle
20921887
Attached To
R3600 invenio-infoscience
bibformat_bfx_engine_config.py
View Options
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN.
##
## CDS 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.
##
## CDS 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 CDS Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
# pylint: disable-msg=C0301
"""BibFormat BFX engine configuration."""
__revision__
=
"$Id$"
import
os
from
invenio.config
import
CFG_ETCDIR
CFG_BIBFORMAT_BFX_TEMPLATES_PATH
=
"
%s%s
bibformat
%s
format_templates"
%
(
CFG_ETCDIR
,
os
.
sep
,
os
.
sep
)
CFG_BIBFORMAT_BFX_FORMAT_TEMPLATE_EXTENSION
=
"bfx"
CFG_BIBFORMAT_BFX_ELEMENT_NAMESPACE
=
"http://cdsware.cern.ch/invenio/"
CFG_BIBFORMAT_BFX_LABEL_DEFINITIONS
=
{
#record is a reserved keyword, don't use it
#define one or more addresses for each name or zero if you plan to define them later
'controlfield'
:
[
r'/???'
],
'datafield'
:
[
r'/?????'
],
'datafield.subfield'
:
[
r'datafield/?'
],
'recid'
:
[
r'/001'
],
'article_id'
:
[],
'language'
:
[
r'/041__/a'
],
'title'
:
[
r'/245__/a'
],
'subtitle'
:
[
r'/245__/b'
],
'secondary_title'
:
[
r'/773__/p'
],
'first_author'
:
[
r'/100__/a'
],
'author'
:
[
r'/100__/a'
,
r'/700__/a'
],
'author.surname'
:
[
r'author#(?P<value>.*),[ ]*(.*)'
],
'author.names'
:
[
r'author#(.*),[ ]*(?P<value>.*)'
],
'abstract'
:
[
r'/520__/a'
],
'publisher'
:
[
r'/260__/b'
],
'publisher_location'
:
[
r'/260__/a'
],
'issn'
:
[
r'/022__/a'
],
'doi'
:
[
r'/773__/a'
],
'journal_name_long'
:
[
r'/222__/a'
,
r'/210__/a'
,
r'/773__/p'
,
r'/909C4/p'
],
'journal_name_short'
:
[
r'/210__/a'
,
r'/773__/p'
,
r'/909C4/p'
],
'journal_name'
:
[
r'/773__/p'
,
r'/909C4/p'
],
'journal_volume'
:
[
r'/773__/v'
,
r'/909C4/v'
],
'journal_issue'
:
[
r'/773__/n'
],
'pages'
:
[
r'/773__/c'
,
r'/909C4/c'
],
'first_page'
:
[
r'/773__/c#(?P<value>\d*)-(\d*)'
,
r'/909C4/c#(?P<value>\d*)-(\d*)'
],
'last_page'
:
[
r'/773__/c#(\d*)-(?P<value>\d*)'
,
r'/909C4/c#(\d*)-(?P<value>\d*)'
],
'date'
:
[
r'/260__/c'
],
'year'
:
[
r'/773__/y#(.*)(?P<value>\d\d\d\d).*'
,
r'/260__/c#(.*)(?P<value>\d\d\d\d).*'
,
r'/925__/a#(.*)(?P<value>\d\d\d\d).*'
,
r'/909C4/y'
],
'doc_type'
:
[
r'/980__/a'
],
'doc_status'
:
[
r'/980__/c'
],
'uri'
:
[
r'/8564_/u'
,
r'/8564_/q'
],
'subject'
:
[
r'/65017/a'
],
'keyword'
:
[
r'/6531_/a'
],
'day'
:
[],
'month'
:
[],
'creation_date'
:
[],
'reference'
:
[]
}
CFG_BIBFORMAT_BFX_ERROR_MESSAGES
=
\
{
'ERR_BFX_TEMPLATE_REF_NO_NAME'
:
'Error: Missing attribute "name" in TEMPLATE_REF.'
,
'ERR_BFX_TEMPLATE_NOT_FOUND'
:
'Error: Template
%s
not found.'
,
'ERR_BFX_ELEMENT_NO_NAME'
:
'Error: Missing attribute "name" in ELEMENT.'
,
'ERR_BFX_FIELD_NO_NAME'
:
'Error: Missing attribute "name" in FIELD.'
,
'ERR_BFX_LOOP_NO_OBJECT'
:
'Error: Missing attribute "object" in LOOP.'
,
'ERR_BFX_NO_SUCH_FIELD'
:
'Error: Field
%s
is not defined'
,
'ERR_BFX_IF_NO_NAME'
:
'Error: Missing attrbute "name" in IF.'
,
'ERR_BFX_TEXT_NO_VALUE'
:
'Error: Missing attribute "value" in TEXT.'
,
'ERR_BFX_INVALID_RE'
:
'Error: Invalid regular expression:
%s
'
,
'ERR_BFX_INVALID_OPERATOR_NAME'
:
'Error: Name
%s
is not recognised as a valid operator name.'
,
'ERR_BFX_INVALID_DISPLAY_TYPE'
:
'Error: Invalid display type. Must be one of: value, tag, ind1, ind2, code; received:
%s
'
,
'ERR_BFX_IF_WRONG_SYNTAX'
:
'Error: Invalid syntax of IF statement.'
,
'ERR_BFX_DUPLICATE_NAME'
:
'Error: Duplicate name:
%s
.'
,
'ERR_BFX_TEMPLATE_NO_NAME'
:
'Error: No name defined for the template.'
,
'ERR_BFX_NO_TEMPLATES_FOUND'
:
'Error: No templates found in the document.'
,
'ERR_BFX_TOO_MANY_TEMPLATES'
:
'Error: More than one templates found in the document. No format found.'
}
CFG_BIBFORMAT_BFX_WARNING_MESSAGES
=
\
{
'WRN_BFX_TEMPLATE_NO_DESCRIPTION'
:
'Warning: No description entered for the template.'
,
'WRN_BFX_TEMPLATE_NO_CONTENT'
:
'Warning: No content type specified for the template. Using default: text/xml.'
,
'WRN_BFX_NO_FORMAT_FOUND'
:
'Warning: No format found. Will look for a default template.'
}
Event Timeline
Log In to Comment