content = json.loads(handle.read())
content = content['project']
self.permalink = content['permalink']
- if self.verbose:
- print "Permalink:", self.permalink
def issue_wrapped_request(self, url, request):
"Wrap a JSON object with the auth code and ship it as a POST request"
headers = {"Content-Type" : "application/json"}
if self.verbose:
print "Request URL:", url
+ #if self.verbose:
+ # print "Request headers:", headers
if self.verbose:
print "Request data:", data
- if self.verbose:
- print "Request headers:", headers
if self.emit_enable:
handle = urllib2.urlopen(urllib2.Request(url=url, data=data, headers=headers))
if self.verbose:
self.argument_parser.add_option('-n', '--no-stdin', dest='read',
default=True, action='store_false',
help='Suppress reading fields from stdin.')
- self.argument_parser.add_option('-N', '--noemit', dest='noemit',
+ self.argument_parser.add_option('-N', '--dryrun', dest='dryrun',
default=False, action='store_true',
help='Suppress reading fields from stdin.')
self.argument_parser.add_option('-V', '--verbose', dest='verbose',
raise FreshmeatSessionException("Version conflict on stdin.")
# Merge in options from the command line;
# they override what's on stdin.
- controls = ('read', 'delete', 'no-stdin', 'noemit', 'verbose')
+ controls = ('read', 'delete', 'no-stdin', 'dryrun', 'verbose')
prior_version = data.get("version")
for (key, value) in options.__dict__.items():
if key not in controls and value != None:
# Some switches shouldn't be passed to the server
verbose = 'verbose' in options.__dict__ and options.verbose
delete = 'delete' in options.__dict__ and options.delete
- noemit = 'noemit' in options.__dict__ and options.noemit
+ dryrun = 'dryrun' in options.__dict__ and options.dryrun
# Time to ship the update.
# Establish session
- session = FreshmeatSession(verbose=int(verbose), emit_enable=not noemit)
+ session = FreshmeatSession(verbose=int(verbose), emit_enable=not dryrun)
session.on_project(update.name)
# OK, now actually add or delete the release.
if update.per_release:
<variablelist>
<varlistentry>
-<term>-d</term>
+<term>-d, --delete</term>
<listitem>
<para>Delete the specified release rather than submitting it. With
this option, all data other than Project and Release are
</listitem>
</varlistentry>
<varlistentry>
-<term>-n</term>
+<term>-n, --no-stdin</term>
<listitem>
<para>Process command-line options only; don't read data from
standard input.</para>
</listitem>
</varlistentry>
<varlistentry>
-<term>-N</term>
+<term>-N, --dryrun</term>
<listitem>
<para>Dump the generated JSON, but don't ship it. to Freshmeat.</para>
</listitem>
</varlistentry>
<varlistentry>
-<term>-V</term>
+<term>-V, --verbose</term>
<listitem>
<para>Enable verbose debugging of the transaction. This
option is mainly for developers.</para>
</tgroup>
</informaltable>
-<para>The License-List and all URL fields, when specified, actually change
-the record for the project. Only the Tag-List, Changes, Version,
-Release-Focus, and Hide fields are actually stored for each
-version.</para>
+<para>The Summary, Description, License-List, Project-Tag-List and all
+URL fields, when specified, actually change the record for the
+project. Only the Tag-List, Changes, Version, Release-Focus, and Hide
+fields are actually stored for each version.</para>
<para>Here are the release-focus types. Either the string or the
integer is acceptable. Case of the string is significant.</para>