Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save selected entries in specific subfolders. #41

Open
DunklesArchipel opened this issue Mar 11, 2024 · 0 comments
Open

Save selected entries in specific subfolders. #41

DunklesArchipel opened this issue Mar 11, 2024 · 0 comments

Comments

@DunklesArchipel
Copy link
Member

          We might want to add possibilities to save selected entries in specific subfolders.

We could define an outdir_pattern which creates an outdir from descriptors within an entry.

def pattern(outdir, entry):
    return os.path.join(outdir, entry.user) # stores entries based on the user who created the package

def save_entries(self, outdir=None, outdir_pattern=pattern):
    for entry in self:
        if outdir_pattern:
            outdir = outdir_pattern(outdir, entry)
            entry.save(outdir=outdir)

We could implement a similar approach for the filename.

Originally posted by @DunklesArchipel in #39 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant