-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace the playwright module for easy packaging as an executable #18
Comments
@Jermolene hi, I want to package it as an executable file for people to use it easily. Here is the address of my project. But I have a problem, as mentioned above. playwright module is really too big to wrap in. So is there a better way to replace it? https://github.com/tiddly-gittly/Epub2twpub If you look closely you will find that yes, I am using the source code from this twpub repository. Not a single pen has been touched. Just made a wrapper to use. |
Hi @Zacharia2 it's great to see your work with TWPub, I am glad you are enjoying it. TWPub uses Playwright to parse and render the HTML files extracted from EPUB files to ensure the highest compatibility between TWPub and browser-based EPUB readers. It might be possible to rewrite TWPub to instead use a JS-based HTML and CSS parser; at the time I started TWPub I couldn't find a library with the needed functionality but there might be something better available now. |
cc @xcazin who might be interested in this thread |
@Jermolene Perhaps use the tool here: https://github.com/syntax-tree |
Thanks @Zacharia2. The API of rehype is very different from the DOM that TWPub currently uses so I think it might be a lot of work to convert it. JSDom might be a simpler migration. |
hi @Jermolene I completed the replacement of playwright and I used JSDOM. It looks the same as it did without the replacement. This is my work, and I have added some comments to the code. Packaged program link: https://github.com/tiddly-gittly/Epub2twpub/releases |
On a whim, use JSDOM, so you can make a nodejs TiddlyWik plug-in. |
Can the playwright module be replaced to facilitate packaging into a single executable. Simplify the difficulty for people to use it.
The text was updated successfully, but these errors were encountered: