• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 02:24
CEST 08:24
KST 15:24
  • 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
RSL Season 1 - Final Week6[ASL19] Finals Recap: Standing Tall12HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0
Community News
Esports World Cup 2025 - Brackets Revealed9Weekly Cups (July 7-13): Classic continues to roll2Team TLMC #5 - Submission extension2Firefly given lifetime ban by ESIC following match-fixing investigation17$25,000 Streamerzone StarCraft Pro Series announced7
StarCraft 2
General
Who will win EWC 2025? RSL Revival patreon money discussion thread Esports World Cup 2025 - Brackets Revealed Team TLMC #5 - Submission extension The GOAT ranking of GOAT rankings
Tourneys
RSL: Revival, a new crowdfunded tournament series FEL Cracov 2025 (July 27) - $8000 live event $5,100+ SEL Season 2 Championship (SC: Evo) WardiTV Mondays Sparkling Tuna Cup - Weekly Open Tournament
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
External Content
Mutation # 482 Wheel of Misfortune Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome
Brood War
General
BW General Discussion Flash Announces (and Retracts) Hiatus From ASL Starcraft in widescreen BGH Auto Balance -> http://bghmmr.eu/ A cwal.gg Extension - Easily keep track of anyone
Tourneys
Cosmonarchy Pro Showmatches [Megathread] Daily Proleagues CSL Xiamen International Invitational [BSL20] Non-Korean Championship 4x BSL + 4x China
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile CCLP - Command & Conquer League Project The PlayStation 5
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 Stop Killing Games - European Citizens Initiative Russo-Ukrainian War Thread Summer Games Done Quick 2025! Things Aren’t Peaceful in Palestine
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023 2024 - 2025 Football Thread NBA General Discussion NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Men Take Risks, Women Win Ga…
TrAiDoS
momentary artworks from des…
tankgirl
from making sc maps to makin…
Husyelt
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 550 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
Next event in 3h 36m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nina 238
mcanning 42
StarCraft: Brood War
Zeus 1144
Noble 33
Bale 7
PianO 0
Dota 2
ODPixel398
NeuroSwarm111
canceldota0
League of Legends
JimRising 779
Counter-Strike
Stewie2K1137
Super Smash Bros
Mew2King114
Other Games
summit1g13069
WinterStarcraft337
Trikslyr39
SortOf18
Organizations
Other Games
gamesdonequick3179
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH391
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota213
League of Legends
• Rush2208
• Lourlo1592
Upcoming Events
Replay Cast
3h 36m
WardiTV European League
9h 36m
ShoWTimE vs sebesdes
Percival vs NightPhoenix
Shameless vs Nicoract
Krystianer vs Scarlett
ByuN vs uThermal
Harstem vs HeRoMaRinE
PiGosaur Monday
17h 36m
uThermal 2v2 Circuit
1d 9h
Replay Cast
1d 17h
The PondCast
2 days
WardiTV European League
2 days
Replay Cast
2 days
Epic.LAN
3 days
CranKy Ducklings
4 days
[ Show More ]
Epic.LAN
4 days
CSO Contender
4 days
BSL20 Non-Korean Champi…
4 days
Bonyth vs Sziky
Dewalt vs Hawk
Hawk vs QiaoGege
Sziky vs Dewalt
Mihu vs Bonyth
Zhanhun vs QiaoGege
QiaoGege vs Fengzi
Sparkling Tuna Cup
5 days
Online Event
5 days
BSL20 Non-Korean Champi…
5 days
Bonyth vs Zhanhun
Dewalt vs Mihu
Hawk vs Sziky
Sziky vs QiaoGege
Mihu vs Hawk
Zhanhun vs Dewalt
Fengzi vs Bonyth
Liquipedia Results

Completed

2025 ACS Season 2: Qualifier
RSL Revival: Season 1
Murky Cup #2

Ongoing

JPL Season 2
BSL 2v2 Season 3
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
BSL20 Non-Korean Championship
Championship of Russia 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters

Upcoming

CSL Xiamen Invitational
CSL Xiamen Invitational: ShowMatche
2025 ACS Season 2
CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
BSL Season 21
K-Championship
RSL Revival: Season 2
SEL Season 2 Championship
uThermal 2v2 Main Event
FEL Cracov 2025
Esports World Cup 2025
Underdog Cup #2
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
BLAST Bounty Fall Qual
IEM Cologne 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.