jcryptool / core

JCrypTool Core Plug-ins
https://www.cryptool.org
Eclipse Public License 1.0
161 stars 43 forks source link

Usefull names for online help bookmarks #36

Closed schaeferm closed 12 years ago

schaeferm commented 12 years ago

The online help bookmarks are shown in the Weekly Build of 13th October 2012 as URI. The bookmark for the "About JCrypTool" page is named for example "/org.jcryptool.core.help/$nl$/help/users/about/about.html".

It would be possibly better if the name would equal the page's heading which is specified in the XML file. Another idea would be to set the bookmark’s name to the logical path within the online help. In case of the "About JCrypTool" page this could be for example "User Guide - About JCrypTool".

antidote2 commented 12 years ago

org.eclipse.help.ui.internal.views.BrowserPart used to display help pulls the bookmark title from the html page title,

so with this regexp all h1 became also titles

(?is)(?!(?:.))(.</em>)</head>(.<em>)<h1>(.</em>)</h1></p> <head>$1\t <title>$3\R$2

$3

schaeferm commented 12 years ago

Thank you for your work, but unfortunately your solution doesn't work out of the box for any help site. I have found quite some pages which does not use a single h1 and the title seems to be used even less. I noticed further that the regexp does not match for the help of my plugin. The page starts with:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <h1>Graphical Passwords</h1>

Where as it matches for "Test" in the following fragment.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Test</title>
    </head>
    <body>
        <h1>Graphical Passwords</h1>

I could even find a fragment that does not match at all:

<DOCTYPE HTML PUBLIC "- / / W3C / / DTD HTML 4.0 Transitional / / EN">

<html>
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Simple Power Analysis(SPA) against RSA</title>
</Head>

<body>
<h1> Simple Power Analysis (SPA) gegen RSA </h1>

An other problem I noticed is, that the name does not update after a language change, even if the link points to the site in the changed language.

antidote2 commented 12 years ago

Thank you too for testing:) I reviewed the cases you pointed me to and they seem to work as expected. First I could not find any help page, which should have a title but without one. I didn't find any "Graphical Passwords" sequence, so I cannot test it for that special page. The first should match as it did for 235 other pages. The second is exluded by the regexp: only pages without title are found. And the last one shows you did a good job:)) it is the only one I changed manually and made a mistake. So this one is already fixed. The reason you may have problems with the regexp is when you not use Eclipse Juno, the previous versions of Eclipse had bugs in the regexp evaluation. If you find a page which is not covered by the regexp, please tell. As my collegue used to say: "works as delivered";)

schaeferm commented 12 years ago

I haven't added my plugin to the jcryptool repo yet, but you can obtain it from my playground repo if you want to test the page. The pages without h1 and titel are help pages for visual plugins. The ones I found are in the plugins org.jcryptool.visual.xeuclidean, org.jcryptool.visual.kleptography, org.jcryptool.visual.rsa, org.jcryptool.visual.he, org.jcryptool.visual.aco, and org.jcryptool.visual.crt.

Thanks for your update advice. I'm using Indigo at the moment.

dschadow commented 12 years ago

There are some help pages which do not use <h1> for their title (e.g. instead use <h2> which is wrong). Make sure to catch those as well and please update their heading to use <h1> .

antidote2 commented 12 years ago

replaced those h2 with h1 and added titles, which fixes about 50 spots, the h3 should become h2 and h4 -> h3, but it's less important

schaeferm commented 12 years ago

Thanks, but I think you need to do an other iteration because at least some help pages of the pugins org.jcryptool.visual.aco, org.jcryptool.visual.crt, org.jcryptool.visual.kleptography, and org.jcryptool.visual.xeuclidean start with a h3 as heading.

Your script was furthermore not working correctly with the page https://github.com/jcryptool/crypto/blob/aa8b5d4ca3ad45bb61e44e8bcdc48947dccf7c93/org.jcryptool.visual.rsa/nl/en/help/content/index.html.

antidote2 commented 12 years ago

thanks again for testing, I reviewed all 418 html headings we have and fixed about 5-6 problems, as well as about.html with licenses, which had this h3 heading... so I hope we will not need another cycle. I think it's not a good idea to 14fy the about.html, but this is another issue

schaeferm commented 12 years ago

Thanks. It seems that you got all.