Menu

Recursive Directory Creation

Sergio M.
2003-04-22
2003-04-23
  • Sergio M.

    Sergio M. - 2003-04-22

    Hello,

    When I generate documentation with the following command:

    happydoc -F HTMLTable -t "My Source Docs" src parser_docStringFormat=StructuredText

    The /doc directory is created.  However, new subdirectories are also created that mirror the path to my /src directory that I'm documenting.  The path to that /src directory is pretty long, so happydoc ends up creating as many as 10 directories.  Is this by design, or can I just have the multiple html files in one directory?  I have tried disabling recursion, but that doesn't work.  Any suggestions?

    Thanks,

    --Sergio M.

     
    • Doug Hellmann

      Doug Hellmann - 2003-04-22

      Hi, Sergio,

      That is partially by design.  The idea is for you to point HappyDoc at the top-most directory with your files, and it will create package subdirectories so the documentation mirrors the input.  You can, however, point it at a bunch of individual files.  If all of the files are in the same directory, it should just put everything in the doc directory.

      Doug

       
    • Sergio M.

      Sergio M. - 2003-04-22

      Doug,

      Thanks for the input.  Unfortunately, I had already tried feeding happydoc one file at a time, and it still created all of the subdirectories.  All of the files are in the same directory.  I actually even called happydoc from the directory where the file I wanted to document resided.  It still created all of the subdirectories.
      Example:

        The directory: /home/dir0/subdir1/subdir2/src_dir has all of the files I want to document.
        >cd /home/dir0/subdir1/subdir2/src_dir
        >happydoc -F HTMLTable -t "My Source Docs" file1.py file2.py file3.py parser_docStringFormat=StructuredText

        The resulting directory structure is:
           /home/dir0/subdir1/subdir2/src_dir/doc/home/dir0/subdir1/subdir2/src_dir/doc/
      The first /doc directory in the path contain the index.html file.
      The last /doc directory contains an html file and a corresponding directory for each source file, namely file1.html, /file1, file2.html, /file2... you get the idea.

      Any further ideas?

      --Sergio M.

       
      • Doug Hellmann

        Doug Hellmann - 2003-04-22

        Try this:

        > cd /home/dir0/subdir1/subdir2
        > happydoc -t "My Source Docs" src_dir

         
    • Sergio M.

      Sergio M. - 2003-04-23

      All of the directories are still being created when I try your suggestion.  I've tried all of the possible combinations I can think of.
      Can you recreate this problem?

      --Sergio

       
      • Doug Hellmann

        Doug Hellmann - 2003-04-23

        Would it be possible for you to post a tarball containing sample files and the directory structure involved, as well as the exact command(s) you are typing?  I'll try to recreate the problem that way.

        The directory handling in 2.x is broken in a lot of ways.  I completely redesigned that part for 3.x, but I have not had a chance to put together even an alpha release.  The development version in CVS (the HappyDoc3 module) should generate documentation.  You may want to try extracting a copy from CVS.  I will try to get some time to clean things up and put together an alpha release of 3.x this week.

        Doug

         
    • Doug Hellmann

      Doug Hellmann - 2003-04-23

      I have just uploaded an alpha version of 3.0.  It defaults to output similar to that generated by the default docset for 2.x, but also includes a partial implementation of a TAL-driven docset. The problems with output filenames should be resolved, but this was done in a non-backwards compatible way so you will want to move your 2.x output to a different location before running the 3.x version.

       
    • Sergio M.

      Sergio M. - 2003-04-23

      Doug,

      I tried the alpha release and it fixed the path problem.  The only directory created in the /doc was /src_dir and that directory held all of the html files and the index file.
      I have a tarball if you still want it, however I don't know how to post it or otherwise deliver it to you.
      Thanks for your help on this.

      --Sergio M

       
      • Doug Hellmann

        Doug Hellmann - 2003-04-23

        I'd rather spend the time working on 3.x than fixing 2.x, so if you have things working well enough for now there is not really a need for the tarball.

        Let me know if you have any other trouble, I'll try to help.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.