donmor / Tiddloid

Tiddloid is an app to work with locally stored TiddlyWikis.
GNU General Public License v2.0
234 stars 10 forks source link

Request for support for .hta file extension #30

Closed whjou closed 1 year ago

whjou commented 2 years ago

I use this "hack" https://tiddlywiki.com/static/Windows%2520HTA%2520Hack.html to use TiddlyWiki on Windows. Can you modify Tiddloid to support opening/saving files with .hta extension so that I can sync to my phone and open it in Tiddloid?

donmor commented 2 years ago

I see. The .hta file is basically HTML file so it is possible to load it. I'll try it out if possible.

donmor commented 2 years ago

Achieved. Will be in the next update.

whjou commented 2 years ago

Thanks!

whjou commented 2 years ago

@donmor the .hta support didn't exactly work as expected. While HTML files with .hta extension is handled, I think the UTF-16 part isn't. Tiddloid would try to load the .hta which is UTF-16 encoded HTML but fail. Can you add support to read UTF-16 encoding as well, if possible? I have a sample of empty.html in UTF-16 if you need one to test but do not know how to pass to you.

whjou commented 2 years ago

To generate utf-16 encoded version, open a TiddlyWiki.html file in vim,

:set fileencoding=utf-16le :wq

Or use attached. TiddlyWiki-v5.2.2-Empty.hta.zip

donmor commented 2 years ago

Support for utf16 files has been implemented and will be in the next version.

donmor commented 1 year ago

Okay I uploaded 2.3.0 to GitHub/Gitee/CoolApk (F-droid version needs some time to be built). Try it and let me know if it ceased your problem.

donmor commented 1 year ago

Is there still problem with 2.3.0 or later? I may close this if no problem reported.

donmor commented 1 year ago

No more reports for nearly a year. Closing this. Reopen it if you're still concerned.

whjou commented 1 year ago

Apologies for the long silence. Just for closure, the HTA changes seem to work with test files but crashed when I loaded my actual work .hta file.

Screenshot_20230514_080957_Device care

Since the phone was complaining about WebView, I'm assuming it's not a Tiddloid issue and am letting it be.

Thanks for your effort in trying to accommodate a random Internet user!

I recently discovered and tested https://github.com/slaymaker1907/TW5-browser-nativesaver that can save TW without additional add-ons and that obviates the need to use HTA hack in a locked down environment. Stating this here in case it helps others currently stuck on HTA. Also to clarify why I'd let the issue be.