Re: Two questions about HelpViewer

Riccardo Mottola <[email protected]>
Newsgroups gmane.comp.lib.gnustep.general
Message-ID <[email protected]>
Hi,

Patrick Cardona wrote:
> Hi Riccardo,
>
> On 2025-10-22 19:56:34 +0200 Riccardo Mottola 
> <[email protected]> wrote:
>
>
> The tip of Yavor is quite efficient: just adding this line before 
> every section like:
>  '<meta charset="utf-8" />'
>
> This allowed me to use UTF-8 and to maintain readable text. It would 
> not be the case with HTML entities, not very readable for a long User 
> Guide.

But that is how you are supposed to write it if no explicit charset is 
used, encoding entities.
I don't have issues opening the help file in french it all comes out 
fine, so by magic it is working for me without charset fixes.

the libxml2 parser should go away if possible, to make the code 
portable. I wonder if the internal parser can be made respect charset 
and how. Will look at t.

But as said, French stuff comes out fine for me.

We could default to UTF-8 for convenience perhaps.



>
> Maybe we could implement something like open a FileViewer. And there a 
> place to put all the related .help files? Maybe in 
> '~/GNUstep/Library/Applications Support/Help' or shorter at 
> '~/GNUstep/Library/Help' folder?
>
> In the meanwhile, I installed help files in the '~/Books' folder, but 
> not so a good idea as the user could remove them and also those are 
> not accessible immediately from HelpViewer: we need to use 'Open' 
> Panel and to know where the '.help' files are.

Well help files are not books, perhaps similar. HelpViewer retains the 
interface. But I guess you are not going to put all help files in one 
place, but every application has its own help file in resources (Even 
localized, if that can be made work correctly).
So perhaps just a fancy way of checking "recent files" could be fine.
Or a "bookmark" list.


>
> Well, the release used within gs-desktop by Ondrej Florian (See: 
> https://github.com/onflapp/gs-desktop then in: 
> Applications/HelpViewer), which is older, has the 'Search' feature 
> still working while the most recent SVN seems to get lost.
>

He has made a lot of changes in the meanwhile... so maybe he implemented it.
The code I started with has no search, index, bookhself or print 
implemented. They will come. I like the idea.

However, I am biting the teeth at the parser and rendering engine, it is 
broken in many places even when displaying the supplied Help example. I 
fixed things like being able to display tags! previously they were 
double-parsed! Or properlly resize. Or handle escaped characters 
properly (since you should entities... they should actually work cleanly)

Other examples are broken.
Some issues come from GUI, but they are very subtle. I am trying to 
compare on mac, but there I need to reimplement things and it behaves 
even differently.

Riccardo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.