koldbyte's blog

By koldbyte, 10 years ago, In English

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

GITHUB : https://github.com/koldbyte/CodeBackup

How to use it?

1. Enable the checkbox for which you want to fetch submissions.  
2. Enter your handle(username) registered on the website.  
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.
Download here v2

Thanks.

  • Vote: I like it
  • +35
  • Vote: I do not like it

| Write comment?
»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

 how do i fix this?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

»
9 years ago, # |
  Vote: I like it +1 Vote: I do not like it

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?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    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.

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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.

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I just checked with my handle. Its working fine. Please retry.

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I am getting connection refused, I think it's because of proxy issues. Can you please tell how to configure proxy settings.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Nice tool !! Loved it. Thanks for this nice tool !

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

There might be some bug. The downloaded code for the problems whose id are greater than or equal to 1000 (for example 1013A, 1108D etc) are saved as empty file. There is nothing in the downloaded file. Please fix it. I tried with version 2 as well as version 3.

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

It's saying 0 problems linked to your profile for Codechef with both versions 2 and 3. Please look into this.

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

It dont work anymore