From 4afcd06a715cc15151960d728054c4cb6328927f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 14 Oct 2010 20:07:38 -0400 Subject: [PATCH] Added support for changing Description field. --- freshmeat-submit | 17 +++++++++------- freshmeat-submit.xml | 47 ++++++++++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/freshmeat-submit b/freshmeat-submit index 465ee6c..b68338d 100755 --- a/freshmeat-submit +++ b/freshmeat-submit @@ -63,13 +63,14 @@ focus_values = ( # Note: Release Focus is no longer a real Freshmeat field; we'll remap it later. freshmeat_field_map = ( - ("Project", "p", "name"), - ("Version", "v", "version"), - ("Changes", "c", "changelog"), - ("Hide", "x", "hidden_from_frontpage"), - ("Release-Focus", "r", "release_focus"), - ("Tag-List", "t", "tag_list"), - ("License-List", "l", "license_list"), + ("Project", "P", "name"), # Project + ("Description", "D", "description"), # Project + ("License-List", "L", "license_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 ) def get_rpm_field(fld, rpm): @@ -85,6 +86,8 @@ def crack_rpm(rpm, meta, urls): # Some fields can be copied literally if present. if not "name" in meta: meta["name"] = get_rpm_field("name", rpm) + if not "description" in meta: + meta["description"] = get_rpm_field("description", rpm) if not "version" in meta: meta["version"] = get_rpm_field("version", rpm) # This doesn't work. The values don't map over. diff --git a/freshmeat-submit.xml b/freshmeat-submit.xml index 227e504..6870b4e 100644 --- a/freshmeat-submit.xml +++ b/freshmeat-submit.xml @@ -103,10 +103,11 @@ field. corresponding command-line switches: - + Message field + Scope RPM tag Short switch Long switch @@ -116,7 +117,7 @@ corresponding command-line switches: -Project: NAME +Project: Project NAME -p--project Name of the project (freshmeat shortname) to operate on. @@ -124,7 +125,25 @@ corresponding command-line switches: -Version: VERSION +Description: Project DESCRIPTION +-p--description + +Description of the project. + + + + +License-List: Project - +-l--license-list + +Specify the licenses under which the release is issued. This +may be a comma-separated list. Note that this is not copied from the +RPM License field, because the values don't map. + + + + +Version: Release VERSION -v--version Version string to be associated with the release. @@ -134,7 +153,7 @@ is decimal digits. -Changes: CHANGELOGTEXT +Changes: Release CHANGELOGTEXT -c--changes The Changes field. Plain text, no more than 600 characters. @@ -144,7 +163,7 @@ from the body of the RFC-822 message on standard input. -Release-Focus: - +Release-Focus:Release - -r--release-focus Purpose of this release. See the table of release-focus types @@ -153,7 +172,7 @@ below. -Tag-List: - +Tag-List: Release - -t--tag-list Tags to attach to this release. May be a comma-separated list. @@ -161,7 +180,7 @@ below. -Hide: - +Hide: Release - -x--hide If this field is present and has the value “Y”, this @@ -170,24 +189,14 @@ release will not be visible on the project page. -License-List: - --l--license-list - -Specify the licenses under which the release is issued. This -may be a comma-separated list. Note that this is not copied from the -RPM License field, because the values don't map. - - - - -Website-URL: URL +Website-URL: Project URL -H--home-page-url Specify the project home page. -Tar/GZ-URL: SOURCE +Tar/GZ-URL: Project SOURCE -G--gzipped-tar-url Specify the URL where a gzipped tarball of source can be found. -- 2.43.0