I solved this now using a Greasemonkey script which copies the URL parameters to the form.
The Makefile calls firefox with the URL including the parameters.
This works for my needs. Some refinements would be needed for more complex input, i.e. some URL encoding.
User Script:
// ==UserScript==
// @name Fill CTAN upload form
// @namespace http://www.scharrer-online.de/namespace/
// @description Fills the CTAN upload form with the data provided as URL variables
// @include http://*.ctan.org/upload.html*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// ==/UserScript==
//var $ = unsafeWindow.jQuery;
// From http://papermashup.com/read-url-get-variables-withjavascript/
// Added: decodeURI
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = decodeURI(value);
});
return vars;
}
var vars = getUrlVars();
for (name in vars) {
$("input[name=" + name + "]").val(vars[name]);
$("select[name=" + name + "]").find("option:selected").removeAttr('selected');
$("select[name=" + name + "]").find("option[value=" + vars[name] + "]")
.attr('selected','selected');
}
if ('DoNotAnnounce' in vars) {
var val = vars['DoNotAnnounce'].toLowerCase();
if (val == '1' || val == 'yes' || val == 'true') {
$("input[name=DoNotAnnounce]").attr('checked','checked');
}
}
Makefile:
# CTAN Upload
CTAN=http://dante.ctan.org/upload.html
CONTRIBUTION=filemod
VERSION=
NAME=John Doe
EMAIL=john.doe@somewhere.com
SUMMARY=Updated to ${VERSION}:
DIRECTORY=/macros/latex/contrib/${CONTRIBUTION}
DONOTANNOUNCE=
ANNOUNCEMENT=
NOTES=
LICENCE=free
FREEVERSION=lppl
#FILE= # can't be set because of security limitations
upload: ctanify
firefox 'http://dante.ctan.org/upload.html?contribution=${CONTRIBUTION}&version=${VERSION}&name=${NAME}&email=${EMAIL}&summary=${SUMMARY}&directory=${DIRECTORY}&DoNotAnnounce=${DONOTANNOUNCE}&announce=${ANNOUNCEMENT}¬es=${NOTES}&license=${LICENCE}&freeversion=${FREEVERSION}' &