A nifty idea - at least I think so

I thought I’d share this ‘nifty’ idea with the group.

My TW displays scanned documents of text and images. From each document, I extract the pronouns for names of People, Places, Organisations and Exhibitions, which are recorded as tags. Each of these tags also has its own tiddler grouping together the relevant tiddlers sharing the tag and also having, as a template, links to possible external sources for more information. For example,

The issue is that each external link has, for example, the name of the person in a different format.

Now I know I can write a XOJO script or even a regex command to produce the required JSON to load as tiddlers:

You can find more references to Paul McGillick on the following pages:

<$list filter="[tag[McGillick, Paul]!<currentTiddler>sort[title]]">&bull; <$link/><br/></$list>

External links to more information

* [[Australian Art Sales Digest|https://www.aasd.com.au/index.cfm/artist/?concat=PaulMcGillick]]
* [[Centre for Australian Art|http://www.printsandprintmaking.gov.au/Australian Art Sales Digest|https://www.aasd.com.au/index.cfm/artist/?concat=PaulMcGillick/]]
* [[Dictionary of Australian Artists Online|https://daao.org.au/bio/paul-mcgillick/]]

However, XOJO will be too onerous to write/debug and I am not as expert in REGEX although I could learn. I suspect though that the complexity of the text will mean much more REGEX debugging required.

I assume I could write a TW macro to do the same but as this should be a one time process, I did not want to use runtime cycles to evaluate the macro everytime the tiddler is displayed. A ‘compiled’ solution seems to me to be a better solution.

It struck me though that a spreadsheet may help and so I created the attached example, to take the name in column A and B and use the CONCAT command to insert variations of these into the required places in the template in column C (template items are stored in columns D to J). Al I now need to do is to generate the names from the tag list in the Control Panel of my TW when all tagging has been completed, which is a simple text editing process.

The format of the CONCAT command is

=CONCAT(D1,A1," ",B1,E1,B1,", ",A1,F1,A1,B1,G1,A1," ",B1,H1,A1,"-",B1,I1,B1,", ",A1,J1)

This gives me something that is simple to debug and change if required, allows for as many names as the spreadsheet has rows and just seems to work.

I am working on a similar spreadsheet for the other proper noun cases.

Just thought some of you might be interested as a technique, apologies if you are not.

1 Like

I appear to have forgotten to upload the spreadsheet. Here is a screengrab shwoing the ‘calculation’ for row2

Ahhh, OK now your first post does make sense :wink:

What is a XOJO-script?

@pmario, XOJO (http://xojo.com) is a cross platform IDE, based on the BASIC language but updated to a modern development environment, that I have used for years. I have used it for issues such as this but it would have a longer development environment than the spreadsheet solution I have described.

The example is slightly wrong in that there should not be an opening [ not closing ] character on each cell in column C. There should also be a closing , as last character of cell C.

I should have also added that the final process is just copying all the cells from column C, prepend a [ before the first item, replace the closing , with ] of the last item and there is my bulk-upload JSON file.

bobj