Help for making a maco for a simple code to access pubmed info

82 views
Skip to first unread message

Ya Ya

unread,
Oct 15, 2013, 12:19:29 AM10/15/13
to tiddl...@googlegroups.com
Hi, I need a help to make a macro to access the information from pubmed

+++[abstract>]
<html><div align="center"><iframe src="http://www.ncbi.nlm.nih.gov/pubmed/22464321?report=abstract&format=text" frameborder="0" width="100%" height="250"></iframe></div></html>===

I hope that we can get the information from pubmed to save the spaces in my TWs. Hopefully, the code will be like this: <<pubmed number>>, whereas number is the accession number for each item from pubmed (22464321 is the one as the sample described above). Thanks!

Stephan Hradek

unread,
Oct 15, 2013, 1:29:08 AM10/15/13
to tiddl...@googlegroups.com
Why not simply create a tiddler "pubmed"

+++[abstract>]
<html><div align="center"><iframe src="http://www.ncbi.nlm.nih.gov/pubmed/$1?report=abstract&format=text" frameborder="0" width="100%" height="250"></iframe></div></html>===



and then use it like this:

<<tiddler pubmed with: 22464321>>


Ya Ya

unread,
Oct 15, 2013, 2:54:15 AM10/15/13
to tiddl...@googlegroups.com
Thanks!
This will embed in a tiddler to access he pubmed database. Pubmed (http://www.ncbi.nlm.gov/pubmed/) is biggest database for health research. I think this maco (if this can be done) will help more people.

Peter Miller

unread,
Mar 7, 2016, 1:11:23 PM3/7/16
to TiddlyWiki
I'm guessing that this applies to Classic rather than 5?

What worked for me was putting this in a template tiddler

\define pmLink(what)
<iframe width="100%" height="480" src="http://www.ncbi.nlm.nih.gov/pubmed/$what$ " frameborder="0" allowfullscreen></iframe>
\end
<$macrocall $name="pmLink" what={{!!pmid}} />

and then transcluding that in the target tiddler (with a field pmid containing a value 26895739)

{{||pubmed}}

Acknowledgements to wherever I cloned that code from but it is indeed a useful snippet.

Best wishes

Peter
Reply all
Reply to author
Forward
0 new messages