pres_dir param and other changes #88

Merged
merged 17 commits into from Aug 9, 2011

Projects

None yet

3 participants

@alexch
Collaborator
alexch commented May 8, 2011

including documentation for new features

@schacon
Owner
schacon commented on 805985d May 5, 2011

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

@davetron5000

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|
  ShowOff.run! :host => options[:h], :port => options[:p].to_i, :pres_dir => options[:pres_dir]
end

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

Collaborator

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)

@davetron5000

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'

?

Collaborator

sounds good

@davetron5000

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

Collaborator

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 :-))

Collaborator

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)

@davetron5000

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
Collaborator
alexch commented Jul 20, 2011

ping

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