[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Questions about simplyhtml[-freeplane] package

Eric Lavarde <deb@zorglub.s.bawue.de> writes:

> Hi,
> On 25/11/12 09:47, Felix Natter wrote:
>> Unfortunately, simplyhtml 0.16.05 requires Java5, while freemind
>> only requires Java4. This is because I implemented an approximate string
>> matching algorithm for freeplane (using enums, thus requiring Java5)
>> and included the source code for it in simplyhtml (to be able to use
>> approximate string matching in simplyhtml too).
>> In another commit "Paste as plain-text" I also used enums because we
>> already required Java5.
>> =>  so I think we need a separate package simplyhtml-freeplane unless
>>     freemind switches to Java5 (which will most probably not happen for
>>     1.0) :-/

hello Eric!

> I still don't think so because FreeMind, Freeplane and SimplyHTML, under
> Debian, are all being compiled with OpenJdk6, and I already had to overcome
> the issue with Java4 vs. Java5 jar formats.

The download page says it requires Java4 only, but I don't think there
are debian jdks for <Java6, so I guess it's ok :-)

> The only reason IMHO why you
> would need a separate package would be if the new version of SimplyHTML
> wouldn't be backward compatible with FreeMind.

Since the search code ("PseudoDamerauLevenshtein.java") is included in the 
simplyhtml source code, it is basically compatible.

> Actually, while I was at it, I quickly updated the simplyhtml package in
> SVN and it worked like a charm with FreeMind. I've committed the changes,
> but be aware that the -doc package is still somehow wrong (the api
> directory isn't generated and/or packaged for some reason).

The problem is in the search dialog ("FindReplaceDialog"): There is a
new "Approximate" check box which needs two things to work:

(1) some translations:
        jcbMatchApprox.setText(Util.getResourceString(SHTMLPanel.getResources(), "matchApproximately"));
  (one _could_ also add other translation strings, mostly tooltips, see jbInit() here:
(2) double threshold = Double.parseDouble(Util.getPreference("approximate_search_threshold", null));
  => we could replace null by "0.65" then the approximate search
     threshold would be hardcoded to 0.65

=> there are three options:

(a) Update simplyhtml ("0.16.06") to disable the "Approximate" checkbox
    (don't display it) when running freemind
    (freemind could be detected by
    "Util.getPreference("approximate_search_threshold", null) == null")

(b) fix the two problems above in freemind (I can help with this)

(c) create another simplyhtml debian package for freeplane

In the long run we need solution (b). It's really just adding a few
properties, but it may be too late to change translation strings for
freemind 1.0.0 :-/ (a) is the quick solution. I'd like to avoid (c).

=> so can you talk to Christian about this or shall I do this?

> Back on your issue with get-orig-source, it works like a charm here:
> ~/ALIOTH/simplyhtml$ make -f debian/rules get-orig-source
> if [ -f /home/ericl/ALIOTH/simplyhtml/debian/changelog ]; then \
>         if [ -d /home/ericl/ALIOTH/simplyhtml/../tarballs ]; then \
>         uscan --destdir /home/ericl/ALIOTH/simplyhtml/../tarballs --repack
> --rename ;\
>         else \
>         uscan --repack --rename ;\
>         fi; \
>         echo "Use a command like the following to create a binary free
> (DFSG) source file:";\
>         echo "gunzip -c simplyhtml_0.13.1.orig.tar.gz | tar --delete
> --wildcards -vf - ./lib/\* ./api | gzip -c >
> simplyhtml_0.13.1+dfsg.orig.tar.gz";\
>         else \
>         echo "The get-orig-source uses 'uscan' and works only if
> debian/changelog' is in the current directory.";\
>         fi
> simplyhtml: Newer version (0.16.05) available on remote site:
> http://qa.debian.org/watch/sf.php/simplyhtml/SimplyHTML_src_0_16_05.tar.gz
>   (local version is 0.13.1)
> simplyhtml: Successfully downloaded updated package
> SimplyHTML_src_0_16_05.tar.gz
>     and renamed it as simplyhtml_0.16.05.orig.tar.gz
> Use a command like the following to create a binary free (DFSG) source file:
> gunzip -c simplyhtml_0.13.1.orig.tar.gz | tar --delete --wildcards -vf - 
> ./lib/\* ./api | gzip -c > simplyhtml_0.13.1+dfsg.orig.tar.gz
> ericl@emil:~/ALIOTH/simplyhtml$ ll
> total 4
> drwxr-xr-x 4 ericl ericl 4096 Dec  1 13:23 debian
> ~/ALIOTH/simplyhtml$ ll ../tarballs/
> [...]
> -rw-r--r-- 1 ericl ericl   487113 Dec  1 13:27
> simplyhtml_0.16.05.orig.tar.gz
> What does uscan --verbose tell you?

Ah thanks, didn't know about this!

Thanks for finding the problem (saw your other mail)!

Best Regards,


> ~/ALIOTH/simplyhtml$ uscan --verbose
> -- Scanning for watchfiles in .
> -- Found watchfile in ./debian
> -- In debian/watch, processing watchfile line:
>    opts=uversionmangle=s/_/./g,dversionmangle=s/\+dfsg\d*//
> http://sf.net/simplyhtml/SimplyHTML_src_(\d+[._]\d+[._]\d+)\.tar.gz
> -- Found the following matching hrefs:
>      SimplyHTML_src_0_13_1.tar.gz
>      SimplyHTML_src_0_12_5.tar.gz
>      SimplyHTML_src_0_16_05.tar.gz
> Newest version on remote site is 0.16.05, local version is 0.13.1
>  => Newer version available from
> http://qa.debian.org/watch/sf.php/simplyhtml/SimplyHTML_src_0_16_05.tar.gz
> -- Downloading updated package SimplyHTML_src_0_16_05.tar.gz
> -- Successfully downloaded updated package SimplyHTML_src_0_16_05.tar.gz
>     and symlinked simplyhtml_0.16.05.orig.tar.gz to it
> -- Scan finished
> ~/ALIOTH/simplyhtml$ ll ..
> [...]
> lrwxrwxrwx 1 ericl ericl       29 Dec  1 13:40
> simplyhtml_0.16.05.orig.tar.gz -> SimplyHTML_src_0_16_05.tar.gz
> -rw-r--r-- 1 ericl ericl   487113 Dec  1 13:40 SimplyHTML_src_0_16_05.tar.gz
> Hope this helps, Eric
Felix Natter

Reply to: