Playnite Forums
HTML Exporter | Export your games library to (static) html files - Printable Version

+- Playnite Forums (https://playnite.link/forum)
+-- Forum: Extension Database (https://playnite.link/forum/forum-3.html)
+--- Forum: Generic Extensions (https://playnite.link/forum/forum-6.html)
+--- Thread: HTML Exporter | Export your games library to (static) html files (/thread-664.html)

Pages: 1 2


HTML Exporter | Export your games library to (static) html files - joyrider3774 - 04-25-2021

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:
[attachment=1860]


RE: HTML Exporter | Export your games library to (static) html files - CriticalComposer - 04-26-2021

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.


RE: HTML Exporter | Export your games library to (static) html files - fillidill - 04-26-2021

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


RE: HTML Exporter | Export your games library to (static) html files - joyrider3774 - 04-26-2021

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


RE: HTML Exporter | Export your games library to (static) html files - kristheb - 04-29-2021

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.


RE: HTML Exporter | Export your games library to (static) html files - joyrider3774 - 04-30-2021

(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)


RE: HTML Exporter | Export your games library to (static) html files - joyrider3774 - 04-30-2021

Released Version 1.2:
  • Fix export failing when a game has no platform set! (fixes kristheb's problem)
  • Fix Name Grouping (Quicklinks)



RE: HTML Exporter | Export your games library to (static) html files - joyrider3774 - 08-08-2021

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


RE: HTML Exporter | Export your games library to (static) html files - joyrider3774 - 08-09-2021

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


RE: HTML Exporter | Export your games library to (static) html files - AlexMagnus - 08-10-2021

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 ?


RE: HTML Exporter | Export your games library to (static) html files - joyrider3774 - 08-13-2021

(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.xyz/grid/67f82381-124f-4093-b2df-989fd358302d.html


RE: HTML Exporter | Export your games library to (static) html files - joyrider3774 - 08-22-2021

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


RE: HTML Exporter | Export your games library to (static) html files - mbeemer - 08-26-2021

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.


RE: HTML Exporter | Export your games library to (static) html files - joyrider3774 - 08-26-2021

(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


RE: HTML Exporter | Export your games library to (static) html files - joyrider3774 - 09-04-2021

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



RE: HTML Exporter | Export your games library to (static) html files - vannessqn - 09-04-2021

(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.


RE: HTML Exporter | Export your games library to (static) html files - joyrider3774 - 09-05-2021

(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


RE: HTML Exporter | Export your games library to (static) html files - joyrider3774 - 09-06-2021

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


RE: HTML Exporter | Export your games library to (static) html files - joyrider3774 - 09-19-2021

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



RE: HTML Exporter | Export your games library to (static) html files - Xuiwert - 12-13-2021

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.