Here's a solution that doesn't depend on 3rd party javascript. I munged the 
existing TOC code so it could export a list.

Put the following code in a tiddler:

\define exportlist(tag) 
<$button>Create List for ''$tag$''
<$action-listops $tiddler="exports" $filter="[[]]"/>
<<toc2 "$tag$">>
</$button>
\end
\define toc-body2(tag,sort:"",itemClassFilter,exclude,path)
  <$list filter="""[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$] 
-[[$tag$]] $exclude$""">
    <$vars item=<<currentTiddler>> path="""$path$/$tag$""" 
excluded="""$exclude$ 
-[[$tag$]]""">
      <$set name="toc-item-class" filter="""$itemClassFilter$""" 
emptyValue="toc-item" value="toc-item-selected">
          <$list filter="[all[current]toc-link[no]]" 
emptyMessage="<$action-listops 
$tiddler='exports'  $subfilter='[{!!title}]'/>">
             <$view field="title"/><br/>
          </$list>
          <$macrocall $name="toc-body2" tag=<<item>> sort="""$sort$""" 
itemClassFilter="""$itemClassFilter$""" exclude=<<excluded>> path=<<path>>/>
        
      </$set>
    </$vars>
  </$list>
\end

\define toc2(tag,sort:"",itemClassFilter:" ")
<<toc-body2 tag:"""$tag$""" sort:"""$sort$""" itemClassFilter:"""
$itemClassFilter$""">>
\end



Then, either make the tiddler a global macro, or inside the tiddler invoke:


<<exportlist "HelloThere">>

Where you replace "HelloThere" with your root tag. This will create a 
button. Click on the button and it will create your list in the list field 
of the "exports" tiddler.

Then, go to the filter tab of the advanced search dialog and enter:

[list[exports]]

This will list the items to be exported. Use the export button to export 
your tiddlers.

I haven't tested this with tags that have spaces, so that's still a 
question mark. Be sure to make backups!

-- Mark



On Thursday, May 17, 2018 at 4:18:41 AM UTC-7, Shay Shaked wrote:
>
> I want a section of my TW to be exported into another wiki. The section is 
> defined by a tag, and then there are tags under that tag. Is there a way to 
> export ALL of them to .tid format, and then import them as a bunch to the 
> new wiki, or do I have to drag, one by one?
>

-- 
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/8295cdce-7b0c-41fa-99ff-557ee2f8f41e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to