OcttKB Cross-Repo Sync (HTML to Raw)

This commit is contained in:
octospacc 2023-09-26 06:21:32 +00:00
parent 82f7427ba6
commit b4d7e7e4bb
28 changed files with 276 additions and 12 deletions

View File

@ -0,0 +1,5 @@
created: 20230319153234115
modified: 20230319153234115
title: $:/DefaultTiddlers
[list[$:/StoryList]else[$:/plugins/btheado/BrowserStorage]]

View File

@ -0,0 +1,3 @@
created: 20220419183248949
modified: 20220419183248949
title: $:/config/SaverFilter

View File

@ -0,0 +1,9 @@
caption: bx-cylinder
category:
collection: Regular
library: Boxicons
library_version: 2.0.7
tags: $:/tags/Image Icons Images SVG
title: $:/images/boxicons/regular/bx-cylinder
<svg width="22pt" height="22pt" class="tc-image-bxi-bx-cylinder tc-image-button" viewBox="0 0 24 24"><path d="M12,22c5.131,0,9-1.935,9-4.5V7h-0.053C20.98,6.836,21,6.67,21,6.5C21,3.935,17.131,2,12,2C7.209,2,3.52,3.688,3.053,6H3 v11.5C3,20.065,6.869,22,12,22z M12,20c-4.273,0-7-1.48-7-2.5V9.394C6.623,10.387,9.111,11,12,11s5.377-0.613,7-1.606V17.5 C19,18.52,16.273,20,12,20z M12,4c4.273,0,7,1.48,7,2.5S16.273,9,12,9S5,7.52,5,6.5S7.727,4,12,4z"/></svg>

View File

@ -0,0 +1,9 @@
tags: $:/tags/ViewToolbar
title: $:/plugins/btheado/BrowserStorage/Buttons/browser-storage-info
\whitespace trim
<$list filter="[enlist{$:/temp/BrowserStorage/Log}match<currentTiddler>] [haschanged[]subfilter{$:/config/BrowserStorage/SaveFilter}match<currentTiddler>] :and[first[]]">
<$button to="$:/plugins/btheado/BrowserStorage/backup" tooltip="this tiddler is stored in browser storage" aria-label="this tiddler is stored in browser storage" class=<<tv-config-toolbar-class>>>
{{$:/images/boxicons/regular/bx-cylinder}}
</$button>
</$list>

View File

@ -0,0 +1,64 @@
created: 20220728010037807
modified: 20220728012526627
tags:
title: $:/plugins/btheado/BrowserStorage/FilteredTreeMacro
\define leaf-link(full-title,chunk,separator: "/")
<$link to=<<__full-title__>>><$text text=<<__chunk__>>/></$link>
\end
\define leaf-node(prefix,chunk)
\whitespace trim
<li>
<$list filter="[<__prefix__>addsuffix<__chunk__>is[shadow]] [<__prefix__>addsuffix<__chunk__>is[tiddler]]" variable="full-title">
<$list filter="[<full-title>removeprefix<__prefix__>]" variable="chunk">
<span>{{$:/core/images/file}}</span>&#32;<$macrocall $name="leaf-link" full-title=<<full-title>> chunk=<<chunk>>/>
</$list>
</$list>
</li>
\end
\define branch-node(prefix,chunk,separator: "/", filter)
\whitespace trim
<li>
<$set name="reveal-state" value={{{ [[$:/state/tree/]addsuffix<__prefix__>addsuffix<__chunk__>] }}}>
<$reveal type="nomatch" stateTitle=<<reveal-state>> text="show">
<$button setTitle=<<reveal-state>> setTo="show" class="tc-btn-invisible">
{{$:/core/images/folder}}&#32;<$text text=<<__chunk__>>/>
</$button>
</$reveal>
<$reveal type="match" stateTitle=<<reveal-state>> text="show">
<$button setTitle=<<reveal-state>> setTo="hide" class="tc-btn-invisible">
{{$:/core/images/folder}}&#32;<$text text=<<__chunk__>>/>
</$button>
</$reveal>
&#32;
<span>(<$count filter="[all[shadows+tiddlers]subfilter<__filter__>removeprefix<__prefix__>removeprefix<__chunk__>] -[<__prefix__>addsuffix<__chunk__>]"/>)</span>
<$reveal type="match" stateTitle=<<reveal-state>> text="show">
<$macrocall $name="tree-node" prefix={{{ [<__prefix__>addsuffix<__chunk__>] }}} separator=<<__separator__>> filter=<<__filter__>>/>
</$reveal>
</$set>
</li>
\end
\define tree-node(prefix,separator: "/", filter)
\whitespace trim
<ol>
<$list filter="[all[shadows+tiddlers]subfilter<__filter__>removeprefix<__prefix__>splitbefore<__separator__>sort[]!suffix<__separator__>]" variable="chunk">
<$macrocall $name="leaf-node" prefix=<<__prefix__>> chunk=<<chunk>> separator=<<__separator__>>/>
</$list>
<$list filter="[all[shadows+tiddlers]subfilter<__filter__>removeprefix<__prefix__>splitbefore<__separator__>sort[]suffix<__separator__>]" variable="chunk">
<$macrocall $name="branch-node" prefix=<<__prefix__>> chunk=<<chunk>> separator=<<__separator__>> filter=<<__filter__>>/>
</$list>
</ol>
\end
\define tree(prefix: "$:/",separator: "/", filter: "[all[]]")
\whitespace trim
<div class="tc-tree">
<span><$text text=<<__prefix__>>/></span>
<div>
<$macrocall $name="tree-node" prefix=<<__prefix__>> separator=<<__separator__>> filter=<<__filter__>>/>
</div>
</div>
\end

View File

@ -0,0 +1,5 @@
created: 20220419183248949
modified: 20220419183248949
title: $:/plugins/btheado/BrowserStorage/SaveFilter
[all[]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]]

View File

@ -0,0 +1,8 @@
created: 20230319150404819
modified: 20230319150821620
tags:
title: $:/plugins/btheado/BrowserStorage/StartupMessage
<$navigator story="$:/StoryList">
<$text text={{{[enlist{$:/temp/BrowserStorage/Log}count[]]}}}/> tiddlers loaded from local browser storage. Be sure to periodically [[backup|$:/plugins/btheado/BrowserStorage/backup]] your file.
</$navigator>

View File

@ -0,0 +1,13 @@
caption: Storage
created: 20230316194806701
modified: 20230316195309773
tags: $:/tags/MoreSideBar
title: $:/plugins/btheado/BrowserStorage/TiddlerStorageCounts
!! {{$:/plugins/btheado/BrowserStorage/TiddlersLoadedFromBrowserStorage!!caption}}
{{$:/plugins/btheado/BrowserStorage/TiddlersLoadedFromBrowserStorage}}
---
!! {{$:/plugins/btheado/BrowserStorage/TiddlersChangedSinceStartup!!caption}}
{{$:/plugins/btheado/BrowserStorage/TiddlersChangedSinceStartup}}

View File

@ -0,0 +1,20 @@
caption: Tiddlers saved to browser storage since startup
created: 20220730015851691
modified: 20220730020122508
tags:
title: $:/plugins/btheado/BrowserStorage/TiddlersChangedSinceStartup
<$importvariables filter="[[$:/plugins/btheado/BrowserStorage/FilteredTreeMacro]]">
<table><tr>
<th>System tiddlers</th><th>Other tiddlers</th>
</tr>
<tr>
<td><<tree prefix: "$:/" filter: "[haschanged[]subfilter{$:/config/BrowserStorage/SaveFilter}] -$:/config/BrowserStorage/Enabled">></td><td>
{{{[haschanged[]subfilter{$:/config/BrowserStorage/SaveFilter}!prefix[$:/]]}}}
</td>
</tr></table>
</$importvariables>

View File

@ -0,0 +1,20 @@
caption: Tiddlers loaded from browser storage
created: 20220730015639992
modified: 20220731222040644
tags:
title: $:/plugins/btheado/BrowserStorage/TiddlersLoadedFromBrowserStorage
<$importvariables filter="[[$:/plugins/btheado/BrowserStorage/FilteredTreeMacro]]">
<table><tr>
<th>System tiddlers</th><th>Other tiddlers</th>
</tr>
<tr>
<td><<tree prefix: "$:/" filter: "[enlist{$:/temp/BrowserStorage/Log}]">></td><td>
{{{[enlist{$:/temp/BrowserStorage/Log}!prefix[$:/]]}}}
</td>
</tr></table>
</$importvariables>

View File

@ -0,0 +1,39 @@
created: 20220727011104055
modified: 20220731013334922
tags:
title: $:/plugins/btheado/BrowserStorage/backup
\define download-storage-tiddlers-as-json()
<$action-sendmessage
$message="tm-download-file"
$param="$:/core/templates/exporters/JsonFile"
exportFilter="[enlist{$:/temp/BrowserStorage/Log}] [haschanged[]subfilter{$:/config/BrowserStorage/SaveFilter}] -$:/config/BrowserStorage/Enabled"
filename={{{[[$:/config/SaveWikiButton/Filename]get[text]else[tiddlers]addsuffix[.json]]}}}/>
\end
Have you downloaded a backup file recently?
Click this button {{$:/core/ui/Buttons/save-wiki}} to download a new backup copy of your wiki.
Downloaded backups provide extra copies of the tiddler data stored in browser local storage. The backup is a single, self-contained html file and it also includes all the source code required to run this wiki.
Here is a summary of the tiddlers in browser local storage:
|!Loaded at startup|<$link to="$:/plugins/btheado/BrowserStorage/TiddlersLoadedFromBrowserStorage"><$text text={{{[enlist{$:/temp/BrowserStorage/Log}count[]]}}}/> tiddlers</$link>|
|!Saved since startup|<$link to="$:/plugins/btheado/BrowserStorage/TiddlersChangedSinceStartup"><$text text={{{[haschanged[]subfilter{$:/config/BrowserStorage/SaveFilter}] -$:/config/BrowserStorage/Enabled :and[count[]]}}}/> tiddlers</$link>|
|!Total (unique)|<$text text={{{[enlist{$:/temp/BrowserStorage/Log}] [haschanged[]subfilter{$:/config/BrowserStorage/SaveFilter}] -$:/config/BrowserStorage/Enabled :and[unique[]count[]]}}}/> tiddlers <$button tooltip="download browser storage tiddlers as json" aria-label="download browser storage tiddlers as json" actions=<<download-storage-tiddlers-as-json>> class=<<tv-config-toolbar-class>>> {{$:/core/images/export-button}} </$button>|
The browser local storage tiddlers are not present in the source url: {{$:/info/url/full}}, but they will be saved whenever you download a backup copy {{$:/core/ui/Buttons/save-wiki}}.
If you don't have access to update the wiki file at {{$:/info/url/full}}, then consider performing the following steps:
# download a backup {{$:/core/ui/Buttons/save-wiki}}
# copy the download to a documents or some other folder folder
# load it into the browser via a file:/// url (i.e. double clicking the file in a file explorer should open it in the browser).
If you do have access to update the wiki file at {{$:/info/url/full}}, then it is best to
# Overwrite it periodically with the latest downloaded backup {{$:/core/ui/Buttons/save-wiki}}.
# Upon reload any data already in the wiki file will be cleared from the browser storage.
Beware of the privacy implications of browser local storage tiddlers and file:/// urls. The browser storage contents are shared across all file:/// urls. This means any html loaded from a file:/// url can read those browser storage tiddlers.

View File

@ -0,0 +1,10 @@
title: $:/plugins/btheado/BrowserStorage/readme
This plugin contains opinionated configuration settings for the [[browser-storage plugin|$:/plugins/tiddlywiki/browser-storage]]:
* [[Configures|$:/plugins/tiddlywiki/browser-storage/settings]] the browser storage plugin to save more tiddlers than the default
* Since the tiddlers are automatically saved to local storage, the [[SaverFilter|$:/config/SaverFilter]] is configured to leave the save icon inert
* Automatically save open tiddlers between sessions (see $:/DefaultTiddlers)
* [[Instructions|$:/plugins/btheado/BrowserStorage/backup]] on using the save button as a way to backup the wiki
* [[Browse-able list|$:/plugins/btheado/BrowserStorage/TiddlerStorageCounts]] of tiddlers which were loaded from storage and those which were saved to storage after load
* Displays a [[notification message|$:/plugins/btheado/BrowserStorage/StartupMessage]] at startup telling how many tiddlers were loaded from browser storage

View File

@ -0,0 +1,15 @@
created: 20220731143327842
modified: 20220731164653068
tags: $:/tags/StartupAction/Browser
title: $:/plugins/btheado/BrowserStorage/startup/SetSaverFilter
<!--
When two different plugins have the same tiddler, then plugin load order
dictates which will be used. Instead of relying on order, use a startup
action to copy the tiddler over top the default one. But once the shadow
tiddler exists (and possibly further modified by the user), do not overwrite
it anymore.
-->
<$list filter="$:/config/BrowserStorage/SaveFilter -[is[tiddler]]">
<$action-setfield $tiddler="$:/config/BrowserStorage/SaveFilter" text={{$:/plugins/btheado/BrowserStorage/SaveFilter}}/>
</$list>

View File

@ -0,0 +1,8 @@
created: 20230319151028372
modified: 20230319151854263
tags: $:/tags/StartupAction/PostRender
title: $:/plugins/btheado/BrowserStorage/startup/notify
<$list filter="[enlist{$:/temp/BrowserStorage/Log}first[]]">
<$action-sendmessage $message="tm-notify" $param="$:/plugins/btheado/BrowserStorage/StartupMessage"/>
</$list>

View File

@ -0,0 +1,11 @@
{
"title": "$:/plugins/btheado/BrowserStorage",
"description": "Opinionated configuration settings for the browser-storage plugin",
"author": "Brian Theado",
"core-version": ">=5.2.3",
"plugin-priority": "20",
"list": "readme backup",
"version": "0.1.0",
"plugin-type": "plugin",
"dependents": ""
}

View File

@ -1,5 +1,5 @@
created: 20230925181532831
created: 20230926062126882
current-tiddler: GettingStarted
modified: 20230925181532831
modified: 20230926062126882
title: $:/HistoryList
type: application/json

View File

@ -1,8 +1,6 @@
modified: 20230919181132853
modifier: Octt
status: complete
title: $:/Import
The following tiddlers were imported:
# [[$:/Res/silence.opus]]
# [[$:/plugins/btheado/BrowserStorage]]

View File

@ -1,6 +1,6 @@
created: 20230925173322935
created: 20230926061954174
creator: Octt
list:
modified: 20230925173941925
modified: 20230926061954174
modifier: Octt
title: $:/StoryList

View File

@ -0,0 +1,3 @@
title: $:/config/BrowserStorage/Enabled
yes

View File

@ -0,0 +1,3 @@
title: $:/info/browser/storage/persisted
not requested yet

View File

@ -1,6 +1,6 @@
created: 20220920090405977
creator: Octt
modified: 20230925173326111
modified: 20230926061116777
modifier: Octt
title: $:/state/tab-1749438307

View File

@ -1,6 +1,6 @@
created: 20220920091923734
creator: Octt
modified: 20230404141559071
modified: 20230926061021641
modifier: Octt
title: $:/state/tab-2065006209

View File

@ -0,0 +1,7 @@
created: 20230926061008598
creator: Octt
modified: 20230926061008598
modifier: Octt
title: $:/state/plugin-info--1223675686-$:/plugins/tiddlywiki/browser-storage
no

View File

@ -0,0 +1,7 @@
created: 20230926062017966
creator: Octt
modified: 20230926062019458
modifier: Octt
title: $:/state/plugin-info--372949414-$:/plugins/btheado/BrowserStorage--1503532932
backup

View File

@ -0,0 +1,7 @@
created: 20230926062008979
creator: Octt
modified: 20230926062016152
modifier: Octt
title: $:/state/plugin-info--372949414-$:/plugins/btheado/BrowserStorage
yes

View File

@ -1,6 +1,6 @@
created: 20230925173654392
creator: Octt
modified: 20230925173745464
modified: 20230926061216843
modifier: Octt
title: $:/state/plugin-info-1867135918-$:/plugins/tiddlywiki/browser-storage

View File

@ -1,6 +1,6 @@
created: 20220920092307479
creator: Octt
modified: 20230925181459976
modified: 20230926062002862
modifier: Octt
title: $:/state/tab/sidebar--595412856

View File

@ -1,3 +1,3 @@
title: $:/status/RequireReloadDueToPluginChange
yes
no