www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Customizing ddoc from cmd-line

reply "Peter Sommerfeld" <noreply rubrica.at> writes:
I seem to be unable to customize DDoc from the
command line.

Suppose the sources are in "src", docs in "doc".
Here is my command line (Win7 if that matters):

     dmd -D -Dddoc doc/my.ddoc src/main.d

Nothing happens...

What I would like to do is to add a style sheet
as described in http://dlang.org/ddoc.html.
Isn't it not possible from the cmdline or do
I something wrong here ? How to make it working ?

Peter
Jan 05 2013
next sibling parent "Peter Sommerfeld" <noreply rubrica.at> writes:
Am 05.01.2013, 20:23 Uhr, schrieb Peter Sommerfeld <noreply rubrica.at>:
 Nothing happens...
Sorry, I was imprecise. Of course, the executable as well as the html was generated but my.ddoc had no effect. Peter
Jan 05 2013
prev sibling parent reply =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 01/05/2013 11:23 AM, Peter Sommerfeld wrote:
 I seem to be unable to customize DDoc from the
 command line.

 Suppose the sources are in "src", docs in "doc".
 Here is my command line (Win7 if that matters):

 dmd -D -Dddoc doc/my.ddoc src/main.d

 Nothing happens...

 What I would like to do is to add a style sheet
 as described in http://dlang.org/ddoc.html.
 Isn't it not possible from the cmdline or do
 I something wrong here ? How to make it working ?

 Peter
I used to have issues with ddoc. I remember that I solved it by rearranging the files on the command line. When I compare to the one that works for me, I don't see a -D on my command line. (?) Something like the following may work for you: dmd doc/my.ddoc src/main.d -Dfddoc/main.html Ali
Jan 05 2013
parent "Peter Sommerfeld" <noreply rubrica.at> writes:
06.01.2013 Ali =C7ehreli wrote>:

 On 01/05/2013 11:23 AM, Peter Sommerfeld wrote:
  >
  > I seem to be unable to customize DDoc from the
  > command line.
  >
  > Suppose the sources are in "src", docs in "doc".
  > Here is my command line (Win7 if that matters):
  >
  > dmd -D -Dddoc doc/my.ddoc src/main.d
  >
  > Nothing happens...
  >
  > What I would like to do is to add a style sheet
  > as described in http://dlang.org/ddoc.html.
  > Isn't it not possible from the cmdline or do
  > I something wrong here ? How to make it working ?
  >
  > Peter

 I used to have issues with ddoc. I remember that I solved it by  =
 rearranging the files on the command line.

 When I compare to the one that works for me, I don't see a -D on my  =
 command line. (?) Something like the following may work for you:

    dmd doc/my.ddoc src/main.d -Dfddoc/main.html

 Ali
Thanks Ali, that works. But other then I expected the command line seems to be usable for macros only, not to redefine the page/css. Probably I have to use sc.ini to include a css etc. But I'm not sure it is worth the effort. Another option would be to utilize the JSON output (-X). It contains the needed info, unfortunately the header comment on top of the module is missing. Anyway, I have to investigate the issue further. Peter
Jan 06 2013