[Ann] CintaNotes 3.6 Beta 1

User avatar
CintaNotes Developer
Site Admin
Posts: 4717
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

[Ann] CintaNotes 3.6 Beta 1

Postby CintaNotes Developer » Thu Feb 16, 2017 12:14 pm

Hi all,

In this release we've prepared a long awaited feature!
Finally CintaNotes will retain links and simple formatting when you clip text from web pages!
Please try it out - parsing HTML is not trivial, so bugs are very probable. Thanks!

Feb 16, 2017 - Version 3.6 Beta1

In this version:

Features:
  • Parse HTML for links and basic formatting upon clipping

Enhancements:
  • Note links: open another notebook's note if it exists in opened notebook

Fixes:
  • Export: XML not created when previous directory is removed
  • Note links: keyboard shortcuts didn't work in Russian
  • HTML export: regression - no spacing between paragraphs
  • Editor: tab indents not lining up correctly
  • Drag and drop: block keyboard while drag
  • Editor: unwanted keyboard layout change upon paste
  • Notes list: weird selection behavior when selection.followedited = 0
  • About dialog: missing licensee info

Download:
Installable: CintaNotes_3_6_Beta1_Setup.exe
Portable: CintaNotes_3_6_Beta1.zip
Alex
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby date » Thu Feb 16, 2017 2:42 pm

It works! Amazing :D

When there is a link in an image, for example:
<a href="./index.php" title="Board index"><img src="./styles/elegance_lightblue/theme/images/logo.png"></a>, the image address is linked, but I think it is more appropriate to make it link to 'cintanotes.com/forum/index.php.'

And there is a problem with the scrolling. When you open a note, and it is maximized, and it contains a link, when you scroll down with the mouse wheel, and click, it jumps to the top, and make it click there where the mouse is but from the top. When the note is not opened maximized, or does not contain a link, it is fine somehow.

Also the tooltip pop-up when hovering a link does not work when the note's text field does not currently have the cursor; for example when the cursor is in the title field.
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby date » Thu Feb 16, 2017 6:39 pm

date wrote:Also the tooltip pop-up when hovering a link does not work when the note's text field does not currently have the cursor; for example when the cursor is in the title field.
This has always been, I just never noticed it.
gunars
Posts: 194
Joined: Fri Nov 08, 2013 5:35 am
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby gunars » Thu Feb 16, 2017 7:33 pm

  • Parse HTML for links and basic formatting upon clipping

Alex, fantastic addition!!! :D This greatly increases the usability of CN for me. As I've mentioned in the past, this covers most situations where I would clip text with links.

In a quick test of a dozen web clips, it worked well in all cases except once. I first tried clipping the announcement above and must have hit some boundary condition in the selection. The resulting note had only a title with no body or link. I haven't been able to replicate it though.

The parsing for links appears to work only when clipping, not when pasting from the clipboard. Is it possible to have this done also when pasting? In that way, I could select and paste several selections into the same note.
User avatar
usbpoweredfridge
Posts: 407
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby usbpoweredfridge » Sat Feb 18, 2017 2:33 am

CintaNotes Developer wrote:In this release we've prepared a long awaited feature!
Finally CintaNotes will retain links and simple formatting when you clip text from web pages!

Nice. This is the single biggest thing I have longed for in CN!

CintaNotes Developer wrote:Please try it out - parsing HTML is not trivial, so bugs are very probable. Thanks!

There are some. For example, I tried to clip this release announcement. It got all the text - I didn't see the problem gunars saw, but maybe that is browser specific - but CN has a problem with spacing. This is what CN captured:
http://i.imgur.com/4LKd3fe.png

As you can see, it missed spaces between a few things, in lines #1 and #3. It also added blank lines, eg between each section heading.

Much more testing to be done.

(Captured from the latest stable version 1.7 of Vivaldi, though I wonder if the blank lines may be coming from the forum software, which I have noticed does some strange things with spacing in all browsers)

Chris
User avatar
usbpoweredfridge
Posts: 407
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby usbpoweredfridge » Sat Feb 18, 2017 7:48 am

Something else I noticed, though I am not sure it is related to this beta, or has been a problem for a while. If you have a note with URL's in it (in the text field, not the links field), when you mouse over the URL, nothing happens. However, if you double click a URL (which will open your browser), and then mouse over the URL, CN will show a tooltip with the URL address. It seems that CN not showing the tooltip is a bug.

(Would also like to see inline image capture with the new HTML capture feature as well for articles that have text and images, but considering CN doesn't allow inline images in its notes at this point in time, adding image capture would probably not be of any benefit at this time)

Chris
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby date » Sat Feb 18, 2017 10:37 am

It seems that the line breaks, tabs and spaces that are in the html but not part of the page are captured as well. Try saving this as html, open in an editor that shows unprinted characters, and capture in CN from a browser, I used firefox. (The tabs are removed by the forum software.)

Code: Select all

<ul><li>Saturday</li><li>Sunday</li><li>Monday</ul>




<ul><a href="asdf"><li>Saturday</li><li>Sunday</li><li>Monday</a></ul>

<hr>
<div>adsf</div>
<ul>
  <li>Saturday</li>
   <li>Sunday</li>
 <li>Monday</ul>asdf


My capture of this announcement, including the left side, looks quite a bit different than usbpoweredfridge's: http://imgur.com/a/lU0UF
User avatar
usbpoweredfridge
Posts: 407
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby usbpoweredfridge » Sun Feb 19, 2017 9:14 am

date wrote:It seems that the line breaks, tabs and spaces that are in the html but not part of the page are captured as well.

It brings up an interesting point I suppose - should CN capture 'what the user can see' or 'the actual underlying html code'? Tough one, points for an against each way.

usbpoweredfridge wrote:Something else I noticed, though I am not sure it is related to this beta, or has been a problem for a while. If you have a note with URL's in it (in the text field, not the links field), when you mouse over the URL, nothing happens. However, if you double click a URL (which will open your browser), and then mouse over the URL, CN will show a tooltip with the URL address. It seems that CN not showing the tooltip is a bug.

Oops, I see this is what date mentioned above previously in post #2:

date wrote:Also the tooltip pop-up when hovering a link does not work when the note's text field does not currently have the cursor; for example when the cursor is in the title field.
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby date » Sun Feb 19, 2017 10:18 am

usbpoweredfridge wrote:It brings up an interesting point I suppose - should CN capture 'what the user can see' or 'the actual underlying html code'? Tough one, points for an against each way.

What we can see, preferably, but that might be a bit more complicated. The tabs, spaces and newlines are not used by the browser.

I found out, that when copying to the clipboard, Firefox and the Vivaldi do this differently. Vivaldi seems to paste all the html in one line.

What really needs to be different is capturing the image links - try to capture from http://cintanotes.com/files/old/ for instance, it won't capture the links to the files. (And on that page, those aren't even image links.)
User avatar
CintaNotes Developer
Site Admin
Posts: 4717
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby CintaNotes Developer » Fri Feb 24, 2017 5:46 am

Hi guys,

Sorry for the delay and HUGE thanks for taking the time to try out the beta!

Now to the discovered issues:

date wrote:When there is a link in an image [...] the image address is linked, but I think it is more appropriate to make it link to 'cintanotes.com/forum/index.php.'


I confirm, will be fixed, thanks!

date wrote:And there is a problem with the scrolling. When you open a note, and it is maximized, and it contains a link, when you scroll down with the mouse wheel, and click, it jumps to the top, and make it click there where the mouse is but from the top.

I think this might be the same issue as here ?

date wrote: the tooltip pop-up when hovering a link does not work when the note's text field does not currently have the cursor; for example when the cursor is in the title field.

I confirm that the tooltip only appears when the note's text field has focus. Added to our todo list with a bit lower priority, this might get fixed only after 3.6 is released.

gunars wrote: I first tried clipping the announcement above and must have hit some boundary condition in the selection. The resulting note had only a title with no body or link. I haven't been able to replicate it though.

Couldn't replicate it either. Maybe you could replicate it if you remembered how exactly was the selection placed?

gunars wrote:The parsing for links appears to work only when clipping, not when pasting from the clipboard. Is it possible to have this done also when pasting? In that way, I could select and paste several selections into the same note.

Will definitely try to add this ability, maybe it will even be already in 3.6 final.

usbpoweredfridge wrote:CN has a problem with spacing

Yes, and this is one of the toughest issues. I will do more testing and tweaking, but doing it perfectly well would require CN to have it's own HTML rendering engine with CSS support and all bells and whistles, and this is not possible. But we'll try to do the best we can.

usbpoweredfridge wrote:If you have a note with URL's in it (in the text field, not the links field), when you mouse over the URL, nothing happens. However, if you double click a URL (which will open your browser), and then mouse over the URL, CN will show a tooltip with the URL address.

Yes, date has already mentioned this and I discussed it above.

Would also like to see inline image capture with the new HTML capture feature as well for articles that have text and images, but considering CN doesn't allow inline images in its notes at this point in time, adding image capture would probably not be of any benefit at this time)

Yes, that's a whole different story. The best we could do at the moment is to download images in the background and attach them to notes, placing links to attached images into the text. But even that is beyond the scope of the current release. Retaining all those links in HTML is already a huge step that so many people have been asking about.

date wrote:It seems that the line breaks, tabs and spaces that are in the html but not part of the page are captured as well.

Close, but not quite so. CN inserts breaks itself depending on which tags it encounters.

My capture of this announcement, including the left side, looks quite a bit different than usbpoweredfridge's: http://imgur.com/a/lU0UF

What are those two pics there? The second one looks much better than the first one. How did you get the first one?

should CN capture 'what the user can see' or 'the actual underlying html code'? Tough one, points for an against each way.

Once again, capturing HTML perfectly is not possible, the best we can do is use some kind of a guessing algorithm that would put line breaks based to the type of HTML tags it sees. Usually the HTML that is put into the clipboard by the browsers is simpler than the original HTML, but this is also not always the case.

So let's summarize:

  • Links around images - Confirmed, will be fixed in 3.6 final
  • Note link tooltip only appearing when note text field has focus - Confirmed, will be fixed after 3.6 final
  • Relative links - Confirmed, will be fixed in 3.6 final
  • Pasting HTML (i.e. parse not only on clipping)- will be implemented in 3.6 final
  • Problem with scrolling - Confirmed, but not related to HTML parsing in any way. Will be fixed after 3.6
  • Whitespace handling - will be a bit improved in 3.6 final, but can't be perfect
Alex
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby date » Fri Feb 24, 2017 10:19 am

CintaNotes Developer wrote:
date wrote:And there is a problem with the scrolling. When you open a note, and it is maximized, and it contains a link, when you scroll down with the mouse wheel, and click, it jumps to the top, and make it click there where the mouse is but from the top.

I think this might be the same issue as here ?
Exactly. But only when opened maximized and when it contains a link.

gunars wrote: I first tried clipping the announcement above and must have hit some boundary condition in the selection. The resulting note had only a title with no body or link. I haven't been able to replicate it though.

Couldn't replicate it either. Maybe you could replicate it if you remembered how exactly was the selection placed?
I think I encountered this before. Clipping set to silent, and had for example 50 pages in the browser I wanted to clip. If I did it too fast, very seldomly after pressing the clipping hotkey a note window would open, despite clipping set to silent, it contained the page name in the title, but not the selection to be clipped. It occurred very rarily though, and I haven't seen this for a long time.

My capture of this announcement, including the left side, looks quite a bit different than usbpoweredfridge's: http://imgur.com/a/lU0UF

What are those two pics there? The second one looks much better than the first one. How did you get the first one?
It is the same note, didn't fit on one screen. It is the announcement clipped including the left side that says Site Admin, Posts, Joined etc., clipped with Firefox. When I clip with Vivaldi like usbpoweredfridge, I have the same result as his image.

Once again, capturing HTML perfectly is not possible, the best we can do is use some kind of a guessing algorithm that would put line breaks based to the type of HTML tags it sees. Usually the HTML that is put into the clipboard by the browsers is simpler than the original HTML, but this is also not always the case.

It might be better to remove all line breaks from the clipboard, so the contents of the clipboard are the same regardless of the browser, and work from there.
Example html:
2017-02-24_10-56-03.png
2017-02-24_10-56-03.png (5.36 KiB) Viewed 3962 times


In the html but not part of the page in squares:
2017-02-24_10-56-03 - Kopie.png
2017-02-24_10-56-03 - Kopie.png (15.11 KiB) Viewed 3962 times


The page clipped from firefox:
clippedfromfirefox.png
clippedfromfirefox.png (2.66 KiB) Viewed 3962 times
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby date » Fri Feb 24, 2017 10:20 am

Clipped from Vivaldi:
clippedfromvivaldi.png
clippedfromvivaldi.png (2.17 KiB) Viewed 3962 times
User avatar
CintaNotes Developer
Site Admin
Posts: 4717
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby CintaNotes Developer » Wed Mar 01, 2017 9:10 am

date wrote:Exactly. But only when opened maximized and when it contains a link.

Ok, thanks for this extra info.

If I did it too fast, very seldomly after pressing the clipping hotkey a note window would open, despite clipping set to silent, it contained the page name in the title, but not the selection to be clipped. It occurred very rarily though, and I haven't seen this for a long time.

Usually this happens when after a certain timeout since CN had emulated Ctrl+C press (the timeout is controlled by the clipping.waittime.seconds parameter btw) the clipboard still hasn't received anything. This can happen when there's a whole lot to be copied to clipboard. Increasing the timeout might help here.

Another reason could be when the source application is running under admin and CN is not. Then CN can't emulate the Ctrl+C press in the context of a higher privileged app.

It is the same note, didn't fit on one screen. It is the announcement clipped including the left side that says Site Admin, Posts, Joined etc., clipped with Firefox. When I clip with Vivaldi like usbpoweredfridge, I have the same result as his image.

Seems like you selected the whole page and that's why there's so much weird formatting - all those tables etc.

It might be better to remove all line breaks from the clipboard, so the contents of the clipboard are the same regardless of the browser, and work from there.


That's what happens now. An open-source HTML parser is used, so CN operates upon a DOM, not HTML source. However, it stil needs to determine the logical places to put line breaks in. This is where the current algorithm might fall short.

So thanks for a good test case. Could you please post the HTML source code here as well? Thanks!
Alex
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby date » Wed Mar 01, 2017 7:35 pm

CintaNotes Developer wrote:Seems like you selected the whole page and that's why there's so much weird formatting - all those tables etc.
I selected exactly the same portion of the page as usbpoweredfridge, the difference is caused by how different the browsers send the selection to the clipboard.

It might be better to remove all line breaks from the clipboard, so the contents of the clipboard are the same regardless of the browser, and work from there.
That's what happens now. An open-source HTML parser is used, so CN operates upon a DOM, not HTML source. However, it stil needs to determine the logical places to put line breaks in. This is where the current algorithm might fall short.
Ok, but there is a difference in how the notes look depending on the browser used, so the cause of different is located before the parser is used.

I already posted an example html, but here is an even simpler example. This is the page source:

Code: Select all

<h1>Example</h1>

<ul>
   <li>One</li>
   <li>Two</li>
   <li>Three</li>
</ul>
The list is not the issue here, the main point is that the HTML is formatted so it is more easy to read. After the first line, there are two newlines, then after <ul> is a new line, and in front of the <li>'s are either tabs or spaces. This is very common and makes the page source more readable, but there is no other purpose.

Now, if I open this HTML with Internet Explorer (6 or 8) and examine the clipboard, in between what is in <!--StartFragment--> and end:

Code: Select all

<H1>Example</H1>
<UL>
<LI>One
<LI>Two
<LI>Three </LI></UL>

Notice these are a few lines. After </H1> is a newline, and after every other line as well. IE places a space there instead of </li> except for the last one. A clipped note in CN contains two empty bullets, 'One,' an empty bullet and Two and Three, somehow no empty bullet there.

The clipboard with Firefox:

Code: Select all

<h1>Example</h1>

<ul>
   <li>One</li>
   <li>Two</li>
   <li>Three</li>
</ul>
It is exactly same as the page source, including all the newlines, spaces and tabs. The note clipped from Firefox is the worst looking one.

The clipboard with Vivaldi (probably the same as Chrome, the new Opera, etc.):

Code: Select all

<h1 style="color: rgb(0, 0, 0); font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Example</h1><ul style="color: rgb(0, 0, 0); font-family: &quot;Times New Roman&quot;; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><li>One</li><li>Two</li><li>Three</li></ul>
Notice everything is on one line. Most notes clipped from there look nearly perfect (the simple example is perfect), but judging from the announcement clipping example above it only doesn't know:
1) a few missing spaces, the texts without spaces are in different tags but there is no space 'inside' the tag (where the contents are), in the announcement examples above it was probably the <dd>'s but on other sites this is also true for table tags, and:
2) at the end of the bulleted list, there is always a <br> here, but that might be an exception for few sites.

Also there are a few Webkit browsers, the clipboard:

Code: Select all

<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><h1>Example</h1><ul><li>One</li><li>Two</li><li>Three</li></ul></span>


Also one one line, the clipped note is perfect. So my finding is:
--> if the HTML is one line on the clipboard, the clipped note turns out nearly perfect.
If the HTML is spread out over multiple lines on the clipboard, including perhaps tabs and spaces, like Internet Explorer and Firefox do, it looks considerably worse.

So, perhaps, change the clipboard before sending it to the HTML parser you are using.

If the example was like this:

Code: Select all

<h1>Example</h1><ul><li>One</li><li>Two</li><li>Three</li></ul>

on just one line, it would clip fine from Firefox. For Internet Explorer (if it hasn't changed with the newer versions), it makes newlines on the clipboard even if they weren't in the source, so the clipboard would need some editing anyway.

In the first example I posted somewhere above here I also demonstrated a problem with the tag order, like <tag1><tag2></tag1></tag2>, perhaps this is only with links, but that is a minor issue.

Again, it is nearly perfect, thank you for adding this to CN.
User avatar
CintaNotes Developer
Site Admin
Posts: 4717
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby CintaNotes Developer » Thu Mar 02, 2017 8:00 am

Thanks for this detailed analysis, date!

I'll definitely re-check the output with IE and Firefox. Automatically removing all newlines in HTML prior to using HTML parser is unfortnately not an option, since newlines are significant (and should be retained) within, say, a PRE tag.

The solution should be as follows: CN should analyse newlines already existing in HTML nodes of type "text", and remove newlines that are not significant (outside of PRE tags etc). Should be doable allright.
Alex
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby date » Thu Mar 02, 2017 9:44 am

CintaNotes Developer wrote:The solution should be as follows: CN should analyse newlines already existing in HTML nodes of type "text", and remove newlines that are not significant (outside of PRE tags etc). Should be doable allright.
Ok. I don't know anything about ready-made parsers, but I wonder, shouldn't this really be the job of the parser. It's not like those newlines and tabs are part of the inner text, all browsers ignore them fine. The newlines, spaces and tabs are not 'inside' an HTML node.
User avatar
CintaNotes Developer
Site Admin
Posts: 4717
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: [Ann] CintaNotes 3.6 Beta 1

Postby CintaNotes Developer » Tue Mar 07, 2017 1:12 pm

date wrote:Ok. I don't know anything about ready-made parsers, but I wonder, shouldn't this really be the job of the parser. It's not like those newlines and tabs are part of the inner text, all browsers ignore them fine. The newlines, spaces and tabs are not 'inside' an HTML node.

Probaby it should, but I'll need to check anyway.
Alex

Return to “CintaNotes Personal Notes Manager”