~ubuntu-branches/ubuntu/karmic/pybliographer/karmic

« back to all changes in this revision

Viewing changes to Pyblio/Format/OvidLike.py

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Van Wambeke
  • Date: 2009-08-13 09:17:42 UTC
  • mfrom: (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090813091742-pgh3g1hch0suzexc
Tags: 1.2.12-1ubuntu1
* New upstream release. (LP: #357413)
* Merge from debian unstable, remaining changes: (LP: #412890)
  - Bump build-deps for python-dev to allow 2.6
  - Add manpages from Nis Martensen, adjust debian/rules, and add debian/
    manpages
  - Add b-d-i for scrollkeeper and modify doc/C/pybliographer-C.omf to use
    XML DTD from scrollkeeper instead of from sourceforge
  - Dropped specific build-deps for python-bibtex (>= 1.2.4-1ubuntu1)
* Bumped standards to 3.8.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
268
268
    output.write ('<%d>\n' % counter)
269
269
 
270
270
    keys = entry.keys()
 
271
    keys.sort()
271
272
 
272
273
    write_source_field (output, entry, keys)
273
274
     
312
313
        output.write('\n')
313
314
 
314
315
 
315
 
def write_author_field (output, value):
316
 
    auths = [ '%s %s' % (auth.last or '', auth.first or '')
317
 
              for auth in value]
318
 
    output.write ('  ')
319
 
    output.write ('  '.join (auths))
320
 
    output.write ('\n')
 
316
def write_author_field(output, value):
 
317
    # Initials are grouped together in Ovid (ie I. E. becomes IE.)
 
318
    auths = []
 
319
    for auth in value:
 
320
        parts = [auth.last]
 
321
        if auth.first:
 
322
            parts.append(''.join(word[0].upper()
 
323
                                 for word in auth.first.split(' ')) + '.')
 
324
        auths.append(' '.join(parts))
 
325
    output.write('  ')
 
326
    output.write('  '.join (auths))
 
327
    output.write('\n')
321
328
 
322
329
 
323
330
def write_source_field (output, entry, keys):