File: import-export.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 (16 lines) | stat: -rw-r--r-- 321 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import sys
from Pyblio import Selection, Sort

how = sys.argv [2]

if how == '': how = None

a = bibopen (sys.argv [3], how)

f = open (sys.argv [4], 'w')

# write out in the key order
sel = Selection.Selection (sort = Sort.Sort ([Sort.KeySort ()]))
it  = sel.iterator (a.iterator ())

bibwrite (it, out = f, how = a.id)