This repository contains a short utility script that make it easy to import student submissions from JSFiddle to codePost.
Create a file called fiddles.txt
that contains a list of all the JSFiddle files submitted by students, one per line. There is an example fiddles.txt
file in this repo.
Since JSFiddle URLs are indexed by JSFiddle ID, we need to map {JSFiddle ID} to {email} in order to upload to codePost.
Create a file called roster.csv
with the following information:
jsfiddle_id,email
rfreling,[email protected]
scooper2,[email protected]
aturing,[email protected]
Clone this repository or copy the python script jsfiddle_to_codepost.py
to your local machine. Collect this script, fiddles.txt
, and roster.csv
into one folder. Then run
python3 jsfiddle_to_codepost fiddles.txt roster.csv <name of file>
You should now see a folder called codepost_upload
, whose subfolders correspond to students. Any problem files will show up in the errors
folder. The script will download only the Javascript portion of a Fiddle (but can be extended in the future to download CSS and HTLML, too, as separate files).
codepost_upload/
[email protected]/
file.js
[email protected]/
file.js
[email protected]/
file.js
Navigate to codepost.io, log in, and click Assignments -> Actions -> Upload Submissions -> Multiple Submissions
. Drag codepost_upload
into codePost and voila.
If you prefer to have more control over the upload process, check out our Python SDK.