• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 11:22
CET 16:22
KST 00:22
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL20] Finals Preview: Arrival10TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9
Community News
Merivale 8 Open - LAN - Stellar Fest3Chinese SC2 server to reopen; live all-star event in Hangzhou22Weekly Cups (Oct 13-19): Clem Goes for Four3BSL Team A vs Koreans - Sat-Sun 16:00 CET10Weekly Cups (Oct 6-12): Four star herO8
StarCraft 2
General
Could we add "Avoid Matchup" Feature for rankgame RotterdaM "Serral is the GOAT, and it's not close" Chinese SC2 server to reopen; live all-star event in Hangzhou The New Patch Killed Mech! Weekly Cups (Oct 13-19): Clem Goes for Four
Tourneys
Merivale 8 Open - LAN - Stellar Fest $5,000+ WardiTV 2025 Championship $3,500 WardiTV Korean Royale S4 Tenacious Turtle Tussle RSL Season 3 Qualifier Links and Dates
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers
Brood War
General
ASL20 Pre-season Tier List ranking! [ASL20] Finals Preview: Arrival Is there anyway to get a private coach? BGH Auto Balance -> http://bghmmr.eu/ BSL Team A vs Koreans - Sat-Sun 16:00 CET
Tourneys
[ASL20] Grand Finals ASL final tickets help [ASL20] Semifinal A Small VOD Thread 2.0
Strategy
Soma's 9 hatch build from ASL Game 2 Simple Questions, Simple Answers Roaring Currents ASL final Relatively freeroll strategies
Other Games
General Games
General RTS Discussion Thread Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread YouTube Thread The Chess Thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Korean Music Discussion Series you have seen recently... Movie Discussion!
Sports
Formula 1 Discussion 2024 - 2026 Football Thread MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
The Benefits Of Limited Comm…
TrAiDoS
Sabrina was soooo lame on S…
Peanutsc
Our Last Hope in th…
KrillinFromwales
Certified Crazy
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1727 users

Starcraft 2 Twitter Updater: Learning Python

Blogs > CTangent
Post a Reply
CTangent
Profile Blog Joined April 2011
United States125 Posts
June 25 2012 11:13 GMT
#1
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.



501TFX
Profile Joined March 2011
Austria345 Posts
June 25 2012 15:10 GMT
#2
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 !
LeafMeAlone
Profile Blog Joined November 2010
United States301 Posts
June 25 2012 15:17 GMT
#3
Very interesting idea :O I hope you keep writing blogs about your progress. I'm starting to learn python myself
~_~
CTangent
Profile Blog Joined April 2011
United States125 Posts
Last Edited: 2012-06-25 16:06:52
June 25 2012 16:05 GMT
#4
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.


aike
Profile Blog Joined July 2010
United States1629 Posts
June 25 2012 16:58 GMT
#5
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
Please log in or register to reply.
Live Events Refresh
BSL Team A[vengers]
14:00
vs Korea
Gypsy vs nOOBLIVE!
JDConan vs ScanLIVE!
ZZZero.O142
LiquipediaDiscussion
CrankTV Team League
13:00
Preliminary Stage: 3 Bo5s
Team Liquid vs Shopify RebellionLIVE!
Team Vitality vs Team Falcon
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
IndyStarCraft 187
Railgan 111
Rex 94
StarCraft: Brood War
Movie 1522
ZZZero.O 142
Dewaltoss 98
ToSsGirL 39
sas.Sziky 17
Terrorterran 10
iFU.spx 2
Dota 2
qojqva4366
Dendi1016
KheZu486
Fuzer 240
canceldota92
Super Smash Bros
Mew2King78
Westballz27
Heroes of the Storm
Khaldor355
Other Games
singsing2513
ScreaM1940
B2W.Neo976
DeMusliM315
KnowMe305
Hui .203
XcaliburYe146
Organizations
Counter-Strike
PGL13365
StarCraft 2
WardiTV981
StarCraft: Brood War
Kim Chul Min (afreeca) 10
CasterMuse 8
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• StrangeGG 47
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• 3DClanTV 34
• Azhi_Dahaki12
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• Ler97
League of Legends
• Jankos3932
Other Games
• WagamamaTV314
Upcoming Events
RSL Revival
1h 38m
Wardi Open
20h 38m
CrankTV Team League
21h 38m
Monday Night Weeklies
1d 1h
Replay Cast
1d 18h
WardiTV Invitational
1d 20h
CrankTV Team League
1d 21h
Replay Cast
2 days
CrankTV Team League
2 days
Replay Cast
3 days
[ Show More ]
The PondCast
3 days
CrankTV Team League
3 days
Replay Cast
4 days
WardiTV Invitational
4 days
CrankTV Team League
4 days
Replay Cast
5 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
CSL 2025 AUTUMN (S18)
BSL 21 Team A
C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
CranK Gathers Season 2: SC II Pro Teams
EC S1
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025

Upcoming

SC4ALL: Brood War
YSL S2
BSL Season 21
BSL 21 Non-Korean Championship
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
META Madness #9
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.