Closed strider72 closed 9 years ago
So long as you're actively updating your app this might not be an issue, but in my experience (no offense) individual developers often move on to other things, and this type of app isn't always updated aggressively year after year.
Touché. Case in point, I've not checked into the issues in a very long time. Sorry about that.
The use of the command line version is going to be tricky because Balthisar Tidy uses TidyLib directly, and doesn't use the command line executable at all; in fact the tidy command line executable is just a simple wrapper around TidyLib, too.
Balthisar Tidy's features are dependent on features of TidyLib that aren't present in the command line version, notably TidyLib's output buffers, error filters, and callbacks.
I'm not sure which version MacPorts is pulling from right now. The current, as-close-as-we-can-get-to-bona-fide version of Tidy right now is HTACG Tidy at https://github.com/htacg/tidy-html5, and is the official succussor to WC3's fork, and I think we have support of the original dev's at SourceForge now. I mention this for two reasons:
Since we formed HTACG and started serious Tidy development again, there are a lot of reported issues that are being cleaned up little by little. As such I don't want to compile in 4.9.xx versions that have a critical bug. The current Balthisar Tidy has the latest stable from just before HTACG stepped in, incorporating also some of the pull requests that hadn't been addressed.
After 5.0.0 is released, something that I may have some influence over is adding to the command line API, which would then allow Balthisar Tidy to use any arbitrary Tidy executable. There would still be compromises to Balthisar Tidy in this approach, but it would give great flexibility to Tidy users.
By the way, if you have any experience with XCode, you should be able to clone Balthisar Tidy repository, and substitute in the HTACG latest code. You'd really only have to disable certificate signing, or use your own certificates. This is a good way to get the for Work version for free, too.
Speaking of that, Balthisar Tidy for Work does have the feature where you can output the current configuration settings into a normal tidy configuration file, and then you can use that configuration file with any command line tidy.
I think I'll change the export feature to the free version, and then add it to the AppleScript dictionary in the Work version, and then it would be simple to automate the process for any arbitrary version of command line Tidy. But again, once tidy hits 5.0.0 release (we keep saying, any time now).
Sorry for the terribly long-winded response; I've been involved in real life job demands for the last three months, and there's a lot of pent up energy in me!
Hi —
Wow! I must admit I wasn’t expecting such a thorough reply. But I know the impulse when it’s a project you’re close to. :-)
Just FYI, I’m a big fan of MacPorts and use it for various CLI programs. I’m a geek but not such a geek that I like messing with compiling command line stuff, so MacPorts is great for all that whenever possible.
After finding Balthasar Tidy, I looked at your site and saw the stuff about HTACG. I left notes on both their support forum AND at MacPorts, telling MacPorts they should update their (then) six-year-old version of Tidy, and after their reply telling HTACG that they should start tagging their releases so it’s easier for MacPorts et al to find the releases. Long story short: MacPorts updated Tidy, and is now pulling from HTACG, and they’re communicating with each other for future releases.
Regards, Stephen
On Jun 5, 2015, at 4:12 AM, Jim Derry notifications@github.com wrote:
So long as you're actively updating your app this might not be an issue, but in my experience (no offense) individual developers often move on to other things, and this type of app isn't always updated aggressively year after year.
Touché. Case in point, I've not checked into the issues in a very long time. Sorry about that.
The use of the command line version is going to be tricky because Balthisar Tidy uses TidyLib directly, and doesn't use the command line executable at all; in fact the tidy command line executable is just a simple wrapper around TidyLib, too.
Balthisar Tidy's features are dependent on features of TidyLib that aren't present in the command line version, notably TidyLib's output buffers, error filters, and callbacks.
I'm not sure which version MacPorts is pulling from right now. The current, as-close-as-we-can-get-to-bona-fide version of Tidy right now is HTACG Tidy at https://github.com/htacg/tidy-html5 https://github.com/htacg/tidy-html5, and is the official succussor to WC3's fork, and I think we have support of the original dev's at SourceForge now. I mention this for two reasons:
Although we're trying to work with MacPorts package manager, things are still in flux until tidy hits 5.0 stable release, and
As soon as 5.0 is released, I will update the current 2.0.0 versions of Balthisar Tidy to it.
Since we formed HTACG and started serious Tidy development again, there are a lot of reported issues that are being cleaned up little by little. As such I don't want to compile in 4.9.xx versions that have a critical bug. The current Balthisar Tidy has the latest stable from just before HTACG stepped in, incorporating also some of the pull requests that hadn't been addressed.
After 5.0.0 is released, something that I may have some influence over is adding to the command line API, which would then allow Balthisar Tidy to use any arbitrary Tidy executable. There would still be compromises to Balthisar Tidy in this approach, but it would give great flexibility to Tidy users.
By the way, if you have any experience with XCode, you should be able to clone Balthisar Tidy repository, and substitute in the HTACG latest code. You'd really only have to disable certificate signing, or use your own certificates. This is a good way to get the for Work version for free, too.
Speaking of that, Balthisar Tidy for Work does have the feature where you can output the current configuration settings into a normal tidy configuration file, and then you can use that configuration file with any command line tidy.
I think I'll change the export feature to the free version, and then add it to the AppleScript dictionary in the Work version, and then it would be simple to automate the process for any arbitrary version of command line Tidy. But again, once tidy hits 5.0.0 release (we keep saying, any time now).
Sorry for the terribly long-winded response; I've been involved in real life job demands for the last three months, and there's a lot of pent up energy in me!
— Reply to this email directly or view it on GitHub https://github.com/balthisar/tidy/issues/1#issuecomment-109212828.
@strider72, I'm going to close this issue now because Balthisar Tidy 2.2.0 is now available. You can search for the full changelog if you'd like to, but I think the coolest new thing was inspired by your ticket: Balthisar Tidy can use /usr/local/lib/libtidy-balthisar.dylib
instead of its own built-in library.
It's not as easy as specifying a command line executable as per your original suggestion, but it's close, and it works with sandboxed apps with Apple's blessing. Full instructions in Help -> Advanced Features -> Use a different version of TidyLib, but in short if you put a symlink in /usr/local/lib/
called libtidy-balthisar.dylib
that points to a compatible libtidy.dylib
, Balthisar Tidy will use that instead.
HTACG's Tidy installs the lib to /usr/local/lib/
already, and Tidy's Mac binary installer installs there, too, so creating the symlink is easy.Some of the package managers use their own hierarchy (such as /opt). As long as the symlink points to a valid dylib, there should be no problem.
Barring any API changes from Tidy, it should "just work." API changes aren't automatic, though. For example current Tidy master branch introduces indent-with-spaces
. Although the dylib will work, this option won't be available in Balthisar Tidy without updating. I have a strategy to make this work automatically that should hit code in a few days, and hit binaries and App Store in a month or so -- sooner if we push HTML Tidy as a "release version" with the new options.
As long as I'm being verbose then for the sake of heading off other users' questions I'm just going to write a blog article then update this comment later (i.e., why the special dylib name).
Thanks for the original issue report; it inspired what I think is a really awesome feature.
It might be a good idea (in the long-term sense) to add an option to specify a command line version of Tidy for the app to use. For example, I've used MacPorts to install the most up-to-date version, and would like it if I could set Balthisar Tidy to use that version on the back end.
So long as you're actively updating your app this might not be an issue, but in my experience (no offense) individual developers often move on to other things, and this type of app isn't always updated aggressively year after year. Adding this option will give the App a lot of flexibility and make it less dependent on updates.