Issues

Issue #4 wontfix

Custom output folder

Justin Forest
created an issue

Poole puts generated files in the output directory. I'm using GitHub Pages to host the web site, it makes a branch publicly available. While it's possible to move contents of output/ to a separate git branch, it's quite complicated and not very convenient.

I use a different approach: I moved Poole and source files to src/, while generated files go to the root folder. I'd like to share my patch.

The patch does two things: (1) adds an optional --output-dir=DIR parameter, which still defaults to "output", and (2) makes sure that the source files aren't deleted during --build in case they're inside the output directory.

Comments (2)

  1. Oben Sonne repo owner
    • changed status to open

    Thanks for the patch and sorry for the long delay in answering your post.

    Looks good, basically, except:

    if real_fod == project_path or real_fod.startswith(project_path + os.path.sep):
    

    Isnt't real_fod == project_path enough? AFAIK glob returns plain names without trailing slashes.

    Also:

    if os.path.basename(fod) in ('.git', '.hg', '.svn'):
        continue
    

    This isn't necessary since glob by default excludes dot-files (only ".*" includes them).

    Please check if these things can be omitted and provide an correspondingly updated patch.

    Thanks and cheers,

    Oben

  2. Oben Sonne repo owner

    I think this is a too specific feature. The shared patch might be some help for users interested in such a feature. Anyway, symlinks might be a more straight-forward solution to handle individual preferences for folder locations.

  3. Log in to comment