1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-28 23:10:46 +00:00

Merge branch 'master' into parameterised-transclusions

This commit is contained in:
jeremy@jermolene.com 2022-11-15 10:39:29 +00:00
commit 70930e16b2
82 changed files with 1378 additions and 149 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
tmp/
output/
node_modules/

View File

@ -233,6 +233,15 @@ node $TW5_BUILD_TIDDLYWIKI \
--build index \
|| exit 1
# /editions/twitter-archivist/index.html Twitter Archivist edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/twitter-archivist \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/twitter-archivist/ \
--build index \
|| exit 1
######################################################
#
# Plugin demos

View File

@ -2403,11 +2403,11 @@ $tw.boot.initStartup = function(options) {
$tw.utils.registerFileType("application/x-font-ttf","base64",".woff");
$tw.utils.registerFileType("application/font-woff2","base64",".woff2");
$tw.utils.registerFileType("audio/ogg","base64",".ogg");
$tw.utils.registerFileType("audio/mp4","base64",[".mp4",".m4a"]);
$tw.utils.registerFileType("video/ogg","base64",[".ogm",".ogv",".ogg"]);
$tw.utils.registerFileType("video/webm","base64",".webm");
$tw.utils.registerFileType("video/mp4","base64",".mp4");
$tw.utils.registerFileType("audio/mp3","base64",".mp3");
$tw.utils.registerFileType("audio/mp4","base64",[".mp4",".m4a"]);
$tw.utils.registerFileType("text/markdown","utf8",[".md",".markdown"],{deserializerType:"text/x-markdown"});
$tw.utils.registerFileType("text/x-markdown","utf8",[".md",".markdown"]);
$tw.utils.registerFileType("application/enex+xml","utf8",".enex");

View File

@ -7,7 +7,7 @@ Appearance/Hint: Ways to customise the appearance of your TiddlyWiki.
Basics/AnimDuration/Prompt: Animation duration
Basics/AutoFocus/Prompt: Default focus field for new tiddlers
Basics/Caption: Basics
Basics/DefaultTiddlers/BottomHint: Use &#91;&#91;double square brackets&#93;&#93; for titles with spaces. Or you can choose to <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">retain story ordering</$button>
Basics/DefaultTiddlers/BottomHint: Use &#91;&#91;double square brackets&#93;&#93; for titles with spaces. Or you can choose to {{retain story ordering||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Default tiddlers
Basics/DefaultTiddlers/TopHint: Choose which tiddlers are displayed at startup
Basics/Language/Prompt: Hello! Current language:

View File

@ -30,6 +30,16 @@ exports.handler = function(request,response,state) {
if(fields.revision) {
delete fields.revision;
}
// If this is a skinny tiddler, it means the client never got the full
// version of the tiddler to edit. So we must preserve whatever text
// already exists on the server, or else we'll inadvertently delete it.
if(fields._is_skinny !== undefined) {
var tiddler = state.wiki.getTiddler(title);
if(tiddler) {
fields.text = tiddler.fields.text;
}
delete fields._is_skinny;
}
state.wiki.addTiddler(new $tw.Tiddler(fields,{title: title}));
var changeCount = state.wiki.getChangeCount(title).toString();
response.writeHead(204, "OK",{

View File

@ -20,15 +20,16 @@ caption: {{$:/language/ControlPanel/Basics/Caption}}
\end
\whitespace trim
|tc-max-width tc-edit-max-width|k
|<<lingo Version/Prompt>> |''<<version>>'' |
|<$link to="$:/SiteTitle"><<lingo Title/Prompt>></$link> |<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> |
|<$link to="$:/SiteSubtitle"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> |
|<$link to="$:/status/UserName"><<lingo Username/Prompt>></$link> |<$edit-text tiddler="$:/status/UserName" default="" tag="input"/> |
|<$link to="$:/config/AnimationDuration"><<lingo AnimDuration/Prompt>></$link> |<$edit-text tiddler="$:/config/AnimationDuration" default="" tag="input"/> |
|<$link to="$:/DefaultTiddlers"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit tag="textarea" tiddler="$:/DefaultTiddlers" class="tc-edit-texteditor"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |
|<$link to="$:/DefaultTiddlers"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit tag="textarea" tiddler="$:/DefaultTiddlers"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |
|<$link to="$:/language/DefaultNewTiddlerTitle"><<lingo NewTiddler/Title/Prompt>></$link> |<$edit-text tiddler="$:/language/DefaultNewTiddlerTitle" default="" tag="input"/> |
|<$link to="$:/config/NewJournal/Title"><<lingo NewJournal/Title/Prompt>></$link> |<$edit-text tiddler="$:/config/NewJournal/Title" default="" tag="input"/> |
|<$link to="$:/config/NewJournal/Text"><<lingo NewJournal/Text/Prompt>></$link> |<$edit tiddler="$:/config/NewJournal/Text" tag="textarea" class="tc-edit-texteditor" default=""/> |
|<$link to="$:/config/NewJournal/Text"><<lingo NewJournal/Text/Prompt>></$link> |<$edit tiddler="$:/config/NewJournal/Text" tag="textarea" default=""/> |
|<$link to="$:/config/NewTiddler/Tags"><<lingo NewTiddler/Tags/Prompt>></$link> |<$vars currentTiddler="$:/config/NewTiddler/Tags" tagField="text">{{||$:/core/ui/EditTemplate/tags}}<$list filter="[<currentTiddler>tags[]] +[limit[1]]" variable="ignore"><$button tooltip={{$:/language/ControlPanel/Basics/RemoveTags/Hint}}><<lingo RemoveTags>><$action-listops $tiddler=<<currentTiddler>> $field="text" $subfilter={{{ [<currentTiddler>get[tags]] }}}/><$action-setfield $tiddler=<<currentTiddler>> tags=""/></$button></$list></$vars> |
|<$link to="$:/config/NewJournal/Tags"><<lingo NewJournal/Tags/Prompt>></$link> |<$vars currentTiddler="$:/config/NewJournal/Tags" tagField="text">{{||$:/core/ui/EditTemplate/tags}}<$list filter="[<currentTiddler>tags[]] +[limit[1]]" variable="ignore"><$button tooltip={{$:/language/ControlPanel/Basics/RemoveTags/Hint}}><<lingo RemoveTags>><$action-listops $tiddler=<<currentTiddler>> $field="text" $subfilter={{{ [<currentTiddler>get[tags]] }}}/><$action-setfield $tiddler=<<currentTiddler>> tags=""/></$button></$list></$vars> |
|<$link to="$:/config/AutoFocus"><<lingo AutoFocus/Prompt>></$link> |{{$:/snippets/minifocusswitcher}} |

View File

@ -0,0 +1,3 @@
title: $:/snippets/retain-story-ordering-button
<$button set="$:/DefaultTiddlers" setTo={{$:/config/ControlPanel/Basics/DefaultTiddlers/RetainStory}} ><<currentTiddler>></$button>

View File

@ -19,7 +19,7 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
<div class="tc-tiddler-preview-preview">
<div class="tc-tiddler-preview-preview" data-tiddler-title={{!!draft.title}} data-tags={{!!tags}}>
<$transclude tiddler={{$:/state/editpreviewtype}} mode="inline">

View File

@ -3,89 +3,101 @@ icon: $:/core/images/tag-button
color: #bbb
\define lingo-base() $:/language/TagManager/
\define iconEditorTab(type)
\whitespace trim
<$link to=""><<lingo Icons/None>></$link>
<$list filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[sort[title]] +[$type$is[system]]">
<$link to={{!!title}}>
<$transclude/> <$view field="title"/>
</$link>
<$link to={{!!title}}>
<$transclude/> <$view field="title"/>
</$link>
</$list>
\end
\define iconEditor(title)
\whitespace trim
<div class="tc-drop-down-wrapper">
<$button popupTitle={{{ [[$:/state/popup/icon/]addsuffix<__title__>] }}} class="tc-btn-invisible tc-btn-dropdown">{{$:/core/images/down-arrow}}</$button>
<$reveal stateTitle={{{ [[$:/state/popup/icon/]addsuffix<__title__>] }}} type="popup" position="belowleft" text="" default="">
<div class="tc-drop-down">
<$linkcatcher actions="""<$action-setfield $tiddler=<<__title__>> icon=<<navigateTo>>/>""">
<<iconEditorTab type:"!">>
<hr/>
<<iconEditorTab type:"">>
</$linkcatcher>
</div>
</$reveal>
<$button popupTitle={{{ [[$:/state/popup/icon/]addsuffix<__title__>] }}} class="tc-btn-invisible tc-btn-dropdown">
{{$:/core/images/down-arrow}}
</$button>
<$reveal stateTitle={{{ [[$:/state/popup/icon/]addsuffix<__title__>] }}} type="popup" position="belowleft" text="" default="">
<div class="tc-drop-down">
<$linkcatcher actions="""<$action-setfield $tiddler=<<__title__>> icon=<<navigateTo>>/>""">
<<iconEditorTab type:"!">>
<hr/>
<<iconEditorTab type:"">>
</$linkcatcher>
</div>
</$reveal>
</div>
\end
\define toggleButton(state)
\whitespace trim
<$reveal stateTitle=<<__state__>> type="match" text="closed" default="closed">
<$button setTitle=<<__state__>> setTo="open" class="tc-btn-invisible tc-btn-dropdown" selectedClass="tc-selected">
{{$:/core/images/info-button}}
</$button>
<$button setTitle=<<__state__>> setTo="open" class="tc-btn-invisible tc-btn-dropdown" selectedClass="tc-selected">
{{$:/core/images/info-button}}
</$button>
</$reveal>
<$reveal stateTitle=<<__state__>> type="match" text="open" default="closed">
<$button setTitle=<<__state__>> setTo="closed" class="tc-btn-invisible tc-btn-dropdown" selectedClass="tc-selected">
{{$:/core/images/info-button}}
</$button>
<$button setTitle=<<__state__>> setTo="closed" class="tc-btn-invisible tc-btn-dropdown" selectedClass="tc-selected">
{{$:/core/images/info-button}}
</$button>
</$reveal>
\end
\whitespace trim
<table class="tc-tag-manager-table">
<tbody>
<tr>
<th><<lingo Colour/Heading>></th>
<th class="tc-tag-manager-tag"><<lingo Tag/Heading>></th>
<th><<lingo Count/Heading>></th>
<th><<lingo Icon/Heading>></th>
<th><<lingo Info/Heading>></th>
</tr>
<$list filter="[tags[]!is[system]sort[title]]">
<tr>
<td><$edit-text field="color" tag="input" type="color"/></td>
<td>{{||$:/core/ui/TagTemplate}}</td>
<td><$count filter="[all[current]tagging[]]"/></td>
<td>
<$macrocall $name="iconEditor" title={{!!title}}/>
</td>
<td>
<$macrocall $name="toggleButton" state={{{ [[$:/state/tag-manager/]addsuffix<currentTiddler>] }}} />
</td>
</tr>
<tr>
<td></td>
<td colspan="4">
<$reveal stateTitle={{{ [[$:/state/tag-manager/]addsuffix<currentTiddler>] }}} type="match" text="open" default="">
<table>
<tbody>
<tr><td><<lingo Colour/Heading>></td><td><$edit-text field="color" tag="input" type="text" size="9"/></td></tr>
<tr><td><<lingo Icon/Heading>></td><td><$edit-text field="icon" tag="input" size="45"/></td></tr>
</tbody>
</table>
</$reveal>
</td>
</tr>
</$list>
<tr>
<td></td>
<td style="position:relative;">
{{$:/core/ui/UntaggedTemplate}}
</td>
<td>
<small class="tc-menu-list-count"><$count filter="[untagged[]!is[system]] -[tags[]]"/></small>
</td>
<td></td>
<td></td>
</tr>
<tr>
<th><<lingo Colour/Heading>></th>
<th class="tc-tag-manager-tag"><<lingo Tag/Heading>></th>
<th><<lingo Count/Heading>></th>
<th><<lingo Icon/Heading>></th>
<th><<lingo Info/Heading>></th>
</tr>
<$list filter="[tags[]!is[system]sort[title]]">
<tr>
<td><$edit-text field="color" tag="input" type="color"/></td>
<td>{{||$:/core/ui/TagTemplate}}</td>
<td><$count filter="[all[current]tagging[]]"/></td>
<td>
<$macrocall $name="iconEditor" title={{!!title}}/>
</td>
<td>
<$macrocall $name="toggleButton" state={{{ [[$:/state/tag-manager/]addsuffix<currentTiddler>] }}} />
</td>
</tr>
<tr>
<td></td>
<td colspan="4">
<$reveal stateTitle={{{ [[$:/state/tag-manager/]addsuffix<currentTiddler>] }}} type="match" text="open" default="">
<table>
<tbody>
<tr>
<td><<lingo Colour/Heading>></td>
<td><$edit-text field="color" tag="input" type="text" size="9"/></td>
</tr>
<tr>
<td><<lingo Icon/Heading>></td>
<td><$edit-text field="icon" tag="input" size="45"/></td>
</tr>
</tbody>
</table>
</$reveal>
</td>
</tr>
</$list>
<tr>
<td></td>
<td style="position:relative;">
{{$:/core/ui/UntaggedTemplate}}
</td>
<td>
<small class="tc-menu-list-count"><$count filter="[untagged[]!is[system]] -[tags[]]"/></small>
</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>

View File

@ -0,0 +1,3 @@
title: $:/config/ControlPanel/Basics/DefaultTiddlers/RetainStory
[list[$:/StoryList]]

View File

@ -1,21 +1,21 @@
title: $:/core/macros/list
tags: $:/tags/Macro
\define list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage)
\define list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage,field:"caption")
\whitespace trim
<$type$ class="$class$">
<$list filter="$filter$" emptyMessage=<<__emptyMessage__>>>
<$subtype$>
<$genesis $type=<<__type__>> class=<<__class__>>>
<$list filter=<<__filter__>> emptyMessage=<<__emptyMessage__>>>
<$genesis $type=<<__subtype__>>>
<$link to={{!!title}}>
<$let tv-wikilinks="no">
<$transclude field="caption">
<$transclude field=<<__field__>>>
<$view field="title"/>
</$transclude>
</$let>
</$link>
</$subtype$>
</$genesis>
</$list>
</$type$>
</$genesis>
\end
\define list-links-draggable-drop-actions()

View File

@ -3,14 +3,11 @@ modified: 20141212110330815
tags: $:/tags/Macro
title: $:/core/macros/timeline
\define timeline-title()
\whitespace trim
<!-- Override this macro with a global macro
of the same name if you need to change
how titles are displayed on the timeline
-->
<$view field="title"/>
\end
<!-- Override one or both of the following two macros with a global or local macro of the same name
if you need to change how titles are displayed on a timeline -->
\define timeline-title() <$view field="title"/>
\define timeline-link() <$link to={{!!title}}><<timeline-title>></$link>
\define timeline(limit:"100",format:"DDth MMM YYYY",subfilter:"",dateField:"modified")
\whitespace trim
<div class="tc-timeline">
@ -19,7 +16,7 @@ title: $:/core/macros/timeline
<$view field="$dateField$" format="date" template="$format$"/>
<$list filter="[sameday:$dateField${!!$dateField$}!is[system]$subfilter$!sort[$dateField$]]">
<div class="tc-menu-list-subitem">
<$link to={{!!title}}><<timeline-title>></$link>
<<timeline-link>>
</div>
</$list>
</div>

View File

@ -1,6 +1,10 @@
title: $:/core/macros/toc
tags: $:/tags/Macro
\define toc-open-icon() $:/core/images/down-arrow
\define toc-closed-icon() $:/core/images/right-arrow
\define toc-caption()
\whitespace trim
<span class="tc-toc-caption tc-tiny-gap-left">
@ -45,12 +49,12 @@ tags: $:/tags/Macro
<$link to={{{ [<currentTiddler>get[target]else<currentTiddler>] }}}>
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/right-arrow}}
<$transclude tiddler=<<toc-closed-icon>> />
</$button>
</$reveal>
<$reveal type="match" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/down-arrow}}
<$transclude tiddler=<<toc-open-icon>> />
</$button>
</$reveal>
<<toc-caption>>
@ -71,13 +75,13 @@ tags: $:/tags/Macro
<li class=<<toc-item-class>>>
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/right-arrow}}
<$transclude tiddler=<<toc-closed-icon>> />
<<toc-caption>>
</$button>
</$reveal>
<$reveal type="match" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/down-arrow}}
<$transclude tiddler=<<toc-open-icon>> />
<<toc-caption>>
</$button>
</$reveal>
@ -117,12 +121,12 @@ tags: $:/tags/Macro
<$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button>">
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/right-arrow}}
<$transclude tiddler=<<toc-closed-icon>> />
</$button>
</$reveal>
<$reveal type="match" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/down-arrow}}
<$transclude tiddler=<<toc-open-icon>> />
</$button>
</$reveal>
</$list>
@ -144,13 +148,13 @@ tags: $:/tags/Macro
<$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>">
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/right-arrow}}
<$transclude tiddler=<<toc-closed-icon>> />
<<toc-caption>>
</$button>
</$reveal>
<$reveal type="match" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/down-arrow}}
<$transclude tiddler=<<toc-open-icon>> />
<<toc-caption>>
</$button>
</$reveal>

View File

@ -0,0 +1,42 @@
created: 20221114225038703
modified: 20221114230502925
tags: howto
title: How to run a local plugin library for testing
type: text/vnd.tiddlywiki
!! Start the Library Server
The "pluginlibrary" edition contains the components needed to set up a local server for ~TiddlyWiki plugin library testing or development.
The following commands will create the library files and start a test server at http://localhost:8888
```
cd /your/path/to/TiddlyWiki5/editions/pluginlibrary
tiddlywiki --build test-server
```
!! Important
''This server is read-only. Nothing is saved back to the filesystem''
!! Test the Library with a Single File Wiki
* Open a single file wiki and import the configuration tiddler form http://localhost:8888/#%24%3A%2Fconfig%2FLocalPluginLibrary
* Open the ''$:/ControlPanel : Plugins : "Get More Plugins"'' modal
!! Test the Library with a Node.js Wiki
* Create a new wiki with eg:
<<<
```
cd /temp/
tiddlywiki my-wiki --init server
tiddlywiki my-wiki --listen
```
<<<
* Open "my-wiki" from http://localhost:8080
* Import the http://localhost:8888/#%24%3A%2Fconfig%2FLocalPluginLibrary tiddler into "my-wiki"
* Open the ''$:/ControlPanel : Plugins : "Get More Plugins"'' modal

View File

@ -0,0 +1,45 @@
title: GettingStarted
This edition contains the components needed to set up a local server for ~TiddlyWiki plugin library testing or development.
!! Import Configuration
Import the configuration tiddler: $:/config/LocalPluginLibrary to your "test wiki".
!! Important
''This server is read-only. Nothing is saved back to the filesystem''
!! Start the Library Server
The following commands will create the library files and start a test server at http://localhost:8888
```
cd /your/path/to/TiddlyWiki5/editions/pluginlibrary
tiddlywiki --build test-server
```
!! Test the Library with a Single File Wiki
* Open a single file wiki and import the configuration tiddler form http://localhost:8888/#%24%3A%2Fconfig%2FLocalPluginLibrary
* Open the ''$:/ControlPanel : Plugins : "Get More Plugins"'' modal
!! Test the Library with a Node.js Wiki
* Create a new wiki with eg:
<<<
```
cd /temp/
tiddlywiki my-wiki --init server
tiddlywiki my-wiki --listen
```
<<<
* Open my-wiki from http://localhost:8080
* Import the http://localhost:8888/#%24%3A%2Fconfig%2FLocalPluginLibrary tiddler into "my-wiki"
* Open the ''~$:/ControlPanel : Plugins : "Get More Plugins"'' modal
!! ~ControlPanel Plugin Tab
{{$:/core/ui/ControlPanel/Plugins}}

View File

@ -0,0 +1,6 @@
title: $:/config/LocalPluginLibrary
tags: $:/tags/PluginLibrary
url: http://localhost:8888/files/local/library/tmp/index.html
caption: Local TiddlyWiki Plugin Library Test Server
A locally installed version of the plugin library //Requires a local web server to share the library//

View File

@ -0,0 +1,3 @@
title: $:/SiteSubtitle
<<version>>

View File

@ -0,0 +1,3 @@
title: $:/SiteTitle
Library test edition, plugin development

View File

@ -0,0 +1,3 @@
title: $:/themes/tiddlywiki/vanilla/options/sidebarlayout
fluid-fixed

View File

@ -4,10 +4,17 @@
"tiddlywiki/pluginlibrary"
],
"themes": [
"tiddlywiki/vanilla",
"tiddlywiki/snowwhite"
],
"includeWikis": [
],
"build": {
"test-server": [
"--output", "./files/local/library/tmp",
"--build", "library",
"--listen", "port=8888"
],
"library": [
"--makelibrary","$:/UpgradeLibrary",
"--savelibrarytiddlers","$:/UpgradeLibrary","[prefix[$:/]] -[[$:/plugins/tiddlywiki/upgrade]] -[[$:/plugins/tiddlywiki/translators]] -[[$:/plugins/tiddlywiki/pluginlibrary]] -[[$:/plugins/tiddlywiki/jasmine]]","recipes/library/tiddlers/","$:/UpgradeLibrary/List",

View File

@ -1,5 +1,5 @@
created: 20220728145919904
list: Brackets Base64 HelloThere GettingStarted Community
modified: 20220728145919904
created: 20221010074222386
list: [[HTML Block Elements]] [[Table Classes, Captions, Headers and Footers]] [[Tables in WikiText]] [[Tables in WikiText CSS Utility Classes]]
modified: 20221010074406819
title: $:/StoryList
type: text/vnd.tiddlywiki

View File

@ -0,0 +1,81 @@
created: 20220817153236691
modified: 20221010074314452
tags: [[Tables in WikiText]]
title: Tables in WikiText CSS Utility Classes
type: text/vnd.tiddlywiki
~WikiText tables can be styled by applying CSS classes. For basic information on wiktext tables and how to style them, see [[Tables in WikiText]].
{{Table Classes, Captions, Headers and Footers}}
As seen above, the resulting table is left aligned and grows to fit the content. This is the browser default layout behaviour for tables. To get another behaviour, various CSS classes can be added into the "`k` row".
! Utility Classes
{{Utility Classes}}
! Examples
The following examples apply the style classes to tables but the "General Utility Classes" can as well be used on DIVs or other [[HTML block elements|HTML Block Elements]]
!! Centred Table
To center a table horizontally, use `tc-center`:
<<wikitext-example-without-html src:"""|tc-center|k
|This is a caption |c
|Cell1 |Cell2 |
|Cell3 |Cell4 |
|Header|Header|h
|Footer|Footer|f
""">>
!! Centred Table, 80% Width
To add empty left and right margins to a table that is otherwise full-tiddler-width, you can use `tc-max-width-80`
<<wikitext-example-without-html src:"""|tc-center tc-max-width-80|k
|This is a caption |c
|Cell1 |<<.lorem>> |
|<<.lorem>> |Cell4 |
|Header|Header|h
""">>
!! Table with Maximum Width
To expand a table to full tiddler width, use `tc-max-width`
<<wikitext-example-without-html src:"""|tc-max-width|k
|Header|Header|h
|Cell1 |Cell2 |
|Cell3 |Cell4 |
""">>
!! Table with First Column Minimum Width
The following example shows a simple "form" where the first columns width is adjusted to its content by means of `tc-first-col-min-width`
<<wikitext-example-without-html src:"""|tc-max-width tc-first-col-min-width|k
|Header|Header|h
|Cell1 |<$edit-text tiddler="$:/temp/test-table-input" tag="input" field="test"/> |
|Cell3 |<$edit-text tiddler="$:/temp/test-table-input" field="text"/> |
""">>
!! Table with Maximum Width ~TextWidgets
Here, the previous "form" is styled further to give the [[TextWidget]]s full width by adding the class `tc-edit-max-width`
<<wikitext-example-without-html src:"""|tc-max-width tc-first-col-min-width tc-edit-max-width|k
|Header|Header|h
|Cell1 |<$edit-text tiddler="$:/temp/test-table-input" tag="input" field="test"/> |
|Cell3 |<$edit-text tiddler="$:/temp/test-table-input" field="text"/> |
""">>
!! Table with No Borders
The following is a table with maximum width. It contains [[TextWidget]]s with maximum width. The first column is set to be minimum width. Further, all links in the first column are set to __not__ line break (wrap) regardless of window resize.
<<wikitext-example-without-html src:"""|tc-max-width tc-first-col-min-width tc-edit-max-width tc-table-no-border tc-first-link-nowrap|k
| Cell1|<$edit-text tiddler="$:/temp/test-table-input" tag="input" field="test"/> |
|^ [[Link to a tiddler]]<br>some more text|<$edit-text tiddler="$:/temp/test-table-input" field="text"/> |
""">>

View File

@ -0,0 +1,9 @@
created: 20220818091959523
modified: 20220818092101307
tags: Definitions
title: HTML Block Elements
type: text/vnd.tiddlywiki
<<<
HTML (Hypertext Markup Language) elements historically were categorized as either "block-level" elements or "inline-level" elements. Since this is a presentational characteristic it is nowadays specified by CSS in the Flow Layout. A Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of its contents, thereby creating a "block".
<<< https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements

View File

@ -0,0 +1,16 @@
caption: Selective (custom icons)
created: 20220819080004663
modified: 20220819081049054
order: 5
tags: table-of-contents-example
title: Example Table of Contents: Selectively Expandable (custom icons)
type: text/vnd.tiddlywiki
<<.from-version "5.2.4">> It is possible to define the `toc-open-icon` and `toc-closed-icon` variable, to change the icons used by the toc macros. This setting works for all toc-macro variants
<$macrocall $name=".example" n="1"
eg="""<$let toc-open-icon="$:/core/images/fold-button" toc-closed-icon="$:/core/images/folder">
<div class="tc-table-of-contents">
<<toc-selective-expandable "Contents">>
</div>
</$let>"""/>

View File

@ -0,0 +1,4 @@
title: Hidden Setting: Retain Story ordering
tags: [[Hidden Settings]]
<<.from-version "5.2.4">> The tiddler $:/config/ControlPanel/Basics/DefaultTiddlers/RetainStory contains the value that is assigned to $:/DefaultTiddlers when clicking the "retain story ordering" button in $:/ControlPanel under the ''Info'' -> ''Basics'' tab.

View File

@ -1,6 +1,6 @@
caption: list-links
created: 20140917083515996
modified: 20190206000000000
modified: 20221105090835041
tags: Macros [[Core Macros]]
title: list-links Macro
type: text/vnd.tiddlywiki
@ -15,6 +15,8 @@ Note: Each first [[step|Filter Step]] of a [[filter run|Filter Run]] not given a
;filter
: A [[filter|Filters]] selecting which tiddlers to include
;caption
: The name of the field to transclude for each list item, defaultingt to `caption`
;type
: An HTML element to use for the overall list element, defaulting to `ul`
;subtype

View File

@ -1,5 +1,5 @@
created: 20140919155729620
modified: 20201017134038305
modified: 20220819093733569
tags: Macros [[Core Macros]]
title: Table-of-Contents Macros
type: text/vnd.tiddlywiki
@ -62,4 +62,38 @@ These two parameters are combined into a single [[filter expression|Filter Expre
;template
: Optionally, the title of a tiddler to use as a [[template|TemplateTiddlers]] for transcluding the selected tiddler into the right-hand panel
[[Examples|Table-of-Contents Macros (Examples)]]
!! Custom Icons
<<.from-version "5.2.4">>
To change the icons used by the Table-of-Contents macros, redefine the macros `toc-open-icon` and `toc-closed-icon`. This setting works for all toc-macro variants.
!!! Default Settings
* <<.var toc-open-icon>>: `\define toc-open-icon() $:/core/images/down-arrow`
* <<.var toc-closed-icon>>: `\define toc-closed-icon() $:/core/images/right-arrow`
!!! Custom Definitions
The default settings can be overwritten in your code using the define-pragma or the let-widget. The <<.wlink LetWidget>> widget can be used, if you have multiple table of contents macros in one tiddler, that need different icons.
''Define new icons using a pragma''
```
\define toc-open-icon() $:/core/images/fold-button
\define toc-closed-icon() $:/core/images/folder
...
```
''Define new icons using the let-widget''
```
<$let toc-open-icon="$:/core/images/fold-button" toc-closed-icon="$:/core/images/folder">
...
</$let>
```
!! Examples
Learn more at [[Examples|Table-of-Contents Macros (Examples)]]

View File

@ -4,7 +4,7 @@ created: 20131219100608529
delivery: DIY
description: Flexible hosting on your own machine or in the cloud
method: sync
modified: 20211003230831173
modified: 20221151230831173
tags: Saving [[TiddlyWiki on Node.js]] Windows Mac Linux
title: Installing TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
@ -12,7 +12,7 @@ type: text/vnd.tiddlywiki
# Install [[Node.js]]
#* Linux:
#*> //Debian/Ubuntu//:<br/>`apt install nodejs`<br/>May need to be followed up by:<br/>`apt install npm`
#*> //Arch Linux//<br/>`pacman -S tiddlywiki` <br/>(installs node and tiddlywiki)
#*> //Arch Linux//<br/>`yay -S tiddlywiki` <br/>(installs node and tiddlywiki)
#* Mac
#*> `brew install node`
#* Android

View File

@ -6,4 +6,4 @@ tags: SystemTags
title: SystemTag: $:/tags/ClassFilters/TiddlerTemplate
type: text/vnd.tiddlywiki
The [[system tag|SystemTags]] `$:/tags/ClassFilters/TiddlerTemplate` marks filters marks filters evaluated to dynamically add their output as CSS classes to the tiddler template.
The [[system tag|SystemTags]] `$:/tags/ClassFilters/TiddlerTemplate` marks filters evaluated to dynamically add their output as CSS classes to the tiddler template.

View File

@ -1,9 +1,9 @@
caption: $:/tags/Filter
created: 20180926170345251
description: marks filters in advanced seach sample filter dropdown
description: marks filters in advanced search sample filter dropdown
modified: 20180926171456495
tags: SystemTags
title: SystemTag: $:/tags/Filter
type: text/vnd.tiddlywiki
The [[system tag|SystemTags]] `$:/tags/Filter` marks filters in advanced seach sample filter dropdown
The [[system tag|SystemTags]] `$:/tags/Filter` marks filters in advanced search sample filter dropdown

View File

@ -0,0 +1,20 @@
created: 20220819100636227
modified: 20220819101309072
tags: [[Tables in WikiText]]
title: Table Classes, Captions, Headers and Footers
type: text/vnd.tiddlywiki
Table CSS classes, captions, headers and footers can be specified as special pseudo-rows. The following example:
* `|myclass anotherClass|k` assigns the CSS classes "myclass" and "anotherClass" to the table
* `|This is a caption |c` gives the table the caption "This is a caption"
* `|Header|Header|h` adds a header row of cells with the text "Header"
* `|Footer|Footer|f` adds a footer row of cells with the text "Footer"
<<wikitext-example-without-html src:"""|myclass anotherClass|k
|This is a caption |c
|Cell1 |Cell2 |
|Cell3 |Cell3 |
|Header|Header|h
|Footer|Footer|f
""">>

View File

@ -1,6 +1,6 @@
caption: Tables
created: 20130914132100000
modified: 20220513115945053
modified: 20220819103416274
tags: WikiText
title: Tables in WikiText
type: text/vnd.tiddlywiki
@ -66,17 +66,7 @@ To merge a table cell with the one above, use the special cell text `~`. To merg
! Table Classes, Captions, Headers and Footers
Table CSS classes, captions, headers and footers can be specified as special pseudo-rows. The following example:
{{Table Classes, Captions, Headers and Footers}}
* assigns the CSS classes "myclass" and "anotherClass" to the table
* gives the table the caption "This is a caption"
* adds a header row of cells with the text "Header"
* adds a footer row of cells with the text "Footer"
<<wikitext-example-without-html src:"""|myclass anotherClass|k
|This is a caption |c
|Cell1 |Cell2 |
|Cell3 |Cell3 |
|Header|Header|h
|Footer|Footer|f
""">>
More examples can be found at: [[Tables in WikiText CSS Utility Classes]]

View File

@ -0,0 +1,20 @@
created: 20220818093624828
modified: 20221010074235929
tags: WikiText
title: Utility Classes
type: text/vnd.tiddlywiki
<<.from-version "5.2.4">> The following outlines a few predefined CSS classes intended to make it simpler to style [[HTML block-elements|HTML Block Elements]] and [[wikitext tables|Tables in WikiText CSS Utility Classes]].
!! General Utility Classes
|`tc-center` |Centres a block-element to the middle of the container |
|`tc-max-width `|Expands a block-element to use the maximum width of the container |
|`tc-max-width-80`|Sets the width of a block-element to use 80% of the maximum container width. This setting is useful with the `tc-center` class |
|`tc-edit-max-width `|Expands [[TextWidget]]s to use the maximum available width. See [[ControlPanel -> Info -> Basics|$:/core/ui/ControlPanel/Basics]]|
|`tc-first-link-nowrap` |Ensures that any links in the first table column will never wrap to the next line |
!! Table Utility Classes
|`tc-table-no-border` |Removes the borders of a table |
|`tc-first-col-min-width` |The first column of a table will take up minimal possible width. It adapts to the content |

View File

@ -0,0 +1,4 @@
title: $:/DefaultTiddlers
[[Twitter Archives]]
HelloThere

View File

@ -0,0 +1,9 @@
title: HelloThere
!!! Welcome to the Twitter Archivist for TiddlyWiki
<$tiddler tiddler="$:/plugins/tiddlywiki/twitter-archivist">
<$set name="tabsList" filter="[list<currentTiddler>]">
<$macrocall $name="tabs" state=<<qualify "$:/state/tabs/twitter-archivist">> tabsList=<<tabsList>> default={{{ [enlist<tabsList>] }}} template="$:/core/ui/PluginInfo"/>
</$set>
</$tiddler>

View File

@ -0,0 +1,3 @@
title: $:/SiteTitle
Get Your Tweets Into ~TiddlyWiki

View File

@ -0,0 +1,3 @@
title: $:/SiteTitle
Twitter Archivist

View File

@ -0,0 +1,16 @@
{
"description": "Twitter Archivist Edition",
"plugins": [
"tiddlywiki/twitter-archivist"
],
"languages": [
],
"themes": [
"tiddlywiki/vanilla",
"tiddlywiki/snowwhite"
],
"build": {
"index": [
"--rendertiddler","$:/core/save/all","index.html","text/plain"]
}
}

View File

@ -8,7 +8,7 @@ Appearance/Hint: طرق لتخصيص مظهر وكي خاص بك.
Basics/AnimDuration/Prompt: مدة الرسوم المتحركة
Basics/AutoFocus/Prompt: موقع مؤشر الماوس الإفتراضي للتدلرز الجددة
Basics/Caption: أساسيات
Basics/DefaultTiddlers/BottomHint: إستخدم &#91;&#91;أقواس مربعة مزدوجة&#93;&#93; للعناوين مع مسافات. أو بإمكانك إختيار<$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">الإحتفاظ بترتيب القصة</$button>
Basics/DefaultTiddlers/BottomHint: إستخدم &#91;&#91;أقواس مربعة مزدوجة&#93;&#93; للعناوين مع مسافات. أو بإمكانك إختيار{{الإحتفاظ بترتيب القصة||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: تدلرز مفترضة
Basics/DefaultTiddlers/TopHint: أي تدلرز ستظهر عند التشغيل
Basics/Language/Prompt: مرحبا! اللغة الحالية:

View File

@ -7,7 +7,7 @@ Appearance/Hint: Formes de personalitzar l'aparença del vostre TiddlyWiki.
Basics/AnimDuration/Prompt: Duració de l'animació:
Basics/AutoFocus/Prompt: Focus dels nous tiddlers
Basics/Caption: Bàsic
Basics/DefaultTiddlers/BottomHint: Useu &#91;&#91;claudàtors dobles&#93;&#93; per als títols amb espais. O trieu <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">restaura la sessió anterior en arrencar</$button>
Basics/DefaultTiddlers/BottomHint: Useu &#91;&#91;claudàtors dobles&#93;&#93; per als títols amb espais. O trieu {{restaura la sessió anterior en arrencar||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Tiddlers per omissió:
Basics/DefaultTiddlers/TopHint: Trieu quins tiddlers s'han de mostrar a l'inici:
Basics/Language/Prompt: Bon dia! Trieu l'idioma:

View File

@ -6,7 +6,7 @@ Appearance/Caption: Vzhled
Appearance/Hint: Možnosti přizpůsobení vzhledu vaší TiddlyWiki.
Basics/AnimDuration/Prompt: Délka animace:
Basics/Caption: Základní
Basics/DefaultTiddlers/BottomHint: Použijte &#91;&#91;dvojité hranaté závorky&#93;&#93; pro názvy s mezerami. Nebo můžete zvolit <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">zachování toku</$button>
Basics/DefaultTiddlers/BottomHint: Použijte &#91;&#91;dvojité hranaté závorky&#93;&#93; pro názvy s mezerami. Nebo můžete zvolit {{zachování toku||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Výchozí tiddlery:
Basics/DefaultTiddlers/TopHint: Vyberte které tiddlery budou zobrazeny po spuštění:
Basics/Language/Prompt: Ahoj! Aktuální jazyk:

View File

@ -6,7 +6,7 @@ Appearance/Caption: Design
Appearance/Hint: Måder at tilpasse udseendet af din TiddlyWiki.
Basics/AnimDuration/Prompt: Animationsvarighed
Basics/Caption: Basis
Basics/DefaultTiddlers/BottomHint: Brug &#91;&#91;dobbelt firkantede parenteser&#93;&#93; for titler med mellemrum. Eller du kan vælge at <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">gemme de aktuelt åbne tiddlere</$button>
Basics/DefaultTiddlers/BottomHint: Brug &#91;&#91;dobbelt firkantede parenteser&#93;&#93; for titler med mellemrum. Eller du kan vælge at {{gemme de aktuelt åbne tiddlere||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Standardtiddlere:
Basics/DefaultTiddlers/TopHint: Vælg hvilke tiddlere der vises ved opstart:
Basics/Language/Prompt: Hallo! Aktuelt sprog:

View File

@ -7,7 +7,7 @@ Appearance/Hint: Möglichkeiten um das Aussehen Ihres ~TiddlyWikis anzupassen.
Basics/AnimDuration/Prompt: Dauer der Animation
Basics/AutoFocus/Prompt: Standard Fokus Feld für neue Tiddler
Basics/Caption: Basis
Basics/DefaultTiddlers/BottomHint: Verwenden Sie &#91;&#91;doppelte eckige Klammern&#93;&#93; für Titel mit Leerzeichen oder wählen Sie <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">Offene Tiddler beim Laden wiederherstellen.</$button>
Basics/DefaultTiddlers/BottomHint: Verwenden Sie &#91;&#91;doppelte eckige Klammern&#93;&#93; für Titel mit Leerzeichen oder wählen Sie {{Offene Tiddler beim Laden wiederherstellen.||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Standard-Tiddler
Basics/DefaultTiddlers/TopHint: Tiddler, die beim Start geladen werden
Basics/Language/Prompt: Hallo! Aktuelle Sprache

View File

@ -6,7 +6,7 @@ Appearance/Caption: Εμφάνιση
Appearance/Hint: Τρόποι για να παραμετροποιήσετε την εμφάνιση του δικού σας TiddlyWiki.
Basics/AnimDuration/Prompt: Διάρκεια κινούμενων εφέ:
Basics/Caption: Βασικά
Basics/DefaultTiddlers/BottomHint: Χρησιμοποιήστε &#91;&#91;διπλές αγκύλες &#93;&#93; για τίτλους με κενά. Ή, μπορείτε να διαλέξετε τη <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">διατήρηση της διάταξης της ιστορίας</$button>
Basics/DefaultTiddlers/BottomHint: Χρησιμοποιήστε &#91;&#91;διπλές αγκύλες &#93;&#93; για τίτλους με κενά. Ή, μπορείτε να διαλέξετε τη {{διατήρηση της διάταξης της ιστορίας||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Προκαθορισμένα tiddler:
Basics/DefaultTiddlers/TopHint: Επιλέξτε τα tiddler που θα εμφανίζονται κατά την έναρξη:
Basics/Language/Prompt: Γεια σας! Τρέχουσα γλώσσα:

View File

@ -7,7 +7,7 @@ Appearance/Hint: Personaliza la apariencia de TiddlyWiki
Basics/AnimDuration/Prompt: Duración de la animación
Basics/AutoFocus/Prompt: Campo de enfoque predeterminado para nuevos tiddlers
Basics/Caption: Básico
Basics/DefaultTiddlers/BottomHint: Usa &#91;&#91;corchetes dobles&#93;&#93; para títulos con espacios. También puedes mostrarlos ordenados <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">de más reciente a más antiguo</$button>
Basics/DefaultTiddlers/BottomHint: Usa &#91;&#91;corchetes dobles&#93;&#93; para títulos con espacios. También puedes mostrarlos ordenados {{de más reciente a más antiguo||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Tiddlers por defecto
Basics/DefaultTiddlers/TopHint: Escoge qué tiddlers se muestran al inicio
Basics/Language/Prompt: ¡Hola! Selecciona idioma actual

View File

@ -6,7 +6,7 @@ Appearance/Caption: ظاهر
Appearance/Hint: روش‌های تغییر ظاهر TiddlyWiki
Basics/AnimDuration/Prompt: طول زمان انیمیشن:
Basics/Caption: اساسی‌ها
Basics/DefaultTiddlers/BottomHint: Use &#91;&#91;double square brackets&#93;&#93; for titles with spaces. Or you can choose to <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">retain story ordering</$button>
Basics/DefaultTiddlers/BottomHint: Use &#91;&#91;double square brackets&#93;&#93; for titles with spaces. Or you can choose to {{retain story ordering||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: تیدلرهای پیش‌فرض:
Basics/DefaultTiddlers/TopHint: انتخاب کن که کدوم تیدلرها در هنگام شروع نمایش داده بشن:
Basics/Language/Prompt: سلام! زبان حاضر:

View File

@ -7,7 +7,7 @@ Appearance/Hint: Personnalisation de l'apparence de votre ~TiddlyWiki.
Basics/AnimDuration/Prompt: Durée de l'animation
Basics/AutoFocus/Prompt: Champ qui recevra le focus par défaut pour les nouveaux tiddlers
Basics/Caption: Fondamentaux
Basics/DefaultTiddlers/BottomHint: Utilisez les &#91;&#91;crochets doubles&#93;&#93; pour les titres contenant des espaces. Vous pouvez aussi décider de <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">Conserver le déroulé actuel</$button>
Basics/DefaultTiddlers/BottomHint: Utilisez les &#91;&#91;crochets doubles&#93;&#93; pour les titres contenant des espaces. Vous pouvez aussi décider de {{Conserver le déroulé actuel||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Tiddlers par défaut
Basics/DefaultTiddlers/TopHint: Liste les tiddlers qui seront affichés au démarrage :
Basics/Language/Prompt: Bonjour ! Langue active :
@ -36,7 +36,7 @@ EditorTypes/Hint: Ces tiddlers déterminent l'éditeur à utiliser pour éditer
EditorTypes/Type/Caption: Type
EditTemplateBody/Caption: Édition du corps
EditTemplateBody/Hint: Cette cascade de règles est utilisée par le template d'édition par défaut pour choisir dynamiquement le template à appliquer pour éditer le corps d'un tiddler.
FieldEditor/Caption: Éditeur de champ
FieldEditor/Caption: Édition des champs
FieldEditor/Hint: Cette cascade de règles sert à choisir dynamiquement le template de rendu d'un champ de tiddler en fonction de son nom. Il est utilisé dans le template d'édition.
Info/Caption: Info
Info/Hint: Information sur ce TiddlyWiki
@ -198,7 +198,7 @@ Settings/TitleLinks/Yes/Description: Afficher les titres des tiddlers comme des
Settings/MissingLinks/Caption: Liens wiki
Settings/MissingLinks/Hint: Peut-on pointer vers des tiddlers qui n'existent pas encore ?
Settings/MissingLinks/Description: Active les liens vers les tiddlers inexistants
StoryTiddler/Caption: Tiddler dans le déroulé
StoryTiddler/Caption: Tiddlers du déroulé
StoryTiddler/Hint: Cette cascade de règles sert à choisir dynamiquement le template d'affichage d'un tiddler dans le déroulé.
StoryView/Caption: Vue sur le déroulé
StoryView/Prompt: Vue courante :
@ -227,5 +227,5 @@ Toolbars/ViewToolbar/Hint: Choix des boutons à afficher pour les tiddlers en mo
Tools/Download/Full/Caption: Télécharger le wiki complet
ViewTemplateBody/Caption: Visualisation du corps
ViewTemplateBody/Hint: Cette cascade de règles est utilisée par le template de visualisation par défaut pour choisir dynamiquement le template d'affichage du corps d'un tiddler.
ViewTemplateTitle/Caption: Template de visualisation du titre
ViewTemplateTitle/Caption: Visualisation du titre
ViewTemplateTitle/Hint: Cette cascade de règles est utilisée par le template de visualisation par défaut pour choisir dynamiquement le template d'affichage du titre d'un tiddler.

View File

@ -8,7 +8,7 @@ Appearance/Caption: दिखावट
Appearance/Hint: आपके टिड्लीविकि को अनुकूलित रूप से दिखने के तरीके
Basics/AnimDuration/Prompt: एनीमेशन अवधि:
Basics/Caption: पहला
Basics/DefaultTiddlers/BottomHint: प्रयोग करें&#91;&#91;डबल वर्ग ब्रैकेट्स&#93;&#93;रिक्त स्थान के साथ शीर्षक के लिए। या फिर आप चुन सकते हैं<$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">retain story ordering</$button>
Basics/DefaultTiddlers/BottomHint: प्रयोग करें&#91;&#91;डबल वर्ग ब्रैकेट्स&#93;&#93;रिक्त स्थान के साथ शीर्षक के लिए। या फिर आप चुन सकते हैं{{retain story ordering||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: डिफ़ॉल्ट tiddlers:
Basics/DefaultTiddlers/TopHint: कौन सा tiddler शुरुआत मे दिखाना है
Basics/Language/Prompt: हैलो! वर्तमान भाषा:

View File

@ -6,7 +6,7 @@ Appearance/Caption: Apparentia
Appearance/Hint: Manieras de cambiar le apparentia de tu TiddlyWiki.
Basics/AnimDuration/Prompt: Animation - duration:
Basics/Caption: Basic
Basics/DefaultTiddlers/BottomHint: Usa &#91;&#91;parentheses quadrate duple&#93;&#93; pro titulos con spatios. O selige <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">mantener le ordine de historia</$button>
Basics/DefaultTiddlers/BottomHint: Usa &#91;&#91;parentheses quadrate duple&#93;&#93; pro titulos con spatios. O selige {{mantener le ordine de historia||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Notas standard:
Basics/DefaultTiddlers/TopHint: Selige qual notas es monstrate in le initio:
Basics/Language/Prompt: Hallo! Lingua actual:

View File

@ -6,7 +6,7 @@ Appearance/Caption: Aspetto
Appearance/Hint: Personalizza l'aspetto del tuo ~TiddlyWiki
Basics/AnimDuration/Prompt: Durata animazione:
Basics/Caption: Impostazioni base
Basics/DefaultTiddlers/BottomHint: Utilizza &#91;&#91;le doppie parentesi quadre&#93;&#93; per titoli di frammenti con spazi. In alternativa scegli di visualizzare i frammenti secondo la <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">cronologia</$button>
Basics/DefaultTiddlers/BottomHint: Utilizza &#91;&#91;le doppie parentesi quadre&#93;&#93; per titoli di frammenti con spazi. In alternativa scegli di visualizzare i frammenti secondo la {{cronologia||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Frammenti di default:
Basics/DefaultTiddlers/TopHint: Scegli quali frammenti vuoi visualizzare all'avvio:
Basics/Language/Prompt: Ciao! Scegli la lingua:

View File

@ -7,7 +7,7 @@ Appearance/Hint: TiddlyWiki 外観のカスタマイズ方法
Basics/AnimDuration/Prompt: アニメーション時間:
Basics/AutoFocus/Prompt: 新しい Tiddler の標準フォーカスフィールド
Basics/Caption: 基本
Basics/DefaultTiddlers/BottomHint: タイトルに空白を含めたいときは &#91;&#91;二重の角カッコ&#93;&#93; を使用してください。そのほか <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">保存時の表示を維持</$button> することもできます。
Basics/DefaultTiddlers/BottomHint: タイトルに空白を含めたいときは &#91;&#91;二重の角カッコ&#93;&#93; を使用してください。そのほか {{保存時の表示を維持||$:/snippets/retain-story-ordering-button}} することもできます。
Basics/DefaultTiddlers/Prompt: デフォルト Tiddler:
Basics/DefaultTiddlers/TopHint: このファイルを開いたときに初期表示される Tiddler を設定してください:
Basics/Language/Prompt: 現在の言語:

View File

@ -6,7 +6,7 @@ Appearance/Caption: 외관
Appearance/Hint: 티들리위키의 외관을 사용자 지정하는 방법입니다.
Basics/AnimDuration/Prompt: 애니메이션 지속 시간:
Basics/Caption: 기본
Basics/DefaultTiddlers/BottomHint: 스페이스로 되어 있는 제목에는 &#91;&#91;이중 대괄호&#93;&#93;를 사용하세요. 또는 <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">이야기 정렬 유지</$button>로 선택할 수 있습니다
Basics/DefaultTiddlers/BottomHint: 스페이스로 되어 있는 제목에는 &#91;&#91;이중 대괄호&#93;&#93;를 사용하세요. 또는 {{이야기 정렬 유지||$:/snippets/retain-story-ordering-button}}로 선택할 수 있습니다
Basics/DefaultTiddlers/Prompt: 기본 티들러:
Basics/DefaultTiddlers/TopHint: 시작할 때 표시할 티들러를 선택합니다:
Basics/Language/Prompt: 안녕! 현재 언어:

View File

@ -7,7 +7,7 @@ Appearance/Hint: Manieren om het uiterlijk van je TiddlyWiki aan te passen
Basics/AnimDuration/Prompt: Duur van de animatie:
Basics/AutoFocus/Prompt: Standaard 'focus' veld van een nieuwe tiddler
Basics/Caption: Standaard
Basics/DefaultTiddlers/BottomHint: Gebruik &#91;&#91;dubbele rechte haken&#93;&#93; voor titels met spaties. Of je kan <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]"> kiezen voor behoud van open tiddlers
Basics/DefaultTiddlers/BottomHint: Gebruik &#91;&#91;dubbele rechte haken&#93;&#93; voor titels met spaties. Of je kan {{kiezen voor behoud van open tiddlers||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Standaard tiddlers:
Basics/DefaultTiddlers/TopHint: Kies welke tiddlers bij opstarten getoond worden:
Basics/Language/Prompt: Hallo! Huidige taal:

View File

@ -7,7 +7,7 @@ Appearance/Hint: Dostosowywanie wyglądu tej TiddlyWiki
Basics/AnimDuration/Prompt: Długość animacji
Basics/AutoFocus/Prompt: Domyślne pole z fokusem dla nowych tiddlerów
Basics/Caption: Podstawowe
Basics/DefaultTiddlers/BottomHint: Używaj &#91;&#91;podwójnych nawiasów kwadratowych&#93;&#93; dla nazw ze spacjami. Możesz też <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">przywrócić ostatnią sesję</$button>
Basics/DefaultTiddlers/BottomHint: Używaj &#91;&#91;podwójnych nawiasów kwadratowych&#93;&#93; dla nazw ze spacjami. Możesz też {{przywrócić ostatnią sesję||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Domyślnie otwarte tiddlery
Basics/DefaultTiddlers/TopHint: Wybierz które tiddlery mają być widoczne przy uruchomieniu
Basics/Language/Prompt: Cześć! Wybrany język to:

View File

@ -6,7 +6,7 @@ Appearance/Caption: Aparência
Appearance/Hint: Formas de personalizar a aparência da sua TiddlyWiki.
Basics/AnimDuration/Prompt: Duração da animação:
Basics/Caption: Básicos
Basics/DefaultTiddlers/BottomHint: Utilize &#91;&#91;colchetes &#93;&#93; para títulos com espaços. Ou então <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">Clique aqui para inserir a ordem cronológica</$button>
Basics/DefaultTiddlers/BottomHint: Utilize &#91;&#91;colchetes &#93;&#93; para títulos com espaços. Ou então {{Clique aqui para inserir a ordem cronológica||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Tiddlers Padrão:
Basics/DefaultTiddlers/TopHint: Escolha quais tiddlers serão exibidos ao iniciar:
Basics/Language/Prompt: Seleção do Idioma:

View File

@ -6,7 +6,7 @@ Appearance/Caption: Aparência
Appearance/Hint: Formas de personalizar a aparência da sua TiddlyWiki.
Basics/AnimDuration/Prompt: Duração da animação:
Basics/Caption: Básicos
Basics/DefaultTiddlers/BottomHint: Utilize &#91;&#91;parêntesis rectos duplos &#93;&#93; para títulos com espaços. Ou pode escolher <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">guardar a ordem da lista</$button>
Basics/DefaultTiddlers/BottomHint: Utilize &#91;&#91;parêntesis rectos duplos &#93;&#93; para títulos com espaços. Ou pode escolher {{guardar a ordem da lista||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Tiddlers pré definidos:
Basics/DefaultTiddlers/TopHint: Escolha que tiddlers são exibidos ao iniciar:
Basics/Language/Prompt: Olá! Linguagem actual:

View File

@ -6,7 +6,7 @@ Appearance/Caption: Внешний вид
Appearance/Hint: Способы настройки внешнего вида TiddlyWiki.
Basics/AnimDuration/Prompt: Продолжительность анимации:
Basics/Caption: Основные
Basics/DefaultTiddlers/BottomHint: Заметки, содержащие пробелы нужно взять в &#91;&#91;двойные квадратные скобки&#93;&#93;. А также можно возвращать <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">открытые ранее заметки</$button>
Basics/DefaultTiddlers/BottomHint: Заметки, содержащие пробелы нужно взять в &#91;&#91;двойные квадратные скобки&#93;&#93;. А также можно возвращать {{открытые ранее заметки||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Открывать при старте:
Basics/DefaultTiddlers/TopHint: Выберите заметки открытые при запуске:
Basics/Language/Prompt: Привет! Текущий язык:

View File

@ -6,7 +6,7 @@ Appearance/Caption: Vzhľad
Appearance/Hint: Možnosti ako upraviť vzhľad vášho TiddlyWiki.
Basics/AnimDuration/Prompt: Trvanie animácie:
Basics/Caption: Základné
Basics/DefaultTiddlers/BottomHint: Pre tiddlery s medzerami v názve použite &#91;&#91;dvojité hranaté zátvorky&#93;&#93;. Alebo si môžete zvoliť <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">dodržanie poradia v story</$button>.
Basics/DefaultTiddlers/BottomHint: Pre tiddlery s medzerami v názve použite &#91;&#91;dvojité hranaté zátvorky&#93;&#93;. Alebo si môžete zvoliť {{dodržanie poradia v story||$:/snippets/retain-story-ordering-button}}.
Basics/DefaultTiddlers/Prompt: Pred-definované tiddlery:
Basics/DefaultTiddlers/TopHint: Vyberte tiddlery, ktoré sa majú zobraziť pri štarte:
Basics/Language/Prompt: Ahoj! Aktuálny jazyk:

View File

@ -6,7 +6,7 @@ Appearance/Caption: Videz
Appearance/Hint: Načini prilagoditve videza vašega TiddlyWikija.
Basics/AnimDuration/Prompt: Trajanje animacije:
Basics/Caption: Osnove
Basics/DefaultTiddlers/BottomHint: Za naslove s presledki uporabite &#91;&#91;double square brackets&#93;&#93;. Ali pa kliknite, <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">da bi ob nalaganju obnovili odprte tiddlerje.</$button>
Basics/DefaultTiddlers/BottomHint: Za naslove s presledki uporabite &#91;&#91;double square brackets&#93;&#93;. Ali pa kliknite, {{da bi ob nalaganju obnovili odprte tiddlerje.||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Privzeti tiddlerji:
Basics/DefaultTiddlers/TopHint: Izberite, kateri tiddlerji so prikazani ob zagonu:
Basics/Language/Prompt: Zdravo! Trenutni jezik:

View File

@ -6,7 +6,7 @@ Appearance/Caption: Utseende
Appearance/Hint: Möjlighet att ändra utseendet för din TiddlyWiki.
Basics/AnimDuration/Prompt: Varaktighet på animationer:
Basics/Caption: Grundläggande
Basics/DefaultTiddlers/BottomHint: Använd &#91;&#91;dubbla hakparenteser&#93;&#93; för rubriker med mellanslag. Eller kan du välja att <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">spara de öppna tiddlers</$button>
Basics/DefaultTiddlers/BottomHint: Använd &#91;&#91;dubbla hakparenteser&#93;&#93; för rubriker med mellanslag. Eller kan du välja att {{spara de öppna tiddlers||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: Standard-tiddlers:
Basics/DefaultTiddlers/TopHint: Välj vilka tiddlers som ska visas vid uppstart:
Basics/Language/Prompt: Hej! Nuvarande språk:

View File

@ -7,7 +7,7 @@ Appearance/Hint: 定制您的 TiddlyWiki 外观。
Basics/AnimDuration/Prompt: 动画持续时间
Basics/AutoFocus/Prompt: 编辑条目时的默认自动停留栏位
Basics/Caption: 基本
Basics/DefaultTiddlers/BottomHint: 标题含空白时请使用 &#91;&#91;双中括弧&#93;&#93;,或者您可用 <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">保留开启中的条目顺序</$button>
Basics/DefaultTiddlers/BottomHint: 标题含空白时请使用 &#91;&#91;双中括弧&#93;&#93;,或者您可用 {{保留开启中的条目顺序||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: 首页
Basics/DefaultTiddlers/TopHint: 默认开启的条目
Basics/Language/Prompt: 您好!当前的语言:

View File

@ -7,7 +7,7 @@ Appearance/Hint: 自訂您的 TiddlyWiki 外觀。
Basics/AnimDuration/Prompt: 動畫持續時間
Basics/AutoFocus/Prompt: 編輯條目時的預設自動停留欄位
Basics/Caption: 基本
Basics/DefaultTiddlers/BottomHint: 標題含空白時請使用 &#91;&#91;雙中括弧&#93;&#93;,或者您可用 <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">保留開啟中的條目順序</$button>
Basics/DefaultTiddlers/BottomHint: 標題含空白時請使用 &#91;&#91;雙中括弧&#93;&#93;,或者您可用 {{保留開啟中的條目順序||$:/snippets/retain-story-ordering-button}}
Basics/DefaultTiddlers/Prompt: 首頁
Basics/DefaultTiddlers/TopHint: 預設開啟的條目
Basics/Language/Prompt: 您好!當前的語言:

View File

@ -4,9 +4,13 @@ caption: Support
~TiddlyWiki is an open source project with a vibrant community of users and developers. We're always happy to help new users get the most from ~TiddlyWiki.
Join the ~TiddlyWiki mailing list:
Join the ~TiddlyWiki forum:
http://groups.google.com/group/TiddlyWiki
https://talk.tiddlywiki.org/
For the convenience of existing users, we also continue to operate the original TiddlyWiki group (hosted on Google Groups since 2005):
https://groups.google.com/group/TiddlyWiki
Post bug reports to the ~TiddlyWiki ~GitHub repository:

View File

@ -0,0 +1,5 @@
title: Twitter Archives
color: #1D9CF0
icon: $:/core/images/twitter
<<list-archives>>

View File

@ -0,0 +1,319 @@
/*\
title: $:/plugins/tiddlywiki/twitter-archivist/archivist.js
type: application/javascript
module-type: utils
Utility class for manipulating Twitter archives
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
function TwitterArchivist(options) {
options = options || {};
this.source = options.source;
}
TwitterArchivist.prototype.loadArchive = async function(options) {
options = options || {};
const wiki = options.wiki;
await this.source.init();
// Process the manifest and profile
const manifestData = await this.loadTwitterJsData("data/manifest.js","window.__THAR_CONFIG = ",""),
profileData = await this.loadTwitterJsData("data/profile.js","window.YTD.profile.part0 = ",""),
accountData = await this.loadTwitterJsData("data/account.js","window.YTD.account.part0 = ",""),
username = manifestData.userInfo.userName,
user_id = manifestData.userInfo.accountId;
wiki.addTiddler({
title: "Twitter Archive for @" + username,
icon: "$:/core/images/twitter",
color: "#1D9CF0",
tags: "$:/tags/TwitterArchive",
user_id: user_id,
username: username,
displayname: manifestData.userInfo.displayName,
generation_date: $tw.utils.stringifyDate(new Date(manifestData.archiveInfo.generationDate)),
account_created_date: $tw.utils.stringifyDate(new Date(accountData[0].account.createdAt)),
bio: profileData[0].profile.description.bio,
website: profileData[0].profile.description.website,
location: profileData[0].profile.description.location
});
// Process the media
await this.source.processFiles("data/tweets_media","base64",function(mediaItem) {
var ext = mediaItem.filename.split(".").slice(-1)[0];
if("jpg png".split(" ").indexOf(ext) !== -1) {
var extensionInfo = $tw.utils.getFileExtensionInfo("." + ext),
type = extensionInfo ? extensionInfo.type : null;
wiki.addTiddler({
title: "Tweet Media - " + mediaItem.filename,
tags: "$:/tags/TweetMedia",
status_id: mediaItem.filename.split("-")[0],
text: mediaItem.contents,
type: type
});
}
});
// Process the favourites
const likeData = await this.loadTwitterJsData("data/like.js","window.YTD.like.part0 = ","");
$tw.utils.each(likeData,function(like) {
// Create the tweet tiddler
var tiddler = {
title: "Tweet - " + like.like.tweetId,
text: "\\rules only html entity extlink\n" + (like.like.fullText || "").replace("\n","<br>"),
status_id: like.like.tweetId,
liked_by: user_id,
tags: "$:/tags/Tweet"
};
wiki.addTiddler(tiddler);
});
// Process the tweets
const tweetData = await this.loadTwitterJsData("data/tweets.js","window.YTD.tweets.part0 = ","");
$tw.utils.each(tweetData,function(tweet) {
// Compile the tags for the tweet
var tags = ["$:/tags/Tweet"];
// Accumulate the replacements/insertions to the text as an array of {startPos:,endPos:,fnTransform:}
var modifications = [];
// Modifications for mentions
var mentions = [];
$tw.utils.each(tweet.tweet.entities.user_mentions,function(mention) {
var title = "Tweeter - " + mention.id_str;
tags.push(title);
mentions.push(mention.id_str);
wiki.addTiddler({
title: title,
screenname: "@" + mention.screen_name,
tags: "$:/tags/Tweeter",
user_id: mention.id_str,
name: mention.name
});
modifications.push({
startPos: parseInt(mention.indices[0],10),
endPos: parseInt(mention.indices[1],10),
fnTransform: function(text) {
return "<$link to=\"" + title + "\">" +
$tw.utils.htmlEncode(text.substring(mention.indices[0],mention.indices[1])) +
"</$link>";
}
});
});
// Modifications for URLs
$tw.utils.each(tweet.tweet.entities.urls,function(urlInfo) {
modifications.push({
startPos: parseInt(urlInfo.indices[0],10),
endPos: parseInt(urlInfo.indices[1],10),
fnTransform: function(text) {
return "<a href=\"" + urlInfo.expanded_url + "\" rel=\"noopener noreferrer\" target=\"_blank\">" +
$tw.utils.htmlEncode(urlInfo.display_url) +
"</a>";
}
});
});
// Modifications for hashtags
$tw.utils.each(tweet.tweet.entities.hashtags,function(hashtag) {
var title = "#" + hashtag.text;
tags.push(title);
wiki.addTiddler({
title: title,
hashtag: hashtag.text,
tags: "$:/tags/Hashtag"
});
modifications.push({
startPos: parseInt(hashtag.indices[0],10),
endPos: parseInt(hashtag.indices[1],10),
fnTransform: function(text) {
return "<$link to=\"" + title + "\">" +
"#" + $tw.utils.htmlEncode(hashtag.text) +
"</$link>";
}
});
});
// Sort the modifications by start position
modifications.sort(function(a,b) {
return a.startPos - b.startPos;
});
// Apply the modifications in reverse order
var rawText = tweet.tweet.full_text,
posText = 0,
chunks = [];
$tw.utils.each(modifications,function(modification) {
// Process any text before the modification
if(modification.startPos > posText) {
chunks.push($tw.utils.htmlEncode(rawText.substring(posText,modification.startPos)));
}
// Process the modification
chunks.push(modification.fnTransform(rawText));
// Adjust the position
posText = modification.endPos;
});
// Process any remaining text
if(posText < rawText.length) {
chunks.push($tw.utils.htmlEncode(rawText.substring(posText)));
}
// Concatenate the chunks and replace newlines with <br>
var text = chunks.join("").replace("\n","<br>");
// Create the tweet tiddler
var tiddler = {
title: "Tweet - " + tweet.tweet.id_str,
text: "\\rules only html entity extlink\n" + text,
status_id: tweet.tweet.id_str,
user_id: user_id,
favorite_count: tweet.tweet.favorite_count,
retweet_count: tweet.tweet.retweet_count,
tags: tags,
created: $tw.utils.stringifyDate(new Date(tweet.tweet.created_at)),
modified: $tw.utils.stringifyDate(new Date(tweet.tweet.created_at))
};
if(tweet.tweet.in_reply_to_status_id_str) {
tiddler.in_reply_to_status_id = tweet.tweet.in_reply_to_status_id_str;
}
if(mentions.length > 0) {
tiddler.mention_user_ids = $tw.utils.stringifyList(mentions);
}
wiki.addTiddler(tiddler);
});
};
TwitterArchivist.prototype.loadTwitterJsData = async function(filePath,prefix,suffix) {
var tweetFileData = await this.source.loadTwitterJsData(filePath);
if(prefix) {
if(tweetFileData.slice(0,prefix.length) !== prefix) {
throw "Reading Twitter JS file " + filePath + " missing prefix '" + prefix + "'";
}
tweetFileData = tweetFileData.slice(prefix.length);
}
if(suffix) {
if(tweetFileData.slice(-suffix.length) !== suffix) {
throw "Reading Twitter JS file " + filePath + " missing suffix '" + suffix + "'";
}
tweetFileData = tweetFileData.slice(0,tweetFileData.length - suffix.length);
}
return JSON.parse(tweetFileData);
};
function TwitterArchivistSourceNodeJs(options) {
options = options || {};
this.archivePath = options.archivePath;
}
TwitterArchivistSourceNodeJs.prototype.init = async function() {
};
TwitterArchivistSourceNodeJs.prototype.processFiles = async function(dirPath,encoding,callback) {
var fs = require("fs"),
path = require("path"),
dirPath = path.resolve(this.archivePath,dirPath),
filenames = fs.readdirSync(dirPath);
$tw.utils.each(filenames,function(filename) {
callback({
filename: filename,
contents: fs.readFileSync(path.resolve(dirPath,filename),encoding)
});
});
};
TwitterArchivistSourceNodeJs.prototype.loadTwitterJsData = async function(filePath) {
var fs = require("fs"),
path = require("path");
return fs.readFileSync(path.resolve(this.archivePath,filePath),"utf8");
};
function TwitterArchivistSourceBrowser(options) {
options = options || {};
}
TwitterArchivistSourceBrowser.prototype.init = async function() {
// Open directory
this.rootDirHandle = await window.showDirectoryPicker();
};
TwitterArchivistSourceBrowser.prototype.processFiles = async function(dirPath,encoding,callback) {
const dirHandle = await this.walkDirectory(dirPath.split("/"));
for await (const [filename, fileHandle] of dirHandle.entries()) {
const contents = await fileHandle.getFile();
callback({
filename: filename,
contents: arrayBufferToBase64(await contents.arrayBuffer())
});
}
};
TwitterArchivistSourceBrowser.prototype.loadTwitterJsData = async function(filePath) {
const filePathParts = filePath.split("/");
const dirHandle = await this.walkDirectory(filePathParts.slice(0,-1));
const fileHandle = await dirHandle.getFileHandle(filePathParts.slice(-1)[0]);
const contents = await fileHandle.getFile();
return await contents.text();
};
TwitterArchivistSourceBrowser.prototype.walkDirectory = async function(arrayDirectoryEntries) {
var entries = arrayDirectoryEntries.slice(0),
dirHandle = this.rootDirHandle;
while(entries.length > 0) {
dirHandle = await dirHandle.getDirectoryHandle(entries[0]);
entries.shift();
}
return dirHandle;
};
// Thanks to MatheusFelipeMarinho
// https://github.com/MatheusFelipeMarinho/venom/blob/43ead0bfffa57a536a5cff67dd909e55da9f0915/src/lib/wapi/helper/array-buffer-to-base64.js#L55
function arrayBufferToBase64(arrayBuffer) {
var base64 = '';
var encodings =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var bytes = new Uint8Array(arrayBuffer);
var byteLength = bytes.byteLength;
var byteRemainder = byteLength % 3;
var mainLength = byteLength - byteRemainder;
var a, b, c, d;
var chunk;
// Main loop deals with bytes in chunks of 3
for (var i = 0; i < mainLength; i = i + 3) {
// Combine the three bytes into a single integer
chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
// Use bitmasks to extract 6-bit segments from the triplet
a = (chunk & 16515072) >> 18; // 16515072 = (2^6 - 1) << 18
b = (chunk & 258048) >> 12; // 258048 = (2^6 - 1) << 12
c = (chunk & 4032) >> 6; // 4032 = (2^6 - 1) << 6
d = chunk & 63; // 63 = 2^6 - 1
// Convert the raw binary segments to the appropriate ASCII encoding
base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d];
}
// Deal with the remaining bytes and padding
if (byteRemainder == 1) {
chunk = bytes[mainLength];
a = (chunk & 252) >> 2; // 252 = (2^6 - 1) << 2
// Set the 4 least significant bits to zero
b = (chunk & 3) << 4; // 3 = 2^2 - 1
base64 += encodings[a] + encodings[b] + '==';
} else if (byteRemainder == 2) {
chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1];
a = (chunk & 64512) >> 10; // 64512 = (2^6 - 1) << 10
b = (chunk & 1008) >> 4; // 1008 = (2^6 - 1) << 4
// Set the 2 least significant bits to zero
c = (chunk & 15) << 2; // 15 = 2^4 - 1
base64 += encodings[a] + encodings[b] + encodings[c] + '=';
}
return base64;
}
exports.TwitterArchivist = TwitterArchivist;
exports.TwitterArchivistSourceNodeJs = TwitterArchivistSourceNodeJs;
exports.TwitterArchivistSourceBrowser = TwitterArchivistSourceBrowser;
})();

View File

@ -0,0 +1,2 @@
title: $:/config/TiddlerInfo/Mode
text: sticky

View File

@ -0,0 +1,53 @@
/*\
title: $:/plugins/tiddlywiki/twitter-archivist/loadtwitterarchive.js
type: application/javascript
module-type: command
Read tiddlers from an unzipped Twitter archive
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var widget = require("$:/core/modules/widgets/widget.js");
exports.info = {
name: "loadtwitterarchive",
synchronous: false
};
var Command = function(params,commander,callback) {
this.params = params;
this.commander = commander;
this.callback = callback;
};
Command.prototype.execute = function() {
var self = this;
if(this.params.length < 1) {
return "Missing path to Twitter archive";
}
var archivePath = this.params[0];
// Load tweets
var archiveSource = new $tw.utils.TwitterArchivistSourceNodeJs({
archivePath: archivePath
}),
archivist = new $tw.utils.TwitterArchivist({
source: archiveSource
});
archivist.loadArchive({
wiki: this.commander.wiki
}).then(function() {
self.callback(null);
}).catch(function(err) {
self.callback(err);
});
return null;
};
exports.Command = Command;
})();

View File

@ -0,0 +1,222 @@
title: $:/plugins/tiddlywiki/twitter-archivist/macros
tags: $:/tags/Macro
\define skinny-tabs(tabNames,tabCaptions,defaultTab,state)
<$let
currTab={{{ [<__state__>get[text]else<__defaultTab__>] }}}
>
<div class="tc-tab-set">
<div class="tc-tab-buttons">
<$list filter="[enlist<__tabNames__>]" variable="tab" counter="tabCounter">
<$let
caption={{{ [enlist<__tabCaptions__>nth<tabCounter>] }}}
>
<$list filter="[<tab>match<currTab>]" variable="ignore">
<$button aria-checked="true" class="tc-tab-selected" role="switch">
<$action-setfield $tiddler=<<__state__>> $value=<<tab>>/>
<$text text=<<caption>>/>
</$button>
</$list>
<$list filter="[<tab>!match<currTab>]" variable="ignore">
<$button role="switch">
<$action-setfield $tiddler=<<__state__>> $value=<<tab>>/>
<$text text=<<caption>>/>
</$button>
</$list>
</$let>
</$list>
</div>
<div class="tc-tab-divider"></div>
<div class="tc-tab-content">
<$list filter="[enlist<__tabNames__>]" variable="tab" counter="tabCounter">
<$list filter="[<tab>match<currTab>]" variable="ignore">
<div class="tc-reveal">
<$macrocall $name=<<currTab>>/>
</div>
</$list>
<$list filter="[<tab>!match<currTab>]" variable="ignore">
<div class="tc-reveal" hidden="true"></div>
</$list>
</$list>
</div>
</div>
</$let>
\end
\define list-archives()
\whitespace trim
<$list filter="[tag[$:/tags/TwitterArchive]limit[1]]" emptyMessage=<<list-archives-empty>> variable="ignore">
<ul>
<$list filter="[tag[$:/tags/TwitterArchive]sort[displayname]]">
<li>
<$link><$text text=<<currentTiddler>>/></$link>
</li>
</$list>
</ul>
</$list>
\end
\define list-archives-empty()
<p style="background:#ff3;color:#333;padding:8px;font-weight:bold;">
No Twitter Archives are currently loaded
</p>
<$transclude tiddler="$:/plugins/tiddlywiki/twitter-archivist/usage" mode="block"/>
\end
\define show-archive()
<$let
user_id={{!!user_id}}
>
<div class="tc-twitter-archive">
<table>
<tbody>
<<show-archive-attribute "Username" "username" prefix:"@">>
<<show-archive-attribute "Display Name" "displayname">>
<<show-archive-attribute "Bio" "bio">>
<<show-archive-attribute "Location" "location">>
<<show-archive-attribute "Website" "website">>
<<show-archive-calculated-attribute "Number of Tweets" "[tag[$:/tags/Tweet]field:user_id<user_id>count[]]">>
<<show-archive-calculated-attribute "Number of Favorites Received" "[tag[$:/tags/Tweet]field:user_id<user_id>] :reduce[<currentTiddler>get[favorite_count]else[0]add<accumulator>]">>
<<show-archive-calculated-attribute "Number of Retweets Received" "[tag[$:/tags/Tweet]field:user_id<user_id>] :reduce[<currentTiddler>get[retweet_count]else[0]add<accumulator>]">>
<<show-archive-calculated-attribute "Number of Tweeters Mentioned" "[tag[$:/tags/Tweeter]count[]]">>
<<show-archive-attribute "User ID" "user_id">>
<<show-archive-attribute "Account Creation Date" "account_created_date" format:"date" template:"DDth mmm YYYY 0hh:0mm:0ss">>
<<show-archive-attribute "Archive Generation Date" "generation_date" format:"date" template:"DDth mmm YYYY 0hh:0mm:0ss">>
</tbody>
</table>
<$macrocall $name="skinny-tabs" tabNames="show-archive-tweets show-favorited-tweets" tabCaptions="Tweets Favourites" defaultTab="show-archive-tweets" state=<<qualify "$:/state/skinny-tabs/archive">>/>
</div>
</$let>
\end
\define show-archive-tweets()
<$let user_id={{!!user_id}}>
<$list filter="[tag[$:/tags/Tweet]field:user_id<user_id>!sort[created]limit[50]]">
<<show-tweet>>
</$list>
</$let>
\end
\define show-favorited-tweets()
<$let user_id={{!!user_id}}>
<$list filter="[tag[$:/tags/Tweet]field:liked_by<user_id>limit[50]]">
<<show-tweet>>
</$list>
</$let>
\end
\define show-archive-attribute(caption,field,prefix,format:"text",template)
<tr>
<th>
<$text text=<<__caption__>>/>
</th>
<td>
<$text text={{{ [<__prefix__>] }}}/>
<$view field=<<__field__>> format=<<__format__>> template=<<__template__>>/>
</td>
</tr>
\end
\define show-archive-calculated-attribute(caption,filter)
<tr>
<th>
<$text text=<<__caption__>>/>
</th>
<td>
<$text text={{{ [subfilter<__filter__>] }}}/>
</td>
</tr>
\end
\define show-tweet()
<div class="tc-twitter-tweet">
<div class="tc-twitter-tweet-header">
<$list filter="[<currentTiddler>has[user_id]]" variable="ignore">
<$let archive={{{ [tag[$:/tags/TwitterArchive]field:user_id{!!user_id}] }}}>
<span class="tc-twitter-tweet-header-displayname">
<$text text={{{ [<archive>get[displayname]] }}}/>
</span>
<span class="tc-twitter-tweet-header-username">
@<$text text={{{ [<archive>get[username]] }}}/>
</span>
</$let>
</$list>
<$link to=<<currentTiddler>>>
<span class="tc-twitter-tweet-header-date">
<$view field="created" format="date" template="DDth mmm YYYY 0hh:0mm:0ss"/>
</span>
</$link>
</div>
<$list filter="[<currentTiddler>get[in_reply_to_status_id]addprefix[Tweet - ]is[tiddler]]" variable="replyTo">
<div class="tc-twitter-tweet-reply-to">
Reply to <$link to=<<replyTo>>><$text text=<<replyTo>>/></$link>
</div>
</$list>
<div class="tc-twitter-tweet-body">
<$transclude field="text"/>
</div>
<div class="tc-twitter-tweet-media">
<$list filter="[tag[$:/tags/TweetMedia]field:status_id{!!status_id}]" variable="mediaItem">
<$transclude tiddler=<<mediaItem>>/>
</$list>
</div>
<div class="tc-twitter-tweet-footer">
<$list filter="[<currentTiddler>has[retweet_count]]" variable="ignore">
<span class="tc-twitter-tweet-footer-retweets">
Retweets: <$view field="retweet_count" format="text"/>
</span>
</$list>
<$list filter="[<currentTiddler>has[favorite_count]]" variable="ignore">
<span class="tc-twitter-tweet-footer-likes">
Likes: <$view field="favorite_count" format="text"/>
</span>
</$list>
<span class="tc-twitter-tweet-footer-twitter-link">
<a href={{{ [{!!status_id}addprefix[https://twitter.com/i/web/status/]] }}} rel="noopener noreferrer" target="_blank">View on Twitter</a>
</span>
</div>
</div>
\end
\define show-tweet-thread(archive)
<div class="tc-twitter-tweet-thread">
<$list filter="[<currentTiddler>has[in_reply_to_status_id]]" variable="ignore">
<div class="tc-twitter-tweet-reply">
<$tiddler tiddler={{{ [<currentTiddler>get[in_reply_to_status_id]addprefix[Tweet - ]] }}}>
<$macrocall $name="show-tweet"/>
</$tiddler>
</div>
</$list>
<$macrocall $name="show-tweet"/>
</div>
\end
\define show-tweeter()
<table>
<tbody>
<tr><th>Username</th><td><$text text={{!!screenname}}/></td></tr>
<tr><th>Display Name</th><td><$text text={{!!name}}/></td></tr>
<tr><th>User ID</th><td><$text text={{!!user_id}}/></td></tr>
</tbody>
</table>
<a href={{{ [{!!user_id}addprefix[https://twitter.com/intent/user?user_id=]] }}} rel="noopener noreferrer" target="_blank">View on Twitter</a>
<$macrocall $name="skinny-tabs" tabNames="show-tweeter-mentions" tabCaptions="Mentions" defaultTab="show-tweeter-mentions" state=<<qualify "$:/state/skinny-tabs/tweeter-mentions">>/>
\end
\define show-tweeter-mentions()
<$list filter="[tag[$:/tags/Tweet]tag<currentTiddler>]">
<$macrocall $name="show-tweet" title=<<currentTiddler>>/>
</$list>
\end
\define show-hashtag()
<a href={{{ [{!!user_id}addprefix[https://twitter.com/intent/user?user_id=]] }}} rel="noopener noreferrer" target="_blank">View on Twitter</a>
<$macrocall $name="skinny-tabs" tabNames="show-hashtag-tweets" tabCaptions="Tweets" defaultTab="show-hashtag-tweets" state=<<qualify "$:/state/skinny-tabs/hashtag-tweets">>/>
\end
\define show-hashtag-tweets()
<$list filter="[tag[$:/tags/Tweet]tag<currentTiddler>]">
<$macrocall $name="show-tweet" title=<<currentTiddler>>/>
</$list>
\end

View File

@ -0,0 +1,6 @@
{
"title": "$:/plugins/tiddlywiki/twitter-archivist",
"name": "Twitter Archivist",
"description": "Twitter archiving tools",
"list": "readme usage spec todo"
}

View File

@ -0,0 +1,33 @@
title: $:/plugins/tiddlywiki/twitter-archivist/readme
! Introduction
The Twitter Archivist imports the tweets and associated media from a [[Twitter Archive|https://help.twitter.com/en/managing-your-account/how-to-download-your-twitter-archive]] as individual tiddlers.
The first step is to request your Tweet archive from Twitter. Once it is available, download file compressed file and unzip it.
! Installation
For browser-based wikis, drag and drop this link to install the Twitter Archivist plugin in your own wikis (note that a reload will be required after installing the plugin and saving the wiki):
{{$:/plugins/tiddlywiki/twitter-archivist||$:/core/ui/Components/plugin-info}}
For Node.js-based wikis, add `tiddlywiki/twitter-archivist` to the `plugin` section of `tiddlywiki.info`:
```
...
"plugins": [
"tiddlywiki/twitter-archivist"
],
...
```
! Limitations of Twitter Archives
The Twitter Archive format itself has many shortcomings which affect this tool:
* Retweets come through as old-school RTs, which means that they are often truncated
* Likes only have minimal information, lacking date, author and mentions
* Twitter archives can be delivered in multiple parts, but this tool has only been tested with single archives. It is hoped that cumulatively importing each of the archives in turn should work
A future version of this tool may use the Twitter API to get around these restrictions.

View File

@ -0,0 +1,62 @@
title: $:/plugins/tiddlywiki/twitter-archivist/spec
! Twitter Archivist Data Model
The Twitter Archivist imports the following tiddlers:
* A single tiddler tagged <<tag "$:/tags/TwitterArchive">> containing details about the archive
* Tweets/favourites represented by tiddlers tagged <<tag "$:/tags/Tweet">>
* Twitter users represented by tiddlers tagged <<tag "$:/tags/Tweeter">>
* Tweet images/videos represented by tiddlers tagged <<tag "$:/tags/TweetMedia">>
!! Twitter Archive Tiddler Fields
|!Field |!Description |
|''account_created_date'' |Date of account creation (in TiddlyWiki format) |
|''bio'' |Account biography |
|''displayname'' |Account displayname |
|''generation_date'' |Date of archive generation (in TiddlyWiki format) |
|''location'' |Account location |
|''tags'' |`$:/tags/TwitterArchive` |
|''title'' |Formed from `Twitter Archive for @` concatenated with the account username |
|''user_id'' |Unique numeric identifier for account |
|''username'' |Account username |
|''website'' |Account website |
!! Tweet Tiddler Fields
|!Field |!Description |
|''created'' |Tweet creation date (in TiddlyWiki format) |
|''favorite_count'' |Number of favourites received by this tweet |
|''mention_user_ids'' |Optional list of user IDs mentioned in the tweet |
|''modified'' |Tweet creation date (in TiddlyWiki format) |
|''retweet_count'' |Number of retweets received by this tweet |
|''status_id'' |Unique numeric identifier for tweet |
|''tags'' |`$:/tags/Tweet` along with the titles of any tweeters mentioned in the tweet |
|''text'' |The text of the tweet (see below) |
|''title'' |Formed from `Tweet - ` concatenated with the tweet ID |
|''user_id'' |Unique numeric identifier for tweeter of this tweet |
The text of the tweet includes the following changes:
* The pragma `\rules only html entity extlink` is prepended to restrict the parse rules recognised within the text
* Mentions are linked to the associated tweeter tiddler
* Line breaks are replaced by `<br/>`
!! Tweeter Tiddler Fields
|!Field |!Description |
|''name'' |Account displayname |
|''screenname'' |Account screenname (including the @) |
|''tags'' |`$:/tags/Tweeter` |
|''title'' |Formed from `Tweeter - ` concatenated with the account ID |
|''user_id'' |Unique numeric identifier for account |
!! Tweet Media Fields
|!Field |!Description |
|''status_id'' |Identifier of tweet associated with this media item |
|''tags'' |`$:/tags/TweetMedia` |
|''text'' |The body of the media item |
|''title'' |Formed from `Tweet Media - ` concatenated with the ID of the associated tweet and a further unique identifier |
|''type'' |`image/jpg`, `image/png` or `video/mp4` |

View File

@ -0,0 +1,38 @@
/*\
title: $:/plugins/tiddlywiki/twitter-archivist/startup.js
type: application/javascript
module-type: startup
Twitter initialisation
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
exports.name = "twitter-archivist";
exports.after = ["startup"];
exports.synchronous = true;
exports.startup = function() {
$tw.rootWidget.addEventListener("tm-load-twitter-archive",function(event) {
// Load tweets
var archiveSource = new $tw.utils.TwitterArchivistSourceBrowser({
}),
archivist = new $tw.utils.TwitterArchivist({
source: archiveSource
});
archivist.loadArchive({
wiki: $tw.wiki
}).then(function() {
alert("Archived tweets imported");
}).catch(function(err) {
alert("Error importing archived tweets: " + err);
});
});
};
})();

View File

@ -0,0 +1,47 @@
title: $:/plugins/tiddlywiki/twitter-archivist/styles
tags: [[$:/tags/Stylesheet]]
code-body: yes
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock
.tc-twitter-tweet {
border: 1px solid <<colour muted-foreground>>;
border-radius: 8px;
margin: 1em 0;
padding: 1em;
}
.tc-twitter-tweet-reply {
font-size: 0.7em;
}
.tc-twitter-tweet-reply .tc-twitter-tweet {
margin: 0.5em 0 0.5em 1em;
padding: 0.5em;
}
.tc-twitter-tweet-header-displayname {
font-weight: bold;
}
.tc-twitter-tweet-header-username,
.tc-twitter-tweet-header-date {
color: #536471;
}
.tc-twitter-tweet-reply-to {
font-size: 0.7em;
}
.tc-twitter-tweet-body {
margin: 0.25em 0;
line-height: 1.3;
}
.tc-twitter-tweet-reply .tc-twitter-tweet-body {
margin: 0.5em 0;
}
.tc-twitter-tweet-footer {
font-size: 0.8em;
}

View File

@ -0,0 +1,3 @@
title: $:/plugins/tiddlywiki/twitter-archivist/template/archive
<<show-archive>>

View File

@ -0,0 +1,3 @@
title: $:/plugins/tiddlywiki/twitter-archivist/template/hashtag
<<show-hashtag>>

View File

@ -0,0 +1,3 @@
title: $:/plugins/tiddlywiki/twitter-archivist/template/tweet
<<show-tweet-thread>>

View File

@ -0,0 +1,3 @@
title: $:/plugins/tiddlywiki/twitter-archivist/template/tweeter
<<show-tweeter>>

View File

@ -0,0 +1,15 @@
title: $:/plugins/tiddlywiki/twitter-archivist/todo
!! Done
* Fixed display of tweet account information
* Data model documentation
* Expand t.co URLs
!! To Do
* Wikify hashtags
* Import direct messages
* Control over which media types are imported
* `_canonical_uri` support for media
* Handle editable tweets

View File

@ -0,0 +1,18 @@
title: $:/plugins/tiddlywiki/twitter-archivist/usage
! In the Browser
To import a Twitter archive in the browser, click the button below and navigate to the root of the archive:
<$button>
<$action-sendmessage $message="tm-load-twitter-archive"/>
Open Twitter archive
</$button>
! Under Node.js
To import a Twitter archive under Node.js, use the `--loadtwitterarchive` command:
```
tiddlywiki editions/twitter-archivist/ --loadtwitterarchive '/path/to/archive' --build index
```

View File

@ -0,0 +1,8 @@
title: $:/plugins/tiddlywiki/twitter-archivist/view-template-body-cascade
tags: $:/tags/ViewTemplateBodyFilter
list-before:
[tag[$:/tags/Tweet]then[$:/plugins/tiddlywiki/twitter-archivist/template/tweet]]
[tag[$:/tags/TwitterArchive]then[$:/plugins/tiddlywiki/twitter-archivist/template/archive]]
[tag[$:/tags/Tweeter]then[$:/plugins/tiddlywiki/twitter-archivist/template/tweeter]]
[tag[$:/tags/Hashtag]then[$:/plugins/tiddlywiki/twitter-archivist/template/hashtag]]

View File

@ -6,7 +6,9 @@ tags: $:/tags/AboveStory
<div class="tc-upgrade-wizard">
! ~TiddlyWiki Upgrade Wizard
! Upgrade Wizard
!! ~TiddlyWiki version <<version>>
<$list filter="[[$:/Import]is[missing]]">
@ -48,8 +50,6 @@ For help and support, visit [[the TiddlyWiki discussion forum|http://groups.goog
</div>
version <<version>>
//Your data will not leave your browser. <a href="#" download="upgrade.html">Download</a> this upgrader to use it offline//
//If clicking the link doesn't work, right-click the link and save it that way.//

View File

@ -326,7 +326,7 @@ table {
}
table th, table td {
padding: 0 7px 0 7px;
padding: 4px 6px 4px 6px;
border-top: 1px solid <<colour table-border>>;
border-left: 1px solid <<colour table-border>>;
}
@ -357,11 +357,36 @@ Table utility classes
width: 1%;
}
/*
** Utility classes work well with tables but also for other containers
*/
/* First link A element will not wrap */
.tc-first-link-nowrap:first-of-type a {
white-space: nowrap;
}
/* Move the table to the center of the container */
.tc-center {
margin-left: auto;
margin-right: auto;
}
.tc-max-width {
width: 100%;
}
.tc-max-width-80 {
max-width: 80%;
}
/* Allow input and textarea to look like the ControlPanel inputs */
.tc-edit-max-width input,
.tc-edit-max-width textarea {
width: 100%;
padding: 3px;
}
/*
CSV parser plugin
*/