EDT 06:19 CEST 12:19 KST 19:19

Streams: 54 live
46806 total viewers

Active: 8712
Pizza Meter
[WCS KR] Innovation vs. Sy…
[WCS AM] Ro16 Group C Prev…
Bruno Community Q&A
Beyond the Summit and TL S…
[WCS KR] Code S Recap/Code…
HerO, Revival Interviews -…
[SPL] Round 5 Week 4 Start…
viOLet forfeits WCS AM due…
FXOpen acquires Seed from …
Crank, mOOnGLaDe interview…
LGD.cn and RaTtLeSnAkE Adv…
GomTV: about the gamespeed…
Get 50% off Papa John's pi…
TL Advertising Features
UK Soldier beheaded in L…
Korean Music Discussion
The XBox One
[TV] Star Trek: Deep Spa…
Korean Drama Discussion
BarcraftOslo WCS Europe Fi…
Seoul LoL allstars Meetup …
The Automated Ban List
Barcraft Ludwigshafen
TL.net Ten Commandments
Artosis Fanclub
INnoVation Fanclub
[Stream] Najzmajs
[Stream] theognis
What mouse/pad does your f…
Computer screen distorted …
Same SSID different places…
Mechanical Keyboard Guide
The Ultimate Headphone/Aud…
Papa John's explores EG,…
[SPL] Round 5 Week 4 Sta…
[GSL] Music List
HerO, Revival Interviews…
DeParture, JREcco + more…
Hellokitty Top 16 GM NA …
[Code S] Ro4 Day 2 WCS Kor…
[WCS AM] RO16 Group C Prem…
[ATC] Quantic vs. Milleniu…
Numericable M-House Cup 2 …
SC2 LR Resources
[D] Rebuff Snipe?
CatZ CC first counter - a …
[G] TheStaircase - An Alte…
The HotS Protoss Help Me T…
SC2 Strategy Recommended T…
[A] Starbow
[M] (2) ESV Ravage by Iron…
TeamLiquid Map Contest Fin…
[D] Favorite Maps that Did…
[A] Peepmode: New maps, ne…
Inhouse Dota
General Discussion
Dota 2 QQ thread
Who is Who
Toronto Dota Community.
Bruno Community Q&A
[The International] Easter…
Perfect World's Dota 2 Su…
[D2L] EG vs. Na'Vi & VP
Liquid Pasture Community L…
Starladder Season 6
[H] Night Stalker
[G] In-Game Dota Guide for…
Simple Questions, Simple A…
[G]uide to Lifestealer
[G] Clockwerk, The Offlani…
2 Artificial Intelligenc…
[D] New BW Server
[Update] itemBay SSL Gra…
DES Sonic Interview 5/18…
Hiya - Highlight Video
[SOSPA] Event Matches
[SRT] Ro16 Group B
C Ranks Teamleague Season 1
[GC S3] Gambit's Cup Semif…
Gem League II
D Ranks Teamleague Season 4
Practice Partner Thread
Challenger map on Starcraf…
Simple Questions, Simple A…
Increasing APM/EAPM
2012 - 2013 Football Thr…
Liquid Blood Bowl Cup Se…
Magic: The Gathering Onl…
World of Tanks
Steam Sales Thread
The Shikyo Memorial for QQ…
Anyone Diamond want to joi…
[LoL Stream] Entenzwerg
[LCS] All-Star Tournament
[OGN] Olympus The Champion…
[LoL] General Stream Thread
[Champion] Nunu
[Guide] Montegomery's Supe…
[Champion] Nidalee
Barbarian - Builds/Discuss…
The: What is my item worth?
[G] Hardcore
ESPORTS Mafia (streamed ma…
Mexican Standoff Mafia
[T] Bastard "Mini" Mafia!
The 2013 Weightlifting Pro…
Questions & Answers
TL Health and Fitness Init…
Leta - Movie
Michael - skyline
Anytime - Beast
By.Hero - Shuttle
Anytime - Pusan

Website Feedback

Closed Threads

IRC Chat
irc.quakenet.org #teamliquid

IRC Web Client

TeamSpeak 3 (41 users)

Starcraft 2 Twitter Updater: Learning Python

Forum Index > Blogs
 
 CTangent   United States. June 25 2012 20:13. Posts 123
Profile Blog # 
Hey Teamliquid! It's been a little while since I wrote a blog, and I've never written one that wasn't about Starcraft itself, so this will be new territory for me. Being a Computer Science major, I have decided to learn the Python programming language. I have a background in C and Java (with Java being my "native" language, so to speak, the one that I go to first if I have a choice). I am a somewhat skilled programmer in both Java and C, but I decided to branch out into the wonderful world of Python.

In order to learn Python, I've come up with an idea for a program just for fun. It will run in the background whenever the user plays starcraft 2, and will do the following things:

1) Whenever a new file is added into the "Unsaved" replay directory, I will copy it and place it into a new folder, altering the filename to be more descriptive.

2) Whenever this new folder reaches a certain number of replays, I will stop adding replays to it and create a different folder. (Replay pack generation)

3) Whenever my program copies a new replay, it posts the results to Twitter. Something like "I just [won/lost] a game vs [opponent] on [xyz map]!

4) My program will then look up the opponent's ladder data on SC2ranks and display it. Maybe I'll incorporate that into the tweet too.

5) My program will keep track of some basic statistics (win/loss ratio, average apm, etc) and display it to the user when queried.

I plan to release the source to this too if anyone is interested! I doubt that the program itself will be very useful, but I'm excited to create some sort of deliverable in a language I've never used.



Old Post

 
 501TFX   Austria. June 26 2012 00:10. Posts 323
Profile # 
Sounds like an exciting little program, but I think posting EVERY win/loss on twitter is a little bit too much, I would more say you should post every 5th, 10th or you could let customize the amount of tweets the user itself.

I guess SC2Gears is already something like this, but as you said, it isn't supposed to be useful, so I'm not arguing on that point !
Sounds awesome, would love to see the source code. (Never saw python my self, but I am experienced in things like Java, PHP, etc)
Never let your dreams fade, run after them, run until you get them !
Old Post

 
 LeafMeAlone   United States. June 26 2012 00:17. Posts 297
Profile Blog # 
Very interesting idea :O I hope you keep writing blogs about your progress. I'm starting to learn python myself
~_~
Old Post

 
 CTangent   United States. June 26 2012 01:05. Posts 123
Profile Blog # 

On June 26 2012 00:10 FeelTHeBluEZ wrote:
Sounds like an exciting little program, but I think posting EVERY win/loss on twitter is a little bit too much, I would more say you should post every 5th, 10th or you could let customize the amount of tweets the user itself.

I guess SC2Gears is already something like this, but as you said, it isn't supposed to be useful, so I'm not arguing on that point !
Sounds awesome, would love to see the source code. (Never saw python my self, but I am experienced in things like Java, PHP, etc)


Thanks! You're right about the tweets, maybe every game is a little extreme. I can easily add a configuration such that it only posts every few games, and posts something along the lines of "I just won x out of my last y games!", or whatever. I just really wanted to get some experience linking up Python with Twitter's API. I'll be sure to post the source code! I'll probably throw it up on github when I get some amount of code.

I realize that SC2gears does a lot of this already, haha. I'm not hoping to compete at all with sc2gears, I'm just writing a fun little program for some Python experience.


On June 26 2012 00:17 LeafMeAlone wrote:
Very interesting idea :O I hope you keep writing blogs about your progress. I'm starting to learn python myself


Will do! I'll post a link to github when I get some code, too. Diving into a small little project like this is definitely the way to go if you want to learn a language! I'm having a lot of fun doing this little project so far.


Last edit: 2012-06-26 01:06:52
Old Post

 
 aike   United States. June 26 2012 01:58. Posts 1264
Profile Blog # 
I really need to learn Python one of these days lol. I've always meant to, just always too busy with other stuff. I use PHP mostly, but a little bit of everything else when needed, and the basic idea of all these languages are the same so it's not much work to understand what's going on with Python, I just don't know any of the syntax by heart This sounds like a fun little project, and I do know some people that wouldn't mind using it. What I think would be great with the twitter API is if you could customize the message... So you have say a form with different options where you can choose conditions (On: Loss vs Zerg) followed by the message (Message: "I just lost to a fking Zerg again") or something random like that And allow variables to be added to the message, similar to how you can add variables to your replays that get renamed in SC2Gears.
Wahaha
Old Post

Please log in or register to reply.
 
Refresh
StarCraft: Brood War
StarCraft 2
Dota 2
League of Legends
Other Notable Streams
[ Show 43 non-featured ]

» Recent SC2 Results
» Premier SC2 Tournaments
Sidebar Settings...

The Little App Factory



The opinions expressed by our users do not reflect the official position of TeamLiquid.net or its staff.

Advertising | Jobs | Privacy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren. Ad tag: TF_US.
The contents of this webpage are copyright © 2002-2013 Teamliquid.net. All Rights Reserved