tconfrey / BrainTool

A better way to manage Tabs, Links and Notes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tabs Outliner import discards notes

trespda opened this issue · comments

I try this as a Tabs Outliner replacement mostly. So far it has better integration and documentation.

Having I imported a fairly big and disorganized TO tree, it seems like manual notes added there did not pass to the BT notes column. That makes a shift difficult.

commented

I noticed the same thing when testing the BrainTool (BT) converter utility on a Tabs Outliner (TO) export a while back 😞

@trespda, can you document what version of Chrome + TO + BrainTool + the converter you used, ie: online?

As for me, I am on Chrome 121 + BT 0.9.9 + TO 1.4.141 and today in TO I noticed (once again) that I am unable restore (double-click) ANY bookmark from a "Saved Window" node (<li id="savedwin" class="nodeTitleAndSubnodesContainer savedwinNTASC NTASC-windowFrame currentNode">in the TO HTML code) that consists of 262 nodes 😱 (the issue seems inconsistent and I do not know the cause). I fear I will soon lose the ability to access any of this data!

@tconfrey, Any way you can bump up the priority on this to get the converter to support the importing of TO Notes? 🙏 📿 TO notes node export from TO is vital as TO is more than just a collection of bookmarks!
FWIW, it seems TO Notes nodes have a DOM structure that consist of a child <span class="tab_comment"> tag nested under the <span class="node_text savedtab_text" draggable="true"> tag that saves the page title (which itself is nested under an <a class="nodeTitleContainer savedtabNTC NTC-tabFrame nosubnodes currentNode" ... > anchor tag).

Here is a complete <li> savedtabundefined node example excerpt below (ℹ️ N.B, base64 data redacted for privacy + formatted/indented for better readability)

<li id="savedtabundefined" class="nodeTitleAndSubnodesContainer savedtabNTASC NTASC-tabFrame currentNode">
    <a class="nodeTitleContainer savedtabNTC NTC-tabFrame nosubnodes currentNode" href="chrome-extension://noogafoofpebimajpfpamcfhoaifemoa/suspended.html#ttl=Foo&amp;pos=0&amp;uri=https://foo.bar/baz" tabindex="1">
        <img class="node_favicon savedtab_favicon" data-icon-src-deffered-load="data:image/png;base64,redacted" src="data:image/png;base64,redacted" />
        <span class="node_text savedtab_text" draggable="true">
            <span class="tab_comment">#Foo comment</span>
            Foo page name
        </span>
    </a>
</li>

In the example above #Foo comment is a comment I added and want to import (N.B, the hashtag # was added by me- the user, and just a way for me to more easily restrict Chrome "Find..." searches to just the TO notes/comments).

Perhaps these can be mapped to BT tags/notes? (not sure what the exact terminology or syntax/structure BT uses when it generates its equivalent Org-mode file... although I did find this screenshot in the docs):
image

Hope this helps to implement the parsing of above such nodes in https://github.com/tconfrey/BrainTool/blob/master/utilities/converters.js (perhaps some sort of XPath expression could be used to extract out the nested <span> node's value?)

Please let me know if you need any additional information!

Hi @bkmdev and @trespda
I tweaked the TabsOutliner import and it shoudl now handle copying over notes added to tab nodes. Note that I import from the exported tree file which is in JSON format I don't look at the TO dom structure.

Make sure you reload BT to get the changes and LMK if you continue to see errors.