Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the TabsOutliner converter #9

Closed
siliconmeadow opened this issue Feb 20, 2021 · 2 comments
Closed

Using the TabsOutliner converter #9

siliconmeadow opened this issue Feb 20, 2021 · 2 comments

Comments

@siliconmeadow
Copy link

siliconmeadow commented Feb 20, 2021

Thank you so much for creating that converter for TO @tconfrey.

I worked with it for an hour or two earlier this week and got a clean import. It did take quite a few goes at cleaning up the data and I'm not really a JS guy but am happy to learn a bit more to make it work more smoothly. Here are some of the things that I did to get it to work:

  1. First off, TO doesn't put any new lines in its tree file, so if you've got something wrong with your data it's hard to track down. I used the jq util to pretty print the json file for me. Handy tool to have, if you've not tried it. And packages for most systems. Tip:
jq . tabsoutliner.tree > tabsoutliner.tree.json
  1. Chrome's console wasn't quite as clear about the data issues as Firefox, so I made that switch.
  2. Every time I had an error, I ended up needed to close the DevTools window and its parent window before running again, as const TabsOutlinerExport was already set and I couldn't figure out how to clear or trash it.
  3. Wouldn't you know it, the very first data it rejected were backticks. In the <title> tag of this page https://github.com/consolidation/cgr it's got backticks so I removed those manually, washed, rinsed, repeat.
  4. Then the most common errors were double quotes. I think I would remove them as they appeared, but having just done a brief search I think they need to be escaped with two backslashes, not just the single one that TO puts in. I suspect that would be easily enough dealt with regex.
  5. When I finally got the data, I couldn't simply swap it with the default BrainTool.org file. I don't know what is up with this laptop and my GDrive account but it would make a new BrainTool.org file, and keep the one I used but turn it into a GDoc or something. Very strange. Probably something to do with Gnome and the way it's connected to Gdrive. I've not tried it out on my Mac or booted this laptop into Windows yet to see if it's something to do with that. What did work, in the end, was installing InSync which I'm ambivalent about.

The TO tree I imported has 761 entries in it - it's the one on my personal account. My work account has about 1200+ but needs some pruning and does get pruned regularly as I group together windows based on Jira tickets I'm working on and I regularly clear out stuff at ends of sprints and/or projects.

Since I've got so much data in BrainDump here now, I'll have to spend a lot of time thinking about how I'm going to tag and organise it better now!

Thanks again.

@tconfrey
Copy link
Owner

Hi @siliconmeadow . I'm glad you got the conversion to work. I realized after I uploaded the script that I can probably just host it as a page on braintool.org with a file upload and save. Your comments will come in useful for a final version. Some responses to your numbered comments below.
3. Sorry for the frustration, a const can only be assigned once. Changing to var TabsOutlinerExport will allow it to be reset.
4. I used backticks as a shortcut to avoid escaping nested single or double quotes assuming the import would not have any backticks. I guess that was wrong! I'll escape or change all quotes in the next iteration.
6. I use Google's Backup and Sync app to keep a subset of my GDrive folders synced locally and then use emacs to edit .txt files. It is weird that there's no easy way to directly edit a plain text file in the GDrive app without it getting converted. Also note that the permissions you grant the BT app is specific to the file it creates (I'm trying to keep any permissions tightly scoped). You can freely edit or move the BrainTool.org file once it's created but you can't just rename some other file.

Good luck with the rest of your journey. LMK how it goes.
Tony

@tconfrey
Copy link
Owner

tconfrey commented Mar 9, 2021

Hi @siliconmeadow ,
I added a page to help with the Tabs Outliner conversion. See here:
converters
You still need to hassle with manually copying text into your BrainTool.org file but the rest of the process is easier. I intended to automatically append to the file but now realize that that requires having my API key visible to the script and orchestrating the whole permissions flow, so I'm punting for now.

LMK if you get a chance to try it and see any issues.

My plan is to pull this capability into the 1.0 version of BT so it works in-app where the keys and permissions are already handled.
Tony

@tconfrey tconfrey closed this as completed Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants