Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Changing an Attribute (Read 6840 times)
Simon A Graham
Full Member
*
Offline



Posts: 6

Changing an Attribute
Nov 25th, 2009, 12:41am
 
Hi,

I've created and have been using an attribute (ArticleTitle) for a while and have just recently created another one (BookArticle) which I feel better describes the content of the attribute.

I was wondering if there is a more convenient way and how I can change all my old notes under the ArticleTitle attribute - maintaining its content - without having to go back through all of them to rewrite the content under the new BookArticle attribute?

Cheers
Back to top
 
 
  IP Logged
Paul Walters
Ex Member




Re: Changing an Attribute
Reply #1 - Nov 25th, 2009, 4:14am
 
I assume you have been using BookTitle for some notes, and that notes either have a value for ArticleTitle but not BookTitle, or have a value for BookTitle but not ArticleTitle.  If that is the case then do this:

Create an agent with the query:

$ArticleTitle!=""

Do not put anything into the Action box.  At this point, the agent looks for notes whose ArticleTitle attribute has a value.  Inspect the results.  If the agent works as expected, modify the agent's action to be:

$BookTitle=$ArticleTitle

This loads the value of $ArticleTitle into $BookTitle for all the notes found by the agent.  The notes will thus have the same value in both attributes.  You can stop here, or, if you want to clear all ArticleTitle values, then modify the agent action again to be:

$ArticleTitle=;

This will erase all ArticleTitle data in all notes found by the agent. It will also make the agent have no results, because the query is now false for all notes.  You can safely delete the ArticleTitle attribute, or leave it for future use.
Back to top
 
« Last Edit: Nov 25th, 2009, 4:15am by Paul Walters »  
  IP Logged
Simon A Graham
Full Member
*
Offline



Posts: 6

Re: Changing an Attribute
Reply #2 - Nov 25th, 2009, 4:50pm
 
Thanks Paul,

WOW Shocked. Not been anywhere near the agents!

However there does appear to be a problem in that I only want to change a 'few' from ArticleTitles to BookArticles. Whilst leaving the majority of my notes as ArticleTitles.

Don't know if I'm doing anything wrong but the agent lists all the ArticleTitles. Don't know if you can carry out the agent on just a selected 'few' - but which is enough to make it a bit time consuming and tedious to do.

I guess I'll just have to make some time to change them all manually.

Thanks again.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Changing an Attribute
Reply #3 - Nov 25th, 2009, 5:04pm
 
Yes, you certainly can limit the agent's scope.  In simple terms the more things the agent has to match in each note, the likely the fewer items it has to find.  That does of course assume your 'few' items share some definable features other than Article Titles.

For instance, let's say all the notes needing changes are inside (in outline view) a container note called 'Books'. In such a case we could say:-
Query: (inside(Books)) & ($ArticleTitle) & ($ArticleTitle != $BookTitle))

This starts by only looking at notes inside (i.e. direct children of) 'Books'. Within that group it then whittles that down to those notes with a value in attribute ArticleTitle. Lastly it removes items where ArticleTitle doesn't match BookTitle. This is just an example. The 'questions' asked of the query, the query's parameters, could differ.

What facts would describe the 'few items' you want to work on? We could then help you make the right query.

If your query finds everything, it is possible you've a query that, whilst being usable code is effectively a syntax mistake.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Paul Walters
Ex Member




Re: Changing an Attribute
Reply #4 - Nov 25th, 2009, 5:19pm
 
Mark A's approach is excellent.  Another option (especially if it proves difficult to use an agent to narrow down "the few") is a stamp.  Open Window > Attributes.  Click the Stamps tab.  Give your stamp a name (ArticleToBook, for example) and put this in the action box:

$BookTitle=$ArticleTitle

Click "Create" to save the stamp.  Now, when you select one of those notes you want to change, you can click Stamps > ArticleToBook and BookTitle will have the contents of ArticleTitle stored to it.  You can chain actions in your stamp, for example:

$BookTitle=$ArticleTitle;$ArticleTitle=;

Will copy ArticleTitle into BookTitle and then erase the contents of ArticleTitle.

To be safe, play with this concept in a test copy of your Tinderbox document.
Back to top
 
 
  IP Logged
Simon A Graham
Full Member
*
Offline



Posts: 6

Re: Changing an Attribute
Reply #5 - Nov 29th, 2009, 2:05pm
 
I have to confess since purchasing Tinderbox, I haven't moved very far beyond the very basic or looked deeply into the programme - barely skimming the manual. But despite my basic involvement so far, it is a vast improvement over how I previously worked; which didn't really work at all on reflection. So it's been a giant leap even at this very basic level.

Mark A:  "What facts would describe the 'few item's' you want to work on?"

Intriguing question. By facts, do you mean what attributes/attribute contents or values have I set-up in my Tinderbox doc?

I think you answered the question agents action in part by specifying in your example query the folder/container that my notes are in. Therefore limiting the agents action to just one container. Thanks for that. Thank Paul, for the stamp approach.

I basically bought the program as a repository and a place to try and keep track of my internet reading. I haven't got very far beyond assigning 3 attributes: URL, ArticleTitle and ArticleAuthor. So I guess I haven't really amassed a great deal of facts. I guess nor will I with only 3 attributes. And maybe the facts aspect is something I need to think about in relational to an elusive feeling that I've not really grasped what I'd wish to retain from my internet reading. Perhaps a large part of that elusiveness is down to not putting in the work to understand Tinderbox more in order to input more facts into it.

Thinking on I guess I could make the dates into an attribute in order to get rid of 3 containers - leaving agents to sort them out - though I guess from an outline view that would look a lot more chaotic.

I'm only really charting one site in particular.

So for example my document looks like this: 3 (main containers) things they publish: a list of Articles I get delivered every Friday; a list of BookReviews on the last Friday of every month; which leads to a Book List.

For example:

Articles    (not specified the following 3 container as attributes?)
     2008
           Aug
                 15/08/08

                       Let's give children the 'store of human
                               knowledge' (ArticleTitle), by Frank Furedi
                               (ArticleAuthor)

                       Election: up for grabs, but nothing to play for    
                               (ArticleTitle), by Mike Hume (ArticleAuthor)

                 26/08/08
           Sep
                 03/10/08
     2009
           Jan
           Feb…

BookReviews (again, not specified the 3 containers as attributes)
     2007
     2008
     2009
           Issue No. 20 January 2009

                 Bursting out of the finance bubble (BookArticle), by
                 Sean Collins (ArticleAuthor)

           Issue No. 21 February 2009

Book List
     2007
     2008
     2009
           Issue No. 20 January 2009
                 Panic! The Story of Modern Financial Insanity (BookTitle),
                 by Michael Lewis (BookAuthor)
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Changing an Attribute
Reply #6 - Nov 30th, 2009, 10:15am
 
Mark Anderson, at Tinderbox Weekend SF, emphasized that it's tempting -- but usually a mistake -- to record more metadata than you need.  

You *could* record all sorts of things. But if you set up Tinderbox to demand that you record too much -- so that you need to fill out a laundry list every time you add a new article -- pretty soon you'll have a busy day and won't want to fill out all the information.  So, you'll fill it out hastily, or incompletely, or you'll promise that you'll get around to it later, or you'll leave that article outside Tinderbox because today you're really, really busy.

And pretty soon, you can't trust or use anything.

A better way is to capture (a) what you know you need -- and to get that material easily, quickly, and (if possible) automatically, and (b) also what you think you might need -- and to get that material informally and unobtrusively.  

As time passes, some of the category (b) information may turn out to be more useful than you knew. Promote it to category a!  But you don't need to do this from the outset; you can verify the utility before you make the investment.

For example, right now you have date information that is implicitly encoded by containers.  Do you need date attributes?  Maybe!  But your agents can already get this information if they need it; a note inside(/Book Reviews/2008/ was published in 2008. So, you can go back and define a date attribute, and fill it in manually or automaticaly from what you've recorded.

Back to top
 
 
WWW   IP Logged
russ lipton
Full Member
*
Offline



Posts: 126

Re: Changing an Attribute
Reply #7 - Nov 30th, 2009, 11:14am
 
I fight when using Tinderbox against some inner parent who is uncomfortable that my documents are too 'messy'.

In fact, they span the spectrum from formal to informal structures.

Obviously, there are boundaries to 'what works' for given people and, even more, given projects. Experimenting with structure (especially with agents) is 'cheap' and yields unexpectedly emergent insights.

But I have gradually learned to make my peace with Tinderbox's greatest strength: deferred structure and organization.

A good check for me on going too far with structure is always this - am I turning my document into the equivalent of a formal database?

If so, Tinderbox is definitely the wrong tool for the job!

The sweet spot is deciding how much structure is just enough.

Anything more is almost definitely a mistake now and, often, the best way I know to avoid my doing real work on a matter.

It is easier in Tinderbox to add structure later than to remove it. The latter is very do-able, but is sometimes messier to unravel than was the original state of the document.

Good version-style backups help, but I am just as likely as not to forget I might later want to remove my brilliant, visionary, anal structure and so fail to leave a path back. Perhaps more likely ...
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print