tiddlywiki 5.2.3 → 5.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/build-site.sh +11 -2
- package/bin/test.sh +1 -0
- package/boot/boot.js +9 -6
- package/core/images/layout-button.tid +4 -0
- package/core/images/mastodon.tid +6 -0
- package/core/language/en-GB/Buttons.multids +4 -0
- package/core/language/en-GB/ControlPanel.multids +3 -3
- package/core/language/en-GB/Fields.multids +2 -2
- package/core/language/en-GB/GettingStarted.tid +4 -3
- package/core/language/en-GB/Help/commands.tid +18 -0
- package/core/language/en-GB/Misc.multids +1 -0
- package/core/modules/commands/commands.js +42 -0
- package/core/modules/editor/engines/framed.js +12 -1
- package/core/modules/editor/factory.js +2 -2
- package/core/modules/filters/format/json.js +35 -0
- package/core/modules/filters/is/variable.js +2 -2
- package/core/modules/filters/json-ops.js +186 -0
- package/core/modules/filters/variables.js +9 -3
- package/core/modules/filters.js +15 -6
- package/core/modules/keyboard.js +13 -1
- package/core/modules/parsers/csvparser.js +25 -17
- package/core/modules/parsers/wikiparser/rules/macrodef.js +1 -1
- package/core/modules/parsers/wikiparser/rules/parsermode.js +68 -0
- package/core/modules/parsers/wikiparser/rules/styleinline.js +3 -3
- package/core/modules/parsers/wikiparser/wikiparser.js +4 -2
- package/core/modules/server/routes/put-tiddler.js +10 -0
- package/core/modules/startup/startup.js +5 -1
- package/core/modules/utils/csv.js +101 -23
- package/core/modules/utils/dom/dom.js +17 -2
- package/core/modules/utils/dom/modal.js +6 -0
- package/core/modules/utils/dom/popup.js +69 -6
- package/core/modules/utils/fakedom.js +2 -2
- package/core/modules/utils/linked-list.js +79 -75
- package/core/modules/utils/logger.js +3 -1
- package/core/modules/utils/parsetree.js +20 -10
- package/core/modules/utils/utils.js +3 -0
- package/core/modules/widgets/action-deletefield.js +2 -2
- package/core/modules/widgets/action-popup.js +10 -8
- package/core/modules/widgets/button.js +7 -2
- package/core/modules/widgets/checkbox.js +12 -5
- package/core/modules/widgets/error.js +63 -0
- package/core/modules/widgets/genesis.js +108 -0
- package/core/modules/widgets/importvariables.js +4 -1
- package/core/modules/widgets/keyboard.js +4 -0
- package/core/modules/widgets/let.js +3 -5
- package/core/modules/widgets/reveal.js +11 -10
- package/core/modules/widgets/select.js +9 -0
- package/core/modules/widgets/transclude.js +3 -5
- package/core/modules/widgets/widget.js +44 -18
- package/core/palettes/Blanca.tid +2 -0
- package/core/palettes/Blue.tid +2 -0
- package/core/palettes/BrightMute.tid +2 -0
- package/core/palettes/ContrastDark.tid +2 -0
- package/core/palettes/ContrastLight.tid +2 -0
- package/core/palettes/CupertinoDark.tid +2 -0
- package/core/palettes/DarkPhotos.tid +2 -0
- package/core/palettes/DesertSand.tid +2 -0
- package/core/palettes/GruvBoxDark.tid +2 -0
- package/core/palettes/Nord.tid +2 -0
- package/core/palettes/Rocker.tid +2 -0
- package/core/palettes/SolarFlare.tid +2 -0
- package/core/palettes/SolarizedDark.tid +2 -0
- package/core/palettes/SolarizedLight.tid +2 -0
- package/core/palettes/SpartanDay.tid +2 -0
- package/core/palettes/SpartanNight.tid +2 -0
- package/core/palettes/Twilight.tid +2 -0
- package/core/palettes/Vanilla.tid +2 -0
- package/core/templates/external-js/save-all-external-js.tid +4 -2
- package/core/templates/external-js/save-offline-external-js.tid +4 -2
- package/core/templates/single.tiddler.window.tid +1 -1
- package/core/ui/Actions/new-image.tid +1 -7
- package/core/ui/AdvancedSearch/FilterButtons/delete.tid +3 -3
- package/core/ui/AdvancedSearch/FilterButtons/dropdown.tid +2 -2
- package/core/ui/ControlPanel/Basics/retain-story-ordering-button.tid +3 -0
- package/core/ui/ControlPanel/Basics.tid +3 -2
- package/core/ui/EditTemplate/Preview/output.tid +1 -1
- package/core/ui/EditTemplate/body/default.tid +1 -1
- package/core/ui/EditTemplate/fields.tid +12 -2
- package/core/ui/EditTemplate.tid +7 -2
- package/core/ui/ImportListing.tid +5 -5
- package/core/ui/KeyboardShortcuts/advanced-search.tid +1 -1
- package/core/ui/PageControls/layout.tid +15 -0
- package/core/ui/PageTemplate.tid +1 -4
- package/core/ui/SideBar/More.tid +2 -2
- package/core/ui/SwitcherModal.tid +1 -0
- package/core/ui/TagManager.tid +75 -63
- package/core/ui/ViewTemplate/unfold.tid +6 -2
- package/core/ui/ViewTemplate.tid +1 -1
- package/core/wiki/config/DefaultTiddlersRetainStory.tid +3 -0
- package/core/wiki/config/OfficialPluginLibrary.tid +1 -1
- package/core/wiki/config/PageControlButtons.multids +1 -0
- package/core/wiki/macros/list.tid +7 -7
- package/core/wiki/macros/timeline.tid +6 -9
- package/core/wiki/macros/toc.tid +12 -8
- package/core/wiki/tags/PageControls.tid +1 -1
- package/editions/de-AT/tiddlywiki.info +0 -1
- package/editions/de-AT-server/tiddlywiki.info +0 -1
- package/editions/de-DE/tiddlywiki.info +0 -1
- package/editions/dev/tiddlers/HelloThere.tid +2 -1
- package/editions/dev/tiddlers/How to run a local plugin library for testing.tid +42 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Child widgets tutorial.tid +140 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Do nothing widget demo.tid +22 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Do nothing widget tutorial.tid +25 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Hello World demo.tid +23 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Hello World widget tutorial.tid +18 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Javascript Widget Tutorial.tid +37 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Undefined widget demo.tid +18 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Undefined widget tutorial.tid +11 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget attributes demo I.tid +48 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget attributes demo II.tid +48 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget attributes tutorial part I.tid +50 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget attributes tutorial part II.tid +33 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget refresh demo I.tid +44 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget refresh demo II.tid +40 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget refresh demo III.tid +50 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget refresh tutorial part I.tid +47 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget refresh tutorial part II.tid +37 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget refresh tutorial part III.tid +26 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/domwidget.js +47 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/domwidget.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/donothing.js +16 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/donothing.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute-optimized.js +51 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute-optimized.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute.js +47 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/hello.js +35 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/hello.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/refreshcount.js +43 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/refreshcount.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield-norefresh.js +36 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield-norefresh.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield.js +46 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield.js.meta +6 -0
- package/editions/dev/tiddlywiki.info +2 -1
- package/editions/fr-FR/tiddlers/$__editions_tw5.com_doc-macros.tid +1 -1
- package/editions/fr-FR/tiddlers/system/$__core_macros_list.tid +113 -0
- package/editions/fr-FR/tiddlers/system/$__core_macros_tag.tid +39 -0
- package/editions/fr-FR/tiddlers/system/$__core_ui_TagPickerTagTemplate.tid +25 -0
- package/editions/full/tiddlywiki.info +0 -1
- package/editions/introduction/tiddlywiki.info +0 -1
- package/editions/pluginlibrary/tiddlers/GettingStarted.tid +45 -0
- package/editions/pluginlibrary/tiddlers/PrereleaseLocalPluginLibrary.tid +6 -0
- package/editions/pluginlibrary/tiddlers/meta/SiteSubtitle.tid +3 -0
- package/editions/pluginlibrary/tiddlers/meta/SiteTitle.tid +3 -0
- package/editions/pluginlibrary/tiddlers/system/$__themes_tiddlywiki_vanilla_options_sidebarlayout.tid +3 -0
- package/editions/pluginlibrary/tiddlywiki.info +7 -0
- package/editions/prerelease/tiddlers/{Release 5.2.4.tid → Release 5.2.5.tid } +8 -17
- package/editions/prerelease/tiddlers/system/PrereleaseOfficialPluginLibrary.tid +1 -1
- package/editions/prerelease/tiddlers/system/TiddlyWiki Pre-release.tid +5 -1
- package/editions/test/tiddlers/tests/data/csv-cases.tid +282 -0
- package/editions/test/tiddlers/tests/data/filters/Recursion.tid +15 -0
- package/editions/test/tiddlers/tests/data/filters/fake-variables.tid +27 -0
- package/editions/test/tiddlers/tests/data/genesis-widget/DollarSigns.tid +14 -0
- package/editions/test/tiddlers/tests/data/genesis-widget/MultipleAttributes.tid +14 -0
- package/editions/test/tiddlers/tests/data/genesis-widget/Simple.tid +14 -0
- package/editions/test/tiddlers/tests/data/macros/NestedMacros.tid +36 -0
- package/editions/test/tiddlers/tests/data/pragmas/Parsermode.tid +36 -0
- package/editions/test/tiddlers/tests/data/transclude/Recursion.tid +13 -0
- package/editions/test/tiddlers/tests/modules/utils/test-csv.js +33 -0
- package/editions/test/tiddlers/tests/test-checkbox-widget.js +35 -1
- package/editions/test/tiddlers/tests/test-json-filters.js +112 -0
- package/editions/test/tiddlers/tests/test-linked-list.js +42 -2
- package/editions/test/tiddlers/tests/test-popup.js +63 -0
- package/editions/test/tiddlers/tests/test-utils.js +1 -0
- package/editions/test/tiddlers/tests/test-wikitext.js +16 -0
- package/editions/test/tiddlywiki.info +2 -1
- package/editions/translators/tiddlers/system/PageControlButtonsVisibility.multids +1 -0
- package/editions/translators/tiddlywiki.info +0 -1
- package/editions/tw.org/tiddlers/Code of Conduct.tid +4 -1
- package/editions/tw.org/tiddlers/Fundraising.tid +2 -2
- package/editions/tw5.com/tiddlers/Tables in WikiText CSS Utility Classes.tid +81 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/markplace.png +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/markplace.png.meta +3 -0
- package/editions/tw5.com/tiddlers/_tw_shared/sites/marketplace.tid +6 -0
- package/editions/tw5.com/tiddlers/_tw_shared/tags-TiddlyWikiSites.tid +1 -1
- package/editions/tw5.com/tiddlers/about/Funding TiddlyWiki.tid +19 -0
- package/editions/tw5.com/tiddlers/about/Open Collective.tid +14 -0
- package/editions/tw5.com/tiddlers/commands/CommandsCommand.tid +8 -0
- package/editions/tw5.com/tiddlers/commands/RenderTiddlerCommand.tid +2 -0
- package/editions/tw5.com/tiddlers/commands/RenderTiddlersCommand.tid +2 -0
- package/editions/tw5.com/tiddlers/commands/SaveTiddlerCommand.tid +2 -0
- package/editions/tw5.com/tiddlers/commands/SaveTiddlersCommand.tid +2 -0
- package/editions/tw5.com/tiddlers/community/plugins/GSD5.tid +2 -2
- package/editions/tw5.com/tiddlers/community/plugins/_JD Mobile Layout plugin_ by JD.tid +0 -1
- package/editions/tw5.com/tiddlers/community/resources/_Dropboard_ by Reid Gould.tid +0 -1
- package/editions/tw5.com/tiddlers/community/resources/_Hacks_ by Thomas Elmiger.tid +0 -2
- package/editions/tw5.com/tiddlers/community/resources/_MathCell_ by Ste Wilson.tid +0 -1
- package/editions/tw5.com/tiddlers/community/resources/_TiddlyServer_ by Matt Lauber.tid +0 -1
- package/editions/tw5.com/tiddlers/community/resources/_X3DOM for TiddlyWiki 5_ by Jamal Wills.tid +0 -1
- package/editions/tw5.com/tiddlers/concepts/CoordinateSystems.tid +42 -0
- package/editions/tw5.com/tiddlers/concepts/KeyboardShortcutTiddler.tid +2 -0
- package/editions/tw5.com/tiddlers/definitions/Federatial.tid +13 -1
- package/editions/tw5.com/tiddlers/definitions/HTML Block Elements.tid +9 -0
- package/editions/tw5.com/tiddlers/definitions/TiddlyWikiClassic.tid +3 -1
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContentsMacro Selective Expandable Example custom icons.tid +16 -0
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/TaskManagementExampleDraggable.tid +1 -1
- package/editions/tw5.com/tiddlers/features/DateFormat.tid +27 -3
- package/editions/tw5.com/tiddlers/features/JSON in TiddlyWiki.tid +1 -1
- package/editions/tw5.com/tiddlers/features/Modals.tid +3 -0
- package/editions/tw5.com/tiddlers/filters/examples/format Operator (Examples).tid +5 -2
- package/editions/tw5.com/tiddlers/filters/format.tid +5 -4
- package/editions/tw5.com/tiddlers/filters/jsonextract.tid +66 -0
- package/editions/tw5.com/tiddlers/filters/jsonget.tid +93 -0
- package/editions/tw5.com/tiddlers/filters/jsonindexes.tid +65 -0
- package/editions/tw5.com/tiddlers/filters/jsontype.tid +74 -0
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted.tid +3 -7
- package/editions/tw5.com/tiddlers/hellothere/HelloThere.tid +23 -22
- package/editions/tw5.com/tiddlers/hellothere/HelloThumbnail.tid +1 -1
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Funding.tid +10 -0
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Grok TiddlyWiki.tid +2 -0
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Introduction Video.tid +2 -0
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Latest Version.tid +9 -1
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Marketplace.tid +10 -0
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - TiddlyWikiLinks.tid +3 -1
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail_-_Federatial.tid +11 -0
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting Default Story Ordering.tid +4 -0
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting Sync System Tiddlers From Server.tid +13 -0
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting SyncLogging.tid +13 -0
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting_ More Tabs Horizontal.tid +7 -0
- package/editions/tw5.com/tiddlers/howtos/How to create keyboard shortcuts.tid +2 -0
- package/editions/tw5.com/tiddlers/howtos/Reading data from JSON tiddlers.tid +10 -1
- package/editions/tw5.com/tiddlers/images/Federatial.png +0 -0
- package/editions/tw5.com/tiddlers/images/Federatial.png.meta +3 -0
- package/editions/tw5.com/tiddlers/images/Funding.png +0 -0
- package/editions/tw5.com/tiddlers/images/{TiddlyMap.png.meta → Funding.png.meta} +1 -1
- package/editions/tw5.com/tiddlers/images/Marketplace Banner.png +0 -0
- package/editions/tw5.com/tiddlers/images/Marketplace Banner.png.meta +3 -0
- package/editions/tw5.com/tiddlers/images/New Release Banner.png +0 -0
- package/editions/tw5.com/tiddlers/macros/ListMacro.tid +3 -1
- package/editions/tw5.com/tiddlers/macros/TableOfContentsMacro.tid +36 -2
- package/editions/tw5.com/tiddlers/marketplace/TiddlyWiki Marketplace.tid +18 -0
- package/editions/tw5.com/tiddlers/mechanisms/PopupMechanism.tid +1 -0
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-modal.tid +4 -2
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-new-tiddler.tid +1 -1
- package/editions/tw5.com/tiddlers/nodejs/Installing TiddlyWiki on Node.js.tid +2 -2
- package/editions/tw5.com/tiddlers/pragmas/Pragma_ _parsermode.tid +17 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.4.tid +140 -0
- package/editions/tw5.com/tiddlers/releasenotes/Releases.tid +1 -1
- package/editions/tw5.com/tiddlers/saving/Emergency Tiddler Export.tid +1 -1
- package/editions/tw5.com/tiddlers/saving/Saving on TiddlyHost.tid +1 -1
- package/editions/tw5.com/tiddlers/saving/Saving on TiddlySpot.tid +0 -1
- package/editions/tw5.com/tiddlers/saving/Saving with Polly.tid +1 -0
- package/editions/tw5.com/tiddlers/saving/Saving.tid +12 -5
- package/editions/tw5.com/tiddlers/saving/TiddlyBucket - Save to AWS or Google Storage.tid +15 -0
- package/editions/tw5.com/tiddlers/system/doc-macros.tid +1 -1
- package/editions/tw5.com/tiddlers/system/tw5.com-card-template.tid +1 -16
- package/editions/tw5.com/tiddlers/system/tw5.com-styles.tid +168 -40
- package/editions/tw5.com/tiddlers/system/version-macros.tid +3 -4
- package/editions/tw5.com/tiddlers/system/wikitext-macros.tid +43 -15
- package/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_ClassFilters_PageTemplate.tid +9 -0
- package/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_ClassFilters_TiddlerTemplate.tid +9 -0
- package/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_Filter.tid +2 -2
- package/editions/tw5.com/tiddlers/testimonials/Testimonials - Joe Armstrong.tid +8 -0
- package/editions/tw5.com/tiddlers/testimonials/Testimonials - Network World.tid +8 -0
- package/editions/tw5.com/tiddlers/testimonials/Testimonials - Product Hunt.tid +6 -0
- package/editions/tw5.com/tiddlers/webserver/Using the external JavaScript template.tid +10 -10
- package/editions/tw5.com/tiddlers/webserver/WebServer API_ Get All Tiddlers.tid +3 -1
- package/editions/tw5.com/tiddlers/widgets/ActionPopupWidget.tid +4 -3
- package/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid +2 -1
- package/editions/tw5.com/tiddlers/widgets/DraggableWidget.tid +2 -1
- package/editions/tw5.com/tiddlers/widgets/ErrorWidget.tid +17 -0
- package/editions/tw5.com/tiddlers/widgets/EventCatcherWidget.tid +4 -3
- package/editions/tw5.com/tiddlers/widgets/GenesisWidget.tid +41 -0
- package/editions/tw5.com/tiddlers/widgets/LetWidget.tid +4 -1
- package/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid +1 -1
- package/editions/tw5.com/tiddlers/widgets/SelectWidget.tid +1 -0
- package/editions/tw5.com/tiddlers/wikitext/Macro Definitions in WikiText.tid +27 -4
- package/editions/tw5.com/tiddlers/wikitext/Styles and Classes in WikiText.tid +1 -1
- package/editions/tw5.com/tiddlers/wikitext/Table Classes Captions Headers and Footers.tid +20 -0
- package/editions/tw5.com/tiddlers/wikitext/Tables in WikiText.tid +3 -13
- package/editions/tw5.com/tiddlers/wikitext/Utility Classes.tid +20 -0
- package/editions/tw5.com/tiddlers/wikitext/parser/WikiText Parser Modes.tid +1 -1
- package/editions/twitter-archivist/tiddlers/DefaultTiddlers.tid +4 -0
- package/editions/twitter-archivist/tiddlers/HelloThere.tid +9 -0
- package/editions/twitter-archivist/tiddlers/SiteSubtitle.tid +3 -0
- package/editions/twitter-archivist/tiddlers/SiteTitle.tid +3 -0
- package/editions/twitter-archivist/tiddlywiki.info +16 -0
- package/languages/ar-PS/ControlPanel.multids +1 -1
- package/languages/ca-ES/ControlPanel.multids +1 -1
- package/languages/cs-CZ/ControlPanel.multids +1 -1
- package/languages/da-DK/ControlPanel.multids +1 -1
- package/languages/de-DE/Buttons.multids +5 -1
- package/languages/de-DE/ControlPanel.multids +1 -1
- package/languages/de-DE/Help/commands.tid +14 -0
- package/languages/de-DE/Misc.multids +1 -0
- package/languages/el-GR/ControlPanel.multids +1 -1
- package/languages/es-ES/Buttons.multids +89 -87
- package/languages/es-ES/ControlPanel.multids +18 -1
- package/languages/es-ES/Docs/PaletteColours.multids +2 -2
- package/languages/es-ES/EditTemplate.multids +3 -0
- package/languages/es-ES/Fields.multids +4 -3
- package/languages/es-ES/GettingStarted.tid +4 -3
- package/languages/es-ES/Help/default.tid +4 -1
- package/languages/es-ES/Help/listen.tid +0 -1
- package/languages/es-ES/Help/render.tid +2 -2
- package/languages/es-ES/Import.multids +1 -1
- package/languages/es-ES/Misc.multids +2 -1
- package/languages/es-ES/SideBar.multids +1 -0
- package/languages/es-ES/Snippets/ListByTag.tid +1 -1
- package/languages/fa-IR/ControlPanel.multids +1 -1
- package/languages/fr-FR/Buttons.multids +2 -0
- package/languages/fr-FR/ControlPanel.multids +4 -4
- package/languages/fr-FR/Misc.multids +3 -2
- package/languages/hi-IN/ControlPanel.multids +1 -1
- package/languages/ia-IA/ControlPanel.multids +1 -1
- package/languages/it-IT/ControlPanel.multids +1 -1
- package/languages/ja-JP/ControlPanel.multids +9 -9
- package/languages/ko-KR/ControlPanel.multids +1 -1
- package/languages/nl-NL/ControlPanel.multids +1 -1
- package/languages/pl-PL/Buttons.multids +7 -3
- package/languages/pl-PL/ControlPanel.multids +26 -24
- package/languages/pl-PL/GettingStarted.tid +4 -3
- package/languages/pl-PL/Help/commands.tid +18 -0
- package/languages/pl-PL/Help/render.tid +2 -2
- package/languages/pl-PL/Misc.multids +1 -0
- package/languages/pl-PL/ThemeTweaks.multids +3 -3
- package/languages/pt-BR/ControlPanel.multids +1 -1
- package/languages/pt-PT/ControlPanel.multids +1 -1
- package/languages/ru-RU/ControlPanel.multids +1 -1
- package/languages/sk-SK/ControlPanel.multids +1 -1
- package/languages/sl-SI/ControlPanel.multids +1 -1
- package/languages/sv-SE/ControlPanel.multids +1 -1
- package/languages/zh-Hans/Buttons.multids +36 -32
- package/languages/zh-Hans/ControlPanel.multids +19 -19
- package/languages/zh-Hans/CoreReadMe.tid +1 -1
- package/languages/zh-Hans/Docs/ModuleTypes.multids +2 -2
- package/languages/zh-Hans/Docs/PaletteColours.multids +8 -8
- package/languages/zh-Hans/Fields.multids +7 -7
- package/languages/zh-Hans/Filters.multids +1 -1
- package/languages/zh-Hans/GettingStarted.tid +8 -6
- package/languages/zh-Hans/Help/commands.tid +18 -0
- package/languages/zh-Hans/Help/fetch.tid +6 -6
- package/languages/zh-Hans/Help/init.tid +1 -1
- package/languages/zh-Hans/Help/listen.tid +5 -5
- package/languages/zh-Hans/Help/makelibrary.tid +1 -1
- package/languages/zh-Hans/Help/savetiddlers.tid +1 -1
- package/languages/zh-Hans/Help/server.tid +6 -6
- package/languages/zh-Hans/Help/setfield.tid +3 -3
- package/languages/zh-Hans/Import.multids +1 -1
- package/languages/zh-Hans/Misc.multids +12 -11
- package/languages/zh-Hans/Search.multids +6 -6
- package/languages/zh-Hans/SiteSubtitle.tid +1 -1
- package/languages/zh-Hans/Snippets/ListByTag.tid +1 -1
- package/languages/zh-Hans/ThemeTweaks.multids +7 -7
- package/languages/zh-Hans/TiddlerInfo.multids +2 -2
- package/languages/zh-Hant/Buttons.multids +4 -0
- package/languages/zh-Hant/ControlPanel.multids +2 -2
- package/languages/zh-Hant/Fields.multids +2 -2
- package/languages/zh-Hant/GettingStarted.tid +4 -3
- package/languages/zh-Hant/Help/commands.tid +18 -0
- package/languages/zh-Hant/Misc.multids +1 -0
- package/licenses/cla-individual.md +4 -0
- package/package.json +1 -1
- package/plugins/tiddlywiki/codemirror/engine.js +4 -0
- package/plugins/tiddlywiki/dynannotate/docs/readme.tid +2 -2
- package/plugins/tiddlywiki/dynannotate/modules/dynannotate.js +4 -2
- package/plugins/tiddlywiki/help/tabs/Support.tid +6 -2
- package/plugins/tiddlywiki/jasmine/command.js +33 -0
- package/plugins/tiddlywiki/jasmine/help.tid +24 -0
- package/plugins/tiddlywiki/jasmine/jasmine-plugin.js +24 -18
- package/plugins/tiddlywiki/jasmine/readme.tid +31 -1
- package/plugins/tiddlywiki/jasmine/run-wiki-based-tests.js +93 -0
- package/plugins/tiddlywiki/jasmine/startup.js +37 -0
- package/plugins/tiddlywiki/translators/macros/translatableStringEditor.tid +6 -0
- package/plugins/tiddlywiki/translators/system/styles.tid +5 -0
- package/plugins/tiddlywiki/twitter-archivist/Twitter Archives.tid +5 -0
- package/plugins/tiddlywiki/twitter-archivist/archivist.js +319 -0
- package/plugins/tiddlywiki/twitter-archivist/configTiddlerInfoMode.tid +2 -0
- package/plugins/tiddlywiki/twitter-archivist/loadtwitterarchive.js +53 -0
- package/plugins/tiddlywiki/twitter-archivist/macros.tid +222 -0
- package/plugins/tiddlywiki/twitter-archivist/plugin.info +6 -0
- package/plugins/tiddlywiki/twitter-archivist/readme.tid +33 -0
- package/plugins/tiddlywiki/twitter-archivist/spec.tid +62 -0
- package/plugins/tiddlywiki/twitter-archivist/startup.js +38 -0
- package/plugins/tiddlywiki/twitter-archivist/styles.tid +47 -0
- package/plugins/tiddlywiki/twitter-archivist/template-archive.tid +3 -0
- package/plugins/tiddlywiki/twitter-archivist/template-hashtag.tid +3 -0
- package/plugins/tiddlywiki/twitter-archivist/template-tweet.tid +3 -0
- package/plugins/tiddlywiki/twitter-archivist/template-tweeter.tid +3 -0
- package/plugins/tiddlywiki/twitter-archivist/todo.tid +15 -0
- package/plugins/tiddlywiki/twitter-archivist/usage.tid +18 -0
- package/plugins/tiddlywiki/twitter-archivist/view-template-body-cascade.tid +8 -0
- package/plugins/tiddlywiki/upgrade/UpgradeWizard.tid +3 -3
- package/readme.md +1 -1
- package/themes/tiddlywiki/vanilla/base.tid +131 -10
- package/editions/fr-FR/tiddlers/$__core_ui_TagTemplate.tid +0 -33
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Classic.tid +0 -6
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Developers.tid +0 -7
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Gentle Guide.tid +0 -11
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - HelpingTiddlyWiki.tid +0 -7
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - TWEUM2017.tid +0 -8
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - TiddlyMap.tid +0 -6
- package/editions/tw5.com/tiddlers/images/Dev Thumbnail.jpg +0 -0
- package/editions/tw5.com/tiddlers/images/Dev Thumbnail.jpg.meta +0 -3
- package/editions/tw5.com/tiddlers/images/TiddlyMap.png +0 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
/*\
|
2
|
+
title: $:/plugins/tiddlywiki/jasmine/startup.js
|
3
|
+
type: application/javascript
|
4
|
+
module-type: startup
|
5
|
+
|
6
|
+
The main module of the Jasmine test plugin for TiddlyWiki5
|
7
|
+
|
8
|
+
\*/
|
9
|
+
(function(){
|
10
|
+
|
11
|
+
/*jslint node: true, browser: true */
|
12
|
+
/*global $tw: true */
|
13
|
+
"use strict";
|
14
|
+
|
15
|
+
var jasmine = require("./jasmine-plugin.js");
|
16
|
+
|
17
|
+
exports.name = "jasmine";
|
18
|
+
|
19
|
+
if($tw.browser) {
|
20
|
+
// Jasmine is run automatically on the browser, so always add it here.
|
21
|
+
exports.startup = jasmine.runTests;
|
22
|
+
} else {
|
23
|
+
// However, if we're on node.js, the tests are explciitly run with the
|
24
|
+
// --test command. This didn't used to be the case, so if they're
|
25
|
+
// not, we'll issue a small notice to cue users in to the change
|
26
|
+
// BTW, this notice probably won't be needed forever. It was installed
|
27
|
+
// Sept 2022. If it's been four years, this notice can probably come out.
|
28
|
+
exports.startup = function() {
|
29
|
+
if(!jasmine.testsWereRun()) {
|
30
|
+
process.stdout.write("Jasmine: no \"--test\" command given, so skipping tests\n");
|
31
|
+
}
|
32
|
+
}
|
33
|
+
// We make this check after the commands are run.
|
34
|
+
exports.after = ["commands"];
|
35
|
+
}
|
36
|
+
|
37
|
+
})();
|
@@ -10,6 +10,10 @@ tags: $:/tags/Macro
|
|
10
10
|
<$list filter="""$(editFieldsFilter)$""" variable="editorField">
|
11
11
|
<$edit-text tag="$(editorTagName)$" field=<<editorField>> type="text" class="tc-edit-texteditor" minHeight="10px"/>
|
12
12
|
</$list>
|
13
|
+
<$reveal state="$:/state/showEnglishText" type=match text="show" tag="p">
|
14
|
+
Default text:
|
15
|
+
<pre><code><$view tiddler="$:/core" subtiddler=<<currentTiddler>> field=<<editorField>>/></code></pre>
|
16
|
+
</$reveal>
|
13
17
|
</td>
|
14
18
|
<td width="20px">
|
15
19
|
<div class="tc-drop-down-wrapper">
|
@@ -60,6 +64,8 @@ Delete translation
|
|
60
64
|
|
61
65
|
//<$count filter=<<translatableTiddlerTitles>>/> translatable tiddlers in this group//
|
62
66
|
|
67
|
+
<$checkbox tiddler="$:/state/showEnglishText" field="text" checked="show" unchecked="hide" default="hide"> Show the default text below editor field</$checkbox>
|
68
|
+
|
63
69
|
<$radio tiddler="$:/plugins/tiddlywiki/translators/editorTag" value="textarea"> Multi-line editors</$radio><br>
|
64
70
|
<$radio tiddler="$:/plugins/tiddlywiki/translators/editorTag" value="input"> Single-line editors</$radio>
|
65
71
|
|
@@ -0,0 +1,319 @@
|
|
1
|
+
/*\
|
2
|
+
title: $:/plugins/tiddlywiki/twitter-archivist/archivist.js
|
3
|
+
type: application/javascript
|
4
|
+
module-type: utils
|
5
|
+
|
6
|
+
Utility class for manipulating Twitter archives
|
7
|
+
|
8
|
+
\*/
|
9
|
+
(function(){
|
10
|
+
|
11
|
+
/*jslint node: true, browser: true */
|
12
|
+
/*global $tw: false */
|
13
|
+
"use strict";
|
14
|
+
|
15
|
+
function TwitterArchivist(options) {
|
16
|
+
options = options || {};
|
17
|
+
this.source = options.source;
|
18
|
+
}
|
19
|
+
|
20
|
+
TwitterArchivist.prototype.loadArchive = async function(options) {
|
21
|
+
options = options || {};
|
22
|
+
const wiki = options.wiki;
|
23
|
+
await this.source.init();
|
24
|
+
// Process the manifest and profile
|
25
|
+
const manifestData = await this.loadTwitterJsData("data/manifest.js","window.__THAR_CONFIG = ",""),
|
26
|
+
profileData = await this.loadTwitterJsData("data/profile.js","window.YTD.profile.part0 = ",""),
|
27
|
+
accountData = await this.loadTwitterJsData("data/account.js","window.YTD.account.part0 = ",""),
|
28
|
+
username = manifestData.userInfo.userName,
|
29
|
+
user_id = manifestData.userInfo.accountId;
|
30
|
+
wiki.addTiddler({
|
31
|
+
title: "Twitter Archive for @" + username,
|
32
|
+
icon: "$:/core/images/twitter",
|
33
|
+
color: "#1D9CF0",
|
34
|
+
tags: "$:/tags/TwitterArchive",
|
35
|
+
user_id: user_id,
|
36
|
+
username: username,
|
37
|
+
displayname: manifestData.userInfo.displayName,
|
38
|
+
generation_date: $tw.utils.stringifyDate(new Date(manifestData.archiveInfo.generationDate)),
|
39
|
+
account_created_date: $tw.utils.stringifyDate(new Date(accountData[0].account.createdAt)),
|
40
|
+
bio: profileData[0].profile.description.bio,
|
41
|
+
website: profileData[0].profile.description.website,
|
42
|
+
location: profileData[0].profile.description.location
|
43
|
+
});
|
44
|
+
// Process the media
|
45
|
+
await this.source.processFiles("data/tweets_media","base64",function(mediaItem) {
|
46
|
+
var ext = mediaItem.filename.split(".").slice(-1)[0];
|
47
|
+
if("jpg png".split(" ").indexOf(ext) !== -1) {
|
48
|
+
var extensionInfo = $tw.utils.getFileExtensionInfo("." + ext),
|
49
|
+
type = extensionInfo ? extensionInfo.type : null;
|
50
|
+
wiki.addTiddler({
|
51
|
+
title: "Tweet Media - " + mediaItem.filename,
|
52
|
+
tags: "$:/tags/TweetMedia",
|
53
|
+
status_id: mediaItem.filename.split("-")[0],
|
54
|
+
text: mediaItem.contents,
|
55
|
+
type: type
|
56
|
+
});
|
57
|
+
}
|
58
|
+
});
|
59
|
+
// Process the favourites
|
60
|
+
const likeData = await this.loadTwitterJsData("data/like.js","window.YTD.like.part0 = ","");
|
61
|
+
$tw.utils.each(likeData,function(like) {
|
62
|
+
// Create the tweet tiddler
|
63
|
+
var tiddler = {
|
64
|
+
title: "Tweet - " + like.like.tweetId,
|
65
|
+
text: "\\rules only html entity extlink\n" + (like.like.fullText || "").replace("\n","<br>"),
|
66
|
+
status_id: like.like.tweetId,
|
67
|
+
liked_by: user_id,
|
68
|
+
tags: "$:/tags/Tweet"
|
69
|
+
};
|
70
|
+
wiki.addTiddler(tiddler);
|
71
|
+
});
|
72
|
+
// Process the tweets
|
73
|
+
const tweetData = await this.loadTwitterJsData("data/tweets.js","window.YTD.tweets.part0 = ","");
|
74
|
+
$tw.utils.each(tweetData,function(tweet) {
|
75
|
+
// Compile the tags for the tweet
|
76
|
+
var tags = ["$:/tags/Tweet"];
|
77
|
+
// Accumulate the replacements/insertions to the text as an array of {startPos:,endPos:,fnTransform:}
|
78
|
+
var modifications = [];
|
79
|
+
// Modifications for mentions
|
80
|
+
var mentions = [];
|
81
|
+
$tw.utils.each(tweet.tweet.entities.user_mentions,function(mention) {
|
82
|
+
var title = "Tweeter - " + mention.id_str;
|
83
|
+
tags.push(title);
|
84
|
+
mentions.push(mention.id_str);
|
85
|
+
wiki.addTiddler({
|
86
|
+
title: title,
|
87
|
+
screenname: "@" + mention.screen_name,
|
88
|
+
tags: "$:/tags/Tweeter",
|
89
|
+
user_id: mention.id_str,
|
90
|
+
name: mention.name
|
91
|
+
});
|
92
|
+
modifications.push({
|
93
|
+
startPos: parseInt(mention.indices[0],10),
|
94
|
+
endPos: parseInt(mention.indices[1],10),
|
95
|
+
fnTransform: function(text) {
|
96
|
+
return "<$link to=\"" + title + "\">" +
|
97
|
+
$tw.utils.htmlEncode(text.substring(mention.indices[0],mention.indices[1])) +
|
98
|
+
"</$link>";
|
99
|
+
}
|
100
|
+
});
|
101
|
+
});
|
102
|
+
// Modifications for URLs
|
103
|
+
$tw.utils.each(tweet.tweet.entities.urls,function(urlInfo) {
|
104
|
+
modifications.push({
|
105
|
+
startPos: parseInt(urlInfo.indices[0],10),
|
106
|
+
endPos: parseInt(urlInfo.indices[1],10),
|
107
|
+
fnTransform: function(text) {
|
108
|
+
return "<a href=\"" + urlInfo.expanded_url + "\" rel=\"noopener noreferrer\" target=\"_blank\">" +
|
109
|
+
$tw.utils.htmlEncode(urlInfo.display_url) +
|
110
|
+
"</a>";
|
111
|
+
}
|
112
|
+
});
|
113
|
+
});
|
114
|
+
// Modifications for hashtags
|
115
|
+
$tw.utils.each(tweet.tweet.entities.hashtags,function(hashtag) {
|
116
|
+
var title = "#" + hashtag.text;
|
117
|
+
tags.push(title);
|
118
|
+
wiki.addTiddler({
|
119
|
+
title: title,
|
120
|
+
hashtag: hashtag.text,
|
121
|
+
tags: "$:/tags/Hashtag"
|
122
|
+
});
|
123
|
+
modifications.push({
|
124
|
+
startPos: parseInt(hashtag.indices[0],10),
|
125
|
+
endPos: parseInt(hashtag.indices[1],10),
|
126
|
+
fnTransform: function(text) {
|
127
|
+
return "<$link to=\"" + title + "\">" +
|
128
|
+
"#" + $tw.utils.htmlEncode(hashtag.text) +
|
129
|
+
"</$link>";
|
130
|
+
}
|
131
|
+
});
|
132
|
+
});
|
133
|
+
// Sort the modifications by start position
|
134
|
+
modifications.sort(function(a,b) {
|
135
|
+
return a.startPos - b.startPos;
|
136
|
+
});
|
137
|
+
// Apply the modifications in reverse order
|
138
|
+
var rawText = tweet.tweet.full_text,
|
139
|
+
posText = 0,
|
140
|
+
chunks = [];
|
141
|
+
$tw.utils.each(modifications,function(modification) {
|
142
|
+
// Process any text before the modification
|
143
|
+
if(modification.startPos > posText) {
|
144
|
+
chunks.push($tw.utils.htmlEncode(rawText.substring(posText,modification.startPos)));
|
145
|
+
}
|
146
|
+
// Process the modification
|
147
|
+
chunks.push(modification.fnTransform(rawText));
|
148
|
+
// Adjust the position
|
149
|
+
posText = modification.endPos;
|
150
|
+
});
|
151
|
+
// Process any remaining text
|
152
|
+
if(posText < rawText.length) {
|
153
|
+
chunks.push($tw.utils.htmlEncode(rawText.substring(posText)));
|
154
|
+
}
|
155
|
+
// Concatenate the chunks and replace newlines with <br>
|
156
|
+
var text = chunks.join("").replace("\n","<br>");
|
157
|
+
// Create the tweet tiddler
|
158
|
+
var tiddler = {
|
159
|
+
title: "Tweet - " + tweet.tweet.id_str,
|
160
|
+
text: "\\rules only html entity extlink\n" + text,
|
161
|
+
status_id: tweet.tweet.id_str,
|
162
|
+
user_id: user_id,
|
163
|
+
favorite_count: tweet.tweet.favorite_count,
|
164
|
+
retweet_count: tweet.tweet.retweet_count,
|
165
|
+
tags: tags,
|
166
|
+
created: $tw.utils.stringifyDate(new Date(tweet.tweet.created_at)),
|
167
|
+
modified: $tw.utils.stringifyDate(new Date(tweet.tweet.created_at))
|
168
|
+
};
|
169
|
+
if(tweet.tweet.in_reply_to_status_id_str) {
|
170
|
+
tiddler.in_reply_to_status_id = tweet.tweet.in_reply_to_status_id_str;
|
171
|
+
}
|
172
|
+
if(mentions.length > 0) {
|
173
|
+
tiddler.mention_user_ids = $tw.utils.stringifyList(mentions);
|
174
|
+
}
|
175
|
+
wiki.addTiddler(tiddler);
|
176
|
+
});
|
177
|
+
};
|
178
|
+
|
179
|
+
TwitterArchivist.prototype.loadTwitterJsData = async function(filePath,prefix,suffix) {
|
180
|
+
var tweetFileData = await this.source.loadTwitterJsData(filePath);
|
181
|
+
if(prefix) {
|
182
|
+
if(tweetFileData.slice(0,prefix.length) !== prefix) {
|
183
|
+
throw "Reading Twitter JS file " + filePath + " missing prefix '" + prefix + "'";
|
184
|
+
}
|
185
|
+
tweetFileData = tweetFileData.slice(prefix.length);
|
186
|
+
}
|
187
|
+
if(suffix) {
|
188
|
+
if(tweetFileData.slice(-suffix.length) !== suffix) {
|
189
|
+
throw "Reading Twitter JS file " + filePath + " missing suffix '" + suffix + "'";
|
190
|
+
}
|
191
|
+
tweetFileData = tweetFileData.slice(0,tweetFileData.length - suffix.length);
|
192
|
+
}
|
193
|
+
return JSON.parse(tweetFileData);
|
194
|
+
};
|
195
|
+
|
196
|
+
function TwitterArchivistSourceNodeJs(options) {
|
197
|
+
options = options || {};
|
198
|
+
this.archivePath = options.archivePath;
|
199
|
+
}
|
200
|
+
|
201
|
+
TwitterArchivistSourceNodeJs.prototype.init = async function() {
|
202
|
+
};
|
203
|
+
|
204
|
+
TwitterArchivistSourceNodeJs.prototype.processFiles = async function(dirPath,encoding,callback) {
|
205
|
+
var fs = require("fs"),
|
206
|
+
path = require("path"),
|
207
|
+
dirPath = path.resolve(this.archivePath,dirPath),
|
208
|
+
filenames = fs.readdirSync(dirPath);
|
209
|
+
$tw.utils.each(filenames,function(filename) {
|
210
|
+
callback({
|
211
|
+
filename: filename,
|
212
|
+
contents: fs.readFileSync(path.resolve(dirPath,filename),encoding)
|
213
|
+
});
|
214
|
+
});
|
215
|
+
};
|
216
|
+
|
217
|
+
TwitterArchivistSourceNodeJs.prototype.loadTwitterJsData = async function(filePath) {
|
218
|
+
var fs = require("fs"),
|
219
|
+
path = require("path");
|
220
|
+
return fs.readFileSync(path.resolve(this.archivePath,filePath),"utf8");
|
221
|
+
};
|
222
|
+
|
223
|
+
function TwitterArchivistSourceBrowser(options) {
|
224
|
+
options = options || {};
|
225
|
+
}
|
226
|
+
|
227
|
+
TwitterArchivistSourceBrowser.prototype.init = async function() {
|
228
|
+
// Open directory
|
229
|
+
this.rootDirHandle = await window.showDirectoryPicker();
|
230
|
+
};
|
231
|
+
|
232
|
+
TwitterArchivistSourceBrowser.prototype.processFiles = async function(dirPath,encoding,callback) {
|
233
|
+
const dirHandle = await this.walkDirectory(dirPath.split("/"));
|
234
|
+
for await (const [filename, fileHandle] of dirHandle.entries()) {
|
235
|
+
const contents = await fileHandle.getFile();
|
236
|
+
callback({
|
237
|
+
filename: filename,
|
238
|
+
contents: arrayBufferToBase64(await contents.arrayBuffer())
|
239
|
+
});
|
240
|
+
}
|
241
|
+
};
|
242
|
+
|
243
|
+
TwitterArchivistSourceBrowser.prototype.loadTwitterJsData = async function(filePath) {
|
244
|
+
const filePathParts = filePath.split("/");
|
245
|
+
const dirHandle = await this.walkDirectory(filePathParts.slice(0,-1));
|
246
|
+
const fileHandle = await dirHandle.getFileHandle(filePathParts.slice(-1)[0]);
|
247
|
+
const contents = await fileHandle.getFile();
|
248
|
+
return await contents.text();
|
249
|
+
};
|
250
|
+
|
251
|
+
TwitterArchivistSourceBrowser.prototype.walkDirectory = async function(arrayDirectoryEntries) {
|
252
|
+
var entries = arrayDirectoryEntries.slice(0),
|
253
|
+
dirHandle = this.rootDirHandle;
|
254
|
+
while(entries.length > 0) {
|
255
|
+
dirHandle = await dirHandle.getDirectoryHandle(entries[0]);
|
256
|
+
entries.shift();
|
257
|
+
}
|
258
|
+
return dirHandle;
|
259
|
+
};
|
260
|
+
|
261
|
+
// Thanks to MatheusFelipeMarinho
|
262
|
+
// https://github.com/MatheusFelipeMarinho/venom/blob/43ead0bfffa57a536a5cff67dd909e55da9f0915/src/lib/wapi/helper/array-buffer-to-base64.js#L55
|
263
|
+
function arrayBufferToBase64(arrayBuffer) {
|
264
|
+
var base64 = '';
|
265
|
+
var encodings =
|
266
|
+
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
267
|
+
|
268
|
+
var bytes = new Uint8Array(arrayBuffer);
|
269
|
+
var byteLength = bytes.byteLength;
|
270
|
+
var byteRemainder = byteLength % 3;
|
271
|
+
var mainLength = byteLength - byteRemainder;
|
272
|
+
|
273
|
+
var a, b, c, d;
|
274
|
+
var chunk;
|
275
|
+
|
276
|
+
// Main loop deals with bytes in chunks of 3
|
277
|
+
for (var i = 0; i < mainLength; i = i + 3) {
|
278
|
+
// Combine the three bytes into a single integer
|
279
|
+
chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
|
280
|
+
|
281
|
+
// Use bitmasks to extract 6-bit segments from the triplet
|
282
|
+
a = (chunk & 16515072) >> 18; // 16515072 = (2^6 - 1) << 18
|
283
|
+
b = (chunk & 258048) >> 12; // 258048 = (2^6 - 1) << 12
|
284
|
+
c = (chunk & 4032) >> 6; // 4032 = (2^6 - 1) << 6
|
285
|
+
d = chunk & 63; // 63 = 2^6 - 1
|
286
|
+
|
287
|
+
// Convert the raw binary segments to the appropriate ASCII encoding
|
288
|
+
base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d];
|
289
|
+
}
|
290
|
+
|
291
|
+
// Deal with the remaining bytes and padding
|
292
|
+
if (byteRemainder == 1) {
|
293
|
+
chunk = bytes[mainLength];
|
294
|
+
|
295
|
+
a = (chunk & 252) >> 2; // 252 = (2^6 - 1) << 2
|
296
|
+
|
297
|
+
// Set the 4 least significant bits to zero
|
298
|
+
b = (chunk & 3) << 4; // 3 = 2^2 - 1
|
299
|
+
|
300
|
+
base64 += encodings[a] + encodings[b] + '==';
|
301
|
+
} else if (byteRemainder == 2) {
|
302
|
+
chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1];
|
303
|
+
|
304
|
+
a = (chunk & 64512) >> 10; // 64512 = (2^6 - 1) << 10
|
305
|
+
b = (chunk & 1008) >> 4; // 1008 = (2^6 - 1) << 4
|
306
|
+
|
307
|
+
// Set the 2 least significant bits to zero
|
308
|
+
c = (chunk & 15) << 2; // 15 = 2^4 - 1
|
309
|
+
|
310
|
+
base64 += encodings[a] + encodings[b] + encodings[c] + '=';
|
311
|
+
}
|
312
|
+
return base64;
|
313
|
+
}
|
314
|
+
|
315
|
+
exports.TwitterArchivist = TwitterArchivist;
|
316
|
+
exports.TwitterArchivistSourceNodeJs = TwitterArchivistSourceNodeJs;
|
317
|
+
exports.TwitterArchivistSourceBrowser = TwitterArchivistSourceBrowser;
|
318
|
+
|
319
|
+
})();
|
@@ -0,0 +1,53 @@
|
|
1
|
+
/*\
|
2
|
+
title: $:/plugins/tiddlywiki/twitter-archivist/loadtwitterarchive.js
|
3
|
+
type: application/javascript
|
4
|
+
module-type: command
|
5
|
+
|
6
|
+
Read tiddlers from an unzipped Twitter archive
|
7
|
+
|
8
|
+
\*/
|
9
|
+
(function(){
|
10
|
+
|
11
|
+
/*jslint node: true, browser: true */
|
12
|
+
/*global $tw: false */
|
13
|
+
"use strict";
|
14
|
+
|
15
|
+
var widget = require("$:/core/modules/widgets/widget.js");
|
16
|
+
|
17
|
+
exports.info = {
|
18
|
+
name: "loadtwitterarchive",
|
19
|
+
synchronous: false
|
20
|
+
};
|
21
|
+
|
22
|
+
var Command = function(params,commander,callback) {
|
23
|
+
this.params = params;
|
24
|
+
this.commander = commander;
|
25
|
+
this.callback = callback;
|
26
|
+
};
|
27
|
+
|
28
|
+
Command.prototype.execute = function() {
|
29
|
+
var self = this;
|
30
|
+
if(this.params.length < 1) {
|
31
|
+
return "Missing path to Twitter archive";
|
32
|
+
}
|
33
|
+
var archivePath = this.params[0];
|
34
|
+
// Load tweets
|
35
|
+
var archiveSource = new $tw.utils.TwitterArchivistSourceNodeJs({
|
36
|
+
archivePath: archivePath
|
37
|
+
}),
|
38
|
+
archivist = new $tw.utils.TwitterArchivist({
|
39
|
+
source: archiveSource
|
40
|
+
});
|
41
|
+
archivist.loadArchive({
|
42
|
+
wiki: this.commander.wiki
|
43
|
+
}).then(function() {
|
44
|
+
self.callback(null);
|
45
|
+
}).catch(function(err) {
|
46
|
+
self.callback(err);
|
47
|
+
});
|
48
|
+
return null;
|
49
|
+
};
|
50
|
+
|
51
|
+
exports.Command = Command;
|
52
|
+
|
53
|
+
})();
|
@@ -0,0 +1,222 @@
|
|
1
|
+
title: $:/plugins/tiddlywiki/twitter-archivist/macros
|
2
|
+
tags: $:/tags/Macro
|
3
|
+
|
4
|
+
\define skinny-tabs(tabNames,tabCaptions,defaultTab,state)
|
5
|
+
<$let
|
6
|
+
currTab={{{ [<__state__>get[text]else<__defaultTab__>] }}}
|
7
|
+
>
|
8
|
+
<div class="tc-tab-set">
|
9
|
+
<div class="tc-tab-buttons">
|
10
|
+
<$list filter="[enlist<__tabNames__>]" variable="tab" counter="tabCounter">
|
11
|
+
<$let
|
12
|
+
caption={{{ [enlist<__tabCaptions__>nth<tabCounter>] }}}
|
13
|
+
>
|
14
|
+
<$list filter="[<tab>match<currTab>]" variable="ignore">
|
15
|
+
<$button aria-checked="true" class="tc-tab-selected" role="switch">
|
16
|
+
<$action-setfield $tiddler=<<__state__>> $value=<<tab>>/>
|
17
|
+
<$text text=<<caption>>/>
|
18
|
+
</$button>
|
19
|
+
</$list>
|
20
|
+
<$list filter="[<tab>!match<currTab>]" variable="ignore">
|
21
|
+
<$button role="switch">
|
22
|
+
<$action-setfield $tiddler=<<__state__>> $value=<<tab>>/>
|
23
|
+
<$text text=<<caption>>/>
|
24
|
+
</$button>
|
25
|
+
</$list>
|
26
|
+
</$let>
|
27
|
+
</$list>
|
28
|
+
</div>
|
29
|
+
<div class="tc-tab-divider"></div>
|
30
|
+
<div class="tc-tab-content">
|
31
|
+
<$list filter="[enlist<__tabNames__>]" variable="tab" counter="tabCounter">
|
32
|
+
<$list filter="[<tab>match<currTab>]" variable="ignore">
|
33
|
+
<div class="tc-reveal">
|
34
|
+
<$macrocall $name=<<currTab>>/>
|
35
|
+
</div>
|
36
|
+
</$list>
|
37
|
+
<$list filter="[<tab>!match<currTab>]" variable="ignore">
|
38
|
+
<div class="tc-reveal" hidden="true"></div>
|
39
|
+
</$list>
|
40
|
+
</$list>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
</$let>
|
44
|
+
\end
|
45
|
+
|
46
|
+
\define list-archives()
|
47
|
+
\whitespace trim
|
48
|
+
<$list filter="[tag[$:/tags/TwitterArchive]limit[1]]" emptyMessage=<<list-archives-empty>> variable="ignore">
|
49
|
+
<ul>
|
50
|
+
<$list filter="[tag[$:/tags/TwitterArchive]sort[displayname]]">
|
51
|
+
<li>
|
52
|
+
<$link><$text text=<<currentTiddler>>/></$link>
|
53
|
+
</li>
|
54
|
+
</$list>
|
55
|
+
</ul>
|
56
|
+
</$list>
|
57
|
+
\end
|
58
|
+
|
59
|
+
\define list-archives-empty()
|
60
|
+
<p style="background:#ff3;color:#333;padding:8px;font-weight:bold;">
|
61
|
+
No Twitter Archives are currently loaded
|
62
|
+
</p>
|
63
|
+
<$transclude tiddler="$:/plugins/tiddlywiki/twitter-archivist/usage" mode="block"/>
|
64
|
+
\end
|
65
|
+
|
66
|
+
\define show-archive()
|
67
|
+
<$let
|
68
|
+
user_id={{!!user_id}}
|
69
|
+
>
|
70
|
+
<div class="tc-twitter-archive">
|
71
|
+
<table>
|
72
|
+
<tbody>
|
73
|
+
<<show-archive-attribute "Username" "username" prefix:"@">>
|
74
|
+
<<show-archive-attribute "Display Name" "displayname">>
|
75
|
+
<<show-archive-attribute "Bio" "bio">>
|
76
|
+
<<show-archive-attribute "Location" "location">>
|
77
|
+
<<show-archive-attribute "Website" "website">>
|
78
|
+
<<show-archive-calculated-attribute "Number of Tweets" "[tag[$:/tags/Tweet]field:user_id<user_id>count[]]">>
|
79
|
+
<<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>]">>
|
80
|
+
<<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>]">>
|
81
|
+
<<show-archive-calculated-attribute "Number of Tweeters Mentioned" "[tag[$:/tags/Tweeter]count[]]">>
|
82
|
+
<<show-archive-attribute "User ID" "user_id">>
|
83
|
+
<<show-archive-attribute "Account Creation Date" "account_created_date" format:"date" template:"DDth mmm YYYY 0hh:0mm:0ss">>
|
84
|
+
<<show-archive-attribute "Archive Generation Date" "generation_date" format:"date" template:"DDth mmm YYYY 0hh:0mm:0ss">>
|
85
|
+
</tbody>
|
86
|
+
</table>
|
87
|
+
<$macrocall $name="skinny-tabs" tabNames="show-archive-tweets show-favorited-tweets" tabCaptions="Tweets Favourites" defaultTab="show-archive-tweets" state=<<qualify "$:/state/skinny-tabs/archive">>/>
|
88
|
+
</div>
|
89
|
+
</$let>
|
90
|
+
\end
|
91
|
+
|
92
|
+
\define show-archive-tweets()
|
93
|
+
<$let user_id={{!!user_id}}>
|
94
|
+
<$list filter="[tag[$:/tags/Tweet]field:user_id<user_id>!sort[created]limit[50]]">
|
95
|
+
<<show-tweet>>
|
96
|
+
</$list>
|
97
|
+
</$let>
|
98
|
+
\end
|
99
|
+
|
100
|
+
\define show-favorited-tweets()
|
101
|
+
<$let user_id={{!!user_id}}>
|
102
|
+
<$list filter="[tag[$:/tags/Tweet]field:liked_by<user_id>limit[50]]">
|
103
|
+
<<show-tweet>>
|
104
|
+
</$list>
|
105
|
+
</$let>
|
106
|
+
\end
|
107
|
+
|
108
|
+
\define show-archive-attribute(caption,field,prefix,format:"text",template)
|
109
|
+
<tr>
|
110
|
+
<th>
|
111
|
+
<$text text=<<__caption__>>/>
|
112
|
+
</th>
|
113
|
+
<td>
|
114
|
+
<$text text={{{ [<__prefix__>] }}}/>
|
115
|
+
<$view field=<<__field__>> format=<<__format__>> template=<<__template__>>/>
|
116
|
+
</td>
|
117
|
+
</tr>
|
118
|
+
\end
|
119
|
+
|
120
|
+
\define show-archive-calculated-attribute(caption,filter)
|
121
|
+
<tr>
|
122
|
+
<th>
|
123
|
+
<$text text=<<__caption__>>/>
|
124
|
+
</th>
|
125
|
+
<td>
|
126
|
+
<$text text={{{ [subfilter<__filter__>] }}}/>
|
127
|
+
</td>
|
128
|
+
</tr>
|
129
|
+
\end
|
130
|
+
|
131
|
+
\define show-tweet()
|
132
|
+
<div class="tc-twitter-tweet">
|
133
|
+
<div class="tc-twitter-tweet-header">
|
134
|
+
<$list filter="[<currentTiddler>has[user_id]]" variable="ignore">
|
135
|
+
<$let archive={{{ [tag[$:/tags/TwitterArchive]field:user_id{!!user_id}] }}}>
|
136
|
+
<span class="tc-twitter-tweet-header-displayname">
|
137
|
+
<$text text={{{ [<archive>get[displayname]] }}}/>
|
138
|
+
</span>
|
139
|
+
<span class="tc-twitter-tweet-header-username">
|
140
|
+
@<$text text={{{ [<archive>get[username]] }}}/>
|
141
|
+
</span>
|
142
|
+
•
|
143
|
+
</$let>
|
144
|
+
</$list>
|
145
|
+
<$link to=<<currentTiddler>>>
|
146
|
+
<span class="tc-twitter-tweet-header-date">
|
147
|
+
<$view field="created" format="date" template="DDth mmm YYYY 0hh:0mm:0ss"/>
|
148
|
+
</span>
|
149
|
+
</$link>
|
150
|
+
</div>
|
151
|
+
<$list filter="[<currentTiddler>get[in_reply_to_status_id]addprefix[Tweet - ]is[tiddler]]" variable="replyTo">
|
152
|
+
<div class="tc-twitter-tweet-reply-to">
|
153
|
+
Reply to <$link to=<<replyTo>>><$text text=<<replyTo>>/></$link>
|
154
|
+
</div>
|
155
|
+
</$list>
|
156
|
+
<div class="tc-twitter-tweet-body">
|
157
|
+
<$transclude field="text"/>
|
158
|
+
</div>
|
159
|
+
<div class="tc-twitter-tweet-media">
|
160
|
+
<$list filter="[tag[$:/tags/TweetMedia]field:status_id{!!status_id}]" variable="mediaItem">
|
161
|
+
<$transclude tiddler=<<mediaItem>>/>
|
162
|
+
</$list>
|
163
|
+
</div>
|
164
|
+
<div class="tc-twitter-tweet-footer">
|
165
|
+
<$list filter="[<currentTiddler>has[retweet_count]]" variable="ignore">
|
166
|
+
<span class="tc-twitter-tweet-footer-retweets">
|
167
|
+
Retweets: <$view field="retweet_count" format="text"/>
|
168
|
+
</span>
|
169
|
+
</$list>
|
170
|
+
<$list filter="[<currentTiddler>has[favorite_count]]" variable="ignore">
|
171
|
+
<span class="tc-twitter-tweet-footer-likes">
|
172
|
+
Likes: <$view field="favorite_count" format="text"/>
|
173
|
+
</span>
|
174
|
+
</$list>
|
175
|
+
<span class="tc-twitter-tweet-footer-twitter-link">
|
176
|
+
<a href={{{ [{!!status_id}addprefix[https://twitter.com/i/web/status/]] }}} rel="noopener noreferrer" target="_blank">View on Twitter</a>
|
177
|
+
</span>
|
178
|
+
</div>
|
179
|
+
</div>
|
180
|
+
\end
|
181
|
+
|
182
|
+
\define show-tweet-thread(archive)
|
183
|
+
<div class="tc-twitter-tweet-thread">
|
184
|
+
<$list filter="[<currentTiddler>has[in_reply_to_status_id]]" variable="ignore">
|
185
|
+
<div class="tc-twitter-tweet-reply">
|
186
|
+
<$tiddler tiddler={{{ [<currentTiddler>get[in_reply_to_status_id]addprefix[Tweet - ]] }}}>
|
187
|
+
<$macrocall $name="show-tweet"/>
|
188
|
+
</$tiddler>
|
189
|
+
</div>
|
190
|
+
</$list>
|
191
|
+
<$macrocall $name="show-tweet"/>
|
192
|
+
</div>
|
193
|
+
\end
|
194
|
+
|
195
|
+
\define show-tweeter()
|
196
|
+
<table>
|
197
|
+
<tbody>
|
198
|
+
<tr><th>Username</th><td><$text text={{!!screenname}}/></td></tr>
|
199
|
+
<tr><th>Display Name</th><td><$text text={{!!name}}/></td></tr>
|
200
|
+
<tr><th>User ID</th><td><$text text={{!!user_id}}/></td></tr>
|
201
|
+
</tbody>
|
202
|
+
</table>
|
203
|
+
<a href={{{ [{!!user_id}addprefix[https://twitter.com/intent/user?user_id=]] }}} rel="noopener noreferrer" target="_blank">View on Twitter</a>
|
204
|
+
<$macrocall $name="skinny-tabs" tabNames="show-tweeter-mentions" tabCaptions="Mentions" defaultTab="show-tweeter-mentions" state=<<qualify "$:/state/skinny-tabs/tweeter-mentions">>/>
|
205
|
+
\end
|
206
|
+
|
207
|
+
\define show-tweeter-mentions()
|
208
|
+
<$list filter="[tag[$:/tags/Tweet]tag<currentTiddler>]">
|
209
|
+
<$macrocall $name="show-tweet" title=<<currentTiddler>>/>
|
210
|
+
</$list>
|
211
|
+
\end
|
212
|
+
|
213
|
+
\define show-hashtag()
|
214
|
+
<a href={{{ [{!!user_id}addprefix[https://twitter.com/intent/user?user_id=]] }}} rel="noopener noreferrer" target="_blank">View on Twitter</a>
|
215
|
+
<$macrocall $name="skinny-tabs" tabNames="show-hashtag-tweets" tabCaptions="Tweets" defaultTab="show-hashtag-tweets" state=<<qualify "$:/state/skinny-tabs/hashtag-tweets">>/>
|
216
|
+
\end
|
217
|
+
|
218
|
+
\define show-hashtag-tweets()
|
219
|
+
<$list filter="[tag[$:/tags/Tweet]tag<currentTiddler>]">
|
220
|
+
<$macrocall $name="show-tweet" title=<<currentTiddler>>/>
|
221
|
+
</$list>
|
222
|
+
\end
|