Re: clojure.contrib.command-line

2011-07-29 Thread OGINO Masanori
> no reason other than its a small lib with a handful of functions... I see. Thanks. -- Name: OGINO Masanori (荻野 雅紀) E-mail: masanori.og...@gmail.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googl

Re: clojure.contrib.command-line

2011-07-29 Thread octopusgrabbus
Thanks. This fixed it. On Jul 29, 9:45 am, gaz jones wrote: > it lives on github:http://github.com/clojure/tools.cli > like all the new contrib libs, to use it in a project you need to add > it to your dependencies: > > :dependencies [[org.clojure/clojure "1.2.1"] >                       [org.clo

Re: clojure.contrib.command-line

2011-07-29 Thread gaz jones
> Well, README and tests are very good. > I withdrew into REPL and overlooked them stupidly. I'm very sorry. > no worries, glad they help. > BTW some functions seems not to be public API though they are public. > Why they are not separated by defn- or specific namespace like > clojure.tools.cli.i

Re: clojure.contrib.command-line

2011-07-29 Thread gaz jones
it lives on github: http://github.com/clojure/tools.cli like all the new contrib libs, to use it in a project you need to add it to your dependencies: :dependencies [[org.clojure/clojure "1.2.1"] [org.clojure/tools.cli "0.1.0"]] On Fri, Jul 29, 2011 at 7:56 AM, octopusgrabb

Re: clojure.contrib.command-line

2011-07-29 Thread octopusgrabbus
On Jul 28, 7:24 pm, Anthony Grimes wrote: > command-line is deprecated in favor of tools.cli > now.http://github.com/clojure/tools.cli Where is the repository located? (ns addr-verify (:gen-class) (:require [clojure.tools.cli :only (cli optional)]) . . . results in this error: clojur

Re: clojure.contrib.command-line

2011-07-28 Thread OGINO Masanori
Well, README and tests are very good. I withdrew into REPL and overlooked them stupidly. I'm very sorry. BTW some functions seems not to be public API though they are public. Why they are not separated by defn- or specific namespace like clojure.tools.cli.internals? -- Name: OGINO Masanori (荻野

Re: clojure.contrib.command-line

2011-07-28 Thread gaz jones
are there any scenarios in particular you feel need more documentation? im happy to add more if it is lacking. hopefully the README on the project page and tests provide a pretty good idea of what options are available: https://github.com/clojure/tools.cli https://github.com/clojure/tools.cli/blob

Re: clojure.contrib.command-line

2011-07-28 Thread OGINO Masanori
(defn -main [& args] (with-command-line args "Get csv file name" [[in-file-name ".csv input file name" "resultset.csv" ]] (println "in-file-name:", in-file-name))) The second vector of vector seems unnecessary. Or tools.cli way: (ns foo.main (:gen-class) (:use [clojure.tools.cli :o

Re: clojure.contrib.command-line

2011-07-28 Thread octopusgrabbus
Thanks. I'll switch over. On Jul 28, 7:24 pm, Anthony Grimes wrote: > command-line is deprecated in favor of tools.cli > now.http://github.com/clojure/tools.cli -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cl

Re: clojure.contrib.command-line

2011-07-28 Thread Anthony Grimes
command-line is deprecated in favor of tools.cli now. http://github.com/clojure/tools.cli -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - p

clojure.contrib.command-line

2011-07-28 Thread octopusgrabbus
Are there any command-line examples or documentation other than what's up on clojure.org or ClojureDocs? I'm using (defn -main [& args] (with-command-line args "Get csv file name" [[in-file-name ".csv input file name" "resultset.csv" ]] [[in-file-name ".csv input file name" 1]]

Re: dynamically create cmdspec for clojure.contrib.command-line

2011-06-27 Thread Marc Limotte
t;something about foo" nil] remaining])) (clojure.contrib.command-line/with-command-line user/args "desc" [[foo "something about foo" nil] remaining] (clojure.core/prn user/foo)) But breaks: user=> (my-with-cl [[foo "something about foo" nil] remaining]) java

Aw: dynamically create cmdspec for clojure.contrib.command-line

2011-06-27 Thread Meikel Brandmeyer
Hi, Am Sonntag, 26. Juni 2011 17:22:14 UTC+2 schrieb mlimotte: user> (my-with-cl '[[foo "something about foo" nil]]) > ; Evaluation aborted. > Exception: Unsupported binding form: something about foo > Leave out the ' in front of the vector. with-command-line quotes it for you. Adding the quote

Re: dynamically create cmdspec for clojure.contrib.command-line

2011-06-26 Thread Ken Wesson
On Sun, Jun 26, 2011 at 11:22 AM, Marc Limotte wrote: > And (macroexpand (my-with-cl ...)) throws the same exception. Macroexpand's a normal function, not a macro, so you need to quote its argument. -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is

dynamically create cmdspec for clojure.contrib.command-line

2011-06-26 Thread Marc Limotte
Hi. I'm trying to understand why the following macro doesn't work. This is a trivial example, but ultimately I want to create a macro that will let me dynamically create the cmdspec for clojure.contrib.command-line/with-command-line. I haven't written many macros, so my genera

Re: Specifying files with spaces in the name to clojure.contrib.command-line

2009-02-14 Thread Chouser
On Sat, Feb 14, 2009 at 3:56 PM, Kevin Albrecht wrote: > > P.S. Also, unrelated to this problem, the following line in the > example code in command_line.clj is missing the vector surrounding the > bindings of the doseq: > > :else (doseq filename filenames Fixed, thanks. --Chouser --~--

Re: Specifying files with spaces in the name to clojure.contrib.command-line

2009-02-14 Thread Kevin Albrecht
Ah, this was the problem, thanks. Michael Wood wrote: > java -server -cp "${CLASSPATH}" clojure.main "${script}" "$@" > > The quotes are necessary around the $@, otherwise you will get the > symptoms you are seeing. --~--~-~--~~~---~--~~ You received this message b

Re: Specifying files with spaces in the name to clojure.contrib.command-line

2009-02-14 Thread Michael Wood
On Sat, Feb 14, 2009 at 10:56 PM, Kevin Albrecht wrote: > > This utility is very useful, but it seems unable to handle passing in > file names with spaces in them. > > Example program: > > ;- begin args.clj > (ns args > (:use clojure.contrib.command-li

Specifying files with spaces in the name to clojure.contrib.command-line

2009-02-14 Thread Kevin Albrecht
This utility is very useful, but it seems unable to handle passing in file names with spaces in them. Example program: ;- begin args.clj (ns args (:use clojure.contrib.command-line)) (with-command-line *command-line-args* "args -- test of args" [filenames] (doseq

Re: clojure.contrib.command-line patch: multiple option format

2009-01-29 Thread Perry Trolard
Patch attached to issue at http://code.google.com/p/clojure-contrib/issues/detail?id=24 On Jan 28, 7:55 pm, Chouser wrote: > Please make the 'justify' fn (whatever you want to call it) private > for now so that it doesn't become another API to be maintained.  If it > proves to be more gener

Re: clojure.contrib.command-line patch: multiple option format

2009-01-28 Thread Chouser
On Wed, Jan 28, 2009 at 1:40 PM, Perry Trolard wrote: > > Is there anything I can do to help get the proposed change above, or > something like it, included in c.c.command-line? I'd be happy to > modify the patch: removing the somewhat orthogonal alignment code, > etc. I've been conflicted over

Re: clojure.contrib.command-line patch: multiple option format

2009-01-28 Thread Perry Trolard
Hi Chouser, Is there anything I can do to help get the proposed change above, or something like it, included in c.c.command-line? I'd be happy to modify the patch: removing the somewhat orthogonal alignment code, etc. Thanks, Perry --~--~-~--~~~---~--~~ You receiv

Re: clojure.contrib.command-line patch: multiple option format

2009-01-14 Thread Perry Trolard
A thought: if you end up using the patch, I gave the 'justify' function an inappropriate name. It should be 'align' or 'align-cols' or some such. (No one in their right mind would justify text on the console!) Perry On Jan 14, 3:16 pm, Perry Trolard wrote: > Hi Chouser, > > Thanks for checking

Re: clojure.contrib.command-line patch: multiple option format

2009-01-14 Thread Perry Trolard
Hi Chouser, Thanks for checking out the patch. > It's a good idea.  Any sane way to allow the single-letter variety to > be specified with a single leading dash, instead of a double-dash? Single or double dashes should work for both kinds of options (long- or short-style), based on your code. T

Re: clojure.contrib.command-line patch: multiple option format

2009-01-14 Thread Chouser
On Tue, Jan 13, 2009 at 8:08 PM, Perry Trolard wrote: > > Hi Chouser & list, > > I like clojure.contrib.command-line -- thanks for it! -- but I wanted > to be able to specify multiple forms for an option, e.g. --help, -h, > -?, etc. Here (in the Files section) > >

clojure.contrib.command-line patch: multiple option format

2009-01-13 Thread Perry Trolard
Hi Chouser & list, I like clojure.contrib.command-line -- thanks for it! -- but I wanted to be able to specify multiple forms for an option, e.g. --help, -h, -?, etc. Here (in the Files section) http://bit.ly/fIVH is a patch to enable it (the values are bound only to the first form g