How do I get Wikipedia links automatically into tiddlers, when pasting text from Wikipedia?

187 views
Skip to first unread message

Mobil Home

unread,
Jul 17, 2018, 7:55:26 PM7/17/18
to TiddlyWiki
How do I get Wikipedia links automatically into tiddlers, when pasting text from Wikipedia?

TonyM

unread,
Jul 17, 2018, 9:11:07 PM7/17/18
to TiddlyWiki
Mobil Home,

You could use an iframe

<iframe src='https://en.wikipedia.org/wiki/France_national_football_team' frameborder="0" width="1024"; height="600"></iframe>
Since you must be on line for the links to be of any value

You could print to a pdf printer that retains links and drag the PDF back into the wiki

In Firefox add the extension 

Copy HTML Text WE (just tested as previous deprecated)

Highlight your html source and r-click, Copy content as HTML text, Then paste into a tiddler
In this case many of the links are all relative references and they will take you to missing tiddlers
Replacing <a href="/wiki/ with <a href="https://en.wikipedia.org/wiki/ 
To do this I would paste the html into notepadd++ then do the replace and then paste it into a tiddler


Drag the attached file into your wiki to see the result.

Regards
Tony
France national football team.json

Mobil Home

unread,
Jul 18, 2018, 2:27:01 PM7/18/18
to tiddl...@googlegroups.com
Hi, thanks.
Just saying: when I copy text from Wikipedia and I paste it into my wordpress, links are copied automatically. So that means that a normal copy also grabs the links, not just special html copy. What about that? How is that possible for wordpress?

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/Zi-v1qOzUHU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/68287d40-c133-48ee-8002-bae4c1a2b411%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

TonyM

unread,
Jul 18, 2018, 8:13:15 PM7/18/18
to TiddlyWiki
Mobil,

Good question. The WordPress "visual" editor accepts the pasting of data in a rich format. If you then click on the text tab you will discover the actual content of the page or post is in fact HTML.

Since tiddlers are normally wiki text if you paste the same content into a tiddler it will paste simple text, you may also need to format it and followup any links and add them. This is not what you are looking for.

There are a number of solutions.
  • There is a visual editor for tiddlywiki somewhere, perhaps you can paste into that (I will see if I can locate it)
  • TiddlyClip for firefox may be good at this http://tiddlyclip.tiddlyspot.com/ (I have not used it lately)
    TiddlyClip allows parts of webpages to be clipped into a TiddlyWiki, and consists of two parts, the browser addon and the TiddlyWiki plugin
    Copys content and provides link to source page
  • Copy as html for  a link only or blocks of text (as suggested above),pasting that into wikitext will work correctly once you view the tiddler, note the need to update the domain for relative links
  • You browser may have tools for this very function eg copy link location https://en.wikipedia.org/wiki/Hough_riots
<b><a href="/wiki/National_Socialist_Underground_trial" title="National Socialist Underground trial">National Socialist Underground trial</a></b>

Update to
<b><a href="https://en.wikipedia.org/wiki/Main_Page/wiki/National_Socialist_Underground_trial" title="National Socialist Underground trial">National Socialist Underground trial</a></b>
Note: the example is not a good one because its on the main page and will most likely change

I think there must be other options, so lets see if others suggest more.

I will let you know if I find a better way. Personally I have being building tools for rapid deployment and have not being using tiddlywiki for such work lately.

Regards
Tony

TonyM

unread,
Jul 18, 2018, 8:16:54 PM7/18/18
to TiddlyWiki
Mobil,

I just checked, http://bjtools.tiddlyspot.com/#VisualEditor seems to have the behaviour you are after.

Pasting a copied link or text works and relative links are changed to absolute links "just like wordPress"

Regards
Tony

Mark S.

unread,
Jul 19, 2018, 12:21:07 PM7/19/18
to TiddlyWiki
Tony has some great suggestions there.

Here's a klugey approach that doesn't require plugins.

In firefox, you can right select the text and "view source". Then copy the selected source. Paste into your TW tiddler.

NOW, the problem is that all of Wikipedias links are relative. You can try, to change the base at the top of your tiddler:

  <base href="https://en.wikipedia.org/"/>


This will change the base reference and make the links functional. This is a kludge. I don't think the "base" tag is actually supposed to work outside the head tag, but it seems to on FF.

However, it will also change the base reference to any tiddlers that have relative links to your local image files, for example. A lot of people don't seem to use these, so that may not be a problem. Fortunately, it doesn't change internal TW linking because TW uses it's own TW mechanism. It will also change the base path of other links if you are clipping from some other source that uses relative links. You can add a base tag to the new tiddler, but whichever tiddler is at top will win the base name war. The base name is also only in effect when the tiddler is open. (I think).

-- Mark

TonyM

unread,
Jul 19, 2018, 9:53:45 PM7/19/18
to TiddlyWiki
Mark,

Thanks for sharing that hack.

Tony
Reply all
Reply to author
Forward
0 new messages