Site
Home / Forum / Artwork / CSV Generator for Photoshop Batch Editing

CSV Generator for Photoshop Batch Editing


Posted: 27 Apr 2021 05:33
willorkney
Posts: 13
Joined: 2021-03-18

I didn't want to derail ovokx's great artwork thread so thought I'd start a new one re: what corswine and I discussed:

I've made so many CSV files now it really isn't too much trouble, but of course it could be streamlined more.

It all depends how many different elements will be present as to how complex the CSV file is, here is a quick example of how I design mine: https://docs.google.com/spreadsheets/d/17HvReqrDo3gEKfsjA8HRAE_8A4vnIP9rK02ME9yg5Z4/edit?usp=sharing

The 'fix' sheet is where I copy the csv data and event links to, then I use a formula to process that data into a format that will be readable in Photoshop in the 'csv' sheet. The 'db' sheet is where I do lookups of different team name forms and stuff like that if necessary,

If you could make something that would auto produce that then it would make life easier.


I may have misunderstood and oversimplified this but this is what I've put together so far: https://chzfans.com/create_csv/ - Note that it only produces results for VERSUS events currently (eg. Ice Hockey, Basketball, Soccer, not Fighting or Motorsport etc)

The CSV being produced in my script for NHL isn't an exact match with corswines (53105 chars in mine vs 53974 chars in corswines) so I'm just looking into why that might be.

After clicking "Create CSV" for your chosen league theres a backend script which loads the season data from eventsseason.php on the API using curl. It then saves the idEvent, strHomeTeam, and strAwayTeam as a CSV (with some additional formatting on the team names to change eg "Florida Panthers" to "\Florida Panthers\512.png")

Will the image names always follow the same naming conventions, eg. 512.png, or would it be better if the user could set a prefix and suffix around the team name to set the image urls?

Currently it only looks at the current season. Does this need to be user-defined too incase people want to batch create art for old events?

Let me know if Im on the right track and what else might be needed in the script
Thanks
Will

zag
Posted: 27 Apr 2021 08:12
curswine
Posts: 866
Joined: 2020-06-17

This is perfect for creating simple thumbs, thanks a lot for taking your time to make this.

I'll get to work on making the NHL thumbs in Ovokx's style later on today, I believe I still have the PSD file for it.

As a little extra do you think you could also add a function that produces a .bat file that can add the folder structure? This is something else I use the spreadsheets for and could save me even more time.

This is an example of what I currently use, the country isn't too important for mixed leagues like the NHL, but quite important for football leagues.

md "Ice Hockey\NHL\Canada\Calgary Flames"
md "Ice Hockey\NHL\Canada\Edmonton Oilers"
md "Ice Hockey\NHL\Canada\Montreal Canadiens"
md "Ice Hockey\NHL\Canada\Ottawa Senators"
md "Ice Hockey\NHL\Canada\Toronto Maple Leafs"
md "Ice Hockey\NHL\Canada\Vancouver Canucks"
md "Ice Hockey\NHL\Canada\Winnipeg Jets"
md "Ice Hockey\NHL\United States\Anaheim Ducks"
md "Ice Hockey\NHL\United States\Arizona Coyotes"
md "Ice Hockey\NHL\United States\Boston Bruins"
md "Ice Hockey\NHL\United States\Buffalo Sabres"
md "Ice Hockey\NHL\United States\Carolina Hurricanes"
md "Ice Hockey\NHL\United States\Chicago Blackhawks"
md "Ice Hockey\NHL\United States\Colorado Avalanche"
md "Ice Hockey\NHL\United States\Columbus Blue Jackets"
md "Ice Hockey\NHL\United States\Dallas Stars"
md "Ice Hockey\NHL\United States\Detroit Red Wings"
md "Ice Hockey\NHL\United States\Florida Panthers"
md "Ice Hockey\NHL\United States\Los Angeles Kings"
md "Ice Hockey\NHL\United States\Minnesota Wild"
md "Ice Hockey\NHL\United States\Nashville Predators"
md "Ice Hockey\NHL\United States\New Jersey Devils"
md "Ice Hockey\NHL\United States\New York Islanders"
md "Ice Hockey\NHL\United States\New York Rangers"
md "Ice Hockey\NHL\United States\Philadelphia Flyers"
md "Ice Hockey\NHL\United States\Pittsburgh Penguins"
md "Ice Hockey\NHL\United States\San Jose Sharks"
md "Ice Hockey\NHL\United States\St. Louis Blues"
md "Ice Hockey\NHL\United States\Tampa Bay Lightning"
md "Ice Hockey\NHL\United States\Vegas Golden Knights"
md "Ice Hockey\NHL\United States\Washington Capitals"


willorkney
Posted: 27 Apr 2021 08:15

zag
Posts: 3,327
Joined: 2020-03-23

Nice work!

willorkney
Posted: 29 Apr 2021 05:09
willorkney
Posts: 13
Joined: 2021-03-18

Hi curswine, I'll look into adding the .bat file this weekend. The API endpoint I'm using doesn't return the teams country unfortunately so I'm not sure how to go about adding it currently.

I think I'll need to look up each individual team using lookupteam.php and then cache their country so that we don't lookup that team again (eg. If Man Utd have 20 fixtures this season we only want to hit the API once, not 20 times for Man Utd).

Will let you know when I have it working

Posted: 29 Apr 2021 12:06
curswine
Posts: 866
Joined: 2020-06-17

If its a bit tricky then don't worry about it, the country part is only really useful when doing thumbs for continental competitions, but I've actually got a setup for those already.

A batch file with the team name and 512.png would still be useful.


Who is Online?

In total there are 68 users online :: 3 registered, 0 hidden and 65 guests (based on users active over the past 5 minutes) Most users ever online was 424 on Fri Nov 10, 2017 9:02 pm

About Us

Discussion forum for TheSportsDB.com site and related topics

Rules

- Be Polite
- Respect other users
- Always post log files with issues
- Try to be helpful
- No Piracy discussion

Showing 0 to 5 (Total: 5)