Story   Photographer   Editor   Student/Intern   Assistant   Job/Item

SportsShooter.com: The Online Resource for Sports Photography

Contents:
 Front Page
 Member Index
 Latest Headlines
 Special Features
 'Fun Pix'
 Message Board
 Educate Yourself
 Equipment Profiles
 Bookshelf
 my.SportsShooter
 Classified Ads
 Workshop
Contests:
 Monthly Clip Contest
 Annual Contest
 Rules/Info
Newsletter:
 Current Issue
 Back Issues
 Subscribe
Members:
 Members Area
 "The Guide"
 Join
About Us:
 About SportsShooter
 Contact Us
 Terms & Conditions


Sign in:
Members log in here with your user name and password to access the your admin page and other special features.

Name:



Password:







||
SportsShooter.com: Member Message Board

How To: Homemade code replacement in under 5 minutes
Josh Weiss, Photographer
Atlanta/Athens | GA | United States | Posted: 11:52 AM on 11.09.10
->> After weeks of trying to figure out a better way to create code replacement rosters to save some money, I came up with a method that is really quick once you know the steps.

I couldn't believe I didn't think of it sooner and felt really stupid, so I posted a how-to to help any one else looking for a better method.

http://www.joshdweiss.com/photoblog/2010/11/09/how-to-photomechanic-code-re.../
 This post is:  Informative (3) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Justin Edmonds, Student/Intern, Photographer
Denver | CO | USA | Posted: 3:28 PM on 11.09.10
->> Genius!

Thanks Josh.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Clark Brooks, Photo Editor, Photographer
Urbana | IL | USA | Posted: 3:32 PM on 11.09.10
->> Should have asked me Josh :-)

I've been making my own CR files for years using Excel. Your method takes a lot longer and way more complex than you need.

Instead of using mail merge, do this use the "&" symbol. The ampersand symbol is read as "join" in Excel. You use this to join the contents of one or more cells in a single cell.

Using the example in your blog, in column E put: ="buc"&a1". What will show is buc6 (buc+his number). In column F put: ="Bucks' "&c1&" "&B1. What will show in the column is "Bucks' center Andrew Bogut".

Next highlight the two rows and drag the cell formulas down the range of entries. The rows 2 through 16 will auto fill with the correct names and positions.

Then highlight highlight the two columns, copy and paste them into a notepad file. The required tab is automatically inserted between columns. Save the file as UTF-8, set PhotoMechanic to read the file and you are ready to rock and roll.

*Tip* save the spread sheet and use it as a template. I have one that use for covering prep games. Typing 26 names, positions and creating the CR file takes less than 10 minutes with the template. During halftime or during the last quarter of the JV game at high school games I get this done. I save the files to a master folder so when I cover that school again, I don't have to recreate the CR file.

Hope this helps and saves you a few steps.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Otto Kitsinger, Photographer
Boise | ID | US | Posted: 3:55 PM on 11.09.10
->> If you're working with an existing tab-delimitated file, such as a roster from ESPN, and you've got a text editor that does grep (such as, on Mac, the free TextWrangler) you can also get a code replacement roster built very quickly; if you don't need positions, you can do it in about 15 seconds.

The NCAA FB rosters, for example, are in columns in this format:

Number NAME POS HT WT CLASS HOMETOWN

A find and replace GREP in BBEdit/TextWrangler style (may vary slightly in different programs) to pull that apart looks like this:

(dd?)t(.*)t(.*)t(.*)t(.*)t(.*)t(.*)r

That's the number (one or two digits), a tab, the next bit to a tab, etc etc. with the return character at the end.

Then, you just replace by putting back together the pieces you want. Each parenthetical pair is numbered for the replace part in the order the were in the find statement. So the player number is 1, the player name is 2, etc. If you want to do a prefix, then the player number, then a tab, then the player name, number in brackets, and "of the TEAM NAME" you would just do this:

PREFIX1t2 #1 of the TEAM NAMEr

You need to just set up two, one for each team. (Or set up one, run it on each team's list, and just change the prefix and team name.)

You can put that back together in any order you want, and repeat things (such as the team number in both the replacement code and the text). For example, to do the player number in parentheses instead of with a # sign, it's (1) instead of #1. Parenthesis have special meaning in the FIND part, but they're just text in the REPLACE part.

The abbreviated position can be put in front of the player name (put a tab after it for ease of replacement) and then a set of saved replacements that turn, say, QBt in to quarterback . That changes the roster creation time from 15 seconds to about two minutes. :)
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Otto Kitsinger, Photographer
Boise | ID | US | Posted: 4:01 PM on 11.09.10
->> Well, rats - that pulled all of the backslashes out on post. That grep should read, with NO SPACES :

(BACKSLASH d BACKSLASH d?) BACKSLASH t (.*) BACKSLASH t (.*) BACKSLASH t (.*) BACKSLASH t (.*) BACKSLASH t (.*) BACKSLASH t (.*) BACKSLASH r

The player number is BACKSLASH 1, The player name is BACKSLASH 2.

The replacement grep is

prefixBACKSLASH1BACKSLASHtBACKSLASH2 #BACKSLASH1 of the TEAM NAME BACKSLASH r.

Not as easy to follow, sorry. But go try it once in find and replace, and it should make sense; then just save it as a preset and you're done.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Chuck Liddy, Photographer
Durham | NC | USA | Posted: 6:24 PM on 11.09.10
->> Gotta tell you guys, as someone who is obviously lacking in some basic skills with these programs (read: NONE) I am WAY so glad I forked over the dough and PAID for jason's code replacement. sorry, but I started reading the instruction page and instantly got a headache. for as many games as I shoot a year it comes out to about 25¢ a game for me to pay jason's more than reasonable fee. and the time I would have to spend looking up the rosters..then following these instructions is well worth 25¢.....
 This post is:  Informative (2) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Craig Mitchelldyer, Photographer, Assistant
Portland | OR | USA | Posted: 6:32 PM on 11.09.10
->> + 1 Chuck.

Well worth the money. Takes me 3 seconds to have full rosters for whatever I am shooting.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Louis Lopez, Photographer
Fontana | CA | USA | Posted: 6:54 PM on 11.09.10
->> Another recommendation for Jason Watson's Code replacement service. Well worth the money.

Josh,
Thanks for the information anyways.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Otto Kitsinger, Photographer
Boise | ID | US | Posted: 6:58 PM on 11.09.10
->> If you're shooting a lot, or don't have that particular sort of computery technical bent, absolutely - he has built a very good service. If you don't shoot much, or are a power Excel user, or handy with a text editor, it's handy to know how to do it.

In addition, if you are building it yourself, you can customize it exactly how you want; if all of your needs are of one style, but on the paid service that code would be "tpb36n" and you have trouble remembering that, you can build it with, say, a simple "b36" and nothing else. In my case, I was always having to do bulk edits to the generated files anyway to get them to match what I am required to have, so for me, it saves a lot of time, and I think for both solutions, the instructions are a lot longer to type out than the job is to perform.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Scott Morgan, Photographer
Rockford | IL | United States | Posted: 7:18 PM on 11.09.10
->> "Next highlight the two rows and drag the cell formulas down the range of entries. The rows 2 through 16 will auto fill with the correct names and positions."

Clark, can you elaborate on how this is done? I'm having trouble figuring out how to drag a cell formula to a new row. Is there a menu command to do this? I'm using Excel 2004 for Mac, so it may not be the same method for me.

(p.s., thanks for posting this, I've been copy and pasting over and over for years now. I use this for high school rosters, so I can't use Craig's tool.)
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Michael Granse, Photographer
Urbana | IL | USA | Posted: 7:20 PM on 11.09.10
->> You guys are all going to ruin the code replacement industry :)
 This post is:  Informative (0) | Funny (4) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Jeffrey Hanisch, Photographer
Slinger | WI | USA | Posted: 7:29 PM on 11.09.10
->> My website, www.jeffhanisch.com, has a free code replacement tool up and running for most of the major sports (NBA, NFL, MLB, NCAA Football, NCAA Mens Basketball). I've been testing it for a couple months now with a couple users and have most of the bugs worked out of it. I can't guarantee it's perfect as of yet, but it's functional thus far.

My code replacement tool doesn't have anywhere near the functionality of Jason's (and I don't have plans to add much more other than maybe a few more sports other people may need), but it is working and I'm not charging. If you do use it, please read the FAQ's before sending me questions/comments/etc.
 This post is:  Informative (0) | Funny (0) | Huh? (1) | Off Topic (0) | Inappropriate (0) |   Definitions

Rick Osentoski, Photographer
Martin | OH | United States | Posted: 7:40 PM on 11.09.10
->> I agree with Chuck and Louis not worth the time when Jason's works so good. Works out to what $4.00 a week.

If on a Mac I would also recommend a program called Typinator

http://www.ergonis.com/products/typinator/

It gives you code replacement in all programs at the system level.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Clark Brooks, Photo Editor, Photographer
Urbana | IL | USA | Posted: 10:44 PM on 11.09.10
->> ""Next highlight the two rows and drag the cell formulas down the range of entries. The rows 2 through 16 will auto fill with the correct names and positions."

Clark, can you elaborate on how this is done? I'm having trouble figuring out how to drag a cell formula to a new row. Is there a menu command to do this? I'm using Excel 2004 for Mac, so it may not be the same method for me."

Scott -
Click on the first cell, hold the mouse button down and drag the cursor over to the second. Then both cells will be highlighted. On the bottom right corner of the two highlighted cells there will be a little square. Click the on it and hold the mouse button down. Drag the mouse to the last row of your data and release it. The formula will be copied down and the cells will fill with the correct info.
 This post is:  Informative (1) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Richard Wolowicz, Photographer
Montreal | QC | Canada | Posted: 11:54 PM on 11.09.10
->> +1 for Jason's service ... works great and is just missing a couple of changes for it to be perfect.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

David Harpe, Photographer
Denver | CO | USA | Posted: 11:57 PM on 11.09.10
->> Buy a fish vs. learning to fish

If all you need are the rosters, Jason's site is great. But learning how to do this type of thing is extremely useful in all sorts of endeavors involving computers. Josh's tutorial and the subsequent comments are a great way to learn how to do text manipulation on a computer, and that can come in very very handy...

Nice post!
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Scott Morgan, Photographer
Rockford | IL | United States | Posted: 12:18 PM on 11.10.10
->> Clark, thank you so much. Now I can copy a high school roster from our newspaper website and make a code replacement file from it in about 30 seconds.

Of course, that doesn't include the time it takes to check spellings and numbers on all the names, but I'll take it.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Clark Brooks, Photo Editor, Photographer
Urbana | IL | USA | Posted: 1:45 PM on 11.10.10
->> Hey Scott,

You are welcome. Another tip since you are shooting high school sports (and this could apply to college/pro, too):

Continuing on the above example, in column h put: ="buc"&a1s". What will show is buc6s (buc+his number+s). In column i put: ="Lincoln High School's "&c1&" "&B1. What will show in the column is "Lincoln High School's Andrew Bogut". I use the letter 's' to denote "school" in my system. In the first example, I would actually use ="buc"&a1n" - the letter 'n' to denote team nickname and ="buc"&a1" for just the player's full name.

This way I can type in PM (I omitted position in the examples because they are not required for my work):

buc6 and get -> "Andrew Bogut"
buc6s and get -> "Lincoln High School's Andrew Bogut"
buc6n and get -> "Bucks' Andrew Bogut"

The first code comes in handy if you have multiple players in the frame. Then you can type buc6s and buc11 to get "Lincoln High School's Andrew Bogut and Earl Boykins". This way you don't have to go back and delete the school or nickname in front of each additional player's name if you have to list them.

Hope this helps.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Clark Brooks, Photo Editor, Photographer
Urbana | IL | USA | Posted: 1:51 PM on 11.10.10
->> Forgot to mention, Scott (et al) the next step. Copy all three columns into a text file and save it as a UTF-8 file. Save the excel spread sheet. Because then you only have populate the name and number column for future CR files and yeah, it is only a 30 sec job if you can copy and paste rosters into your newly created template, five minutes if you have to type in the names and double check spellings.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Anthony Vasser, Photographer, Assistant
Houston | TX | USA | Posted: 2:43 PM on 11.10.10
->> I use a formatted excel sheet and paste the results into a text file. Takes longer to open excel than it does to generate and output the file.

The tricky part no one else has addressed are those teams (like NFL) that format names last, first. This is best resolved using an if/find to determine if it's in this format or not.

This is how I do mine. Ultimately this is just a bunch of & joins, with a roster code conversion and seeing if the name is last, first. Just paste this directly into Q6 and follow the directions. YMMV.

=IF(B6="","",$C$2&" "&IF(ISNA(VLOOKUP(D6,$AM$6:$AN$44,2,FALSE)),D6,VLOOKUP(D6,$AM$6:$AN$44,2,FALSE))&" "&SUBSTITUTE(IF(ISERROR(FIND(",",C6,1)), IF(C6="","",MID(C6,1,FIND(" ",C6,1)-1)),IF(C6="","",MID(C6,FIND(", ",C6,1)+2,30)))," ","")&" "&SUBSTITUTE(IF(ISERROR(FIND(",",C6,1)),IF(C6="","",MID(C6,FIND(" ",C6,1)+1,30)),IF(C6="","",MID(C6,1,FIND(", ",C6,1)-1)))," ","")&" "&IF(C6="","","(#"&B6&")")&" ")

Type the team name in C2 however you want it to look.

Copy the roster, paste as text starting in B6. Usually you'll get number in column B, name in column C, and position in column D, plus other stats junk. Occasionally with college rosters both column C and D will be name (hyperlink artifacts). Just copy paste the data to the "proper" columns.

The roster code conversion is just a vlookup located in AM7:AN44. It's just a table consisting of all the variations of positions for each sport, such as GK is goalkeeper or M/F is Midfield/Forward.

This all results in something that looks like:
Rice University Owls Defender Megan Aultman (#7)
Just copy the whole column to a text file and save (or write a macro).


It'll be up to you to you on how to code your own team/player/number/offense/defense shorthand :)
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Jason Watson, Photographer
Palo Alto | CA | USA | Posted: 2:22 AM on 11.11.10
->> @Chuck, Craig, Louis - Thanks! :-)

@Otto, re: "In addition, if you are building it yourself, you can customize it exactly how you want; if all of your needs are of one style, but on the paid service that code would be "tpb36n" and you have trouble remembering that, you can build it with, say, a simple "b36" and nothing else. "

You can have it either way on my service as well -- tpb36n or b36 (short code / long name option). You can also have tons of other formatting features (standard output, Getty style output, bracketed keywords, etc.) Plus, if you have a suggestion for an output / customization that I currently don't have available on
http://www.codereplacements.com I am happy to consider it (and almost always include it) in the service.

@Richard - thanks too... if you have specific suggestions to make it "perfect" for you, please e-mail me at jason@jasonowatson.com -- as mentioned above, I'll be happy to do my best to meet your needs. :-)

Thanks all!
Jason
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Otto Kitsinger, Photographer
Boise | ID | US | Posted: 3:24 AM on 11.11.10
->> Very cool; glad you keep updating and adding features! If I was shooting more, I'd probably be using it myself. Maybe next year... :)
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Tim Vizer, Photographer
Belleville | IL | USA | Posted: 8:40 AM on 11.11.10
->> I'm with Chuck and the others---I neither have the time, nor the desire to make these CR files up myself.

Jason's work is always comprehensive and accurate, especially for guys like me who work a full-time daytime newspaper job AND freelance for multiple sports outlets in the evening, on days off/weekends by shooting pro or collegiate games.

I simply don't need to know how to do CR for the limited amount of high school sports I do shoot, so I don't need to create my own files.

Well worth my money for Jason's great service!!!
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Chuck Liddy, Photographer
Durham | NC | USA | Posted: 8:58 AM on 11.11.10
->> another prop to jason. I was having trouble the other day with a little CR problem (that was of my own doing) before a game and emailed him a question....I think it was a whole ten minutes before he got back with me and answered it (and fixed the problem)...and it was 9 am Sunday over there on the left coast where he lives. you get what you pay for with his gig, plus more.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Scott Morgan, Photographer
Rockford | IL | United States | Posted: 9:30 AM on 11.11.10
->> Does Jason's tool do high school sports? I don't shoot NFL or college much anymore.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Jason Watson, Photographer
Palo Alto | CA | USA | Posted: 11:02 AM on 11.11.10
->> Yes, you can generate high school sports rosters (or any other sport for the matter) using my custom roster tool. With this option, you can cut and paste the rosters directly into the tool, set a few options, and it will spit out codes to your liking.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Dennis Wierzbicki, Photographer
Plainfield | IL | USA | Posted: 12:18 PM on 11.11.10
->> As much as I like engineering my own solutions to most things, Jason's tool is SO worth the money that I have no desire to spend my free time manually filling out code replacement files. Plus, you have many, many options with his files that aren't available with DIY solutions.

Of course, if I were only shooting the occasional game here or there I might feel differently.

+1 on props to Jason.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Otto Kitsinger, Photographer
Boise | ID | US | Posted: 12:47 PM on 11.11.10
->> Dennis (and others) - yes, if you shoot a lot of different teams, Jason's service is completely worth it and highly recommended. If you only need one or two rosters to cover you for a season (say if you work for a school and don't shoot the opponents) then it's worth knowing how to do it yourself. I don't use the Excel method these days, but it's harder to explain than to do and once it's set up once, it's really just about a cut, a paste, type the team name, and then another cut and paste. Using grep in a text editor, it's that plus a find and replace command with a pre-saved search. (And if the backslashes had stayed in my first post, it wouldn't have looked so scary!) We have to shove around a lot of different kinds of data in this job and knowing some data processing methods can be very valuable.
 This post is:  Informative (0) | Funny (0) | Huh? (0) | Off Topic (0) | Inappropriate (0) |   Definitions

Add your comments...
If you'd like to add your comments to this thread, use this form. You need to be an active (paying) member of SportsShooter.com in order to post messages to the system.

NOTE: If you would like to report a problem you've found within the SportsShooter.com website, please let us know via the 'Contact Us' form, which alerts us immediately. It is not guaranteed that a member of the staff will see your message board post.
Thread Title: How To: Homemade code replacement in under 5 minutes
Thread Started By: Josh Weiss
Message:
Member Login:
Password:




Return to -->
Message Board Main Index
What do you do when software testing loses it's luster?? Make my hobby, my job!! ::..