[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Install manual, Finnish translation STARTED



Adam Di Carlo <adam@onshore.com> writes:
> Wait, if we have basename, why would we need prefix?
> 
> So if basename is 'dir/foo', and my chapter id is 'bar', and my
> extension is 'html', the URL for the output would be
> 'dir/foo-bar.html', right?  Footnotes could be in
> 'dir/foo-footnotes.html' -- why not?
>
> If the basename is just 'dir/' (trailing slash needed!) and the other
> stuff is the same, the output would be 'dir/bar.html' and
> 'dir/footnotes.html'.  Sound good?

Good thinking!

Ok, let's wrap up what we have so far (using bash-like syntax):

  1. basename = "$dir"
     - html: ext       = ${html_extension:-"html"}
             directory = $dir.$ext
             topfile   = ${topname:-"index"}.$ext
             chapters  = $id.$ext
             footnotes = "footnotes".$ext
     - rest: target    = $dir.${${format}_extension:-${format}_default}
  2. basename = "$dir/$prefix"
     - html: ext       = ${html_extension:-"html"}
             directory = $dir.$ext
             topfile   = $prefix-${topname:-"index"}.$ext
             chapters  = $prefix-$id.$ext
             footnotes = $prefix-"footnotes".$ext
     - rest: target    = $dir.${${format}_extension:-${format}_default}

Note that in the first case the trailing slash is not needed: For html
we already know it indicates a directory.

> The intention here is that *fewer* variable are better.  You've
> flattenned Norm Walsh's three variables (dir, basename, top-filename,
> and, uh, even %use-id-in-filename) to two variables, which is better.

I completely agree! :-)

Thanks,
Ardo
-- 
Ardo van Rangelrooij
home email: avrangel@flevonet.nl, ardo@debian.org
home page:  http://www.tip.nl/users/ardo.van.rangelrooij
PGP fp:     3B 1F 21 72 00 5C 3A 73  7F 72 DF D9 90 78 47 F9


Reply to: