• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

My CSTimer to Excel, Python Converter

JTWong71

Member
Joined
Jan 24, 2016
Messages
251
Location
East Coast of the US
For a while now, I have been wanting to turn my solves into an Excel file from CSTimer,
and so I decided a couple days ago to try and make a Python program that does so.

What the program does is, it takes a session from CSTimer that you give as a .txt file,
and then it extracts the Single Solves, finds the Average of 5, and Average of 12.
If someone wants it to work for Average of 50 or 100, there is a function that they can call to write the Average of 50 Solves.

The requirements are:
  • Python 3.x (I use 3.3, but I am pretty sure it will work with any Python 3.x)
  • Text file with Times (CSTimer Format)
  • xlsxwriter (An external module for Python to create Excel Files)
So, for the CSTimer session format, I am talking about the window that appears from clicking the bottom left portion of the CSTimer Screen, where it shows, "Solve: ......" and "Mean: .....".

After that, you copy everything from that window.
Then you are to paste it into a .txt file and save it (Preferably as Time_List.txt, as that is what the program looks for automatically, but it can be named something different.
Lastly, you run the Python program and then it creates an Excel file and another .txt File.

This is my first thread I am creating, so I am not sure how well I explained everything.

Version 1
Original.

Version 2
Ignores DNF's, makes it easier to create higher count averages such as Ao50, Ao100, and Ao1000, while also taking out the highest and lowest solves depending on the argument given.

Thanks for reading.

Picture of Graph: Here

Edit: +2's will be interpreted as it should, but DNF's will still likely cause errors.
 
Last edited:

Qcumber

Member
Joined
Jul 20, 2016
Messages
8
Yes Finally! My boring hours of manually copying and pasting will be gone. I can't wait to try this out.
 

tristof

Member
Joined
Apr 28, 2021
Messages
5
Location
Liege, Belgium
WCA
2021HENR02
Hello,
In case it could be useful to somebody else, I started from the python script of JTWong71 and enhanced it a bit to:
- allow the user to specify the input file name and choose the session
- print all session names
- added the personal best (PB) time evolution
- DNF are ignored (not copied and therefore ignored from the averages, which is technically not correct, to be improved)
- create 2 Excel worksheets containing the same graphs but with different abscissae:
- solve number
- solve date
(depending on the case, one looks nicer than the other, see examples attached)
Code can be found here:
Happy cubing ;-)
 

Attachments

  • cstimer2excel_date.png
    cstimer2excel_date.png
    53.8 KB · Views: 5
  • cstimer2excel_num.png
    cstimer2excel_num.png
    120.2 KB · Views: 5
Top