~stefanor/ibid/jabber-reconnect

« back to all changes in this revision

Viewing changes to scripts/ibid-db

  • Committer: Stefano Rivera
  • Date: 2010-01-24 16:16:45 UTC
  • mfrom: (849.1.40 manpages-510020)
  • Revision ID: stefano@rivera.za.net-20100124161645-82rzlod7or7npoot
Add manpages.
Rename the ibid_* scripts to ibid-*
https://code.launchpad.net/~stefanor/ibid/manpages-510020/+merge/17928

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from ibid.db.types import IbidUnicode, IbidUnicodeText
23
23
from ibid.utils import ibid_version
24
24
 
 
25
version = ibid_version() or "bzr"
 
26
 
25
27
parser = OptionParser(usage='%prog [options...]', description=
26
28
"""Ibid Database management tool. Used for import, export, and upgrades.
27
29
Export format is JSON. FILE can be - for stdin/stdout or can end
28
 
in .gz for automatic Gzip compression.""")
 
30
in .gz for automatic Gzip compression.""",
 
31
version=("%prog " + version))
 
32
 
29
33
commands = OptionGroup(parser, 'Modes')
30
34
commands.add_option('-e', '--export', dest='export', metavar='FILE',
31
35
        help='Export DB contents to FILE.')
102
106
 
103
107
    output.write(('# Ibid %(version)s Database dump for %(botname)s '
104
108
            'made on %(date)s\n') % {
105
 
        'version': ibid_version() or 'bzr',
 
109
        'version': version,
106
110
        'botname': ibid.config['botname'],
107
111
        'date': datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ'),
108
112
    })