Playnite Forums
  • Playnite Web
  • Rules
  • Members
  • Team
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Playnite Forums Extension Database Generic Extensions HTML Exporter | Export your games library to (static) html files

HTML Exporter | Export your games library to (static) html files
joyrider3774
Offline

#1
04-25-2021, 12:29 PM (This post was last modified: 09-19-2021, 02:45 PM by joyrider3774.)
Hi,

I created a plugin to export your complete playnite library to static html files. It uses a template system so in theory you can create your own templates for exporting. I have provided 3 templates myself a GRID based view, a LIST View and a TEXT Only version. The text only version can easily be used to share your games library with friends or to host this on a website. If you use the images version you either must self host the html files using your own webserver (for example using Wamp on windows) and some dynamic dns provider (for example usin NO-IP). Another option is to upload your files to Onedrive or google drive and use https://drv.tw/ to make a website out of your shared files on those cloud services (this will be slower). For syncing with real webhosting using ftp or to another pc or raspberry pi hosting your website i personally use freefilesync

Example Export
http://htmlexporterexample.joyrider3774.xyz/

release / help video
V3.0

V2.0

V1.0


Export Speed:
Ok so the very first time when you export with images enabled it will take a longer time than the second time you will export. The very first time it has copy all images while the next times it only has to copy new images (it won't copy them again). Also generating the very first page takes longer than all other pages as the very first page also generates all detail pages of games. Also having playnite installed on a SSD and exporting to an SSD folder will be a lot faster than having playnite installed / exporting on platter disk or even worse an SMR platter disk. 

Here are some statistics from my pc where i have about 2250 games in my library all containing images for every game when exporting with the default grid template and copying images:

1st export on (non SMR) platter disk: 3 minutes 9 seconds
2nd export on (non SMR) platter disk: 1 minute 15 seconds

1st export on ssd disk: 50 seconds
2nd export on ssd disk: 23 seconds

Export Size:
Export size highly depends on library size (nr of games), and when exporting images, images resolutions and the amount of games having all images (icons, cover, background). In my playnite all game images are optimzed according to playnite (not one games shows the optimazation warning for images). Here are the sizes for my current real export for about 2250 games:

Grid + Images: 2,14 GB
List + Images: 2,17 GB
List Text only (no images): 113 MB

As of version 2.0 of html exporter you can now reduce the size of the export by converting icon files to png and cover / background images to jpeg as well as resize images. Here are some results of my real export of about 2600 games:

Grid Copy only: 2,33 GB
Grid Resize + Force 100% Jpeg Quality: 1,20 GB
Grid Resize + Force 85% Jpeg Quality: 554 MB
Grid Resize + Convert + Force 100% Jpeg Quality: 1,17 GB
Grid Resize + Convert + Force 85% Jpeg Quality: 469 MB
Grid Convert 100% Jpeg Quality: 2,28 GB
Grid Convert 85% Jpeg Quality: 2,18 GB
Grid Convert + Force 100% Jpeg Quality: 1,92 GB
Grid Convert + Force 85% Jpeg Quality: 895 MB

Github:
https://github.com/joyrider3774/Playnite_html_exporter/

Release History:
Version 3.0:
  • Playnite 9 Support
  • Fix Links sometimes not clickable on details page
  • Make list templates use fixed table to prevent table repositioning
  • New "Table" Template using Tabulator which also works fast on phones
  • New "Tag" Group & export field / page
  • Load Templates from both Plugin as Plugin data Folder, Plugin folder having preference
  • Don't check for Image Magick existance of every function call, do it once before starting export
  • AgeRating, Region and Platform are no longer sortfields, they still are groupfields.
  • Added Tags on Game Details page
  • Fix Library Field not always available in templates
  • Fix bug in Templates javascript where collapsed groups would still show collapsed icon after search
  • Added Viewport the templates for better mobile usage
  • Add Support for "Add to Homescreen" option in the templates for mobile usage
  • Fix Gif, Tif, Ico generating multiple files when not used as icon
  • Make Links Clearer / more visible in exported html pages.
  • Use FileDeDuplicator per image type instead of global one
Version 2.2:
  • Fix bug with image conversion failing if paths contained spaces
Version 2.1:
  • Fix Playtime Category "Not Played"
  • Added new image deduplication option
  • Fixed bug with saving of the file that contains the original image data
Version 2.0:
  • Added image conversion and resizing options through Image Magick
  • Fixed layouts related to certain translations
Version 1.4:
  • Fix and improve search functionality with list templates
  • Fix Return key not working to invoke search after doing an initial search in list templates
  • Fix Search button missing id in specific list template
Version 1.3:
  • Fix export failing when a game has "NULL" weblinks
  • New templates including a search / filter game section
Version 1.2:
  • Fix export failing when a game has no platform set!
  • Fix Name Grouping (Quicklinks)
Version 1.0:
  • Initial Release
Downloads:

.pext   HTML_Exporter_2_2.pext (Size: 247.82 KB / Downloads: 275)



.pext   HTML_Exporter_1_2.pext (Size: 195.5 KB / Downloads: 315)
.pext   HTML_Exporter_1_3.pext (Size: 200.18 KB / Downloads: 164)
.pext   HTML_Exporter_1_4.pext (Size: 202.01 KB / Downloads: 185)
.pext   HTML_Exporter_2_0.pext (Size: 245.42 KB / Downloads: 162)
.pext   HTML_Exporter_2_1.pext (Size: 247.76 KB / Downloads: 161)
CriticalComposer
Offline

#2
04-26-2021, 04:00 AM
This is amazing! I was looking for an alternative to keeping track of both Playnite and Backloggery and this looks like it could be it.
fillidill
Offline

#3
04-26-2021, 07:40 AM
I agree, this is amazing! Would it be possible to have a setting to make it automatically export on playnite startup, both for desktop mode and fullscreen mode? Smile
joyrider3774
Offline

#4
04-26-2021, 10:34 AM (This post was last modified: 04-26-2021, 10:40 AM by joyrider3774.)
No plans for automatic exports, it would take too long to startup playnite if i would be doing that

btw if you want to sync to real webhosting using ftp or to some other pc using ftp i personally use freefilesync
kristheb
Offline

#5
04-29-2021, 11:16 AM
tried it bu tits not generating an inedex.html at the end. Says an page couldnt be exported due to an error. no specific message in the log as far as i can see it.
joyrider3774
Offline

#6
04-30-2021, 03:39 AM (This post was last modified: 04-30-2021, 03:44 AM by joyrider3774.)
(04-29-2021, 11:16 AM)kristheb Wrote: tried it bu tits not generating an inedex.html at the end. Says an page couldnt be exported due to an error. no specific message in the log as far as i can see it.

Error due to template or just generic error ? Wonder what it could be but will be hard to find out without having the same library as you. I can try to add something to the log in case of errors but did do it initially as i thought it could spam the log in case of similar errors. Are you on discord ? maybe we can work it out there if i give some modified version to try and find out what error it was.

Also can you try exporting again and supply me your playnite.log (as an attachment do not copy the contents of the file in post but add it as an attachment)
joyrider3774
Offline

#7
04-30-2021, 06:48 PM (This post was last modified: 04-30-2021, 06:48 PM by joyrider3774.)
Released Version 1.2:
  • Fix export failing when a game has no platform set! (fixes kristheb's problem)
  • Fix Name Grouping (Quicklinks)
joyrider3774
Offline

#8
08-08-2021, 04:28 PM (This post was last modified: 08-08-2021, 04:55 PM by joyrider3774.)
Released Version 1.3:
  • Fix export failing when a game has "NULL" weblinks
  • New templates including a search / filter game section
In order to use the new templates after installing the new version of the plugin, goto the extensions data folder and erase the templates folder then restart playnite, unless of course you have created / modified your own templates
joyrider3774
Offline

#9
08-09-2021, 05:53 AM
Released Version 1.4:
  • Fix and improve search functionality with list templates
  • Fix Return key not working to invoke search after doing an initial search in list templates
  • Fix Search button missing id in specific list template
In order to use the new templates after installing the new version of the plugin, goto the extensions data folder and erase the templates folder then restart playnite, unless of course you have created / modified your own templates
AlexMagnus
Offline

#10
08-10-2021, 10:15 PM (This post was last modified: 08-10-2021, 10:15 PM by AlexMagnus.)
Hello,
Interesting and very good job!
Could it be possible to add the links existing in the "links" properties of a game ? So they will still works, as it is in PlmayNite.
For example, for Steam games you have the "Community Hub", if this link can work also in the HTML export ?
joyrider3774
Offline

#11
08-13-2021, 11:57 AM
(08-10-2021, 10:15 PM)AlexMagnus Wrote: Hello,
Interesting and very good job!
Could it be possible to add the links existing in the "links" properties of a game ? So they will still works, as it is in PlmayNite.
For example, for Steam games you have the "Community Hub", if this link can work also in the HTML export ?

Links are already exported on the details pages ...

[Image: 14dGyxm.png]
http://htmlexporterexample.joyrider3774....8302d.html
joyrider3774
Offline

#12
08-22-2021, 06:21 PM (This post was last modified: 08-22-2021, 06:24 PM by joyrider3774.)
Something i'm working on for the next version:

[Image: GhGlevr.png]

here are the stats for some of the different options html exporter is going to get concerning to images and converting to jpg /  (ico ->) png for my library. Noforce means if source and target filetype are the same files are just copied and not reencoded (unless you resize of course). Force means the files are forcefully resaved even if your original image was of same type. This makes sure jpeg quality is (re)applied. Resize was done using 48x48 for icons, 1280x720 for background and covers to 180x270, it only resizes if original image is bigger (in resolution). With each option it will always check the final files size and if the final files size is bigger than the original the original is used again the nr (85 & 100) at the end is the jpeg quality setting

[Image: MwhVjHH.png]
full image link: https://i.imgur.com/MwhVjHH.png
mbeemer
Offline

#13
08-26-2021, 04:15 PM
I had some trouble trying this out, but I found a workaround.  The extension generated an index.html file on the first run, but failed to re-create the file on subsequent runs.  Selecting "Revert to" /"Default list (text only)" appears to have cleared whatever was causing the problem.
joyrider3774
Offline

#14
08-26-2021, 11:02 PM (This post was last modified: 08-26-2021, 11:07 PM by joyrider3774.)
(08-26-2021, 04:15 PM)mbeemer Wrote: I had some trouble trying this out, but I found a workaround.  The extension generated an index.html file on the first run, but failed to re-create the file on subsequent runs.  Selecting "Revert to" /"Default list (text only)" appears to have cleared whatever was causing the problem.
did your playnite.log show anything ?

Version 2.0 Released !
  • Added image conversion and resizing options through Image Magick
  • Fixed layouts related to certain translations
As of version 2.0 of html exporter you can now reduce the size of the export by converting icon files to png and cover / background images to jpeg as well as resize images. Here are some results of my real export of about 2600 games:

Grid Copy only: 2,33 GB
Grid Resize + Force 100% Jpeg Quality: 1,20 GB
Grid Resize + Force 85% Jpeg Quality: 554 MB
Grid Resize + Convert + Force 100% Jpeg Quality: 1,17 GB
Grid Resize + Convert + Force 85% Jpeg Quality: 469 MB
Grid Convert 100% Jpeg Quality: 2,28 GB
Grid Convert 85% Jpeg Quality: 2,18 GB
Grid Convert + Force 100% Jpeg Quality: 1,92 GB
Grid Convert + Force 85% Jpeg Quality: 895 MB
joyrider3774
Offline

#15
09-04-2021, 11:04 AM
Version 2.1 Released!
  • Fix Playtime Category "Not Played"
  • Added new image deduplication option
  • Fixed bug with saving of the file that contains the original image data
vannessqn
Offline

#16
09-04-2021, 03:29 PM
(09-04-2021, 11:04 AM)joyrider3774 Wrote: Version 2.1 Released!
  • Fix Playtime Category "Not Played"
  • Added new image deduplication option
  • Fixed bug with saving of the file that contains the original image data
Nice can you show me how to not showing the name of the games on the cover, I like the grid view looks clean.
joyrider3774
Offline

#17
09-05-2021, 11:22 PM
(09-04-2021, 03:29 PM)vannessqn Wrote: Nice can you show me how to not showing the name of the games on the cover, I like the grid view looks clean.
Modify the template or create a copy of it and modify that one. Its just templates with html stuff so easy to change
joyrider3774
Offline

#18
09-06-2021, 09:53 PM (This post was last modified: 09-06-2021, 09:56 PM by joyrider3774.)
New Release V2.2:
  • Fix bug with image conversion failing if paths contained spaces

Why did noone notice this ? the bug has been there ever since version 2.0
joyrider3774
Offline

#19
09-19-2021, 02:43 PM
New Release V3.0 (for playnite 9 and above only) Will be available in addons browser soon
  • Playnite 9 Support
  • Fix Links sometimes not clickable on details page
  • Make list templates use fixed table to prevent table repositioning
  • New "Table" Template using Tabulator which also works fast on phones
  • New "Tag" Group & export field / page
  • Load Templates from both Plugin as Plugin data Folder, Plugin folder having preference
  • Don't check for Image Magick existance of every function call, do it once before starting export
  • AgeRating, Region and Platform are no longer sortfields, they still are groupfields.
  • Added Tags on Game Details page
  • Fix Library Field not always available in templates
  • Fix bug in Templates javascript where collapsed groups would still show collapsed icon after search
  • Added Viewport the templates for better mobile usage
  • Add Support for "Add to Homescreen" option in the templates for mobile usage
  • Fix Gif, Tif, Ico generating multiple files when not used as icon
  • Make Links Clearer / more visible in exported html pages.
  • Use FileDeDuplicator per image type instead of global one
Xuiwert
Offline

#20
12-13-2021, 04:05 PM (This post was last modified: 12-13-2021, 04:06 PM by Xuiwert.)
Hi.  Nice export script.  Is there a guide on modifying the templates?  I am looking at simply replacing Played Time with Release date, and whilst I can get the title of that column to change it wont display Release date?  Not sure my changes are be activated.  Everything in the setup is set to default list text:

[see attached picture]

And I changed the elements in default list test folder - gamecard.txt:
From: <TD><a href="%playtime_filename%#quicklink-%playtime%">%playtime%</a></TD>
To: <TD><a href="%releasedate_filename%#quicklink-%releasedatedate%">%playtime%</a></TD>
And in page.txt just following <TABLE  name="gamestable" class="detailstable" id="detailstable">, also the same update.  And the title of the column changed from "Playtime" to "17/10/2016", however the column data still shows "Not played", so it hasn't replaced it. 

I am probably missing somethig obvious.


Thumbnail(s)
   
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »



  • View a Printable Version
  • Subscribe to this thread

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode