[publican-list] RFC: Make -langs=en-US the default language for command line args

Joshua Wulf jwulf at redhat.com
Wed Jun 2 22:45:44 UTC 2010


On 06/02/2010 03:44 PM, Jared Morgan wrote:
> I've seen a number of emails flying around that show some nice aliases 
> for publican commands.  I know many people have implemented their own 
> aliases to quickly execute basic en-US book builds.
>
> When we build a book, I would imagine most people would want to 
> publish en-US versions initially.  So why don't we set this as the 
> default language in command-line arguments, rather than having to 
> specify it each time?
>
> So instead of executing "publican build -langs=en-US -formats html", 
> it would simply be "publican build -formats html".
>
> For those users who need to generate language-specific versions, they 
> could override the default by specifying the --langs option when they 
> execute their publish command.
>
> There might be other ways we can shorten what users need to type as 
> well. How about a "-formats online" option which generates html, and 
> html-single (possibly even ePub).
>
> Thoughts?
>
> Cheers
>
> Jared Morgan
> Content Author
> Red Hat Asia Pacific
> 1/193 North Quay
> BRISBANE QLD 4000
>
> P: +61 7 3514 8242
> M: +61 413 005 479
>
>
> _______________________________________________
> publican-list mailing list
> publican-list at redhat.com
> https://www.redhat.com/mailman/listinfo/publican-list
> Wiki: https://fedorahosted.org/publican

$ diff /usr/lib/perl5/vendor_perl/5.10.0/Publican/Builder.pm 
/usr/lib/perl5/vendor_perl/5.10.0/Publican/Builder.pm.old
99,100c99,100
<    my $langs = delete( $args->{langs} )
<         || 'en-US';
---
 >     my $langs = delete( $args->{langs} )
 >         || croak( maketext("langs is a mandatory argument") );

"There I fixed it" - the wonders of open source. :-)

Untested and unsupported, usual disclaimers apply.

Probably a better way to do it would be to have a per-user 
publican.defaults file with default  behaviour information in it, and 
maybe a system-wide one in /etc, or something like that.

- Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/publican-list/attachments/20100603/be21d783/attachment.htm>


More information about the publican-list mailing list