DO NOT SHARE THE DATA YOU GET AND DO NOT PUT IT PUBLICLY ONLINE (no public repo or anything like that). This is for analysis only and it will be anonymized.
- tl;dr is at the top
- Setting Up
- Running the Code
- FAQ
- Clone at https://github.com/knod/pa-data
- Pick a row at https://docs.google.com/spreadsheets/d/1HkdWJVs0fMROBgHt8xol1gVV252ln8D5dhSEuDQzeT4/edit?usp=sharing that hasn't been assigned to someone and add your name. Run the command in the Command column.
Do not run this in multiple terminals. It's slow on purpose.
Add "{\"alerts\":\"no\"}"
to the end of your command. (See lower down for settings)
You need to have these on your computer
Use homebrew if you've got it (you'll know if you do). Installing globally is easiest.
If you don't know how to install it already, download it manually: https://nodejs.org/en/download/. It may get put in a hidden folder. We're trying to figure out if that's bad. Let us know if you have it figured out.
- Make an account on Github
- Download the Github desktop application: https://desktop.github.com/
- Open the application and log-in
- After you log-in it’ll show your username and some other information associated with your account – you can keep this information just as is it is
- On the far right of the screen select “clone repository”
- Move over to the “URL” tab and enter the URL for our project: https://github.com/knod/pa-data
- You can also assign a file location for the folder your are cloning
- Click “Fetch origin” at the top of the page to make sure you have cloned the most up-to-date version of the code
Download here (https://git-scm.com/download/win) into the same folder as nodejs? We're working on figuring this out.
- If you're on windows and downloaded nodejs manually, find where it got installed on your computer. Put all the other folders in this folder with it. It may be in a hidden folder. We're working on figuring that out.
- go to https://github.com/knod/pa-data
- If you know how:
- clone the repo
- If not:
- click 'clone or download'
- click 'download zip'?
- extract folder
- If you downloaded and extracted on windows: put it in the same folder where nodejs is
- DO NOT DELETE THIS FOLDER
If you're on windows and you want the alert sound to work and you don't have an mp3 player already, try these instructions (see 'Windows – install audio player'): https://thisdavej.com/node-js-playing-sounds-to-provide-notifications/. No one I know has tried this yet.
- Make sure your computer isn't going to go to sleep.
- Plug your computer into power.
- open command prompt
- navigate into extracted folder
- type:
npm install
- press enter
- wait
- You don't have to do one whole assignment all at once. Completing an assignment can take at least 9 or 10 hours in total.
- Open a browser and go to the spreadsheet.
- Pick a row (if you don't already have an assignment) and put your name under the Who column.
- Copy the text in the Command column.
- Do not run this in multiple terminal windows. It's slow on purpose.
- Go to your command prompt and paste the code from the google doc
- Press enter
- You might get an error the first time you run the assignment. Just run it again.
- It'll now probably keep going till it's done with the assignment and prints the message 'success'.
- There might be sound effects if your sound is on, including a clucking sound effect for finishing.
- There will sometimes be errors. You can usually just let it run - the code can usually deal with those, though sometimes it has to make itself wait for an hour or two.
- When in any doubt whatsoever, you know who to contact!
- Check the google doc to put your name next to another assignment. (See getting your assignment)
- The command may have changed. It should be updated in there, so copying and pasting should be fine.
- Possibly (if you cloned the repo and want to risk possible new bugs) do:
git add .
git commit
git pull origin master
npm install
In the assignments
folder, you will find your assignment json file containing your default object. Those are your settings. If you want to change any of them, you can put a json object at the end of your command. It'd look something like this:
windows
node mdj-by-names.js mdj5k "{\"wait\":600,\"alerts\":\"no\"}"
mac
node mdj-by-names.js mdj5k '{"wait":600,"alerts":"no"}'
wait
: It's used tothrottle
in several places. It's multiplied by different values in those places. If you need more throttling, give this a larger value.alerts
: Sounds will alert you to the state of the program, but it's meant to be just left to run. If you don't want the sounds, set this to"no"
.
It's probably not a good idea to customize other ones. They're what's keeping everyone in line.
- You'll still be able to do other stuff on your computer.
- You can run it at night safely.
- You should not run this in multiple terminal windows. It's slow on purpose. See the last item here.
- You'll be able to use other terminal windows for other things.
- You don't have to do one whole assignment all at once. Completing an assignment can take at least 9 or 10 hours in total.
- There will sometimes be errors. You can usually just let it run - the code can usually deal with those, though sometimes it has to make itself wait for an hour or two.
- There are sound effects. You can opt out. See Settings.
- The code should run by itself. You shouldn't have to do anything after running the command. It should do the whole assignment.
- When it finishes all of the assignment, it'll show the message 'success' at the bottom. It might cluck.
- If it gets interrupted and you have to put in the command again, it should remember where it was when it stopped.
- If it gets stuck on the site in various ways, it'll deal with that too. It'll first wait a couple minutes and try again and then wait an hour or two before trying again. Those tactics usually work. If not, it will stop itself eventually with the message 'gave up'. You can definitely try starting again.
- The code tries to limit itself to less than 1 file per 4.5 seconds. If you go over 830 files in 1 hour you have a good chance that their servers won't like your computer anymore for (we think) 2 hours.
If you know sites with tutorials we can link to for some of this stuff, let us know. If you have thoughts on improving the instructions, give us a shout.
Don't hesitate to reach out. We want your sweet sweet messages!