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.
We could define an
outdir_pattern
which creates an outdir from descriptors within an entry.We could implement a similar approach for the filename.
_Originally posted by @DunklesArchipel in https://github.com/echemdb/unitpackage/pull/39#discussion_r1518977930_