Skip to content

Support an "assets" directory to copy into target #751

@tomschr

Description

@tomschr

Problem description

Sometimes a deliverable comes with additional files or directories like public keys (=SUSE AI), configuration files, ZIP archives, PDFs from partners, or maybe even small videos.

Previously, we collected them and added them into the external tree. For small (text) files it's overkill and feels disconnected from the main source.

I would be great if DAPS could copy an "extras" directory to the target directory.

Expected behavior

To enable this feature, provide an option for the command line and a key for the DC file. Maybe something like:

HTML_EXTRA_DIR=assets

As the feature is only useful for HTML, we could remove the prefix for the CLI option and name it --extra-dir=.... Name it whatever you like, it's just a suggestion. Here are a few others:

  • HTML_ASSETS_DIR
  • HTML_RESOURCES_DIR
  • HTML_ATTACHMENTS_DIR

As always, command line option takes precedence over an option in the DC file.

Ideas for implementation

When the above option is passed to DAPS, I see two option how to implement it:

  • Copy the directory into the target directory ("container approach")
    You copy an assets to build/.../html/.../, the result is build/.../html/.../assets/.
  • Copy the content into the target directory ("flat approach")
    You copy the content of assets/* to build/.../html/.../. A file assets/foo.txt would be copied to build/.../html/.../foo.txt

Depending on the exact implementation (with or without rsync) the second approach may be harder and would leave orphans. Additionally, it becomes more messy as it's harder to distinguish between generated HTML files and asset files.

An additional challenge may be when the current directory and the directory with the DC file is different.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions