koldbyte's blog

By koldbyte, 4 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  

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

 how do i fix this?

  • »
    »
    4 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.

»
4 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?

  • »
    »
    4 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.

»
4 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.

»
3 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.

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

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

»
3 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.

  • »
    »
    3 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.

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

      Now it's working, before I tried using version-2, thanks.

»
3 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

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.cpp

EDIT : 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   Vote: I like it 0 Vote: I do not like it

Getting a http error for codechef... in v3.1

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

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

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

its showing error msg,is it supports proxy

»
17 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The jar file is not opening,please help!!!

»
3 weeks 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.