adapted publish.coffee to use command-line arguments