ETA: The README indicates that you need Git, but that’s just to get the repo. Anyone who wants to do this on a computer that doesn’t have Git (for whatever reason), you can skip the git clone step and just download and unzip.
I do have plans to make it a web app that presents users with a simple form, they put their username in and then it just hands them their zip file. I know the terminal will be a bit intimidating for a lot of people. Express backend with an EJS landing page…nothing fancy.
The scraping logic would be the same, but I think there are nicer ways to create the zip file by streaming the files directly into an archive without having to create an intermediary tmp folder.
It might even be possible without a backend…still need to explore that
My biggest problem with it right now is the amount of files and confusion in the output. Here is what my solutions folder looks like, and there is even more below what’s shown.
I think you should be able to see groupings of each project. Also, does it get clones/forks or just your own pens? Because I fork a lot of people’s pens when helping them, so that might be the problem. I think the Node app is a great idea! Maybe you could scrape the files, sort by project and let the user check which projects they want, and then tar and zip them and send file to user? I say that because I have a lot of crap project ideas I could care nothing about. Should be interesting.
It doesn’t touch projects (pens etc), just solutions to challenges and algorithms.
Sorting them into html and js folders could help organise them a little better.
The current way they are collected is to get all the links on the profile page, only keep the ones that contain a solution (fcc stores all the solution text as a query string in the URL!), and then parses those, before zipping the output folder.
The URL query doesn’t say what section it comes from - we could hard code it in based on the structure of the curriculum…but that was far too annoying a job for me to do yesterday
I figured projects already had a home somewhere - be that GitHub, Glitch or CodePen. I was inspired by the underage kid that got his account deleted - I figured it would be cool to have a quick way to download someone’s progress before wiping an account.
Also, the likes of @p1xt like to do speed runs after nuking their account! If you don’t have the confidence that you can solve all the problems again like she can, a back-up option seems like a must have
Holy crap – this is awesome! I’ve been trying to save as I go, especially the tougher ones or really concise solutions I’m particularly proud of, but in one fell swoop I’ve got them all! Thanks!!!
I really love this idea! You rock! I was taking screenshot after screenshot, now don’t have to do that. Yay! I’ll let you know if there are any issues on Win 10 or the latest Mac OS. Thanks again!
I downloaded a solution today (for the first time). It is a json file where all the code is formatted in a single line, with “\n” used to represent new lines or returns.
What online tool do you recommend to re-format our solution into a prettier format? I’d love to have more readable code solutions.
Thanks.
@simonhlee97 The tool I made has been broken since a security patch on the old curriculum site last year…it shouldn’t give you anything at all these days unless by some weird accident!
Could you paste your solution string here so I can take a look?