This is the current revision of this page, as edited by imported>Izno at 21:18, 24 December 2022(make a sandbox, use module:list). The present address (URL) is a permanent link to this version.Revision as of 21:18, 24 December 2022 by imported>Izno(make a sandbox, use module:list)
This module is rated as beta. It is considered ready for widespread use, but as it is still relatively new, it should be applied with some caution to ensure results are as expected.
localgetArgs=require('Module:Arguments').getArgslocalbeginText='This article incorporates text from the public domain [[Pfam]] and [[InterPro]]: 'localbaseUrl='https://www.ebi.ac.uk/interpro/entry/'localp={}localfunctioninterproLink(arg)-- text before first space, if any; otherwise, whole arglocalaccessionNumber=arg:match('^([^ ]*) ')orarg-- text after first space, if any; otherwise, accessionNumberlocallinkText=arg:match(' (.*)')oraccessionNumberreturn'['..baseUrl..accessionNumber..' '..linkText..']'endlocalfunctionrenderList(args)locallist_args={class='inline'}for_,ainipairs(args)dotable.insert(list_args,interproLink(a))endreturnrequire('Module:List').horizontal(list_args)endfunctionp.main(frame)localargs=getArgs(frame)ifnotargs[1]thenreturn'<div class="error">[[Module:InterPro content]]: required argument 1 is missing</div>'elseifnotargs[2]thenreturn'<div role="note" style="font-style: italic;">'..beginText..interproLink(args[1])..'</div>'elsereturn'<div role="note" style="font-style: italic;">'..beginText..renderList(args)..'</div>'endendreturnp