• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 21:29
CEST 03:29
KST 10:29
  • 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
Maestros of the Game: Week 1/Play-in Preview9[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4Team Liquid Map Contest #21 - Presented by Monster Energy9
Community News
Weekly Cups (August 25-31): Clem's Last Straw?6Weekly Cups (Aug 18-24): herO dethrones MaxPax6Maestros of The Game—$20k event w/ live finals in Paris45Weekly Cups (Aug 11-17): MaxPax triples again!15Weekly Cups (Aug 4-10): MaxPax wins a triple6
StarCraft 2
General
#1: Maru - Greatest Players of All Time Weekly Cups (August 25-31): Clem's Last Straw? Maestros of the Game: Week 1/Play-in Preview Weekly Cups (Aug 11-17): MaxPax triples again! 2024/25 Off-Season Roster Moves
Tourneys
Maestros of The Game—$20k event w/ live finals in Paris Monday Nights Weeklies LiuLi Cup - September 2025 Tournaments 🏆 GTL Season 2 – StarCraft II Team League $5,100+ SEL Season 2 Championship (SC: Evo)
Strategy
Custom Maps
External Content
Mutation # 489 Bannable Offense Mutation # 488 What Goes Around Mutation # 487 Think Fast Mutation # 486 Watch the Skies
Brood War
General
Victoria gamers Starcraft at lower levels TvP ASL20 General Discussion BGH Auto Balance -> http://bghmmr.eu/ Pros React To: herO's Baffling Game
Tourneys
[ASL20] Ro24 Group F [IPSL] CSLAN Review and CSLPRO Reimagined! Small VOD Thread 2.0 Cosmonarchy Pro Showmatches
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread General RTS Discussion Thread Nintendo Switch Thread Path of Exile Warcraft III: The Frozen Throne
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread Russo-Ukrainian War Thread YouTube Thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s) Gtx660 graphics card replacement
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
How Culture and Conflict Imp…
TrAiDoS
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
INDEPENDIENTE LA CTM
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 716 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
Replay Cast
00:00
SEL S2 Championship: Playoffs
CranKy Ducklings110
Liquipedia
BSL Team Wars
21:30
Round 5
Team Dewalt vs Team Sziky
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SpeCial 199
WinterStarcraft133
Nina 74
Ketroc 53
CosmosSc2 49
ProTech35
StarCraft: Brood War
Artosis 850
Shuttle 779
sSak 529
Aegong 65
Sharp 44
ajuk12(nOOB) 14
Icarus 0
Dota 2
monkeys_forever467
NeuroSwarm71
LuMiX0
Super Smash Bros
hungrybox436
AZ_Axe140
Other Games
tarik_tv10880
summit1g9465
shahzam845
C9.Mang0474
JimRising 445
Day[9].tv256
Maynarde165
Sick144
Livibee58
Mew2King57
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 2
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota22360
Other Games
• Scarra849
• Day9tv256
Upcoming Events
Sparkling Tuna Cup
8h 31m
PiGosaur Monday
22h 31m
LiuLi Cup
1d 9h
Replay Cast
1d 22h
The PondCast
2 days
RSL Revival
2 days
Maru vs SHIN
MaNa vs MaxPax
OSC
3 days
MaNa vs SHIN
SKillous vs ShoWTimE
Bunny vs TBD
Cham vs TBD
RSL Revival
3 days
Reynor vs Astrea
Classic vs sOs
BSL Team Wars
3 days
Team Bonyth vs Team Dewalt
CranKy Ducklings
4 days
[ Show More ]
RSL Revival
4 days
GuMiho vs Cham
ByuN vs TriGGeR
Cosmonarchy
4 days
TriGGeR vs YoungYakov
YoungYakov vs HonMonO
HonMonO vs TriGGeR
[BSL 2025] Weekly
4 days
RSL Revival
5 days
Cure vs Bunny
Creator vs Zoun
BSL Team Wars
5 days
Team Hawk vs Team Sziky
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

CSL Season 18: Qualifier 2
SEL Season 2 Championship
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL 2025 AUTUMN (S18)
Maestros of the Game
Sisters' Call Cup
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

LASL Season 20
2025 Chongqing Offline CUP
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
RSL Revival: Season 2
EC S1
BLAST Rivals Fall 2025
Skyesports Masters 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 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.