]> thyrsus.com Git - freecode-submit.git/commitdiff
Name changes and documentation.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 15 Oct 2010 07:20:38 +0000 (03:20 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 15 Oct 2010 07:20:38 +0000 (03:20 -0400)
freshmeat-submit
freshmeat-submit.xml

index 98a9fde11315af4f0d179c2ca0ed0118fd4fa423..e891f40d64a6140c23bb5356eb8872c5963aaeba 100755 (executable)
@@ -66,8 +66,6 @@ class FreshmeatSession:
         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"
@@ -78,10 +76,10 @@ class FreshmeatSession:
         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:
@@ -207,7 +205,7 @@ class FreshmeatMetadataFactory:
         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',
@@ -247,7 +245,7 @@ class FreshmeatMetadataFactory:
                 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:
@@ -299,10 +297,10 @@ if __name__ == "__main__":
         # 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:
index fbe53e34942e718365e31c4d13d86bda3083b328..285e78964d2de5004a772f5b2b8dea170f6fcc93 100644 (file)
@@ -46,7 +46,7 @@ freshmeat database via its API.</para>
 
 <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
@@ -56,20 +56,20 @@ this mode will throw an error.</para>
 </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>
@@ -227,10 +227,10 @@ release will not be visible on the project page.</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>