kfl / staffeli_nt

Staffeli NT Technology
MIT License
8 stars 8 forks source link

Split the functionality of the download script #4

Open kfl opened 4 years ago

kfl commented 4 years ago

The download script currently does does two things:

It should be possible to one without the other. Furthermore it might be nice to be able to download just one submission.

kfl commented 4 years ago

The download actually does three things. The troubles in #6 and #7 are because the script does some post-processing of the submissions, where it assumes that submissions follows @kfl preferred structure.

kfl commented 3 years ago

(Repeating comment from #34 on one idea to for do this, so that it is not forgotten.)

The template yaml file could grow a field called post-download (or something like that) that contained some python code that you'd like to run after each download.

Something like:

post-download: |
    import zipfile
    with zipfile.ZipFile("code.zip", 'r') as zip_ref:
         zip_ref.extractall("unpacked")

We might as well take full advantage of python having an exec function.