Support for Bitcoin field in metadata

This commit is contained in:
Ciaran Gultnieks 2012-08-22 17:26:19 +01:00
parent 1df48f7964
commit 5cb5b5b9cd
2 changed files with 11 additions and 0 deletions

View file

@ -425,6 +425,7 @@ The following sections describe the fields recognised within the file.
* Issue Tracker:: * Issue Tracker::
* Donate:: * Donate::
* FlattrID:: * FlattrID::
* Bitcoin::
* Summary:: * Summary::
* Description:: * Description::
* Repo Type:: * Repo Type::
@ -559,6 +560,13 @@ The project's Flattr (http://flattr.com) ID, if it has one. This should be
a numeric ID, such that (for example) https://flattr.com/thing/xxxx leads a numeric ID, such that (for example) https://flattr.com/thing/xxxx leads
directly to the page to donate to the project. directly to the page to donate to the project.
@node Bitcoin
@section Bitcoin
@cindex Bitcoin
A bitcoin address for donating to the project.
@node Summary @node Summary
@section Summary @section Summary

View file

@ -409,6 +409,7 @@ def parse_metadata(metafile, **kw):
thisinfo['Issue Tracker'] = '' thisinfo['Issue Tracker'] = ''
thisinfo['Donate'] = None thisinfo['Donate'] = None
thisinfo['FlattrID'] = None thisinfo['FlattrID'] = None
thisinfo['Bitcoin'] = None
thisinfo['Disabled'] = None thisinfo['Disabled'] = None
thisinfo['AntiFeatures'] = None thisinfo['AntiFeatures'] = None
thisinfo['Update Check Mode'] = 'Market' thisinfo['Update Check Mode'] = 'Market'
@ -547,6 +548,8 @@ def write_metadata(dest, app):
writefield('Donate') writefield('Donate')
if app['FlattrID']: if app['FlattrID']:
writefield('FlattrID') writefield('FlattrID')
if app['Bitcoin']:
writefield('Bitcoin')
mf.write('\n') mf.write('\n')
if app['Name']: if app['Name']:
writefield('Name') writefield('Name')