Those who have done or doing competitive programming, is somehow familiar with SPOJ online judge. Some of the people have solved a lot of problems there. But there are many people who have not started in a structured way or somehow lost all of their accepted codes. But there is a special feature in SPOJ, that we can see or download all of our accepted solutions from our submission page. But it will be really cumbersome to download them manually.
So here is I am to rescue. I have developed a python script to download all of your accepted codes in a structured way. The features of the script are —
- Download all of your accepted codes on SPOJ.
- If there are multiple submission for a single problem, then it downloads all.
- The file name architecture will be “problemName_submissionId”
- File extensions will be cpp for C++ programs; others are on development.
- If you have downloaded now and later solved more problems, then if you execute the script in the same place, it won’t download the previous codes. The submission ids will be saved on a text file name “downloaded” in the same folder.
You can find the script in this link; all the instructions to run the script are given there.
I have also developed another script to download Codeforces code, but recently found some bugs in it. I will repost after solving the bugs.
If you find any bugs or problems regarding the script or want new features, comment here or open an issue on Github. I will try to respond as soon as possible.