Package: cfs
Codeforces cli for lazy nerds who don't want to leave their cozy terminals.InstallationUsageView User DetailsView Rating Graph of UserView Contest DetailsInteract With Problemset Subcommand InterfaceView A Blog Entry Specified By Blog IDView Rating Change For Users In A ContestGet Blog Entries Of A UserGet Submissions For A Specified UserView Contest SubmissionsCompare Two UsersTODOContributeInstallationpipinstallcfsORgitclonehttps://github.com/prasoonbatham11/cfcli.git
python3setup.pyinstallUsageUse-hor--helpto see usage.cfs-hView User Details# Shows basic details of the user specifiedcfs-uprasoonbathamView Rating Graph of User# Shows Rating change graph of usercfs-gprasoonbathamRating Graph of user is displayed as a gnuplot.View Contest DetailsContest ID can be found in the url of contest such as:/contest/1137/.# Shows details of contest specified by contest idcfs-c1137# To view Contests from gymcfs-c102134--gymInteract With Problemset Subcommand InterfaceThese commands retrieve the specified problemset (by tag or whole) and open a python cmd sub-terminal where various other actions can be performed.# Loads all the problemscfs-p# Specify a problemset tagcfs-p--tagdpThe sub-interface has the following commands:View available commands:?List n Problems (max 15):list nReset the pointer to list problems:resetList problems of contest id 'cid':listc cidList 10 problems specified by index:listi indexView problem details specified by name:listn nameView problem details specified by index:prob indexView problem statement specified by contestid+index:stat 1133ASay the following is the output for 8 problemscf>list80:Circus1:SushiforTwo2:MatchesAreNotaChild's Play3: Train Car Selection4: Cooperative Game5: Museums Tour6: Camp Schedule7: Skyscraperscf> list 88: Spanning Tree with One Fixed Degree9: Spanning Tree with Maximum Degree10: K Balanced Teams11: Zero Quantity Maximization12: Balanced Team13: Preparation for International Women'sDay14:MiddleoftheContest15:GreedySubsequences
cf>To reset the pointer back to 0 we useresetcommand.Similar tolist,listcis used to list problems of a particular contest.cf>listc11338:SpanningTreewithOneFixedDegree9:SpanningTreewithMaximumDegree10:KBalancedTeams11:ZeroQuantityMaximization12:BalancedTeam13:PreparationforInternationalWomen'sDay14:MiddleoftheContestIn codeforces every problem has an index ('A', 'B', etc.). To view the problems by index uselisti. To reset the pointer, again useresetcommand.cf>listiB0:Circus6:CampSchedule13:PreparationforInternationalWomen'sDay20:Discounts27:Draw!30:TwoCakes35:WrongAnswer39:MikeandChildren45:Onceinacasino53:TanyaandCandieslistnandprobare used to view problem details by name and serial number respectivelycf>listnSushiforTwo|ProblemDetails|Name:SushiforTwo|ContestID:1138|Index:A|Points:500.0|Rating:900|SolvedBy:3940cf>prob0|ProblemDetails|Name:Circus|ContestID:1138|Index:B|Points:1000.0|Rating:1700|SolvedBy:1147To view any problem statement usestatcommand. This opens a paged output where you can see problem statement.cf>stat1133AView A Blog Entry Specified By Blog IDBlog ID can be found in the url of blog such as:/blog/entry/14565/.# View blog specified by blog idcfs-b14565The blog is displayed in a paged output with a proper comment thread. The comment thread is hierarchical, i.e., a reply to a comment is separated by one tab space from its parent comment.View Rating Change For Users In A Contest# View blog specified by blog idcfs-rc1137# Specify a particular handlecfs-rc1137--handlePetrGet Blog Entries Of A User# Get all blog entries of Petrcfs-buPetrThe subcommand interface is implemented using cmd python package and has the following commands.View available commands:?List n Blog Entries (max 15):list nReset the pointer to list blog entries from:resetView particular blog entry specified by index:vidx 65854View particular blog entry specified by serial no:viewi 13Say we get the following output by runninglist 5for user Petr:cf>list50:65854Anoracleweek1:65574AWTFweek2:65328Asnackweek3:65152Atouristweek4:64991AmumblingweekRunninglist 5again will return the next 5 entries.Now an internal pointer idx points to entry 10. To reset it we runreset.cf>list55:64854AGaloisweek6:64669Ananti-libraryweek7:64501ADilworthweek8:64349ARadewooshweek9:64346Andthebestproblemof2018is...
cf>reset
cf>list50:65854Anoracleweek1:65574AWTFweek2:65328Asnackweek3:65152Atouristweek4:64991Amumblingweek
cf>To view the entryA galois weekwe can either run:cf>viewi5ORcf>vidx64854Get Submissions For A Specified UserTo display all the submissions of the user use:cfs-usprasoonbathamYou can also specify fr and count arguments to seecountnumber of submissions from a particular indexfr.# Display 10 submissions from 5th indexcfs-usprasoonbatham--fr5--count10The default values forfrandcountare 1 and 10 respectively. If either one of these are specified the other one takes default value.For instance, if we want to retrieve 10 submissions from 5th index we can write.# Here count takes the default value 10cfs-usprasoonbatham--fr5Similarly,# Display 20 submissions from 1st indexcfs-usprasoonbatham--count20View Contest Submissions# Display contest submissions specified by contest idcfs-cs1137Here too you can specifyfrandcountarguments to see submissions. And it works similar to user submissions.# Display 100 submissions from index 50cfs-cs1137--fr50--count100Another optional parameter to specify here is:handlewhich retrieves submissions only by the user specified.# Display 10 submissions for user Petr from index 3 in contest 556cfs-cs556--fr3--count10--handlePetrCompare Two Userscfs--compareprasoonbathamPetrSeriously who am I comparing myself to!TODOAdd Command for submitting a solution.Improve rendering of problem statement.Add proxy support.Add command to recommend problemsContributeHave an issue?Feel free to send feedback viamail