Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Moving to Tinderbox 6 >> Editing TBX source to add a Simplenote tag filter
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1413642600

Message started by Mark Anderson on Oct 18th, 2014, 10:29am

Title: Editing TBX source to add a Simplenote tag filter
Post by Mark Anderson on Oct 18th, 2014, 10:29am

This is a further answer to the question in this thread.

For the task:
  • use a code/text editor like BBEdit or the free TextWrangler.
  • If you must use TextEdit, make sure you use plain text mode.
  • Edit a *copy* of your TBX, in case you make a mistake!
First, set up your TB6 document adding the Simplenote setting - see Document settings -> Accounts. Enable SN and give your email and SN password in the boxes provided. Save and close the TBX.

Open your TBX in the text editor and scroll to the end of the source code. Somewhere in the last 40-50 lines you'll see 4 lines like this:


Code:
<CheckSimplenote > 1</CheckSimplenote>
<SimplenoteEmail > joe@example.com</SimplenoteEmail>
<SimplenotePassword > nnnnnnnnnnn</SimplenotePassword>
<SimplenoteTag > </SimplenoteTag>

The CheckSimplenote line is the on/off state for SN sync: 0 = off, 1 = on.

The SimplenoteEmail line is your SN email address.

The SimplenotePassword line is your SN password.

The SimplenoteTag line is the SN tag filter, and the part for which there is no v6 UI (as at v6.1.0). Let's assume you want to filter tags 'todo', 'Project X' and 'Project Y'. The terms are stored semi-colon delimited, so you edit the line like so:


Code:
<SimplenoteTag > todo;Project X;Project Y</SimplenoteTag>

A trailing semi-colon isn't needed after the last term but I suspect no harm comes if you do include one. Save and close the file, your tag filter is set and should now work.

Disclaimer: I've not had time to run tests - the advice is based on comparing v5 and v6 TBX file source code. Edit TBX source at your own risk, so take copies!

In summary, assuming the SN login parameters are set via the v6 UI, then the only source code tag you need to edit is <SimplenoteTag>.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.