File: pybrc.py

package info (click to toggle)
pybliographer 1.2.12-4squeeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,560 kB
  • ctags: 1,413
  • sloc: python: 9,817; xml: 2,560; sh: 813; makefile: 621
file content (46 lines) | stat: -rw-r--r-- 1,564 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Site configuration

from Pyblio import Autoload, Config, version

from Pyblio.TextUI import *

# ==================================================

import string, os

# define autoloaded formats

Autoload.preregister ('format', 'BibTeX',  'Pyblio.Format.BibTeX',  '.*\.bib')
Autoload.preregister ('format', 'Ovid',    'Pyblio.Format.Ovid',    '.*\.ovid')
Autoload.preregister ('format', 'Medline', 'Pyblio.Format.Medline', '.*\.med')
Autoload.preregister ('format', 'Refer',   'Pyblio.Format.Refer',   '.*\.refer')
Autoload.preregister ('format', 'ISIFile', 'Pyblio.Format.isifile', '.*\.isi')


# define styles and outputs

Autoload.preregister ('style', 'Generic', 'Pyblio.Style.Generic')
Autoload.preregister ('style', 'apa4e',   'Pyblio.Style.apa4e')
Autoload.preregister ('style', 'abbrv',   'Pyblio.Style.abbrv')

Autoload.preregister ('output', 'Text',    'Pyblio.Output.text')
Autoload.preregister ('output', 'Raw',     'Pyblio.Output.raw')
Autoload.preregister ('output', 'HTML',    'Pyblio.Output.html')
Autoload.preregister ('output', 'LaTeX',   'Pyblio.Output.LaTeX')
Autoload.preregister ('output', 'Textnum', 'Pyblio.Output.textnum')
Autoload.preregister ('output', 'Textau',  'Pyblio.Output.textau')

# define key formats

Autoload.preregister ('key', 'Default', 'Pyblio.Utils')

# Parse the configuration directory

rootconfig = os.path.join ('Pyblio', 'ConfDir')

if not os.path.isdir (rootconfig):
    rootconfig = os.path.join (version.pybdir, 'Pyblio', 'ConfDir')
    
if os.path.isdir (rootconfig):
    Config.parse_directory (rootconfig)