diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af030458e..3d39d6280 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,12 +11,12 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ env.NODE_VERSION }}" - run: "./bin/ci-test.sh" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: playwright-report @@ -31,8 +31,8 @@ jobs: TW5_BUILD_MAIN_EDITION: "./editions/prerelease" TW5_BUILD_OUTPUT: "./output/prerelease" steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ env.NODE_VERSION }}" - run: "./bin/ci-pre-build.sh" @@ -63,8 +63,8 @@ jobs: TW5_BUILD_OUTPUT: "./output" TW5_BUILD_ARCHIVE: "./output" steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ env.NODE_VERSION }}" - run: "./bin/ci-pre-build.sh" diff --git a/boot/boot.js b/boot/boot.js index ab403aa5a..f1f6e4906 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -232,10 +232,10 @@ $tw.utils.error = function(err) { var link = dm("a"), text = JSON.stringify(tiddlers); if(Blob !== undefined) { - var blob = new Blob([text], {type: "text/html"}); + var blob = new Blob([text], {type: "application/json"}); link.setAttribute("href", URL.createObjectURL(blob)); } else { - link.setAttribute("href","data:text/html," + encodeURIComponent(text)); + link.setAttribute("href","data:application/json," + encodeURIComponent(text)); } link.setAttribute("download","emergency-tiddlers-" + (new Date()) + ".json"); document.body.appendChild(link); @@ -2463,13 +2463,15 @@ $tw.boot.initStartup = function(options) { $tw.utils.registerFileType("image/webp","base64",".webp",{flags:["image"]}); $tw.utils.registerFileType("image/heic","base64",".heic",{flags:["image"]}); $tw.utils.registerFileType("image/heif","base64",".heif",{flags:["image"]}); + $tw.utils.registerFileType("image/avif","base64",".avif",{flags:["image"]}); $tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]}); $tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("application/wasm","base64",".wasm"); - $tw.utils.registerFileType("application/font-woff","base64",".woff"); - $tw.utils.registerFileType("application/x-font-ttf","base64",".woff"); - $tw.utils.registerFileType("application/font-woff2","base64",".woff2"); + $tw.utils.registerFileType("font/woff","base64",".woff"); + $tw.utils.registerFileType("font/woff2","base64",".woff2"); + $tw.utils.registerFileType("font/ttf","base64",".ttf"); + $tw.utils.registerFileType("font/otf","base64",".otf"); $tw.utils.registerFileType("audio/ogg","base64",".ogg"); $tw.utils.registerFileType("audio/mp4","base64",[".mp4",".m4a"]); $tw.utils.registerFileType("video/ogg","base64",[".ogm",".ogv",".ogg"]); diff --git a/core/acknowledgements.tid b/core/acknowledgements.tid index cb54e3d23..e1015e2c9 100644 --- a/core/acknowledgements.tid +++ b/core/acknowledgements.tid @@ -5,7 +5,3 @@ TiddlyWiki incorporates code from these fine OpenSource projects: * [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]] * [[The Jasmine JavaScript Test Framework|https://jasmine.github.io/]] * [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]] - -And media from these projects: - -* World flag icons from [[Wikipedia|http://commons.wikimedia.org/wiki/Category:SVG_flags_by_country]] diff --git a/core/images/language.tid b/core/images/language.tid new file mode 100644 index 000000000..bb4061495 --- /dev/null +++ b/core/images/language.tid @@ -0,0 +1,5 @@ +title: $:/core/images/language +tags: $:/tags/Image + +\parameters (size:"22pt") +> height=<> class="tc-image-language tc-image-button" viewBox="0 0 92 92"> \ No newline at end of file diff --git a/core/language/en-GB/icon.tid b/core/language/en-GB/icon.tid deleted file mode 100644 index 1967b895f..000000000 --- a/core/language/en-GB/icon.tid +++ /dev/null @@ -1,13 +0,0 @@ -title: $:/languages/en-GB/icon -type: image/svg+xml - - - - - - - - - - - diff --git a/core/modules/filters/function.js b/core/modules/filters/function.js index 79210fb78..bc0702cf4 100644 --- a/core/modules/filters/function.js +++ b/core/modules/filters/function.js @@ -17,19 +17,24 @@ Export our filter function */ exports.function = function(source,operator,options) { var functionName = operator.operands[0], - params = []; + params = [], + results; $tw.utils.each(operator.operands.slice(1),function(param) { params.push({value: param}); }); + // console.log(`Calling ${functionName} with params ${JSON.stringify(params)}`); var variableInfo = options.widget && options.widget.getVariableInfo && options.widget.getVariableInfo(functionName,{params: params, source: source}); if(variableInfo && variableInfo.srcVariable && variableInfo.srcVariable.isFunctionDefinition) { - return variableInfo.resultList ? variableInfo.resultList : [variableInfo.text]; + results = variableInfo.resultList ? variableInfo.resultList : [variableInfo.text]; } // Return the input list if the function wasn't found - var results = []; - source(function(tiddler,title) { - results.push(title); - }); + if(!results) { + results = []; + source(function(tiddler,title) { + results.push(title); + }); + } + // console.log(`function ${functionName} with params ${JSON.stringify(params)} results: ${JSON.stringify(results)}`); return results; }; diff --git a/core/modules/parsers/imageparser.js b/core/modules/parsers/imageparser.js index a964a4ba8..d594803b2 100644 --- a/core/modules/parsers/imageparser.js +++ b/core/modules/parsers/imageparser.js @@ -40,6 +40,7 @@ exports["image/gif"] = ImageParser; exports["image/webp"] = ImageParser; exports["image/heic"] = ImageParser; exports["image/heif"] = ImageParser; +exports["image/avif"] = ImageParser; exports["image/x-icon"] = ImageParser; exports["image/vnd.microsoft.icon"] = ImageParser; diff --git a/core/modules/saver-handler.js b/core/modules/saver-handler.js index 23056bcc2..e760fd8f1 100644 --- a/core/modules/saver-handler.js +++ b/core/modules/saver-handler.js @@ -46,8 +46,10 @@ function SaverHandler(options) { // Filter the changes so that we only count changes to tiddlers that we care about var filteredChanges = self.filterFn.call(self.wiki,function(iterator) { $tw.utils.each(changes,function(change,title) { - var tiddler = self.wiki.getTiddler(title); - iterator(tiddler,title); + if(change.normal) { + var tiddler = self.wiki.getTiddler(title); + iterator(tiddler,title); + } }); }); // Adjust the number of changes @@ -183,7 +185,7 @@ SaverHandler.prototype.saveWiki = function(options) { // Call the highest priority saver that supports this method for(var t=this.savers.length-1; t>=0; t--) { var saver = this.savers[t]; - if(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback,{variables: {filename: variables.filename}})) { + if(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback,{variables: {filename: variables.filename, type: variables.type}})) { this.logger.log("Saving wiki with method",method,"through saver",saver.info.name); return true; } diff --git a/core/modules/savers/download.js b/core/modules/savers/download.js index 0a1d565ce..003c332c3 100644 --- a/core/modules/savers/download.js +++ b/core/modules/savers/download.js @@ -22,6 +22,7 @@ DownloadSaver.prototype.save = function(text,method,callback,options) { options = options || {}; // Get the current filename var filename = options.variables.filename; + var type = options.variables.type; if(!filename) { var p = document.location.pathname.lastIndexOf("/"); if(p !== -1) { @@ -32,13 +33,16 @@ DownloadSaver.prototype.save = function(text,method,callback,options) { if(!filename) { filename = "tiddlywiki.html"; } + if(!type) { + type = "text/html"; + } // Set up the link var link = document.createElement("a"); if(Blob !== undefined) { - var blob = new Blob([text], {type: "text/html"}); + var blob = new Blob([text], {type: type}); link.setAttribute("href", URL.createObjectURL(blob)); } else { - link.setAttribute("href","data:text/html," + encodeURIComponent(text)); + link.setAttribute("href","data:" + type + "," + encodeURIComponent(text)); } link.setAttribute("download",filename); document.body.appendChild(link); diff --git a/core/modules/startup/plugins.js b/core/modules/startup/plugins.js index fc8ba9589..af354c38e 100644 --- a/core/modules/startup/plugins.js +++ b/core/modules/startup/plugins.js @@ -75,7 +75,7 @@ exports.startup = function() { $tw.wiki.unpackPluginTiddlers(); // Queue change events for the changed shadow tiddlers $tw.utils.each(Object.keys(changedShadowTiddlers),function(title) { - $tw.wiki.enqueueTiddlerEvent(title,changedShadowTiddlers[title]); + $tw.wiki.enqueueTiddlerEvent(title,changedShadowTiddlers[title], true); }); } } diff --git a/core/modules/startup/rootwidget.js b/core/modules/startup/rootwidget.js index d96d569c3..95e902db6 100644 --- a/core/modules/startup/rootwidget.js +++ b/core/modules/startup/rootwidget.js @@ -77,8 +77,9 @@ exports.startup = function() { $tw.rootWidget.addEventListener("tm-copy-to-clipboard",function(event) { $tw.utils.copyToClipboard(event.param,{ successNotification: event.paramObject && event.paramObject.successNotification, - failureNotification: event.paramObject && event.paramObject.failureNotification - }); + failureNotification: event.paramObject && event.paramObject.failureNotification, + plainText: event.paramObject && event.paramObject.plainText + },event.paramObject && event.paramObject.type); }); // Install the tm-focus-selector message $tw.rootWidget.addEventListener("tm-focus-selector",function(event) { diff --git a/core/modules/tiddler.js b/core/modules/tiddler.js index b0b6e6942..d8d67bf77 100644 --- a/core/modules/tiddler.js +++ b/core/modules/tiddler.js @@ -40,10 +40,10 @@ exports.getFieldString = function(field,defaultValue) { }; /* -Get the value of a field as a list +Get the value of a field as an array / list */ exports.getFieldList = function(field) { - var value = this.fields[field]; + var value = this.getFieldString(field,null); // Check for a missing field if(value === undefined || value === null) { return []; diff --git a/core/modules/utils/dom/dom.js b/core/modules/utils/dom/dom.js index 0b71e128c..5f33bbeea 100644 --- a/core/modules/utils/dom/dom.js +++ b/core/modules/utils/dom/dom.js @@ -268,9 +268,10 @@ exports.copyStyles = function(srcDomNode,dstDomNode) { /* Copy plain text to the clipboard on browsers that support it */ -exports.copyToClipboard = function(text,options) { - options = options || {}; - text = text || ""; +exports.copyToClipboard = function(text,options,type) { + var text = text || ""; + var options = options || {}; + var type = type || "text/plain"; var textArea = document.createElement("textarea"); textArea.style.position = "fixed"; textArea.style.top = 0; @@ -283,10 +284,16 @@ exports.copyToClipboard = function(text,options) { textArea.style.outline = "none"; textArea.style.boxShadow = "none"; textArea.style.background = "transparent"; - textArea.value = text; document.body.appendChild(textArea); textArea.select(); textArea.setSelectionRange(0,text.length); + textArea.addEventListener("copy",function(event) { + event.preventDefault(); + if (options.plainText) { + event.clipboardData.setData("text/plain",options.plainText); + } + event.clipboardData.setData(type,text); + }); var succeeded = false; try { succeeded = document.execCommand("copy"); diff --git a/core/modules/utils/dom/http.js b/core/modules/utils/dom/http.js index f16f1c512..37a7855a5 100644 --- a/core/modules/utils/dom/http.js +++ b/core/modules/utils/dom/http.js @@ -216,11 +216,11 @@ HttpClientRequest.prototype.send = function(callback) { if(lengthComputable) { setBinding(self.bindProgress,"" + Math.floor((loaded/total) * 100)) } - self.wiki.invokeActionString(self.progressActions,undefined,{ + self.wiki.invokeActionString(self.progressActions,undefined,$tw.utils.extend({},self.variables,{ lengthComputable: lengthComputable ? "yes" : "no", loaded: loaded, total: total - },{parentWidget: $tw.rootWidget}); + }),{parentWidget: $tw.rootWidget}); } }); } diff --git a/core/modules/widgets/checkbox.js b/core/modules/widgets/checkbox.js index bf0a7bb79..9d3a07414 100644 --- a/core/modules/widgets/checkbox.js +++ b/core/modules/widgets/checkbox.js @@ -157,7 +157,7 @@ CheckboxWidget.prototype.getValue = function() { if(this.checkboxTag) { return false; } - if(this.checkboxField) { + if(this.checkboxField || this.checkboxIndex) { if(this.checkboxDefault === this.checkboxChecked) { return true; } diff --git a/core/modules/widgets/edit.js b/core/modules/widgets/edit.js index eb7758e90..e4433e1da 100644 --- a/core/modules/widgets/edit.js +++ b/core/modules/widgets/edit.js @@ -43,15 +43,6 @@ EditWidget.prototype.execute = function() { // Get our parameters this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler")); this.editField = this.getAttribute("field","text"); - this.editIndex = this.getAttribute("index"); - this.editClass = this.getAttribute("class"); - this.editPlaceholder = this.getAttribute("placeholder"); - this.editTabIndex = this.getAttribute("tabindex"); - this.editFocus = this.getAttribute("focus",""); - this.editCancelPopups = this.getAttribute("cancelPopups",""); - this.editInputActions = this.getAttribute("inputActions"); - this.editRefreshTitle = this.getAttribute("refreshTitle"); - this.editAutoComplete = this.getAttribute("autocomplete"); // Choose the appropriate edit widget this.editorType = this.getEditorType(); // Make the child widgets @@ -89,8 +80,8 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of */ EditWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - // Refresh if an attribute has changed, or the type associated with the target tiddler has changed - if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (this.getEditorType() !== this.editorType)) { + // Refresh if the editor type has changed + if(changedAttributes.tiddler || changedAttributes.field || (this.getEditorType() !== this.editorType)) { this.refreshSelf(); return true; } else { diff --git a/core/modules/widgets/fill.js b/core/modules/widgets/fill.js index de88c95af..870bf7878 100644 --- a/core/modules/widgets/fill.js +++ b/core/modules/widgets/fill.js @@ -24,6 +24,10 @@ Inherit from the base widget class */ FillWidget.prototype = new Widget(); +FillWidget.prototype.execute = function() { + // Do nothing. Make no child widgets. $Fill widgets should be invisible when naturally encountered. Instead, their parseTreeNodes are made available to $slot widgets that want it. +}; + exports.fill = FillWidget; })(); diff --git a/core/modules/widgets/genesis.js b/core/modules/widgets/genesis.js index 299be1e48..a527553ad 100644 --- a/core/modules/widgets/genesis.js +++ b/core/modules/widgets/genesis.js @@ -23,15 +23,21 @@ Inherit from the base widget class */ GenesisWidget.prototype = new Widget(); +GenesisWidget.prototype.computeAttributes = function(options) { + options = options || Object.create(null); + options.filterFn = function(name) { + // Only compute our own attributes which start with a single dollar + return name.charAt(0) === "$" && name.charAt(1) !== "$"; + } + return Widget.prototype.computeAttributes.call(this,options); +}; + /* Render this widget into the DOM */ GenesisWidget.prototype.render = function(parent,nextSibling) { this.parentDomNode = parent; - this.computeAttributes({filterFn: function(name) { - // Only compute our own attributes which start with a single dollar - return name.charAt(0) === "$" && name.charAt(1) !== "$"; - }}); + this.computeAttributes(); this.execute(); this.renderChildren(parent,nextSibling); }; diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 620f4eccf..928a2e847 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -141,12 +141,15 @@ This method should be called after the changes it describes have been made to th title: Title of tiddler isDeleted: defaults to false (meaning the tiddler has been created or modified), true if the tiddler has been deleted + isShadow: defaults to false (meaning the change applies to the normal tiddler), + true if the tiddler being changed is a shadow tiddler */ -exports.enqueueTiddlerEvent = function(title,isDeleted) { +exports.enqueueTiddlerEvent = function(title,isDeleted,isShadow) { // Record the touch in the list of changed tiddlers this.changedTiddlers = this.changedTiddlers || Object.create(null); this.changedTiddlers[title] = this.changedTiddlers[title] || Object.create(null); this.changedTiddlers[title][isDeleted ? "deleted" : "modified"] = true; + this.changedTiddlers[title][isShadow ? "shadow" : "normal"] = true; // Increment the change count this.changeCount = this.changeCount || Object.create(null); if($tw.utils.hop(this.changeCount,title)) { diff --git a/core/palettes/FlexokiDark.tid b/core/palettes/FlexokiDark.tid index 53fa35330..05e53edf5 100644 --- a/core/palettes/FlexokiDark.tid +++ b/core/palettes/FlexokiDark.tid @@ -78,13 +78,13 @@ code-background: <> code-border: <> code-foreground: <> diff-delete-background: <> -diff-delete-foreground: <> +diff-delete-foreground: <> diff-equal-background: diff-equal-foreground: inherit diff-insert-background: <> -diff-insert-foreground: <> +diff-insert-foreground: <> diff-invisible-background: <> -diff-invisible-foreground: <> +diff-invisible-foreground: <> dirty-indicator: <> download-background: <> download-foreground: <> @@ -103,8 +103,8 @@ external-link-foreground-visited: <> external-link-foreground: <> footnote-target-background: <> foreground: #CECDC3 -highlight-background: <> -highlight-foreground: <> +highlight-background: <> +highlight-foreground: inherit menubar-background: <> menubar-foreground: <> message-background: <> diff --git a/core/palettes/FlexokiLight.tid b/core/palettes/FlexokiLight.tid index abf506387..c3c4d2f25 100644 --- a/core/palettes/FlexokiLight.tid +++ b/core/palettes/FlexokiLight.tid @@ -105,7 +105,7 @@ external-link-foreground-visited: <> external-link-foreground: <> footnote-target-background: <> foreground: #100F0F -highlight-background: <> +highlight-background: <> highlight-foreground: inherit menubar-background: <> menubar-foreground: <> diff --git a/core/templates/exporters/CsvFile.tid b/core/templates/exporters/CsvFile.tid index 23d3bbd73..724827d89 100644 --- a/core/templates/exporters/CsvFile.tid +++ b/core/templates/exporters/CsvFile.tid @@ -2,5 +2,6 @@ title: $:/core/templates/exporters/CsvFile tags: $:/tags/Exporter description: {{$:/language/Exporters/CsvFile}} extension: .csv +file-type: text/csv <$macrocall $name="csvtiddlers" filter=<> format="quoted-comma-sep" $output="text/raw"/> diff --git a/core/templates/exporters/JsonFile.tid b/core/templates/exporters/JsonFile.tid index 9008906cc..2ae5495c1 100644 --- a/core/templates/exporters/JsonFile.tid +++ b/core/templates/exporters/JsonFile.tid @@ -2,5 +2,6 @@ title: $:/core/templates/exporters/JsonFile tags: $:/tags/Exporter description: {{$:/language/Exporters/JsonFile}} extension: .json +file-type: application/json <$macrocall $name="jsontiddlers" filter=<> $output="text/raw"/> diff --git a/core/templates/exporters/TidFile.tid b/core/templates/exporters/TidFile.tid index 7b0bb2d78..94f9744a8 100644 --- a/core/templates/exporters/TidFile.tid +++ b/core/templates/exporters/TidFile.tid @@ -2,6 +2,7 @@ title: $:/core/templates/exporters/TidFile tags: $:/tags/Exporter description: {{$:/language/Exporters/TidFile}} extension: .tid +file-type: text/vnd.tiddlywiki condition: [compare:lte[1]] \define renderContent() diff --git a/core/ui/PageControls/advanced-search.tid b/core/ui/PageControls/advanced-search.tid index 4aa49e6e5..4d13d16e3 100644 --- a/core/ui/PageControls/advanced-search.tid +++ b/core/ui/PageControls/advanced-search.tid @@ -5,6 +5,7 @@ description: {{$:/language/Buttons/AdvancedSearch/Hint}} \whitespace trim \procedure advanced-search-button(class) +\whitespace trim <$button to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`> <%if [match[yes]] %> {{$:/core/images/advanced-search-button}} diff --git a/core/ui/PageControls/controlpanel.tid b/core/ui/PageControls/controlpanel.tid index 8b9db8d9a..6413db21d 100644 --- a/core/ui/PageControls/controlpanel.tid +++ b/core/ui/PageControls/controlpanel.tid @@ -5,6 +5,7 @@ description: {{$:/language/Buttons/ControlPanel/Hint}} \whitespace trim \procedure control-panel-button(class) +\whitespace trim <$button to="$:/ControlPanel" tooltip={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`> <%if [match[yes]] %> {{$:/core/images/options-button}} diff --git a/core/ui/PageControls/language.tid b/core/ui/PageControls/language.tid index 3315b5a23..085b3bfd9 100644 --- a/core/ui/PageControls/language.tid +++ b/core/ui/PageControls/language.tid @@ -7,11 +7,7 @@ description: {{$:/language/Buttons/Language/Hint}} <$button popup=<> tooltip={{$:/language/Buttons/Language/Hint}} aria-label={{$:/language/Buttons/Language/Caption}} class=<> selectedClass="tc-selected"> <%if [match[yes]] %> - - <$set name="languagePluginTitle" value={{$:/language}}> - <$image source=`$(languagePluginTitle)$/icon`/> - - +{{$:/core/images/language}} <%endif%> <%if [match[yes]] %> <$text text={{$:/language/Buttons/Language/Caption}}/> diff --git a/core/ui/PageControls/manager.tid b/core/ui/PageControls/manager.tid index 3cc364f80..1b966a214 100644 --- a/core/ui/PageControls/manager.tid +++ b/core/ui/PageControls/manager.tid @@ -5,6 +5,7 @@ description: {{$:/language/Buttons/Manager/Hint}} \whitespace trim \procedure manager-button(class) +\whitespace trim <$button to="$:/Manager" tooltip={{$:/language/Buttons/Manager/Hint}} aria-label={{$:/language/Buttons/Manager/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`> <%if [match[yes]] %> {{$:/core/images/list}} diff --git a/core/ui/PageControls/savewiki.tid b/core/ui/PageControls/savewiki.tid index 7e6a18ccc..1d833c35d 100644 --- a/core/ui/PageControls/savewiki.tid +++ b/core/ui/PageControls/savewiki.tid @@ -4,10 +4,17 @@ caption: {{$:/core/images/save-button-dynamic}} {{$:/language/Buttons/SaveWiki/C description: {{$:/language/Buttons/SaveWiki/Hint}} \whitespace trim -<$button tooltip={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class=<>> +\procedure saveActions() <$wikify name="site-title" text={{$:/config/SaveWikiButton/Filename}}> -<$action-sendmessage $message="tm-save-wiki" $param={{$:/config/SaveWikiButton/Template}} filename=<>/> + <$action-sendmessage $message="tm-save-wiki" $param={{$:/config/SaveWikiButton/Template}} filename=<>/> +\end + +<$button actions=<> + tooltip={{$:/language/Buttons/SaveWiki/Hint}} + aria-label={{$:/language/Buttons/SaveWiki/Caption}} + class=<> +> <%if [match[yes]] %> {{$:/core/images/save-button-dynamic}} diff --git a/core/ui/PageControls/tag-button.tid b/core/ui/PageControls/tag-button.tid index 6c04804ce..8b1a45226 100644 --- a/core/ui/PageControls/tag-button.tid +++ b/core/ui/PageControls/tag-button.tid @@ -5,6 +5,7 @@ description: {{$:/language/Buttons/TagManager/Hint}} \whitespace trim \procedure control-panel-button(class) +\whitespace trim <$button to="$:/TagManager" tooltip={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`> <%if [match[yes]] %> {{$:/core/images/tag-button}} diff --git a/core/wiki/languageswitcher.tid b/core/wiki/languageswitcher.tid index 48422fca1..7d79c0f5c 100644 --- a/core/wiki/languageswitcher.tid +++ b/core/wiki/languageswitcher.tid @@ -1,25 +1,12 @@ title: $:/snippets/languageswitcher -\define flag-title() -$(languagePluginTitle)$/icon -\end \whitespace trim - <$linkcatcher to="$:/language">
<$list filter="[[$:/languages/en-GB]] [plugin-type[language]sort[description]]"> -<$set name="cls" filter="[all[current]field:title{$:/language}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
>> +<$set name="cls" filter="[all[current]field:title{$:/language}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"> +
> lang={{!!name}}> <$link> - -<$set name="languagePluginTitle" value=<>> -<$transclude subtiddler=<>> -<$list filter="[all[current]field:title[$:/languages/en-GB]]"> -<$transclude tiddler="$:/languages/en-GB/icon"/> - - - - - <$view field="description"> <$view field="name"> <$view field="title"/> diff --git a/core/wiki/macros/copy-to-clipboard.tid b/core/wiki/macros/copy-to-clipboard.tid index d05d014e2..f299cf955 100644 --- a/core/wiki/macros/copy-to-clipboard.tid +++ b/core/wiki/macros/copy-to-clipboard.tid @@ -3,9 +3,11 @@ tags: $:/tags/Macro \whitespace trim -\procedure copy-to-clipboard(src,class:"tc-btn-invisible",style) -<$button message="tm-copy-to-clipboard" - param=<> +\procedure copy-to-clipboard(src,class:"tc-btn-invisible",style,type:"text/plain",plain) +\procedure copy-to-clipboard-actions() +<$action-sendmessage $message="tm-copy-to-clipboard" $param=<> type=<> plainText=<>/> +\end copy-to-clipboard-actions +<$button actions=<> class=<> style=< - diff --git a/editions/ja-JP/tiddlers/nodejs/Building TiddlyWikiClassic.tid b/editions/ja-JP/tiddlers/nodejs/Building TiddlyWikiClassic.tid new file mode 100644 index 000000000..9cb789c59 --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/Building TiddlyWikiClassic.tid @@ -0,0 +1,27 @@ +created: 20131129094452285 +modified: 20241227110457591 +original-modified: 20140912141658212 +tags: [[TiddlyWiki on Node.js]] +title: Building TiddlyWikiClassic +ja-title: TiddlyWikiClassicの構築 +type: text/vnd.tiddlywiki + +TiddlyWiki5を使用すれば、TiddlyWikiClassicの古いバージョン2.xxをその構成コンポーネントから構築できます。これには次の機能が含まれます: + +* `tiddlywiki/classictools`プラグインには、TiddlyWiki 2.xxの`.recipe`ファイルからTiddlerをロードできるようにするデシリアライザモジュールが含まれています +* ViewWidgetのための`stripcomments`フォーマットは、`//#`で始まる1行のJavaScriptコメントを削除します +* FieldsWidgetの`stripTitlePrefix='yes'`属性は、`title`属性から中括弧で囲まれたプレフィックスを削除します +** 例えば、`{tiddler}HelloThere`は、`HelloThere`に変換されます + +! 使用法 + +TiddlyWikiClassicは、[[Node.js上のTiddlyWiki|TiddlyWiki on Node.js]]を実行することによってコマンドラインから構築されます。一般的な使用法は次のようになります: + +``` +node ../../tiddlywiki.js \ + --verbose \ + --load \ + --rendertiddler $:/core/templates/tiddlywiki2.template.html text/plain \ + || exit 1 +``` + diff --git a/editions/ja-JP/tiddlers/nodejs/Customising Tiddler File Naming.tid b/editions/ja-JP/tiddlers/nodejs/Customising Tiddler File Naming.tid new file mode 100644 index 000000000..5f92f1b0e --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/Customising Tiddler File Naming.tid @@ -0,0 +1,58 @@ +created: 20160424181300000 +modified: 20241230104855826 +original-modified: 20210803204659026 +tags: [[TiddlyWiki on Node.js]] +title: Customising Tiddler File Naming +ja-title: Tiddlerファイル名のカスタマイズ +type: text/vnd.tiddlywiki + +デフォルトでは、[[Wikiフォルダー|TiddlyWikiFolders]]を使用する[[Node.js上のTiddlyWiki|TiddlyWiki on Node.js]]インスタンスは、サニタイズされ、曖昧さが解消されたタイトルをファイル名として使用して、新しいTiddlerファイルを作成します。すべてのファイルパス操作は、`default-tiddler-location`からの相対で、デフォルトではWikiフォルダーの`tiddlers/`ディレクトリです。`config`オブジェクトの`default-tiddler-location`プロパティを使用して、Wikiのtiddlywiki.infoファイル内のパスをマッピングすることで、これを上書きできます。 + +デフォルトのファイル拡張子`.tid`は、`type`フィールドが欠落しているTiddlerや、"text/vnd.tiddlywiki"タイプが"text/vnd.tiddlywiki"のTiddlerに使用されます。他のタイプのTiddlerは、(ブートスタートアップ時に定義される)MIMEタイプに従って保存されます。 + +オプションのTiddler[[$:/config/FileSystemPaths]]と[[$:/config/FileSystemExtensions]]を作成することにより、論理パス(ディレクトリとファイル名)とファイル拡張子を個別にカスタマイズできます。 + +! ファイルシステムパス + +論理パスは、1つ以上の[[フィルター式|Filter Syntax]](各フィルター式は1行に1つずつ)を含む[[$:/config/FileSystemPaths]] Tiddlerを作成することでカスタマイズできます。Tiddlerがディスクに保存されるたびに、各フィルターが順番にテストされ、出力を生成する最初のフィルターの最初の出力が、Tiddlerファイルに使用される論理パスとして取得されます。論理パスが変更された場合は、新しいファイルが作成され、古いファイルは削除されます。 + +Tiddlerは、[[Wikiフォルダ|TiddlyWikiFolders]]、`default-tiddler-location`設定で定義されたパス、または $:/config/OriginalTiddlerPaths Tiddlerに保存された特定のパス([[tiddlywiki.filesファイル|tiddlywiki.files Files]]を参照)にのみ書き込むことができます。Tiddlerをディスクに保存するときに、論理パスがWikiフォルダのパスで始まらない(最も一般的なエラー)と、ファイルパスがJavascriptの`encodeURIComponent()`メソッドによってエンコードされ、Wi​​kiフォルダの`default-tiddler-location`にTiddlerがファイルとして保存されます。 + +論理パスにはディスク上のファイルの拡張子は含まれません(下記参照)。また、ディレクトリ区切り文字として`/`や`\`を使用できます(物理パスを生成するときに、~TiddlyWikiが動作しているプラ​​ットフォームの正しい区切り文字に置き換えられます)。フィルターがどれも一致しない場合、論理パスは、結果のパスがすべてのサポートされているプラ​​ットフォームで有効であることを保証するため、すべての`/\<>~:"|?*^`文字が`_`に置き換えられたタイトルになります。論理パスも200文字に制限されています。この名前のファイルがすでに存在する場合、スペースと数字が最終的なファイルパスに追加され、未使用のパスが見つかるまで数字が増加していきます。 + +!! 例 + +``` +[is[system]!has[draft.of]removeprefix[$:/]addprefix[_system/]] +[is[draft]search-replace:g:regexp[/|\\],[_]addprefix[drafts/]] +[tag[task]addprefix[mytasks/]] +[!tag[externalnote]addprefix[wiki/]] +``` + +<<.note "すべてのパスはWikiの`default-tiddler-location`からの相対パスです。">> + +これにより、他のTiddlerの下書きではない、新しく作成されたシステムTiddlerが`./_system/`(`$:/`プレフィックスの削除後)に保存されます。次に、すべての下書きのタイトルのパス区切り文字が"_"に置き換えられ、`./drafts/`に保存されます。そして、[[task]]タグが付けられたTiddlerがサブディレクトリ`./mytasks/`に保存されます。最後に、"externalnote"タグが付けられていないすべてのTiddlerが最終的に`[!tag[externalnote]addprefix[wiki/]]`に一致し、これらが`./wiki/`に保存されます。この例では、"externalnote"タグが付けられたTiddlerが[[tiddlywiki.filesファイル|tiddlywiki.files Files]]を使用してインポートされています。"isEditableFile"フラグがtrueに設定されているファイルにより、サーバーは$:/config/OriginalTiddlerPaths Tiddlerに元のファイルパスを記憶します。 + +Tiddlerが $:/config/FileSystemPaths フィルターのマッチを生成するたびに、Tiddlerのタイトル内の`/`や`\`がパス区切り文字にマップされます。上記のフィルターを使用すると、非システム、非ドラフトのTillder(タグなし)`some/thing/entirely/new`が`./wiki/some/thing/entirely/new.tid`に保存されます(つまり、`entirely/`というディレクトリ内の`new.tid`ファイル)。したがって、プラットフォームに応じて、 $:/config/FileSystemPaths 自体は`./_system/config/FileSystemPaths.tid`や`.\_system\config\FileSystemPaths.tid`に保存されます。 + +! ファイルシステム拡張子 + +通常、ディスク上のTiddlerのファイルシステム拡張子は、改行を含むフィールド値や空白で始まるか終わる(テキストフィールド以外の)フィールド値の存在によって決定されます。この場合、単一ファイル".json" Tiddlerファイル形式が使用されます。 + +Tiddlerにこのようなフィールド値がない場合、`type`フィールドが参照され、一致するファイルタイプが検索されます。タイプ値のないTiddlerの場合は`.tid`が使用されます。ブートエンジンは、[[$:/boot/boot.js]] Tiddlerで、Tiddlerタイプとファイルタイプの関係のセットを定義します。これらの関係を定義するコードのセクションを見つけるには、`// Add file extension information`を検索してください。 + +個々のTiddlerのファイル拡張子は、1つ以上の[[フィルタ式|Filter Syntax]](各行に1つずつ)を含むTiddler[[$:/config/FileSystemExtensions]]を作成することでカスタマイズできます。Tiddlerがディスクに保存されるたびに、これらのフィルタに対してテストされ、出力を生成する最初のフィルタの最初の出力が、Tiddlerファイルに使用されるファイル拡張子として使用されます。拡張子は常に先頭にドットを付ける必要があります(例を参照)。一致するフィルタがない場合は、デフォルトの拡張子が使用されます。拡張子が変更された場合は、新しいファイルが作成され、古いファイルは削除されます。 + +<<.note """".tid"の結果は、Tiddlerを単一ファイルのテキストTiddlerとしてディスクに書き込むことを強制します。".json"の結果は、Tiddlerをjson形式(配列内の単一のTiddler フィールドオブジェクト)の単一ファイルTiddlerとしてディスクに書き込むことを強制します。"application/json"タイプのTiddlerとしては書き込まれません。認識されるその他のすべてのファイルタイプは、定義された拡張子を使用して保存され、"text"フィールド以外のすべてのフィールドを説明する同じ名前の *.meta ファイルが付随します。""">> + +!! 例 + +``` +[tag[.txt]then[.txt]] +[tag[.json]then[.json]] +[tag[.tid]then[.tid]] +``` + +これにより、タグ".txt"を持つすべてのTiddlerが、ファイルシステムのパスフィルターによって決定されたファイルパスに保存されますが、テキストフィールドは *.txt ファイルとして保存され、その他のすべてのフィールドは *.txt.meta ファイルとして保存されます。 + +次に、".json"タグを持つすべてのTiddlerが *.json ファイルとして保存されます。最後に、タグ".tid"を持つすべてのTiddlerが単一のファイルとして保存されます。Tiddlerがどのフィルターにも一致しない場合は、Tiddlerの`type`フィールドによって決定されるデフォルトの拡張子が使用されます。 \ No newline at end of file diff --git a/editions/ja-JP/tiddlers/nodejs/Environment Variables on Node.js.tid b/editions/ja-JP/tiddlers/nodejs/Environment Variables on Node.js.tid new file mode 100644 index 000000000..bafec9495 --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/Environment Variables on Node.js.tid @@ -0,0 +1,27 @@ +created: 20140617211749290 +modified: 20250120104354585 +original-modified: 20220613114121229 +tags: [[TiddlyWiki on Node.js]] +title: Environment Variables on Node.js +ja-title: Node.jsの環境変数 +type: text/vnd.tiddlywiki + +[[Node.js上のTiddlyWiki|TiddlyWiki on Node.js]]は、プラグインとエディションを検索するためのパスの区切りリストを指定するために、次のOS環境変数をサポートしています: + +* `TIDDLYWIKI_PLUGIN_PATH` - 通常のプラグインの検索パス +* `TIDDLYWIKI_THEME_PATH` - テーマの検索パス +* `TIDDLYWIKI_LANGUAGE_PATH` - 言語の検索パス +* `TIDDLYWIKI_EDITION_PATH` - エディションの検索パス (InitCommandによって使用される) + + +<$macrocall $name=".note" _="""''1.'' 区切り文字はオペレーティングシステムによって異なる場合があります。Windowsではセミコロン`;`が使用されますが、Linux ではコロン`:`が使用されます。

''2.'' Linuxシステムでは、変数を定義するだけでなく//''export''//する必要もあります。 +"""/> + +追加のパスはそれぞれ、~TiddlyWiki5 GitHubリポジトリの同等のディレクトリのように、構造化されたフォルダを指す必要があります: プラグイン、テーマ、言語のディレクトリには`publisher/pluginname/`が含まれ、エディションのディレクトリには`editionname/`が含まれます + +例: + +``` +export TIDDLYWIKI_PLUGIN_PATH=~/MyPluginStore +tiddlywiki mywiki --build index +``` diff --git a/editions/ja-JP/tiddlers/nodejs/Installing TiddlyWiki Prerelease on Node.js.tid b/editions/ja-JP/tiddlers/nodejs/Installing TiddlyWiki Prerelease on Node.js.tid new file mode 100644 index 000000000..5ba15078a --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/Installing TiddlyWiki Prerelease on Node.js.tid @@ -0,0 +1,16 @@ +created: 20150926162849519 +modified: 20241228110350676 +original-modified: 20191022095509822 +tags: [[TiddlyWiki on Node.js]] +title: Installing TiddlyWiki Prerelease on Node.js +ja-title: Node.jsにTiddlyWikiプレリリースをインストールする +type: text/vnd.tiddlywiki + +# https://github.com/TiddlyWiki/TiddlyWiki5 からTiddlyWiki5 GitHubリポジトリのローカルコピーをクローンします +# コマンドラインターミナルを開き、現在の作業ディレクトリをTiddlyWiki5リポジトリのルートに変更します +# `npm link` (Windows) または `sudo npm link` (Mac/Linux) と入力して、[[npm]]にこのリポジトリのコピーをグローバルにインストールされたものとして使用するように指示します +# ルート内で、次のようにして~TiddlyWikiを起動できます:
``tiddlywiki editions/tw5.com-server --listen`` + +この手順を実行すると、通常の方法`npm install -g tiddlywiki`でインストールした場合と同じように、[[npm]]経由でTiddlyWiki5を操作できるようになります。 + +最新のコードを確実に取得するために、クローンを定期的に更新してください。 diff --git a/editions/ja-JP/tiddlers/nodejs/Installing custom plugins on Node.js.tid b/editions/ja-JP/tiddlers/nodejs/Installing custom plugins on Node.js.tid new file mode 100644 index 000000000..c7c9b4da4 --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/Installing custom plugins on Node.js.tid @@ -0,0 +1,23 @@ +created: 20191022095653896 +modified: 20250122105447127 +original-modified: 20220617130125173 +tags: [[TiddlyWiki on Node.js]] PluginsCS +title: Installing custom plugins on Node.js +ja-title: Node.jsにカスタムプラグインをインストールする +type: text/vnd.tiddlywiki + +\rules except wikilink + +! 紹介 + +Node.jsクライアントサーバー構成でTiddlyWikiを使用する場合、公式プラグインとカスタムプラグインをインストールするにはいくつかの方法があります。 + +注記 +<$macrocall $name=".note" _="""ライブラリから単一ファイルWikiにプラグインをインストールする手順については、[[プラグイン|Plugins]]で詳細を確認してください。 +"""/> + + +!! プラグインのロード順序 + +{{Plugin Ordering}} + diff --git a/editions/ja-JP/tiddlers/nodejs/Installing official plugins on Node.js.tid b/editions/ja-JP/tiddlers/nodejs/Installing official plugins on Node.js.tid new file mode 100644 index 000000000..e9882cfa3 --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/Installing official plugins on Node.js.tid @@ -0,0 +1,41 @@ +created: 20220611123344385 +modified: 20250123113223702 +original-modified: 20220617132351460 +tags: [[TiddlyWiki on Node.js]] PluginsCS +title: Installing official plugins on Node.js +ja-title: Node.jsに公式プラグインをインストールする +type: text/vnd.tiddlywiki + +クライアント-サーバーNode.js構成でTiddlyWikiを使用する場合は、次の手順に従ってください: + +# <>の''プラグイン''タブを使用してインストールするプラグインを特定します。(ただし、ここからプラグインをインストール''しないで''ください) +#* プラグインは、その種類(言語、テーマ、プラグイン)と発行元、タイトルによって識別されます。たとえば、`$:/plugins/tiddlywiki/internals`プラグインは''tiddlywiki/internals''として参照されます + +# サーバーが実行中の場合は終了します + +# `tiddlywiki.info`ファイル(JSON形式)を編集し、`plugins`、`themes`、`languages`セクションを見つけます(下記参照) + +# 追加したいプラグインに対応するエントリを追加します +#* 項目を区切る''カンマ''を残すように注意してください +#* リストの最後の項目をコンマで終わらせ''ないで''ください + +# サーバーを再起動します + +``` +{ + "plugins": [ + "tiddlywiki/codemirror" + ], + "themes": [ + "tiddlywiki/vanilla", + "tiddlywiki/snowwhite" + ], + "languages": [ + "es-ES", + "fr-FR", + "en-EN" + ] +} +``` + +<$macrocall $name=".note" _="プラグインの操作の概要については、[[プラグイン|Plugins]]を参照してください。
また、[[Node.jsにカスタムプラグインをインストールする|Installing custom plugins on Node.js]]も参照してください。"/> diff --git a/editions/ja-JP/tiddlers/nodejs/Scripts for TiddlyWiki on Node.js.tid b/editions/ja-JP/tiddlers/nodejs/Scripts for TiddlyWiki on Node.js.tid new file mode 100644 index 000000000..e663fa11c --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/Scripts for TiddlyWiki on Node.js.tid @@ -0,0 +1,52 @@ +created: 20131219100637788 +modified: 20250124112753177 +original-modified: 20141015165343893 +tags: [[TiddlyWiki on Node.js]] +title: Scripts for TiddlyWiki on Node.js +ja-title: Node.js上のTiddlyWiki用スクリプト +type: text/vnd.tiddlywiki + +! スクリプトファイル + +TiddlyWiki5リポジトリの`bin`フォルダーには、共通のタスクを自動化したり、独自のスクリプトの便利な開始点として使用したりできるスクリプトがいくつか含まれています。https://tiddlywiki.com/ の構築とリリースに使用されるスクリプトの詳細については、[[Scripts for building tiddlywiki.com]]を参照してください。 + +すべてのスクリプトは、リポジトリのルートフォルダーから実行されることを想定しています。 + +!! `serve`: tw5.comを提供する + +``` +./bin/serve.sh -h +./bin/serve.sh [edition dir] [username] [password] [host] [port] +``` + +または: + +``` +./bin/serve.cmd -h +./bin/serve.cmd [edition dir] [username] [password] [host] [port] +``` + +このスクリプトは、TiddlyWiki5をHTTPサーバーとして実行し、`tw5.com-server`エディションのコンテンツをデフォルトにします。デフォルトでは、Node.jsは8080ポート でサービスを提供します。オプションの`username`パラメータが指定されている場合は、編集の署名に使用されます。`password`が指定されている場合は、HTTP基本認証が使用されます。`-h`パラメータを指定してスクリプトを実行すると、オンラインヘルプが表示されます。 + +この構成を試すには、スクリプトを実行してからブラウザで`http://127.0.0.1:8080`にアクセスしてください。 + +ブラウザで行われた変更は、HTTP経由でサーバーに伝えられます(これらのリクエストを確認するには、ブラウザ開発者コンソールを使用します)。その後、サーバーは変更をファイルシステムに同期します(各変更をスクリーンに記録します)。 + +!! `test`: テストをビルドして実行する + +This script runs the `test` edition of TiddlyWiki on the server to perform the server-side tests and to build `test.html` for running the tests in the browser. +このスクリプトは、サーバー側のテストを実行し、ブラウザでテストを実行するために、`test.html`をビルドし、サーバー上でTiddlyWikiの`test`のエディションを実行します。 + +!! `lazy`: tw5.comを遅延読み込み画像で提供する + +``` +./bin/lazy.sh [] +``` + +または: + +``` +./bin/lazy.cmd [] +``` + +このスクリプトは、画像に[[遅延読み込み|LazyLoading]]を適用して`tw5.com-server`エディションコンテンツを提供します。 diff --git a/editions/ja-JP/tiddlers/nodejs/TiddlyWiki on Node.js.tid b/editions/ja-JP/tiddlers/nodejs/TiddlyWiki on Node.js.tid new file mode 100644 index 000000000..8b65d1274 --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/TiddlyWiki on Node.js.tid @@ -0,0 +1,24 @@ +created: 20131129094353704 +modified: 20241227105025118 +original-modified: 20220617114433107 +tags: Platforms +title: TiddlyWiki on Node.js +ja-title: Node.js上のTiddlyWiki +type: text/vnd.tiddlywiki + +\rules except wikilink + +[[Node.js]]でTiddlyWikiを実行すると、単一ファイルバージョンに比べていくつかの重要な利点が得られます: + +* 個々のTiddlerは別々のファイルに保存され、必要に応じて整理できます。 + +* 共有コンテンツと独自コンテンツのさまざまな組み合わせをブレンドした複数のWikiを構築する機能 + +* スマートフォンやタブレットを含むあらゆる最新ブラウザでコンテンツを編集できます + +<<.warning """Node.js上のTiddlyWikiは現在、実行中にファイルシステム経由でTiddlerファイルを直接変更することをサポートしていないことに注意してください。変更を有効にするには、サーバーを再起動する必要があります。実行中の Wikiを編集するには、HTTPやJavaScript APIを使用することをお勧めします。""">> + + +詳細については、以下を参照してください: + +<> diff --git a/editions/ja-JP/tiddlers/nodejs/Uninstalling a plugin with Node.js.tid b/editions/ja-JP/tiddlers/nodejs/Uninstalling a plugin with Node.js.tid new file mode 100644 index 000000000..7c0707864 --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/Uninstalling a plugin with Node.js.tid @@ -0,0 +1,33 @@ +created: 20220611125113040 +modified: 20250204103637098 +original-modified: 20220617133704286 +tags: [[TiddlyWiki on Node.js]] PluginsCS +title: Uninstalling a plugin with Node.js +ja-title: Node.jsでプラグインをアンインストールする +type: text/vnd.tiddlywiki + +クライアント-サーバー Node.js構成でTiddlyWikiを使用する場合は、次の手順に従ってください: + +# サーバーが実行中の場合は終了します + +# `tiddlywiki.info`ファイル(JSON形式)を編集し、`plugins`と`themes`セクションを見つけます(下記参照) + +# 削除したいプラグインに対応するエントリを削除します +#* 項目を区切る''カンマ''を残すように注意してください +#* リストの最後の項目をコンマで終わらせ''ない''でください + +# サーバーを再起動します + +``` +{ + "plugins": [ + "tiddlywiki/codemirror" + ], + "themes": [ + "tiddlywiki/vanilla", + "tiddlywiki/snowwhite" + ] +} +``` + +<$macrocall $name=".note" _="プラグインの操作方法の概要については、[[プラグイン|Plugins]]で確認できます"/> diff --git a/editions/ja-JP/tiddlers/nodejs/Upgrading TiddlyWiki on Node.js.tid b/editions/ja-JP/tiddlers/nodejs/Upgrading TiddlyWiki on Node.js.tid new file mode 100644 index 000000000..8bf5a12ee --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/Upgrading TiddlyWiki on Node.js.tid @@ -0,0 +1,19 @@ +created: 20131219100544073 +modified: 20241228112745930 +original-modified: 20140912141800426 +tags: [[TiddlyWiki on Node.js]] +title: Upgrading TiddlyWiki on Node.js +ja-title: Node.js上のTiddlyWikiのアップグレード +type: text/vnd.tiddlywiki + +通常の方法で[[Node.js上のTiddlyWiki|TiddlyWiki on Node.js]]をインストールした場合、新しいバージョンがリリースされたときに、次のコマンドでアップグレードできます: + +``` +npm update -g tiddlywiki +``` + +MacやLinuxでは、次のように''sudo''を追加する必要があります: + +``` +sudo npm update -g tiddlywiki +``` diff --git a/editions/ja-JP/tiddlers/nodejs/Using TiddlyWiki on Node.js.tid b/editions/ja-JP/tiddlers/nodejs/Using TiddlyWiki on Node.js.tid new file mode 100644 index 000000000..5d0b6307b --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/Using TiddlyWiki on Node.js.tid @@ -0,0 +1,43 @@ +created: 20131219100520659 +modified: 20250206101730728 +original-modified: 20241025051303991 +tags: [[TiddlyWiki on Node.js]] +title: Using TiddlyWiki on Node.js +ja-title: Node.jsでTiddlyWikiを使用する +type: text/vnd.tiddlywiki + +~TiddlyWiki5には、[[TiddlyWikiフォルダ|TiddlyWikiFolders]]、[[Tiddlerファイル|TiddlerFiles]]に基づいて広範な操作を実行するためにコマンドラインで使用するコマンドセットが含まれています。 + +たとえば、次のコマンドは、~TiddlyWiki HTMLファイルからTiddlerを読み込み、そのうちの1つを静的HTMLに保存します: + +``` +tiddlywiki --verbose --load mywiki.html --render ReadMe ./readme.html +``` + +コマンドラインから`tiddlywiki`を実行すると、~TiddlyWikiカーネルが起動し、コアプラグインがロードされ、空のWikiストアが確立されます。次に、コマンドライン引数を左から右に順番に処理します。引数はスペースで区切られます。 + +<<.from-version "5.1.20">> まず、プレフィックス`+`で始まるプラグイン名や、`++`で始まるプラグインフォルダーへのパスによって識別される0個以上のプラグイン参照が存在する可能性があります。これらのプラグインは、[[TiddlyWikiフォルダ|TiddlyWikiFolders]]で指定されたプラグインに加えてロードされます。 + +次の引数は、ロードする[[TiddlyWikiフォルダ|TiddlyWikiFolders]]へのオプションのパスです。存在しない場合は、現在のディレクトリが使用されます。 + +コマンドとそれぞれの引数は以下のように示されます。各コマンドはプレフィックス`--`で識別されます。 + +``` +tiddlywiki [+ | ++] [] [-- [[,]]] +``` + +例えば: + +``` +tiddlywiki --version +tiddlywiki +plugins/tiddlywiki/filesystem +plugins/tiddlywiki/tiddlyweb mywiki --listen +tiddlywiki ++./mygreatplugin mywiki --listen +``` + +<<.from-version "5.1.18">> 多数のパラメータをサポートするListenCommandなどのコマンドでは、[[名前付きコマンドパラメータ|NamedCommandParameters]]を使用して扱いやすくすることができます。例: + +``` +tiddlywiki wikipath --listen username=jeremy port=8090 +``` + +使用可能なコマンドの完全なリストについては、[[コマンド|Commands]]を参照してください。 diff --git a/editions/ja-JP/tiddlers/nodejs/Working with the TiddlyWiki5 repository.tid b/editions/ja-JP/tiddlers/nodejs/Working with the TiddlyWiki5 repository.tid new file mode 100644 index 000000000..8f8d4c39b --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/Working with the TiddlyWiki5 repository.tid @@ -0,0 +1,25 @@ +created: 20131219100444289 +modified: 20250206103847601 +original-modified: 20140920134404247 +tags: [[TiddlyWiki on Node.js]] +title: Working with the TiddlyWiki5 repository +ja-title: TiddlyWiki5リポジトリの操作 +type: text/vnd.tiddlywiki + +! 紹介 + +TiddlyWikiの開発に[[貢献|Contributing]]したい場合は、[[通常の方法でTiddlyWikiをインストールする|Installing TiddlyWiki on Node.js]]のではなく、GitHubリポジトリを直接動かすことができます。 + +Mario Pietschが[[短い紹介動画|Working with the TiddlyWiki5 repository video]]を作成しました。 + +! セットアップ + +# GitHubのアカウントをお持ちでない場合は、アカウントを作成してください +# https://github.com/TiddlyWiki/TiddlyWiki5 からTiddlyWiki5 GitHubリポジトリをフォークします +# フォークのローカルコピーをクローンします +# コマンドラインターミナルを開き、現在の作業ディレクトリをリポジトリのルートに変更します +# `npm link` (Windows)か`sudo npm link` (Mac/Linux)と入力して、[[npm]]にこのリポジトリのコピーをグローバルにインストールされたものとして使用するように指示します + +この手順を実行すると、`npm install -g tiddlywiki`による通常の方法でインストールした場合と同じように、[[npm]]経由でTiddlyWiki5を操作できるようになります。 + +[[Node.js上のTiddlyWiki用スクリプト|Scripts for TiddlyWiki on Node.js]]も参照してください。 diff --git a/editions/ja-JP/tiddlers/nodejs/tiddlywiki.files_Files.tid b/editions/ja-JP/tiddlers/nodejs/tiddlywiki.files_Files.tid new file mode 100644 index 000000000..fcebf9c5e --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/tiddlywiki.files_Files.tid @@ -0,0 +1,172 @@ +created: 20161015114118243 +modified: 20250201104758596 +original-modified: 20211114101256212 +tags: TiddlyWikiFolders [[TiddlyWiki on Node.js]] +title: tiddlywiki.files Files +ja-title: tiddlywiki.filesファイル +type: text/vnd.tiddlywiki + +! 紹介 + +[[TiddlyWikiフォルダ|TiddlyWikiFolders]]内のサブフォルダーにあるJSONファイル`tiddlywiki.files`は、フォルダーを再帰的にスキャンしてTiddlerファイルを探す通常のロジックをオーバーライドします。代わりに、`tiddlywiki.files`ファイルは特定のファイルとフォルダーからTiddlerをロードするための指示を指定します。 + +ファイルの形式は、2つのオプションプロパティを持つオブジェクトです: + +* ''tiddlers'' - ファイルから読み取ったフィールドを上書きや変更する機能を持つ外部ファイルを記述するオブジェクトの配列 +* ''directories'' - 外部ディレクトリを記述するオブジェクトの配列、それらのディレクトリ内のどのファイルを処理すべきかを決定するフィルターと、ファイルから読み取ったフィールドのいずれかを上書きや変更する機能 + +`tiddlywiki.files`の処理に大幅な機能強化が[[リリース 5.1.14|Release 5.1.14]]で導入されたことに注意してください。 + +!! フィールドのオーバーライド + +`tiddlywiki.files`ファイルの''tiddlers''セクションと''directories''セクションの両方に、`fields`オブジェクトを使用してフィールドの値を上書きやカスタマイズする機能が含まれています。 + +各フィールドは、フィールドに直接割り当てられる''文字列''や''配列''値として指定することも、<<.from-version "5.1.14">>フィールドの値を生成する方法を説明する''オブジェクト''として指定することもできます。オブジェクトには次のプロパティが含まれます: + +* ''source'' - (オプション) フィールドのソース値を指定する文字列。指定しない場合は、既存の値が使用されます +** //filename// Tiddlerを含むファイルのファイル名 +** //filename-uri-decoded// [[URIデコード|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent]]を適用した、Tiddlerを含むファイルのファイル名 +** //basename// 拡張子なしのTiddlerを含むファイルのファイル名 +** //basename-uri-decoded// [[URIデコード|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent]]を適用した、拡張子なしのTiddlerを含むファイルのファイル名 +** //extname// Tiddlerを含むファイル名の拡張子 +** //created// Tiddlerを含むファイルの作成日時 +** //modified// Tiddlerを含むファイルの更新日時 +** <<.from-version "5.3.0">> //filepath// ディレクトリの''path''プロパティを基準とした、Tiddlerを含むファイルのパス(''directories''宣言でのみ使用可能) +** <<.from-version "5.3.0">> //subdirectories// ディレクトリの''path''プロパティを基準とした、ファイルの相対パス内のサブディレクトリの配列(''directories''宣言でのみ使用可能) +* ''prefix'' - (オプション) フィールドの値の先頭に追加する文字列 +* ''suffix'' - (オプション) フィールドの値の末尾に追加する文字列 + +! Tiddlersセクション + +`tiddlers`配列内のファイルの仕様は、次のプロパティをサポートします: + +* ''file'': (必須) Tiddlerデータを含むファイルへの絶対パスまたは相対パス (相対パスは`tiddlywiki.files`ファイルのパスを基準とします) +* ''isTiddlerFile'': (オプション) `true`の場合、ファイルは[[tiddlerファイル|TiddlerFiles]]として扱われ、Tiddlerを抽出するためにデシリアライズされます。それ以外の場合は、ファイルの生のコンテンツが解析されずに`text`フィールドに割り当てられます +* ''fields'': (オプション) Tiddlerファイルで提供されるフィールドを上書きやカスタマイズする値を含むオブジェクト (上記を参照) +* ''prefix''と''suffix'': (オプション) Tiddlerの`text`フィールドにプレフィックスとサフィックスとして付加される文字列 +*> ''prefix''を指定することは、''fields''オブジェクトの`text`のフィールドを`{"prefix":""}`に設定することと同じであることに注意してください。 + +! Directoriesセクション + +`directories`配列内のディレクトリの仕様は次の形式を取ることができます: + +* Tiddlerファイルを含むディレクトリへの絶対パスか相対パスを指定する、''string''リテラル(相対パスは`tiddlywiki.files`ファイルのパスを基準として解釈されます)。Tiddlerファイルはディレクトリを再帰的に検索されます +* <<.from-version "5.1.14">> 次のプロパティを持つ''object'': +** ''path'' - (必須) Tiddlerファイルを含むディレクトリへの絶対パスか相対パス(相対パスは`tiddlywiki.files`ファイルのパスを基準として解釈されます)。デフォルトではディレクトリは再帰的に検索されないことに注意してください。//searchSubdirectories//フラグが`true`に設定されていない限り、サブディレクトリは無視されます(以下を参照)。 +** ''filesRegExp'' - (オプション) ディレクトリ内で処理するファイルのファイル名に一致する[[正規表現|https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions]] +** ''isTiddlerFile'' - (必須) `true`の場合、ファイルは[[Tiddlerファイル|TiddlerFiles]]として扱われ、Tiddlerを抽出するためにデシリアライズされます。それ以外の場合、ファイルの生のコンテンツが解析されずに`text`フィールドに割り当てられます +** ''isEditableFile'' - <<.from-version "5.1.23">> (オプション) `true`の場合、Tiddlerへの変更は元のファイルに保存されます。Tiddlerは、$:/config/FileSystemPathフィルターから結果が生成されない限り、元のファイルパスに保存されます。フィルターから結果が返された場合、生成された最終的なファイルパスが上書きされます。 +** ''searchSubdirectories'' - <<.from-version "5.1.23">> (オプション) `true`の場合、//path//のすべてのサブディレクトリで(オプションの)//filesRegExp//に一致するファイルが再帰的に検索されます。//filesRegExp//が指定されていない場合は、//path//のすべてのサブディレクトリ内のすべてのファイルがロードされます。//source//属性の//filename//(上記を参照)によって生成されたTiddlerタイトルにはファイル名のみが含まれ、パスのサブディレクトリは含まれません。この結果、同じTiddlerタイトルでロードされた複数のファイルが存在する場合、そのTiddlerタイトルでロードされた最後のファイルのみがメモリに格納されます。これを防ぐには、//filename//の代わりに//filepath//属性を使用できます。または、複数のディレクトリオブジェクトを含め、//source//属性とともに//prefix//または//suffix//を使用してタイトルフィールドをカスタマイズすることもできます。 +** ''fields'' - (必須) Tiddlerファイルで提供されるフィールドを上書きやカスタマイズする値を含むオブジェクト(上記を参照) + +同じ名前にサフィックス`.meta`を加えたファイルを作成することで、特定のファイルのフィールドを上書きすることもできます。 -- TiddlerFilesを参照してください。 + +! 例 + +これらの`tiddlywiki.files`の例は、[[Wikiフォルダ|TiddlyWikiFolders]]の独自のサブディレクトリに配置する必要があります。 + +メインの[[TiddlyWiki 5 GitHub リポジトリ|https://github.com/TiddlyWiki/TiddlyWiki5]]にも`tiddlywiki.files`ファイルの例がいくつかあります。 + +!! PDFのフォルダをインポートする + +この例では、相対パスで指定されたフォルダーから拡張子`.pdf`を持つすべてのファイルを取得します。このパスは"../../../"で始まり、この構成ファイルが格納されているフォルダーの3ディレクトリ階層上を示します。各Tiddlerは、次のフィールドを使用してLazyLoading用にセットアップされています: + +* ''title'' - PDFファイルのURIデコードされたベースファイル名を設定。[[URIデコード|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent]]により、"/"などの文字をURIエンコードして"%2F"としてタイトルに含めることができます +* ''created'' - PDFファイルの作成日時を設定 +* ''modified'' - PDFファイルの変更日時を設定 +* ''type'' - `application/pdf`を設定 +* ''tags'' - `$:/tags/AttachedFile`を設定 +* ''text'' - 空の文字列を設定 +* ''_canonical_uri'' - ファイル名と文字列"pdfs/"を連結した値を設定 + +``` +{ + "directories": [ + { + "path": "../../../input/pdfs", + "filesRegExp": "^.*\\.pdf$", + "isTiddlerFile": false, + "fields": { + "title": {"source": "basename-uri-decoded"}, + "created": {"source": "created"}, + "modified": {"source": "modified"}, + "type": "application/pdf", + "tags": ["$:/tags/AttachedFile"], + "text": "", + "_canonical_uri": {"source": "filename", "prefix": "pdfs/"} + } + } + ] +} +``` + +!! テキストファイルのフォルダをインポートする + +この例では、相対パスで指定されたフォルダから拡張子`.txt`を持つすべてのファイルを取得します。このフォルダはWikiのベースディレクトリ内にあり、現在の構成ファイルはWikiの"tiddlers/"ディレクトリ内のディレクトリにあります。したがって、この場合、パスは"../../"で始まり、2つのディレクトリ階層上に移動し、次に "externalnotes/"ディレクトリまで下ります。各Tiddlerは次のフィールドで設定されます: + +* ''title'' - テキストファイルのURIデコードされたベースファイル名を設定します。[[URIデコード|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent]]により、"/"などの文字をURIエンコードして"%2F"としてタイトルに含めることができます +* ''created'' - テキストファイルの作成日時を設定 +* ''modified'' - テキストファイルの変更日時を設定 +* ''type'' - `text/plain`を設定 +* ''tags'' - `[[note]] [[externalnote]] [[.txt]]`を設定(配列表記を使用) +* ''text'' - 設定されないため、ファイルの内容がテキストフィールドとして読み込まれます + +``` +{ + "directories": [ + { + "path": "../../externalnotes", + "filesRegExp": ".+\\.txt", + "isTiddlerFile": false, + "isEditableFile": true, + "fields": { + "title": {"source": "basename-uri-decoded"}, + "created": {"source": "created"}, + "modified": {"source": "modified"}, + "type": "text/plain", + "tags": ["note", "externalnote", ".txt"] + } + } + ] +} +``` + +これにより、`../../externalnotes/`ディレクトリ内のすべてのテキストファイルが個別のTiddlerとしてWikiに読み込まれます。これらは、さまざまなマークアップ言語のスニペットコレクションである可能性があります。次に、これらの各Tiddlerの`type`フィールドを、言語に合わせて変更できます。たとえば、Wikitextの場合は"text/vnd.tiddlywiki"、マークダウンファイルの場合は"text/markdown"です。次に、次の行で$:/config/FileSystemPathsと$:/config/FileSystemExtentions Tiddlerを使用すると、これらのTiddlerへの変更が、開始元のディレクトリに保存され、"*.txt"ファイルとして、"*.txt.meta"ファイルとともに保存されます。これらのメタファイルは必要に応じて生成され、サーバーの再起動時に、`tiddlywiki.files`構成ファイルから生成されたフィールド(Tiddlerの`type`フィールドなど)が上書きされます。 + +[[Tiddlerファイル名のカスタマイズ|Customising Tiddler File Naming]]の例から、$:/config/FileSystemPaths Tiddler内の最後のフィルター`[!tag[externalnote]addprefix[wiki/]]`は、`externalnotes`でタグ付けされたすべてのTiddler(以前のフィルターに一致しなかったもの)を除外することがわかります。これらのTiddlerのファイルパスは、ブート起動時に生成された$:/config/OriginalTiddlerPathsから取得されます。 + +次に、$:/config/FileSystemExtensions Tiddler内のフィルター`[tag[.txt]then[.txt]]`により、これらすべてのTiddlerが*.txtおよび付随する*.txt.metaファイルとしてディスクに保存されます(通常のTiddlerタイプとファイルタイプのマッピングを上書きします)。この場合、Tiddlywiki Wikitextやマークダウンテキストのスニペットを"テキスト"(*.txtファイル)に保存できるようになります。 + +!! 画像のインポートと自動タグ付け + +この例では、`files`ディレクトリとそのすべてのサブディレクトリ内のすべての画像ファイルを外部画像Tiddlerとしてインポートし、ファイルパスに基づいてタグ付けします。各Tiddlerには、次のフィールドが設定されます: + +* ''title'' - テキストファイルのURIデコードされたベースファイル名を設定 +* ''created'' - テキストファイルの作成日時を設定 +* ''modified'' - テキストファイルの更新日時を設定 +* ''type'' - `image/jpeg`に設定します。現在、ファイルから画像Tiddlerの正しいContentTypeを推測する方法はありませんが、`image/jpeg`Tiddlerはpngやgif画像でも正しくレンダリングされるはずです。代わりに、jpg、png、gifファイルの個別の定義を、`image/jpeg`、`image/png`、`image/gif`タイプをそれぞれ使用して作成することもできます。 +* ''tags'' - 親ディレクトリ(この場合は`files`)を基準とした画像の相対パスに基づいて生成されます。たとえば、`files/photos`内の画像には`photos`のタグが付けられ、 `files/photos/family`内の画像には`photos`と`family`両方のタグが付けられ、ルート`files`ディレクトリ内の画像にはタグが付けられません。 +* ''text'' - 空の文字列に設定 +* ''_canonical_uri'' - Wikiルートを基準とした画像の完全な相対ファイルパスを設定 + +``` +{ + "directories": [ + { + "path": "../../files/", + "filesRegExp": "^.*\\.(?:jpg|jpeg|png|gif)$", + "isTiddlerFile": false, + "searchSubdirectories": true, + "fields": { + "title": {"source": "basename-uri-decoded"}, + "created": {"source": "created"}, + "modified": {"source": "modified"}, + "type": "image/jpeg", + "tags": { "source": "subdirectories" }, + "text": "", + "_canonical_uri": { "source": "filepath", "prefix": "files/" } + } + } + ] +} +``` diff --git a/editions/ja-JP/tiddlers/nodejs/tiddlywiki.info_Files.tid b/editions/ja-JP/tiddlers/nodejs/tiddlywiki.info_Files.tid new file mode 100644 index 000000000..c6a32f9d7 --- /dev/null +++ b/editions/ja-JP/tiddlers/nodejs/tiddlywiki.info_Files.tid @@ -0,0 +1,60 @@ +created: 20161015114042793 +modified: 20250201105445142 +original-modified: 20241030132156792 +tags: TiddlyWikiFolders [[TiddlyWiki on Node.js]] +title: tiddlywiki.info Files +ja-title: tiddlywiki.infoファイル +type: text/vnd.tiddlywiki + +[[TiddlyWikiフォルダ|TiddlyWikiFolders]]はWikiフォルダーのルートにある1つの`tiddlywiki.info`ファイルで構成されます。このファイルには、次のプロパティを含むJSONオブジェクトが含まれている必要があります: + +* ''plugins'' - Wikiに含めるプラグインの配列 +* ''themes'' - Wikiに含めるテーマの配列 +* ''languages'' - Wikiに含める言語の配列 +* ''includeWikis'' - Wikiに含める外部Wikiフォルダへの参照の配列 +* ''build'' - 名前付きビルドターゲットのハッシュマップ。それぞれはコマンドトークンの配列で定義されます(BuildCommandを参照) +* ''config'' - 設定オプションのオプションのハッシュマップ(下記参照) + +!!! ''includeWikis'' + +''includeWikis''配列のエントリは、Wikiへの相対パスを指定する文字列か、次のフィールドを持つオブジェクトのいずれかになります: + +* ''path'' - Wikiフォルダへの相対パス +* ''read-only'' - //true//に設定すると、含まれているWiki内のTiddlerが変更されるのを防ぎます。変更は、以下で説明する''default-tiddler-location''で指定されたディレクトリに書き込まれます + +!!! ''build'' + +現在の`tiddlywiki.info`ファイルでその名前のターゲットが定義されていない場合、含まれているWikiのビルドターゲットはマージされることに注意してください。 + +!!! ''config'' + +構成オプションには以下が含まれます: + +* ''default-tiddler-location'' - ファイルシステムアダプタが新しいTiddlerを保存するためのデフォルトの場所への文字列パス(Wikiフォルダを基準に解決) +* ''retain-original-tiddler-path'' - trueの場合、サーバーはWiki内の各Tiddlerの元のファイルパスを含むティドラー[[$:/config/OriginalTiddlerPaths]]を生成します + +!!! 例 + +例: + +``` +{ + "plugins": [ + "tiddlywiki/tiddlyweb", + "tiddlywiki/filesystem" + ], + "includeWikis": [ + {"path": "../tw5.com", "read-only": true} + ], + "build": { + "index": [ + "--render","$:/core/save/all","index.html","text/plain"], + "favicon": [ + "--save", "$:/favicon.ico", "favicon.ico", + "--save", "$:/green_favicon.ico", "static/favicon.ico"] + }, + "config": { + "retain-original-tiddler-path": true + } +} +``` diff --git a/editions/ja-JP/tiddlers/platforms/Platforms.tid b/editions/ja-JP/tiddlers/platforms/Platforms.tid new file mode 100644 index 000000000..ac0b4598e --- /dev/null +++ b/editions/ja-JP/tiddlers/platforms/Platforms.tid @@ -0,0 +1,12 @@ +created: 20150412185300152 +modified: 20241227104147434 +original-modified: 20150412185427211 +tags: TableOfContents +title: Platforms +ja-title: プラットフォーム +type: text/vnd.tiddlywiki + + +TiddlyWikiはいくつかのプラットフォームで使用できます: + +<> \ No newline at end of file diff --git a/editions/ja-JP/tiddlers/plugins/Plugin Ordering.tid b/editions/ja-JP/tiddlers/plugins/Plugin Ordering.tid new file mode 100644 index 000000000..4495d351a --- /dev/null +++ b/editions/ja-JP/tiddlers/plugins/Plugin Ordering.tid @@ -0,0 +1,49 @@ +created: 20220613115453346 +modified: 20250207104327815 +original-modified: 20220628160136158 +tags: PluginMechanism +title: Plugin Ordering +ja-title: プラグインの順序 +type: text/vnd.tiddlywiki + +Node.jsクライアント-サーバー構成を使用すると、プラグインは次の順序でアクティブになります: + +# OS環境変数を使用して見つかったプラグイン +#* 参照: [[PluginFolders]] +#* および: [[Node.jsの環境変数|Environment Variables on Node.js]] + +# Wiki`/plugins`パスに保存されたプラグイン +#* 参照: [[PluginFolders]] + +# コマンドラインで指定されたプラグイン +#* 参照: [[Node.jsでTiddlyWikiを使用する|Using TiddlyWiki on Node.js]] ... <<.from-version "5.1.20">>に関する注記 + +# ドラッグアンドドロップでWikiコンテンツとしてインポートされたプラグイン +#* 参照: [[プラグインライブラリからプラグインをインストールする|Installing a plugin from the plugin library]]や[[プラグインを手動でインストールする|Manually installing a plugin]] + +''重要:'' + +* ''リストの下位の要素が優先されます'' + +*ブラウザにドラッグアンドドロップして通常のTiddlerとしてプラグインを追加すると、プラグインはブラウザ内でのみアクティブになります +** Node.js下では利用できません + +オプション 1: + +* Node.js構成を使用する場合、オプション1が最も一般的な方法です +* すべてのプラグインを一度に更新できるため、メンテナンスの手間が軽減されます + +オプション 2: + +* 構成を固定して作業したい場合はオプション2が推奨されます +* プラグインの更新は対応するWikiにのみ影響します + +オプション 3: + +* このオプションを使用すると、既存の`tiddlywiki.info`ファイルを上書きすることなくエディションを''追加して開始''できます +* tiddlywiki.infoファイルで指定されていない場合でも、任意のエディションをクライアント-サーバーエディションとして起動できます。 + +オプション 4: + +* 単一ファイルのWikiで使用されるのと全く同じメカニズムです +* このメカニズムは、プラグインが`tiddlers/`ディレクトリに保存されるため、Node.js構成では''テストとデバッグ''の目的でのみ使用する必要があります diff --git a/editions/ja-JP/tiddlers/saving/Example config-tiddlyweb-host for IIS.txt b/editions/ja-JP/tiddlers/saving/Example config-tiddlyweb-host for IIS.txt new file mode 100644 index 000000000..e30d38eb6 --- /dev/null +++ b/editions/ja-JP/tiddlers/saving/Example config-tiddlyweb-host for IIS.txt @@ -0,0 +1,2 @@ +title: $:/config/tiddlyweb/host +text: $protocol$//$host$/MyApp/ diff --git a/editions/ja-JP/tiddlers/saving/Example config-tiddlyweb-host for IIS.txt.meta b/editions/ja-JP/tiddlers/saving/Example config-tiddlyweb-host for IIS.txt.meta new file mode 100644 index 000000000..9db7aae2a --- /dev/null +++ b/editions/ja-JP/tiddlers/saving/Example config-tiddlyweb-host for IIS.txt.meta @@ -0,0 +1,7 @@ +title: Example config-tiddlyweb-host for IIS +ja-title: IISのconfig-tiddlyweb-hostの例 +created: 20180328145039530 +modified: 20250123113649343 +original-modified: 20180328145234871 +tags: [[Installing TiddlyWiki on Microsoft Internet Information Server]] +type: text/plain diff --git a/editions/ja-JP/tiddlers/saving/Example package.json for IIS.txt b/editions/ja-JP/tiddlers/saving/Example package.json for IIS.txt new file mode 100644 index 000000000..bfe3b8c1a --- /dev/null +++ b/editions/ja-JP/tiddlers/saving/Example package.json for IIS.txt @@ -0,0 +1,8 @@ +{ + "name": "MyStuff", + "description": "A description of this wiki", + "dependencies": { + "sax": "1.2.4", + "tiddlywiki": "*" + } +} \ No newline at end of file diff --git a/editions/ja-JP/tiddlers/saving/Example package.json for IIS.txt.meta b/editions/ja-JP/tiddlers/saving/Example package.json for IIS.txt.meta new file mode 100644 index 000000000..c3bd2e378 --- /dev/null +++ b/editions/ja-JP/tiddlers/saving/Example package.json for IIS.txt.meta @@ -0,0 +1,7 @@ +created: 20180328145039530 +modified: 20250123114135455 +original-modified: 20180328145234871 +tags: [[Installing TiddlyWiki on Microsoft Internet Information Server]] +title: Example package.json for IIS +ja-title: IISのpackage.jsonの例 +type: text/plain diff --git a/editions/ja-JP/tiddlers/saving/Example tiddlywiki.info for IIS.txt b/editions/ja-JP/tiddlers/saving/Example tiddlywiki.info for IIS.txt new file mode 100644 index 000000000..1ba78a6c9 --- /dev/null +++ b/editions/ja-JP/tiddlers/saving/Example tiddlywiki.info for IIS.txt @@ -0,0 +1,11 @@ +{ + "description": "My wiki", + "plugins": [ + "tiddlywiki/tiddlyweb", + "tiddlywiki/filesystem" + ], + "themes": [ + "tiddlywiki/vanilla", + "tiddlywiki/snowwhite" + ] +} diff --git a/editions/ja-JP/tiddlers/saving/Example tiddlywiki.info for IIS.txt.meta b/editions/ja-JP/tiddlers/saving/Example tiddlywiki.info for IIS.txt.meta new file mode 100644 index 000000000..c4f5b3389 --- /dev/null +++ b/editions/ja-JP/tiddlers/saving/Example tiddlywiki.info for IIS.txt.meta @@ -0,0 +1,7 @@ +created: 20180328151124878 +modified: 20250123114435480 +original-modified: 20180328151214616 +tags: [[Installing TiddlyWiki on Microsoft Internet Information Server]] +title: Example tiddlywiki.info for IIS +ja-title: IISのtiddlywiki.infoの例 +type: text/plain diff --git a/editions/ja-JP/tiddlers/saving/Example web.config for IIS.txt b/editions/ja-JP/tiddlers/saving/Example web.config for IIS.txt new file mode 100644 index 000000000..d8a75bb4f --- /dev/null +++ b/editions/ja-JP/tiddlers/saving/Example web.config for IIS.txt @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + diff --git a/editions/ja-JP/tiddlers/saving/Example web.config for IIS.txt.meta b/editions/ja-JP/tiddlers/saving/Example web.config for IIS.txt.meta new file mode 100644 index 000000000..6fa8afd4f --- /dev/null +++ b/editions/ja-JP/tiddlers/saving/Example web.config for IIS.txt.meta @@ -0,0 +1,7 @@ +created: 20180328145259455 +modified: 20250123114732207 +original-modified: 20180701185215523 +tags: [[Installing TiddlyWiki on Microsoft Internet Information Server]] +title: Example web.config for IIS +ja-title: IISのweb.configの例 +type: text/plain diff --git a/editions/multiwikiserver/tiddlers/$__StoryList_1.tid b/editions/multiwikiserver/tiddlers/$__StoryList_1.tid deleted file mode 100644 index 28aae8c87..000000000 --- a/editions/multiwikiserver/tiddlers/$__StoryList_1.tid +++ /dev/null @@ -1,2 +0,0 @@ -list: GettingStarted -title: $:/StoryList \ No newline at end of file diff --git a/editions/multiwikiserver/tiddlers/MultiWikiServerAllowAnonymousReads.tid b/editions/multiwikiserver/tiddlers/MultiWikiServerAllowAnonymousReads.tid new file mode 100644 index 000000000..97cf771aa --- /dev/null +++ b/editions/multiwikiserver/tiddlers/MultiWikiServerAllowAnonymousReads.tid @@ -0,0 +1,4 @@ +title: $:/config/MultiWikiServer/AllowAnonymousReads +text: yes +description: Controls whether anonymous users can read wiki content +type: text/plain diff --git a/editions/multiwikiserver/tiddlers/MultiWikiServerAllowAnonymousWrites.tid b/editions/multiwikiserver/tiddlers/MultiWikiServerAllowAnonymousWrites.tid new file mode 100644 index 000000000..d24003491 --- /dev/null +++ b/editions/multiwikiserver/tiddlers/MultiWikiServerAllowAnonymousWrites.tid @@ -0,0 +1,4 @@ +title: $:/config/MultiWikiServer/AllowAnonymousWrites +text: yes +description: Controls whether anonymous users can write to the wiki +type: text/plain diff --git a/editions/test/tiddlers/tests/data/transclude/CustomWidget-RawAndSlotted.tid b/editions/test/tiddlers/tests/data/transclude/CustomWidget-RawAndSlotted.tid new file mode 100644 index 000000000..a8e6feb68 --- /dev/null +++ b/editions/test/tiddlers/tests/data/transclude/CustomWidget-RawAndSlotted.tid @@ -0,0 +1,34 @@ +title: Transclude/CustomWidget/RawAndSlotted +description: Custom widget can mix ts-raw and custom slots +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\whitespace trim +\widget $my.widget() +\whitespace trim +<$slot $name="ts-header"> + Default Header + +- +<$slot $name="ts-raw"/> +\end +<$my.widget> + First Body + + + +<$my.widget> + <$fill $name="ts-header"> + Custom Header + + <$fill $name="ts-never"> + <$log RawAndSlotted="Transclude/CustomWidget/RawAndSlotted is actually failing. $fill slots are executing silently when they weren't invoked." /> + + Second Body + ++ +title: ExpectedResult + +

Default Header-First Body

Custom Header-Second Body

\ No newline at end of file diff --git a/editions/test/tiddlers/tests/test-checkbox-widget.js b/editions/test/tiddlers/tests/test-checkbox-widget.js index f42a269a9..936f69338 100644 --- a/editions/test/tiddlers/tests/test-checkbox-widget.js +++ b/editions/test/tiddlers/tests/test-checkbox-widget.js @@ -78,6 +78,13 @@ Tests the checkbox widget thoroughly. startsOutChecked: false, expectedChange: { "TiddlerOne": { expand: "yes" } } }, + { + testName: "field mode default when missing -> true", + tiddlers: [], + widgetText: "<$checkbox tiddler='TiddlerOne' field='expand' default='yes' checked='yes' unchecked='no' />", + startsOutChecked: true, + expectedChange: { "TiddlerOne": { expand: "no" } } + }, { testName: "field mode indeterminate -> true", tiddlers: [{title: "TiddlerOne", text: "Jolly Old World", expand: "some other value"}], @@ -98,19 +105,28 @@ Tests the checkbox widget thoroughly. var indexModeTests = fieldModeTests.map(data => { var newData = {...data}; var newName = data.testName.replace('field mode', 'index mode'); + var tiddlerOneAlreadyExists = false; var newTiddlers = data.tiddlers.map(tiddler => { + if(tiddler.title === "TiddlerOne") { + tiddlerOneAlreadyExists = true; + } return {title: tiddler.title, type: "application/x-tiddler-dictionary", text: `one: a\nexpand: ${tiddler.expand}\ntwo: b`} }); var newWidgetText = data.widgetText.replace("field='expand'", "index='expand'"); var newChange = {}; for (var key of Object.keys(data.expectedChange)) { var oldChange = data.expectedChange[key]; - if (oldChange.expand) { - newChange[key] = { text: `one: a\nexpand: ${oldChange.expand}\ntwo: b` } + var text; + if (!tiddlerOneAlreadyExists) { + // If it wasn't there, the created one will be JSON + text = `{\n "expand": "${oldChange.expand}"\n}`; + } else if (oldChange.expand) { + text = `one: a\nexpand: ${oldChange.expand}\ntwo: b`; } else { // In index tiddlers, the "expand" field gets completely removed, not turned into "expand: (undefined)" - newChange[key] = { text: `one: a\ntwo: b` } + text = `one: a\ntwo: b`; } + newChange[key] = { text: text }; } newData.testName = newName; newData.tiddlers = newTiddlers; @@ -514,7 +530,9 @@ Tests the checkbox widget thoroughly. /* * Checkbox widget tests using the test data above */ - for (var data of checkboxTestData) { + // MAKE SURE TO USE $tw.utils.each HERE!!! + // If you use a forloop, the closure of the tests will all use the last value "data" was assigned to, and thus all run the same test. + $tw.utils.each(checkboxTestData, function(data) { it('checkbox widget test: ' + data.testName, function() { // Setup @@ -553,7 +571,7 @@ Tests the checkbox widget thoroughly. } } }) - } + }); }); diff --git a/editions/translators/tiddlers/Extracting Translations.tid b/editions/translators/tiddlers/Extracting Translations.tid index 3fe559e10..c29d7a40e 100644 --- a/editions/translators/tiddlers/Extracting Translations.tid +++ b/editions/translators/tiddlers/Extracting Translations.tid @@ -12,7 +12,6 @@ Use this procedure if the language being submitted is not already present in the # Create the new language folder `languages/xx-XX` # Copy the language files into the language folder # Create a `plugin.info` file for the translation -# Create an appropriate flag image in `icon.tid` # Add the new language to tw5.com # Submit a pull request diff --git a/editions/tw5.com/tiddlers/Tags.tid b/editions/tw5.com/tiddlers/Tags.tid new file mode 100644 index 000000000..b77f0d452 --- /dev/null +++ b/editions/tw5.com/tiddlers/Tags.tid @@ -0,0 +1,8 @@ +created: 20250211093401937 +modified: 20250211093527189 +tags: Concepts +title: Tags + +Tags are used to organise tiddlers into categories. + +For more details see: [[Tagging]] \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/Title.tid b/editions/tw5.com/tiddlers/Title.tid new file mode 100644 index 000000000..cd89fb6dc --- /dev/null +++ b/editions/tw5.com/tiddlers/Title.tid @@ -0,0 +1,8 @@ +created: 20250211094052630 +modified: 20250211094419548 +tags: Concepts +title: Title + +The minimum requirement for a valid tiddler is a ''unique'' title. + +Learn more at: [[Tiddlers]] \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/about/Developers.tid b/editions/tw5.com/tiddlers/about/Developers.tid index 7ec64f20e..084869ae9 100644 --- a/editions/tw5.com/tiddlers/about/Developers.tid +++ b/editions/tw5.com/tiddlers/about/Developers.tid @@ -22,8 +22,3 @@ There are several resources for developers to learn more about TiddlyWiki and to *** An enhanced group search facility is available on [[mail-archive.com|https://www.mail-archive.com/tiddlywikidev@googlegroups.com/]] * Chat at https://gitter.im/TiddlyWiki/public (development room coming soon) - -! Twitter - -* Follow [[@TiddlyWiki on Twitter|http://twitter.com/#!/TiddlyWiki]] for the latest news - diff --git a/editions/tw5.com/tiddlers/community/Articles.tid b/editions/tw5.com/tiddlers/community/Articles.tid index 8408056cb..729fe539d 100644 --- a/editions/tw5.com/tiddlers/community/Articles.tid +++ b/editions/tw5.com/tiddlers/community/Articles.tid @@ -4,7 +4,7 @@ tags: Community title: Articles type: text/vnd.tiddlywiki -Here are some recent articles written about ~TiddlyWiki. Submit new articles via GitHub, Twitter or by posting in the [[TiddlyWiki Groups|Forums]]. +Here are some recent articles written about ~TiddlyWiki. Submit new articles via GitHub or by posting in the [[TiddlyWiki Groups|Forums]].