|
||||
|
|
FHM9 - General Discussion Talk about the latest & greatest FHM, officially licensed by the NHL! |
![]() |
|
Thread Tools
![]() |
![]() |
#1 |
All Star Starter
Join Date: Aug 2002
Location: Home of the Kansas City Chiefs!
Posts: 1,080
|
HTML Boxscore
Is there no way to get an html boxscore like we can in the baseball game. I was hoping there was something like that available for the purpose of sharing replay results.
Thank you |
![]() |
![]() |
![]() |
#2 |
Major Leagues
Join Date: Oct 2017
Location: I hate hackers!
Posts: 370
|
Nope. Best you can do is export as csv and try and find a way to convert that to thml. So far...haven't had a ton of luck doing that.
|
![]() |
![]() |
![]() |
#3 | |
All Star Starter
Join Date: Jan 2021
Posts: 1,423
|
Quote:
Could be worth asking ChatGPT as it seems like the sort of thing it could make a little script for. I've been messing with it for days and it comes up with some good stuff, some less good stuff too but it could be worth messing with in this context! |
|
![]() |
![]() |
![]() |
#4 | |
Major Leagues
Join Date: Oct 2017
Location: I hate hackers!
Posts: 370
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 | |
Major Leagues
Join Date: May 2020
Location: Murfreesboro, TN
Posts: 312
|
Quote:
|
|
![]() |
![]() |
![]() |
#6 |
All Star Starter
Join Date: Jan 2021
Posts: 1,423
|
It can also be used to write short scripts in something like Python, to take in a csv and output it into HTML!
|
![]() |
![]() |
![]() |
#7 | |
Major Leagues
Join Date: May 2020
Location: Murfreesboro, TN
Posts: 312
|
Quote:
import csv # Open the CSV file and read the contents with open('data.csv', 'r') as csv_file: csv_reader = csv.reader(csv_file) # Create an HTML table table = '<table>\n' # Read each row of the CSV file and add it to the HTML table for row in csv_reader: table += '\t<tr>\n' for cell in row: table += f'\t\t<td>{cell}</td>\n' table += '\t</tr>\n' # Close the table table += '</table>' # Save the HTML table to a file with open('table.html', 'w') as html_file: html_file.write(table) |
|
![]() |
![]() |
![]() |
#8 |
Major Leagues
Join Date: May 2020
Location: Murfreesboro, TN
Posts: 312
|
OK, guys, I've had more luck simply finding a converter. If you'll click here, you'll see the result: https://drive.google.com/file/d/1Xuq...ew?usp=sharing
You'll notice my custom league team names are present; I simply found in the game under "Structure" on July 1 what IDs went with which teams, and then in the HTML code that it spit out from what file I input, I replaced the numeral with the team name. Basically, I did an export, used "team_stats" as a test case, and cut out all minor and junior teams (convenient, since the numbers ran sequentially for my custom league; the NHL does not work this way). I think it basically looks all right. Here's where I did it: https://www.convertcsv.com/csv-to-html.htm |
![]() |
![]() |
![]() |
#9 | |
All Star Starter
Join Date: Jan 2021
Posts: 1,423
|
Quote:
|
|
![]() |
![]() |
![]() |
Bookmarks |
|
|