Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question led to a new package:
ctanupload

sty2dtx and ctanify are useful tools to prepare clean packages to CTAN. Is there also a tool to upload the package from a terminal?

share|improve this question
    
I made once a Makefile which called firefox with the complete form data except the file name as part of the URL, but it doesn't work any longer. Might be caused by changes in the CTAN upload form or maybe by the new Firefox version. However, it then didn't worked in my tests with other browser as well. –  Martin Scharrer Sep 2 '11 at 8:34
    
@Martin: oh my! Wouldn't curl do the job? –  ℝaphink Sep 2 '11 at 8:35
    
It looks like it would. Also a Perl script using a WWW library would also be an option. It then could display the data first before sending it. I don't think the CTAN admins woudl be happy to get a lot of faulty uploads ;-) –  Martin Scharrer Sep 2 '11 at 8:45
    
@Martin: indeed, we would need to check stuff before uploading. Ideally, I think the script would call ctanify to make sure to upload something clean, and parse the archive to get the author, package name, description, version, etc. It would then ask for confirmation before sending. –  ℝaphink Sep 2 '11 at 8:47
    
Parsing the archive would be cumbersome and error-prone. The script should be called with the correct data. The whole thing including ctanify can then be part of a Makefile. –  Martin Scharrer Sep 2 '11 at 8:50

1 Answer 1

up vote 14 down vote accepted

Update 2011/09/07: Now on CTAN: ctanupload, including PDF manual.

I had now a look on how to code a script to handle the WWW form upload and went with Perl and the WWW::Mechanize library. The following script allows to upload a contribution to CTAN. The form fields can be provided using --<name>=<value> or using environment variables, which simplifies the use in Makefiles. I also implemented an interactive mode and error checking for the input. I uploaded the script itself to CTAN as ctanupload.

Usage:

See README file on CTAN.

Script:

Available on CTAN ctanupload.pl or over the source code repository: https://bitbucket.org/martin_scharrer/ctanupload

share|improve this answer
    
Hats off to you, Martin! The Mechanize library is awesome! –  Paulo Cereda Sep 2 '11 at 13:04
    
Great! Would you like to write a post on the TeX.SX blog about it? –  ℝaphink Sep 3 '11 at 8:50
    
@Martin: Very clever, but I'm left wondering if this is actually easier than filling out the form :-) –  Joseph Wright Sep 3 '11 at 8:50
    
@Joseph — I know I would certainly prefer to use a script! I'm looking forward to using this. –  Will Robertson Sep 3 '11 at 9:22
    
@Joseph: Directly from the command line it isn't easier, but you can configure many constant things using a script or Makefile, so you only have to add the summary and announcement text. –  Martin Scharrer Sep 3 '11 at 9:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.