Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:InterPro content
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local getArgs = require('Module:Arguments').getArgs local beginText = 'This article incorporates text from the public domain [[Pfam]] and [[InterPro]]: ' local baseUrl = 'https://www.ebi.ac.uk/interpro/entry/' local p = {} local function interproLink(arg) -- text before first space, if any; otherwise, whole arg local accessionNumber = arg:match('^([^ ]*) ') or arg -- text after first space, if any; otherwise, accessionNumber local linkText = arg:match(' (.*)') or accessionNumber return '[' .. baseUrl .. accessionNumber .. ' ' .. linkText .. ']' end local function renderList(args) local listRoot = mw.html.create('ul') :addClass('hlist hlist-separated') :css('display', 'inline') :css('margin', 0) for _, a in ipairs(args) do listRoot :tag('li') :wikitext(interproLink(a)) end return tostring(listRoot) end function p.main(frame) local args = getArgs(frame) if not args[1] then return '<div class="error">[[Module:InterPro content]]: required argument 1 is missing</div>' elseif not args[2] then return '<div role="note" style="font-style: italic;">' .. beginText .. interproLink(args[1]) .. '</div>' else return '<div role="note" style="font-style: italic;">' .. beginText .. renderList(args) .. '</div>' end end return p
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Module other
(
edit
)
Template:Module rating
(
edit
)
Template:Ombox
(
edit
)
Template:Tl
(
edit
)
Module:Arguments
(
edit
)
Module:InterPro content/doc
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:Yesno
(
edit
)