Package: harwest
📦 Harwest ⛏Harwesttakes away the hassle of managing your submission files on different online-judges by
automating the entire process of collecting and organizing your code submissions in one single Git repository.Here's a sample repository created using Harwest:harwest-sampleHighlightsFully automated collection of all yours submissions with minimal effort setupSimple and easy to use interface to get you started in minutesExtensive traceability for your submissions with reference to the problem, tags, submission date and moreSingle commit for each submission stamped with the original submission date for building rich and accurate contributions graphAutomated git pushes to the remote repository with every updateRequires little to no knowledge of operating Git (though would strongly recommend learning it)PlatformsHarwest currently has extensive support for the following platforms:CodeforcesAtCodercontributed by@s-i-d-d-i-swhile integration with various other OJs are still in the kitchen. Contributions are always welcomed.InstallationYou will requirePython 3.5+along withpip3in order to be able to install and use Harwest.
Refer to the documentation for installingpiponwindows,ubuntu/linuxormacOSThe package is available athttps://pypi.python.org/pypi/harwestRun the following command in the terminal to install the package:$pip3installharwestGetting StartedAfter installing the package, run the following command in the terminal:$harwestIn case you're using Harwest for the first time, you'd be greeted with a set of configuration steps
that you'll have to complete to set up the tool.Step [1]requires you to select a directory name where all your code submissions will be stored.
The directory will be created under the same path from where you executed the command.In case
you'd like to set up the directory at some other location then press <Ctrl>+<C> to exit from
the setup and execute the command again from your desired location.Step [2]is straight-forward and asks you to enter your full-name and email address which will be
used for setting up the git repository.NOTE: For the contributions to show up in the contributions streak graph, the provided email
address must be the same as the email address associated with your GitHub/BitBucket accountStep [3]though optional, takes away the effort of even pushing the changes to the Git repository
from you. To take advantage of this feature, create anemptygit repository inGitHubor BitBucket(without any README, .gitignore or license)and copy and paste the git remote url
as input for this step.If you however don't want automated pushes for your repository then leave
the input as empty and press <enter>. You can always push the repository to remote manually.nellex@HQ:~$harwest______////____________________//_//_//__`/___/|/|//_\/___/__//__//_///||/|//__(__)/_/_//_/\__,_/_/|__/|__/\___/____/\__/==========================================Heythere!👋Lookslikeyou're using Harwest for the first time. Let'sgetyoustarted🚀[1]We'll need to create a directory to store all your filesThe directory will be created as /home/nellex/<your-input>> So, what would you like your directory to be called? accepted👍 Alright, so you'redirectorywillbecreatedat/home/nellex/accepted[2]Thenlet's build your author tag which will appear in your Git commits as:Author: Steve Jobs <steve.jobs@apple.com>> So what would your beautiful (Author) Full Name be? Nilesh Sah> And of course, your magical (Author) Email Address? nilesh.sah13@gmail.com[3] Guess what? We can automate the Git pushes for you too! 🎉In case you'dlikethat,thenpleasespecifytheremoteGitUrlforan"empty"repositoryItwouldbesomewhatlikehttps://github.com/nileshsah/harwest-tool.gitButit's optional, in case you'dliketoskipthenleaveitemptyandjusthit<enter>
>(Optional)So,whatwouldbetheremoteurlfortherepositoryagain?https://github.com/nileshsah/accepted.git🥳Yourock!We'reallgoodtogonowOnce the initial set up is complete, you can then execute the command$harwest<platform>
$harwestcodeforces# exampleto harvest your submissions from the Codeforces platform. If it's the first time you're running the
command, you'll be prompted for providing your Codeforces handle name>Sowhat'syourprestigiousCodeforcesHandleName?nellexHarwest will then start scraping all your submissions, starting from page 1 till the very end.nellex@HQ:~$harwestcodeforces______////____________________//_//_//__`/___/|/|//_\/___/__//__//_///||/|//__(__)/_/_//_/\__,_/_/|__/|__/\___/____/\__/==========================================⛏️HarvestingCodeforces(nellex)Submissionsto/home/nellex/accepted
⌛Currentlyscanningpage#1: (24/24) Phoenix and Beauty https://codeforces.com/contest/1348/problem/BUsernamefor'https://github.com':nileshsah
Passwordfor'https://nileshsah@github.com':
👌Theupdateswereautomaticallypushedtotheremoterepository
✅Therepositorywassuccessfullyupdated!In case scanning stops at any page due to some server side error, you can restart scraping from the
failed page by running the command:$harwest<platform>--start-pageN
$harwestcodeforces--start-page3# exampleor instead force Harwest to re-scan the entire submission list for the platform by running:$harwest<platform>--full-scan
$harwestatcoder--full-scan# exampleReconfigureHarwest settings can be reconfigured by running the following command which will then restart the
entire configuration steps.$harwest--initHarwest provides the ability to re-use an existing directory previously created by this tool for
further updates.To change the handle name for a specific platform, you can run:$harwest<platform>--setup
$harwestcodeforces--setup# exampleLicenseMIT License