The original request was to split off the WP article into separate tids. If 
you replace the BulletList section of the code I previously provided with 
this:

function BulletList(items)
  local buffer = {}
  local name = ""
  local cnt = 0
  
  for _, item in pairs(items) do
    buffer = {}
    name = string.match(item, "([%w%s%.]+),")
    if name then 
      cnt = cnt + 1
      buffer = {}
      filename= cnt .. ".tid"
      table.insert(buffer, "title: " ..  name )
      table.insert(buffer, "tags: " ..  "People" )
      table.insert(buffer, "")
      table.insert(buffer, item)
      local file = io.open(filename, "w")
      file:write(table.concat(buffer,"\n"))
      file:close()
    end
  end
  return table.concat(buffer)
end

and feed it just an HTML file containing the "Players" from the article 
specified, you will get a directory full of numbered tid files that can be 
dnd into TW resulting in per-name tiddlers tagged with "People".

The timeline elements were not as regular as the "Players" elements, so 
they would be harder to work out. But everything in principle should be 
here for anyone that wants to follow-up.

I think there's probably a better approach using just Javascript macros and 
TW, but there you are.

-- Mark

On Friday, March 2, 2018 at 6:05:52 PM UTC-8, Mark S. wrote:
>
> Here's where I'm at with using lua filters inside of Pandoc. The script is 
> attached. It can be invoked by:
>
>    pandoc  -f html -t TW5.lua myfile.html  -o myfile.tid 
>
> or 
>
>    env basename="/mylocaldir/" pandoc  -f html -t TW5.lua myfile.html  -o 
> myfile.tid 
>
> ... if you want to specify a basename file to be appended to links -- not 
> that it does much good with Wikipedia links since they seem to use some 
> internal linking mechanism.
>
> I left <spans> as html since TW has no way of doing nested spans and 
> lua-filters doesn't seem to have a way to tell you when you're inside a 
> nested span. As you can see from the screen shot, without the right classes 
> and context,  the output from WP may not play nicely inside of TW.
>
> Probably someone would need to tailor the script for whatever platform 
> they're looking at.  
>
> This is very beta. Not sure if it's worth pursuing further, but it was 
> interesting. Probably adding a template wrapper so that the resulting file 
> is a draggable tid would be a next step.
>
> -- Mark
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/eaeea3e1-2813-4119-b7fa-dd5a9f8bbd44%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to