<< Back to Programming Forum   Search

Posts 1 - 9 of 9   
Google App scripts to keep track of tournaments: 11/22/2017 20:49:33


Deadman 
Level 64
Report
I just stumbled on to Google app scripts recently, and it's awesome for automating stuff on WL and doing basic tasks. You could theoretically build simple CLOTs(with no UI). You just need to know some basic JavaScript.

I'm sharing a script I wrote to automate score-keeping for RR tournaments. It keeps track of wins and losses for every team. Just replace line 6 with your email and token, set up a sheet with a similar layout for tournaments and you're good to go. You can get Google to run this on your behalf on a time-based trigger.

This is just an example. You can setup any kind of league on WL with very less upkeep! Please take backups of your data before you try it out, as I take no responsibility for any bugs(although it is well tested :p)

Script: https://goo.gl/mXA1QS
Example Usage: https://goo.gl/qZkBVa
Google App scripts to keep track of tournaments: 11/22/2017 20:58:45


Sherlock Holmes
Level 55
Report
Thank ya
Google App scripts to keep track of tournaments: 11/22/2017 21:12:34


DanWL 
Level 63
Report
This is member-only for it to run successfully, right? I saw that it was using APIs (which are member-only).

You might want to use === instead of == and !== instead of != to prevent some possible bugs.
Google App scripts to keep track of tournaments: 11/22/2017 21:16:25


Deadman 
Level 64
Report
Yeah all WL APIs are restricted to members only.
Google App scripts to keep track of tournaments: 11/23/2017 06:14:24


dabo1
Level 57
Report
The key problem of that is in my opinion, that it is very slow(every write or read of a table from drive takes around 1sec) so you need to use it in combination with an other system like firebase for web triggers and webpage design. But for other stuff like extracting the data it is very good.
Google App scripts to keep track of tournaments: 11/23/2017 06:37:21


Deadman 
Level 64
Report
Yeah. It is a bit slow. But since my WL tasks aren't time critical, I usually don't mind.

Edited 11/23/2017 06:39:50
Google App scripts to keep track of tournaments: 11/23/2017 15:22:47


l4v.r0v 
Level 59
Report
Would it be possible to build Google Sheets add-ons using similar code to that? Just asking for someone's e-mail, API token, and letting them run a UI-less CLOT?

I haven't done much with Google Apps Script, so I don't know how their add-ons work and if there'd be anything special involved in this case.
Google App scripts to keep track of tournaments: 11/25/2017 06:38:36


Deadman 
Level 64
Report
I haven't done it myself, but looks like that should be doable(assuming the user is a member of course)
Google App scripts to keep track of tournaments: 11/25/2017 06:48:18


Ekstone 
Level 55
Report
I'm sharing a script I wrote to automate score-keeping for RR tournaments

Don't you plan to write one for single elimination tourneys too? ;)
Posts 1 - 9 of 9