Skip to content

My-master-degree/PED-MC621-vJudge-report-generation-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PED-MC621 vJudge report generation script

This repository contains a script to generate reports from vJudge contests. This script was developed when I was a teaching assistant of the course "Programming Challenges II" or MC621. The script main.py was implemented in python 3 using the library BeautifulSoup.

To use the script, follow the steps:

  1. First, you have to download the full loaded contest HTML files you wish to generate the report.

Contest page

  1. Click at the tab 'Rank'.

Contest rank page

  1. And then, download the page at the contests folder by pressings Ctrl + s, make sure that the option "Webpage, Complete" at the right bottom of the pop-up is selected:

Contest download page

Step 2 is a mandatory requirement for the script correct execution because the rank tab content is loaded through Ajax.

  1. In the file main.py, the cookies dictionary contains the cookies information required to perform the HTTP requests, to find the right values to these fields:
  2. Go to the vJudge.net;
  3. Sign in;
  4. Open the browser page inspector (Ctrl + Shift + i on chrome);
  5. Select the Application tab
  6. At the Storage section, select the Cookies > http://vjudge.net subsection,
  7. And copy and paste the fields Jax.Q, _gid, JSESSIONID, and _ga values to the cookies dictionary. As the image below presents:

vJudge cookies

  1. The contests array contains the directory to the contests HTML files.
contests = [
        'contests/MC621_MC821_08_11 - Virtual Judge.HTML',
        ]

Fill this array with your downloaded files directories.

  1. The usernames array contains the list of vJudge contests usernames.
usernames = [
        'LuizAndia',
        'b164923',
        'hboschirolli',
        ];

Fill this array with the vJudge contests usernames.

  1. The usernames_to_present array contains the usernames presentation order allowing you to insert some break lines between the names.

  2. Now, run python main.py and open the generated .csv.

8.1. Case you want to see the program logs while it runs, you can run with the verbose argument (python main.py --verbose).

Generated CSV

Any doubts feel yourself free to reach me out: [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published