Skip to content

Short utility scripts that make it easy to connect codePost with JSFiddle

Notifications You must be signed in to change notification settings

codepost-io/integration-jsfiddle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Integrating with JSFiddle

This repository contains a short utility script that make it easy to import student submissions from JSFiddle to codePost.

0. List all JSFiddle URLs

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.

1. Create a roster

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]

2. Run the script

Clone this repository or copy the python script jsfiddle_to_codepost.py to your local machine. Collect this script, fiddles.txt, and roster.csvinto 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

3. Upload to codePost

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.

About

Short utility scripts that make it easy to connect codePost with JSFiddle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages