|
||||
| ||||
|
|||||||
| OOTP 25 - General Discussions Everything about the brand new 25th Anniversary Edition of Out of the Park Baseball - officially licensed by MLB, the MLBPA, KBO and the Baseball Hall of Fame. |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Minors (Triple A)
Join Date: Sep 2011
Posts: 204
|
How do I?
I am trying to print the BNN page from a retired player. When I click Open in Browser I get the page show here...UGH, I can't figure out how to copy and paste the screenshot. Sigh. Sorry. Anyway, I don't want the players Batting, fielding and position ratings along with all the jazz that is listed under status and last 10 games played to show up in the browser page. Basically, I just want to print his stats and Bio stuff without all the extra fluff. Is this possible or is that something done via my printer?
Thanks phillsphan |
|
|
|
|
|
#2 | |
|
Global Moderator
Join Date: Nov 2002
Posts: 11,802
|
Quote:
__________________
|
|
|
|
|
|
|
#3 |
|
Global Moderator
Join Date: Nov 2002
Posts: 11,802
|
As to answer your main question, you'd have to edit the html. Right-click on the page and save as. Then find the html file and open it up in a text editor like notepad++. Then find the tags that hold the elements you want to get rid of. For example, search for "log" to find the game log section. From there it gets a little difficult to know what to get rid of unless you know html. If you don't, just find a beginner's tutorial on html, particularly one that focuses on table tags like tr and td.
__________________
|
|
|
|
|
|
#4 |
|
All Star Starter
Join Date: Jan 2008
Posts: 1,497
|
Once the right tags are identified for removal, Notepad++ could also be used to do the same find/replace in bulk, for all files in a folder at the same time.
|
|
|
|
|
|
#5 |
|
Minors (Triple A)
Join Date: Sep 2011
Posts: 204
|
Looks like I need to go to HTML School. Thank you for the responses
|
|
|
|
|
|
#6 |
|
All Star Starter
Join Date: Jan 2008
Posts: 1,497
|
I should have asked, are you looking to do something like this quite often, or just on a few occasions?
I was able to modify one last night to my liking in about 20 minutes. Could probably do it in less than 5 now that I know what I'm looking for and what needs changing. Another possibility that may work is to save that html report you see in the browser as a PDF first, then make your modifications there if you have access to a decent pdf editor. Last edited by snepp; 08-19-2024 at 02:25 PM. |
|
|
|
|
|
#7 |
|
Global Moderator
Join Date: Nov 2002
Posts: 11,802
|
I wonder if OOTP uses a template file of some sort and if you change the template then it'll change how it makes the html files in the future using your new template.
__________________
|
|
|
|
|
|
#8 |
|
Hall Of Famer
Join Date: Jan 2015
Location: Oregon, not by design
Posts: 2,872
|
If on a Windows device, you could use the snipping tool to get the parts of the screen you want. Not certain it'll work, but in theory it should. best of luck.
__________________
"This is my opening farewell " - Jackson Browne “They make a desolation and call it peace.” ― Agha Shahid Ali "Maybe she just has to sing, for the sake of the song - And who do I think that I am to decide that she's wrong." - Townes Van Zandt "I saw a young man leaning on his wooden crutch - He called out to me, 'Don't ask for so much' And a young woman leaning in her darkened door She cried out to me, 'Why not ask for more?' " - Leonard Cohen "Hello darkness, my old Friend ...." - Paul Simon Before Mays, before DiMaggio, there was Oscar Charleston. "All the lies about Babe Ruth are true." - Waite Hoyt Avatar is the late great Townes Van Zandt. rip. |
|
|
|
|
|
#9 | |
|
Minors (Triple A)
Join Date: Sep 2011
Posts: 204
|
Quote:
|
|
|
|
|
|
|
#10 |
|
Minors (Triple A)
Join Date: Sep 2011
Posts: 204
|
Could you share the file you created?
|
|
|
|
|
|
#11 |
|
All Star Starter
Join Date: Jan 2008
Posts: 1,497
|
Here's a copy of the pdf after I edited the html. I lost my edited html when I re-opened the player in game (oops!).
|
|
|
|
|
|
#12 |
|
All Star Starter
Join Date: Jan 2008
Posts: 1,497
|
When I've got a few minutes later I'll post an unedited and edited copy of a player so that you can compare the files side by side for reference.
|
|
|
|
|
|
#13 |
|
Minors (Triple A)
Join Date: Sep 2011
Posts: 204
|
Thanks so much, looking forward to it!!
|
|
|
|
|
|
#14 |
|
All Star Starter
Join Date: Jan 2008
Posts: 1,497
|
Here you go. I included a couple of images in the zip so that the original report displayed properly as I would see it. You can unzip it anywhere, you don't have to put the files in the OOTP folders to look right.
|
|
|
|
|
|
#15 | |
|
All Star Starter
Join Date: May 2022
Posts: 1,289
|
Quote:
I run the game on a Windows laptop and have written a series of powershell scripts to "clean up" the pages more to my liking. Attached is the example player page of Bobby Richardson. Is that sort of what you are talking about? |
|
|
|
|
|
|
#16 |
|
All Star Starter
Join Date: May 2022
Posts: 1,289
|
Here is what the default page looks like before the script is run. Obviously the bottom part with the stats is cropped because the page won't fit on my screen.
|
|
|
|
|
|
#17 |
|
Minors (Triple A)
Join Date: Sep 2011
Posts: 204
|
YES. Exactly what I am looking for. That is perfect for my needs
|
|
|
|
|
|
#18 | |
|
All Star Starter
Join Date: May 2022
Posts: 1,289
|
Quote:
The players.txt file attached is actually the powershell script. Anyone can read the text file beforehand and verify that all it does update html files in the players subdirectory (i.e. the player pages). Obviously for security reasons the forum will not let me upload files with ps1 extensions because there are malicious people in the world. I am not one of them. (Yes, I know that is what a malicious person would say as well, lol.) You will need to rename that file to 'players.ps1' and then place it in your almanac folder... the same folder with your styles.css file. The default for Windows is to not allow Powershell scripts to run at all. This is annoying. So to enable ps1 scripts, I'd recommend perhaps this StackExchange post: https://superuser.com/questions/1063...rshell-scripts If none of that makes sense to you, let me know. I had to figure it out as well. Once script execution is enabled, you should be able to right-click on the players.ps1 file and select 'Run With Powershell'. The script will prompt you for a specific player page to convert (using the player ID), or you can enter '*' and do all of the pages in one shot. I recommend trying just one page at first to make sure it works fine. Last edited by uruguru; 08-22-2024 at 07:15 PM. |
|
|
|
|
|
|
#19 |
|
Minors (Triple A)
Join Date: Sep 2011
Posts: 204
|
I have just read the page you linked and realized that I don't understand that language whatsoever. LOL. This stuff is way beyond my comprehension. I really do appreciate your input, help and the time you've put in here, but alas it is too complicated for this 54 year old retired firefighter.
I am afraid to try and make these changes and mess up my computer |
|
|
|
|
|
#20 | |
|
All Star Starter
Join Date: May 2022
Posts: 1,289
|
Quote:
Here's how you do that: 1. Hit the Windows button and search for "Powershell". You should see an option that says "Windows Powershell" 2. Click the "Run as adminstrator" option. A window for powershell should open up. 3. In the command line, enter 'set-executionpolicy remotesigned'. 4.It should ask for confirmation. Enter 'Y' to confirm, then close the window. Congrats! You are done with that. Then put the players.ps1 file in your almanac directory with the styles.css file. You should be good to go then. |
|
|
|
|
![]() |
| Bookmarks |
|
|