Esempio n. 1
0
    h = Config.get('base/fields').data

    for k, v in multi.items():

        if not h.has_key(k): continue

        if v: h[k].widget = Editor.Text
        else: h[k].widget = Editor.Entry

    return True


Config.define('gnomeui/multiline',
              """ Fields displayed in a multi-line widget """,
              Config.Dict(Config.Element(_text_get), Config.Boolean()),
              hook=_on_multiline_select)

# --------------------------------------------------

Config.set('gnomeui/monospaced',
           gtk.gdk.Font('-*-*-*-r-normal-*-*-*-*-*-c-*-iso8859-1'))

h = Config.get('base/fields').data

Fields.AuthorGroup.widget = Editor.AuthorGroup
Fields.Text.widget = Editor.Entry
Fields.URL.widget = Editor.URL
Fields.Reference.widget = Editor.Reference

Fields.Date.widget = Editor.Date
Esempio n. 2
0
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#

from Pyblio import Config

Config.define('medline/mapping',
              """ A hash table containing field names correspondances """,
              Config.Dict(Config.String(), Config.String()))

Config.set(
    'medline/mapping', {
        'UI': 'medlineref',
        'AU': 'author',
        'DP': 'date',
        'TI': 'title',
        'LA': 'language',
        'MH': 'keywords',
        'AD': 'affiliation',
        'AB': 'abstract',
        'AD': 'authoraddress',
        'TA': 'journal',
        'CY': 'country',
        'PG': 'pages',
Esempio n. 3
0
##     (?P<journal>.*)\.\ +
##     (?P<volume>\d+)
##     (?:\((?P<number>.*)\))?
##     (?::(?P<pages>.*?(?:-+.*?)?)
##     (?:;\ *(?P<other>.*))?)
##     (?:,\ *(?P<year>\d\d\d\d))\ *
##     (?P<month>.*)
##     \.\Z
##     """)

Config.define ('ovid/mapping', 
               """ A mapping between the Ovid field name and
the current field and type. The key is the Ovid field (lower
cases), and the values are tuples of the form (<pyblio field
name>, <entry type>)""", Config.Dict (Config.String(),
                                      Config.Tuple (
    (Config.String(),
    Config.Element (_get_elements )))))


Config.set ('ovid/mapping', {
    'Abbreviated Source'
                    : ('abbrevsrc',   SimpleField),
    'Abstract'      : ('abstract',    SimpleField),
    'Accession Number'
                    : ('accession',   SimpleField),
    'Author'        : ('author',      AuthorField),
    'Author Keywords'
                    : ('author-keywords',
                       KeywordField),
    'Authors'       : ('author',      AuthorField),
    'CAS Registry/EC Number' 
Esempio n. 4
0
from Pyblio import Config

Config.define('refer/mapping',
              """ A hash table containing field names
               correspondances. The boolean flag specifies if the
               mapping should be reversible. """,
              vtype=Config.Dict(
                  Config.String(),
                  Config.Tuple((Config.String(), Config.Boolean()))))

Config.set(
    'refer/mapping', {
        'U': ('url', 1),
        'A': ('author', 1),
        'Q': ('author', 0),
        'T': ('title', 1),
        'S': ('series', 1),
        'J': ('journal', 1),
        'B': ('booktitle', 1),
        'R': ('type', 1),
        'V': ('volume', 1),
        'N': ('number', 1),
        'E': ('editor', 1),
        'D': ('date', 1),
        'P': ('pages', 1),
        'I': ('publisher', 1),
        'C': ('address', 1),
        'K': ('keywords', 1),
        'X': ('abstract', 1),
        'W': ('location', 1),
        'F': ('label', 1),
Esempio n. 5
0
    return map(
        lambda x: string.lower(x.name),
        filter(lambda x: x.type is Fields.Text,
               Config.get('base/fields').data.values()))


Config.define(
    'bibtex+/braces', """ A boolean specifying if pybliographic should use
               braces (instead of quotes) to limit entries """,
    Config.Boolean())

Config.define('bibtex+/capitalize',
              """ A flag indicating if
pybliographer should handle automatic capitalization in the bibtex
output """,
              vtype=Config.Dict(Config.Element(_get_text_ent),
                                Config.Boolean()))

Config.define(
    'bibtex+/override', """ A boolean indicating if the
macro definitions provided here should override the ones given in a
file """, Config.Boolean())

Config.define('bibtex+/dateformat',
              """ A template used for date formatting """, Config.String())

Config.set('bibtex+/braces', 1)

Config.set('bibtex+/capitalize', {
    'title': 1,
    'booktitle': 1,
})