pres_dir param and other changes #88

merged 17 commits into from Aug 9, 2011


None yet

3 participants

alexch commented May 8, 2011

including documentation for new features

schacon commented on 805985d May 5, 2011

I feel stupid - I honestly didn't even know you could do this in markdown.


This will not do what you think. What you want is:

c.desc "Presentation directory"
c.default_value '.'
c.arg_name 'path_to_dir'
c.flag [:pres_dir,:pres-dir] # I like dashes :)
c.action do |global_options,options,args|! :host => options[:h], :port => options[:p].to_i, :pres_dir => options[:pres_dir]

What you have works incidentally, but you didn't actually specify a flag named pres_dir so it won't get documented and can't be specified via a command-line option


I didn't want it specified via an option... just as an argument, e.g. "showoff serve foo". It felt right as an argument since we are serving that directory. Is there a reason to make it an option instead? Seemed like just more typing to me.

Also, I figured out CLI better and it up to where it's supposed to be in a later commit: 186bedc#L59R59

I see; I didn't see your later commit. I dunno; my opinion is everything should be an option and that the actual arguments should be reserved for glob-friendly things (which, arguably, don't make sense for showoff anyway, so it's probably moot)


I like this feature, but I'm not sure I would know what it was; what about

c.desc 'JSON file used to drive presentation'



sounds good


+1, this is awesome. I have typed :1,$s/^#/<!SLIDE>^V^M/g so many times in vi…


There should also be "showoff slidify" which does that and saves it, but this is good to bootstrap an existing Markdown file. (Suggestions welcome for a better command name :-))


btw, my fork now has code that makes all H1s create a new slide (unless they're the first thing on a slide) --
see c8f9451 and c84e41f
(or wait for me to get around to making a proper pull request)


Most of the CLI documentation is/can be generated. If you run bin/showoff rdoc, it will create showoff.rdoc which is generated docs for all of the command-line arguments and interface. You can just drop that in to replace the existing section and don't have to maintain it by hand.

alexch commented Jul 20, 2011


plus I've been doing a lot more on my main branch... I'll organize it into branches soon

@schacon schacon merged commit d389688 into schacon:master Aug 9, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment