URL Import Gadget (URL to WikiText external link)

95 views
Skip to first unread message

Charlie Veniot

unread,
Apr 15, 2023, 6:43:16 PM4/15/23
to TiddlyWiki
Please find attached in this post the JSON file you need to download and drag into any TiddlyWiki to add this gadget.

TW_UrlImportGadget.json

Krisztián Csordás

unread,
Apr 29, 2023, 6:50:44 PM4/29/23
to TiddlyWiki
I use a bookmarklet that copies the wikitext link to the clipboard:

javascript: navigator.clipboard.writeText(`[[${document.title.replaceAll('|','–')}|${document.location.href}]]`);

Charlie Veniot

unread,
Apr 29, 2023, 8:09:43 PM4/29/23
to TiddlyWiki
I have no idea how your bookmarklet helps to create a WikiText link (in TiddlyWiki) to an external site.

Could you clarify?

Krisztián Csordás

unread,
Apr 30, 2023, 3:40:56 AM4/30/23
to TiddlyWiki
When you click it in the bookmarks bar, it copies a wikitext link created from the current page title and URL. Then you can paste it into the tiddler like any other text.

Charlie Veniot

unread,
Apr 30, 2023, 11:14:31 AM4/30/23
to TiddlyWiki
Click (on what, I'm not sure) to copy and then paste is a great option for those who cannot drag and drop.

Drag and drop makes me much happier.

Krisztián Csordás

unread,
May 1, 2023, 1:24:16 AM5/1/23
to TiddlyWiki
Bookmarklet - Wikipedia

Personally, I prefer `[[URL Import Gadget (URL to WikiText external link)|https://groups.google.com/g/TiddlyWiki/c/q3A8j3sIXjI]]` over `[[q3A8j3sIXjI|https://groups.google.com/g/TiddlyWiki/c/q3A8j3sIXjI]]`.

Charlie Veniot

unread,
May 1, 2023, 8:31:05 AM5/1/23
to TiddlyWiki
Why on earth would you have not provided that crucial observation in your first post?  I only tested with links that do not have gibberish in the URL.

Charlie Veniot

unread,
May 1, 2023, 3:56:04 PM5/1/23
to TiddlyWiki
I just wasted the last hour trying to get that bookmarklet to work.

If you recommend this as a good way to go, could you give some pointers on how to get it working?

Eric Shulman

unread,
May 1, 2023, 4:27:40 PM5/1/23
to TiddlyWiki
To create the bookmarklet:
(note: these instructions are for Chrome.  Similar actions are available for other browsers, though the menu item and dialog may vary somewhat)
  • First, select and copy the code posted by cskrisz to your clipboard:
  • ```
    javascript: navigator.clipboard.writeText(`[[${document.title.replaceAll('|','–')}|${document.location.href}]]`);
  • ```
  • Then, right-click on your browser's bookmark bar and select "Add page..." from the popup menu.
  • In the dialog that appears, in the "Name" input, enter something like "Make a TW prettylink", and in the "URL" input, paste the "javascript:..." code from your clipboard.
  • Press "Save" to add the bookmark to your browser.
  • Note that the new bookmark will appear at the end of your existing bookmarks.  You can use drag-and-drop or "Bookmark manager" to relocate the bookmark within the bookmark bar
To use the bookmarklet:
  • Go to any page on any website you like
  • Press the "Make a TW prettylink" bookmark
  • This will copy the current URL's title and href to your system clipboard, formatted as a TW prettylink (e.g., `[[Title|URL]]`)
To add the prettylink to your TW document:
  • Open your TW document
  • Press "+" to create a new tiddler (or edit an existing tiddler)
  • Place the cursor in the tiddler's text area input
  • Press ctrl-V or right-click and select "Paste" from the popup menu.
done.

Charlie Veniot

unread,
May 1, 2023, 4:38:40 PM5/1/23
to TiddlyWiki
Thanks Eric, I had everything working, but had no clue how to use it.

Having to navigate to the site is okay, but that's a completely different use case than the one in the OP, which is about grabbing links on a page.

Charlie Veniot

unread,
May 1, 2023, 5:02:28 PM5/1/23
to TiddlyWiki
Well, mine was about grabbing links that don't have gibberish in them.
Reply all
Reply to author
Forward
0 new messages