문서 편집 권한이 없습니다. 다음 이유를 확인해주세요: 요청한 명령은 다음 권한을 가진 사용자에게 제한됩니다: 사용자. 문서의 원본을 보거나 복사할 수 있습니다. local p = {} function p._entityid(frame,id,alt) if type(id) == 'string' then id = mw.ustring.upper(mw.ustring.sub(id,1,1))..mw.ustring.sub(id,2) if mw.ustring.match(id,'^Q%d+$') then -- id is in the proper format for a Wikidata entity if mw.wikibase.isValidEntityId(id) then -- id is valid id = mw.wikibase.getEntity(id) if id then -- entity exists return id.id end end else id = mw.wikibase.getEntityIdForTitle(id) if id then -- id is a title that matches a Wikidata entity local instanceOf = mw.wikibase.getBestStatements(id, 'P31')[1] if instanceOf and instanceOf.mainsnak.datavalue.value.id ~= 'Q4167410' then -- not disambiguation return mw.wikibase.getEntity(id).id end end end end return alt or nil end function p.entityid(frame) return p._entityid(frame, frame.args[1], frame.args[2]) end return p 이 문서에서 사용한 틀: 모듈:ResolveEntityId/설명문서 (원본 보기) 모듈:ResolveEntityId 문서로 돌아갑니다.