### koldbyte's blog

By koldbyte, 4 years ago, ,

CodeBack is a tool to download all your code submissions from code contest sites — Codeforces, Spoj and Codechef

How to use it?

1. Enable the checkbox for which you want to fetch submissions.
3. Select a directory where you want to save the codes
4, Select other options as required.
5. Hit Run.


CodeBack will save all the Codes and Problem Statement in following directory format :
(Select Directory) / (Handle) / (ContestSite) / (ProblemName) / (ProblemName)-(SubmissionId).(Ext)

Features:
1) Sites supported — Codeforces, Spoj and Codechef
2) Fetches Problem statement too
3) Option to overwrite/not overwrite existing code.
4) Cross-platform

Screenshot::

Credits: Used some idea from https://github.com/ideamonk/spojbackup for Spoj

TODO::
1) For fetching code of Codeforces gym submissions, password is also required. So currently, no gym submissions will be downloaded.
2) Add check to verify if the handle is valid.

Please give it a try. Update v2:
I have updated the app.
It is now Java7 compatible.
I also added new features — Fetch all AC submissions.
It also includes some bug fixes.

Thanks.

•
• +35
•

 » 4 years ago, # |   0 how do i fix this?
•  » » 4 years ago, # ^ |   0 I tried to fetch using your id. It found 112 submissions. Maybe, It is a internet connection problem. Retry one time more. Btw, I will look why there were no errors if there were problems.
 » 4 years ago, # |   +1 Nice work!!! But I have a query — how many submissions of will be downloaded? I gave a try and found only two rounds' submissions. But I participated in 116 rounds till now. How to download all submissions?
•  » » 4 years ago, # ^ |   +3 Please try again. I tried your handle, and you have 381 submissions. Let me explain how it basically works.It fetches the JSON using codeforces api (example: codeforces.com/api/user.status?handle=Milon)It contains the list of all your submissions.then, it will find the last accepted code for a problem and download it.So, if you have solved 100 problems, it will download the last AC code for each 100 of those problems.
•  » » » 4 years ago, # ^ |   +1 Yeh!!! Right. Now I got 381!!! Nice work :D
 » 4 years ago, # |   0 Thanks a lot for sharing this! I recently lost the local copies of all my solutions but was able to download them (or at least the 1441 non-Gym solutions) quickly and easily with this tool.
 » 3 years ago, # |   0 Is SPOJ Solution buggy?? I tried to download my spoj solutions but it gives error " Error fetching list " . I understand it might happen due to change in SPOJ website few months ago.
•  » » 3 years ago, # ^ |   0 I just checked with my handle. Its working fine. Please retry.
 » 3 years ago, # |   0 I am getting connection refused, I think it's because of proxy issues. Can you please tell how to configure proxy settings.
•  » » 3 years ago, # ^ |   0 I believe you tried the Codeback v2.1. I have recently merged changes that adds proxy support thanks to Devansh Dalal. You can try new version from devanshdalal here. I will be updating the releases section very soon.
•  » » » 3 years ago, # ^ |   0 Now it's working, before I tried using version-2, thanks.
 » 3 years ago, # | ← Rev. 2 →   0 One great feature would be to not make separate folder for 308-A and 308-B (for example) but to put them in a folder named 308 and then in that folder as files named 308-A.cpp and 308-B.cppEDIT : One more thing, The problem statement.html completely destroys the latex and makes the feature almost useless. So, Any workaround would be great.Anyways, Great tool.
 » 2 years ago, # | ← Rev. 3 →   0 Getting a http error for codechef... in v3.1
 » 2 years ago, # |   0 Nice tool !! Loved it. Thanks for this nice tool !
 » 2 years ago, # |   0 its showing error msg,is it supports proxy