Last active
August 29, 2015 14:08
-
-
Save shidarin/c3745b11de40b1a40bbc to your computer and use it in GitHub Desktop.
Alphabetize bbcode artist list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from re import search | |
ig_string = """ | |
1000Styles - http://instagram.com/1000styles | |
123 Klan - http://instagram.com/123klan | |
Aa - http://instagram.com/aestheticapparatus | |
Aaron Martin (Angrywoebots) - http://instagram.com/woes | |
Aec (Interesni Kazki) - http://instagram.com/aec_interesnikazki | |
Andrews, Esao - http://instagram.com/esao | |
Artmymind - http://instagram.com/artmymind | |
Aryz - http://instagram.com/mr_aryz | |
Bagshaw, Tom - http://instagram.com/tombagshaw | |
Baizley, John Dyer - http://instagram.com/aperfectmonster | |
Bannon, Jacob - http://instagram.com/jbannon | |
Barrett, Oliver - http://instagram.com/oliverbarrett | |
Bean, Rockin Jelly - http://instagram.com/rockinjellybean | |
Beaudry, Shaun - http://instagram.com/misterbeaudry | |
Beckett, Richey - http://instagram.com/richeybeckett | |
Belanger, Joshua - http://instagram.com/joshuabelanger | |
Bell, Andrew - http://instagram.com/deadzebrainc | |
Ben Kwok (Bioworkz) - http://instagram.com/bioworkz | |
Benscoter, Wes - http://instagram.com/wesbenscoter | |
Berens, Chris - http://instagram.com/chrisberensart | |
Bergeron, Jonathan - http://instagram.com/johnnycrap | |
Black, Dan - http://instagram.com/fakedanblack | |
C00P - http://instagram.com/artofcoop | |
C215 - http://instagram.com/christianguemy | |
Carter, Kyle - http://instagram.com/kylecarterart | |
Chevrier, Sandra - http://instagram.com/SandraChevrier | |
Choe, David - http://instagram.com/davidchoe | |
Chueh, Luke - http://instagram.com/lukechueh | |
Cook, David M - http://instagram.com/bonethrower | |
Cooper, JAW - http://instagram.com/jawcooper | |
Cooper, Rhys - http://instagram.com/studioseppuku | |
Crosshair, Dan Macadam - http://instagram.com/danmacadam | |
Cryptik - http://instagram.com/cryptk | |
Curiot - http://instagram.com/curiotli | |
D*Face - http://instagram.com/dface_official | |
Daleast - http://instagram.com/daleast | |
Dalek - http://instagram.com/dalek2013 | |
D'Andrea, David - http://instagram.com/dvdandrea | |
Danger, Daniel - http://instagram.com/tinymediaempire | |
Deerjerk - http://instagram.com/deerjerk | |
Deligannis, Alex - http://instagram.com/alexdeligiannis | |
Delort, Nico - http://instagram.com/nicodelort | |
Derby, Scott - http://instagram.com/nakedderby | |
Diaz, Alexis - http://instagram.com/alexis_diaz | |
Drilone - http://instagram.com/drilone | |
Duggan, Ryan - http://instagram.com/drugfactorypress | |
Dwitt - http://instagram.com/dwitt75 | |
Dyke, Nate Van - http://instagram.com/69n8vandyke | |
Early, Cloe - http://instagram.com/chloeearly | |
Eaton, Tristan - http://instagram.com/tristaneaton | |
Edmiston, Jason - http://instagram.com/jasonedmistonart | |
Eelus - http://instagram.com/eelusart | |
Faile - http://instagram.com/faileart | |
Faile (unofficial) - http://instagram.com/skinerjack | |
Fairey, Shepard - http://instagram.com/obeygiant | |
Ferg - http://instagram.com/fergbag | |
Ferguson, Matt - http://instagram.com/cakes_comics | |
Foley, Vanessa - http://instagram.com/vanessafoley | |
Forbes, Alan - http://instagram.com/alanforbes | |
Forbes, Alan - http://instagram.com/secretserpents | |
Francavilla, Francesco - http://instagram.com/f_francavilla | |
Gagnon, Jacub - http://instagram.com/jacubgagnon | |
Gaia - http://instagram.com/gaiastreetart | |
Gats - http://instagram.com/gatsptv | |
Geddes, Jeremy - http://instagram.com/jeremyispainting | |
Gemeos, Os - http://instagram.com/osgemeos | |
Glaubinger, Ian - http://instagram.com/hasunow | |
Goad, Jason - http://instagram.com/vincentvangoad | |
Godmachine - http://instagram.com/godmachine | |
Gonzales, Frank - http://instagram.com/gonzalesfrank | |
Gustafsson, Nicole - http://instagram.com/nimasprout | |
Hacker, Michael - http://instagram.com/michaelhackerillustration | |
Hackett, Caitlin - http://instagram.com/caitlin_hackett | |
Hale, David - http://instagram.com/lovehawkstudio | |
Handiedan - http://instagram.com/handiedan | |
Harrington, Conor - http://instagram.com/ | |
Hayuk, Maya - http://instagram.com/mayahayuk | |
Hem, Andrew - http://instagram.com/andrewhem | |
Hill, Brad - http://instagram.com/sircreate | |
Holt, Brandon - http://instagram.com/heathenlegs | |
Horkey, Aaron - http://instagram.com/aaronhorkey | |
Houser, Jim - http://instagram.com/misterhouser | |
Hultberg, Stella Im - http://instagram.com/stellaimhultberg | |
Inti - http://instagram.com/inti_cl | |
Invader - http://instagram.com/invaderwashere | |
Jay, Aye - http://instagram.com/ayejayart | |
Jaz - http://instagram.com/francofasolijaz | |
Jean, James - http://instagram.com/jamesjeanart | |
Ji, Sylvia - http://instagram.com/sylviaji | |
Jock - http://instagram.com/jock4twenty | |
John Howard (Monkeyink) - http://instagram.com/monkeyink | |
Jones, Erik - http://instagram.com/erikjonesart | |
Jones, Rob - http://instagram.com/animalrummy | |
Jufe - http://instagram.com/jufe | |
Justin Kamerer (Angry Blue) - http://instagram.com/angryblue666 | |
Kaiser, Jon Paul - http://instagram.com/jonpaulkaiser | |
Kaws - http://instagram.com/kaws | |
Kehoe, Andy - http://instagram.com/andykehoe | |
Kelly, Rich - http://instagram.com/therichkelly | |
Kelly, Vance - http://instagram.com/vance_kelly | |
Kozik, Frank - http://instagram.com/frankkozik | |
Krause, Lars P - http://instagram.com/blitzkrieg_bob | |
Lafond, Ben - http://instagram.com/benbrlsq | |
Lamm, Jeff - http://instagram.com/greasebat | |
Landland - http://instagram.com/_jseamans | |
Landland - http://instagram.com/fakedanblack | |
Landrum, Zach http://instagram.com/oldesoul | |
Lawrence, Mike - http://instagram.com/mikeillustrated | |
Lee, Christopher - http://instagram.com/thebeastisback | |
Limon, Jason - http://instagram.com/jasonlimon | |
Loon, Jacob Van - http://instagram.com/jacobvanloon | |
Loughborough, Joseph - http://instagram.com/josephloughborough | |
Lynn, Amanda - http://instagram.com/alynnpaint | |
Mackenzie, Robert - http://instagram.com/mackenzieart | |
Mafia, Print - http://instagram.com/printmafiaofficial | |
Malleus - http://instagram.com/malleusdelic | |
Manoukian, Stan - http://instagram.com/grograou | |
Matthew Woodson (Ghostco) - http://instagram.com/ghostco | |
McPherson, Tara - http://instagram.com/taramcpherson | |
Megafauna (blacksosprey) - http://instagram.com/blackosprey_megafauna | |
Milk, Soey - http://instagram.com/soeymilky | |
Millward, Drew - http://instagram.com/drewmillward | |
Miranda, Jeremy - http://instagram.com/jeremypmiranda | |
Miss Bugs - http://instagram.com/miss_bugs | |
Mitchell, Mike - http://instagram.com/sirmitchell | |
Monroe, Brendan - http://instagram.com/brendantheblob | |
Moss, Olly - http://instagram.com/ollymoss | |
Munn, Jason - http://instagram.com/munnjason | |
Neate, Adam - http://instagram.com/adam_neate | |
Never 2501 - http://instagram.com/never2501 | |
Newell, Tom J - http://instagram.com/tomjnewell | |
Nosego - http://instagram.com/nosego | |
Nychos - http://instagram.com/nychos | |
Oliveira, Lango - http://instagram.com/langooliveira | |
Olivier, Dzo - http://instagram.com/dzoolivier | |
Ortiz, Randy - http://instagram.com/randyortizdtd | |
Pan, Mu - http://instagram.com/mupan1911 | |
Pancho, Pixel - http://instagram.com/pixelpancho | |
Parla, Jose - http://instagram.com/joseparla | |
Pen, Sweeney - http://instagram.com/sweeneypen | |
Perillo, Dave - http://instagram.com/montygog | |
Perrot, Sage - http://instagram.com/haypeep | |
Peters, Brandt - http://instagram.com/brandtpeters | |
Phillips, Jimbo - http://instagram.com/jimbophillips | |
Phlegm - http://instagram.com/phlegm_art | |
Police, The London - http://instagram.com/thelondonpolice | |
Prefab77 - http://instagram.com/prefab77 | |
Pushead - http://instagram.com/hyperstoic | |
Qbic - http://instagram.com/rustamqbic | |
Raid71 (Chris Thornley) - http://instagram.com/raid71 | |
Rae - http://instagram.com/rae_bk | |
Retna - http://instagram.com/ironeyeretna | |
Roper, Arik - http://instagram.com/ropervision | |
Ruas, Joao - http://instagram.com/feral_kid | |
Ruggieri, Lucas - http://instagram.com/lr_illustration | |
Ryan, Jay - http://instagram.com/thebirdmachine | |
Ryniak, Chris - http://instagram.com/chrisryniak | |
Salazar, Souther - http://instagram.com/southersalazar | |
Saner - http://instagram.com/saner_edgar | |
Santora, Justin - http://instagram.com/justinsantora | |
Schoening, Dan - http://instagram.com/dannyschoening | |
Scott C - http://instagram.com/scottlava | |
Seamans, Jes - http://instagram.com/_jseamans | |
Shaw, Jay - http://instagram.com/ironjaiden | |
Sheehy, Nick - http://instagram.com/showchicken | |
Simkins, Greg "Craola" - http://instagram.com/craola | |
Sineater - http://instagram.com/sineateruk | |
Skinner - http://instagram.com/theartofskinner | |
Snik - http://instagram.com/snikarts | |
Sommers, Allison - http://instagram.com/allisonsommers | |
Soto, Jeff - http://instagram.com/jeffsotoart | |
Sperry, Chuck - http://instagram.com/yosquirt | |
Spusta, Marq - http://instagram.com/spustastudio | |
Squink - http://instagram.com/squink | |
Sudyka, Diana - http://instagram.com/tinyaviary | |
Supine, Judith - http://instagram.com/judithsupine | |
Sutfin, Mike - http://instagram.com/sutfin | |
Taylor, Ken - http://instagram.com/kentaylorart | |
Taylor, Matt - http://instagram.com/matttaylordraws | |
Terbywonder - http://instagram.com/terbywonder | |
The VACVVM - http://instagram.com/thevacvvm | |
Tidwell, Jeral - http://instagram.com/artboytidwell | |
Tong, Kevin - http://instagram.com/tragicsunshine | |
Tripp, Candice - http://instagram.com/misstripp | |
Tsang, Miles - http://instagram.com/nirazilla | |
Turnham, Chris - http://instagram.com/turnhamator | |
Unitus, Lonny - http://instagram.com/lonnyunitus | |
Usugrow - http://instagram.com/usugrow | |
Vhils - http://instagram.com/vhils | |
Waone (Interesni Kazki) - http://instagram.com/waoneinteresnikazki | |
webuyyourkids - http://instagram.com/webuyyourkids | |
webuyyourkids - http://instagram.com/fantazmagloria | |
Westell, Mishka - http://instagram.com/mishkawestell | |
Whalen, Tom - http://instagram.com/strongstuff | |
Wiesenfeld, Aron - http://instagram.com/aronwiesenfeld | |
Williams, Erica - http://instagram.com/hookieduke | |
Williams, Neal - http://instagram.com/epicproblemz | |
Wittfooth, Martin - http://instagram.com/marsproject | |
Wood, Ashley - http://instagram.com/ashleywoodart | |
Wood, Jeff - http://instagram.com/zenmysticstudio | |
Yamamoto, Yoskay - http://instagram.com/yoskayyamamoto | |
Yan, Bruce - http://instagram.com/mrbruceyan | |
Yata, Hannah Faith - http://instagram.com/hannafaithyata | |
Yeti, Zombie - http://instagram.com/zombieyeti | |
Yoshizawa, Sadam - http://instagram.com/sadam215 | |
Zacharevic, Ernest - http://instagram.com/ernestzacharevic | |
Zar, Chet - http://instagram.com/chetzar | |
Ziegler, Zio - http://instagram.com/zioziegler | |
Zombie, Lora - http://instagram.com/lorazombie | |
""" | |
ig_list = ig_string.split('\n') | |
EXCEPTIONS = [ | |
'Miss Bugs', | |
'123 Klan', | |
] | |
def lastname_first(name): | |
if ', ' in name or name in EXCEPTIONS: | |
return name | |
nickname = search('(\([\w\d\s]*\))', name) | |
if nickname: | |
name = name.replace(nickname.group(0), '') | |
fullname = name.split(' ') | |
fullname = [name for name in fullname if name] | |
if len(fullname) > 1: | |
lastname = fullname[-1] | |
if len(lastname) > 1 and any(c.isalpha() for c in lastname): | |
fullname.insert(0, fullname.pop(-1) + ',') | |
if nickname: | |
fullname.append(nickname.group(0)) | |
return ' '.join(fullname).title() | |
def change_name(line): | |
if not line: | |
return '' | |
if '[url]' not in line: | |
line = line.replace('http://', '[url]http://') + '[/url]' | |
if ' - ' not in line: | |
line = line.replace(' [url]', ' - [url]') | |
line_list = line.split(' - ') | |
line_list[0] = lastname_first(line_list[0]) | |
new_line = ' - '.join(line_list) | |
return new_line | |
alpha_ig_list = [change_name(line) for line in ig_list] | |
alpha_ig_list.sort() | |
print '\n'.join(alpha_ig_list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment