Export a Codecademy Exercise to Plain Text
currently for JavaScript exercises only
What’s this about?
Some Codecademy educators (like myself) want to edit and backup their exercise code outside of the Codecademy editor:
- using a real text editor
- using git for collaboration and version control
So I created an export script to allow copying the entire exercise description (with Hint and Solution) into a Markdown file. It'll also help you copy the JavaScript (including Correctness Test) to a JavaScript file. The script will show an overlay with two text areas to copy the Markdown text and the JavaScript code from.
Unfortunately there's no way of getting the content back into the exercise, so the re-import will involve up to 8 copy & paste operations:
- Exercise title
- Educational text
- Exercise instructions
- Exercise hint
- JavaScript default code
- JavaScript SCT code
- Solution text
- Solution code
OK, so how do I use it?
Just add this bookmarklet to your Bookmarks (e.g. by dragging it to the Bookmarks Bar):
It only works on a Codecademy exercise in edit view. Just open one of the exercises you are authoring and click the bookmarklet (tested with Google Chrome on a Mac). It should display something like this.
Source & Credits
The bookmarklet was inspired by the fantastic Correctness Test Viewer bookmarklet written by Michael Tackes. The source code is shown below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|