From bd8894c8a9c406afa1380afc44e421e7d99d9a0d Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 15 Oct 2010 02:52:29 -0400 Subject: [PATCH] Add the capability to modify the project summary field. --- freshmeat-submit | 13 +++++++++++-- freshmeat-submit.xml | 24 +++++++++++++++++++++--- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/freshmeat-submit b/freshmeat-submit index 53b85b5..0e56fd7 100755 --- a/freshmeat-submit +++ b/freshmeat-submit @@ -125,17 +125,23 @@ focus_values = ( # Note: Release Focus is no longer a real Freshmeat field; we'll remap it later. freshmeat_field_map = ( ("Project", "P", "name"), # Project + ("Summary", "S", "oneliner"), # Project ("Description", "D", "description"), # Project ("License-List", "L", "license_list"), # Project + ("Project-Tag-List", "T", "project_tag_list"), # Project ("Version", "v", "version"), # Release ("Changes", "c", "changelog"), # Release ("Hide", "x", "hidden_from_frontpage"), # Release ("Release-Focus", "r", "release_focus"), # Release - ("Tag-List", "t", "tag_list"), # Release + ("Release-Tag-List", "t", "tag_list"), # Release ) # Which attributes have project scope, all others have release scupe -freshmeat_projectwide = ('name', 'description', 'license_list') +freshmeat_projectwide = ('name', + 'description', + 'oneliner', + 'license_list', + 'project_tag_list') def get_rpm_field(fld, rpm): cmd = "rpm --queryformat='%%{%s}' -qp %s" % (fld, rpm) @@ -271,6 +277,9 @@ class FreshmeatMetadataFactory: update.urldict = urllist for (k, v) in data.items(): if k in freshmeat_projectwide: + # Hack to get around a namespace collision + if k == "project_release_tag": + k = "release_tag" update.per_project[k] = v else: update.per_release[k] = v diff --git a/freshmeat-submit.xml b/freshmeat-submit.xml index 5e5ec1d..fbe53e3 100644 --- a/freshmeat-submit.xml +++ b/freshmeat-submit.xml @@ -122,7 +122,17 @@ corresponding command-line switches: Project: Project NAME -p--project -Name of the project (freshmeat shortname) to operate on. +Name of the project (freshmeat shortname) to operate on. You cannot +change the project-name attribute with this program; to do that, you +need to use the Freshmeat web interface. + + + + +Summary: Project - +-S--summary + +One-line summary of the project. @@ -130,7 +140,7 @@ corresponding command-line switches: Description: Project DESCRIPTION -D--description -Description of the project. +Multiline description of the project. @@ -144,6 +154,14 @@ RPM License field, because the values don't map. + +Project-Tag-List:Release - +-T--project-tag-list + +Tags to attach to this project. May be a comma-separated list. + + + Version: Release VERSION -v--version @@ -174,7 +192,7 @@ below. -Tag-List: Release - +Release-Tag-List: Release - -t--tag-list Tags to attach to this release. May be a comma-separated list. -- 2.43.0