Documentação do módulo[ver] [editar] [histórico] [purgar]

Descrição editar

Este módulo tem funções auxiliares de {{Info/Livro}}

Uso editar

Outra documentação:

local localdata = require 'Módulo:Infobox/Localdata'
local general = require "Módulo:Infobox/Funções"
local person = require "Módulo:Infobox/Funções/Pessoa"
local wikidata = require "Módulo:Infobox/Wikidata"
local linguistic = require "Módulo:Linguística"
local convert = require "Módulo:Conversão"

local function italics(query)
    local val = wikidata.formatAndCat(query)
    if val then
        return '<i>' .. val .. '</i>'
    end
end

return
        {
    maincolor = 'FFE680',
    parts =
        {
        general.title( 'livro'),
        general.mainimage{ wikidata = {property = {'P3383', 'P2716', 'P18', 'P10'}, numval = 1}},
        {type = 'table', rows = {
                {type = 'row', label = 'Título original', value = 'título original', plurallabel = 'Títulos originais' , wikidata = function ( item )
                  return italics({entity = item, property = 'P1476', conjtype = 'new line' , showlang = true })--encontre uma maneira de remover quando o título original estiver em português
            end
            },
            {type = 'row', label = 'Língua original', value = 'língua original' , plurallabel = 'Línguas originais', property = 'P364,P407'},
            {type = 'row', label = 'Autor', value = 'autor', plurallabel = 'Autores' , wikidata = {property = 'P50' , conjtype = 'new line'}},
            {type = 'row', label = 'Ilustração', value = 'ilustrações' , wikidata = {property = 'P110' , conjtype = 'new line'}},
            {type = 'row', label = 'Genéro', value = {'genéro', 'genêro'}, plurallabel = 'Genéros' , wikidata = {property = 'P136' , conjtype = 'new line'}},
            {type = 'row', label = 'Assunto', value = 'assunto', plurallabel = 'Assuntos' , wikidata = {property = 'P921'}},
            {type = 'row', label = 'Linha temporal', value = 'tempo', plurallabel = 'Linhas temporais'},
            {type = 'row', label = 'Localização espacial', value = {'espaço', 'espaco'}, plurallabel = 'Linhas temporais'},
            {type = "row", label = 'Ilustrador', value = 'ilustrador', plurallabel = 'Ilustradores'},
            {type = 'row', label = 'Arte de capa', value = 'artista_capa'},
            {type = 'row', label = 'Tradutor', value = 'tradutor'},
            {type = 'row', label = 'Revisor', value = 'revisor'},
            {type = 'row', label = 'Editora', value = 'editora'},
            {type = 'row', label = 'Editor', value = 'editor', plurallabel = 'Editores' , wikidata = {property = 'P123' , conjtype = 'new line'}},
            {type = 'row', label = 'Formato', value = {'formato', 'tipo_media'},
            {type = 'row', label = 'Coleção', value = 'coleção', plurallabel = 'coleções' , wikidata = {property = 'P195' , conjtype = 'new line'}},
            {type = 'row', label = 'Data de produção', value = 'data de produção', wikidata = {property = 'P571', sorttype = 'chronological'}},
            {type = 'row', label = 'Date de lançamento', value = 'data', plurallabel = 'Datas de lançamento' , wikidata = {property = 'P577' , conjtype = 'new line', sorttype = 'chronological', showqualifiers = 'P291,P276'}},
            {type = 'row', label = 'Páginas', value = {'páginas', 'paginas'},
            {type = 'row', label = 'País', value = 'país' , property = 'P495,P17'},
            {type = 'row', label = 'Obra derivada', value = 'obras', plurallabel = 'Obras derivadas' , wikidata = {property = 'P4969' , conjtype = 'new line'}},
            {type = 'row', label = '[[International Standard Book Number|ISBN]] 10', value = 'isbn10' , wikidata = {property = 'P957' , conjtype = 'new line'}},
            {type = 'row', label = '[[International Standard Book Number|ISBN]] 13', value = {'isbn13', 'isbn'} , wikidata = {property = 'P212' , conjtype = 'new line'}},
                }},
            {type = 'table', title = 'Distinções', rows = {
                    {type = 'row', value = 'distinção', wikidata = {property = 'P166' , conjtype = 'new line', showqualifiers = 'P585'}},
            }},
            {type = 'table', title = 'Sucessão', rows = {
                    {type = 'row', label = 'Série', value = 'série', plurallabel = 'Séries' , wikidata = function ( item )
                    return italics({entity = item, property = 'P179', conjtype = 'new line' , showlang = true })
                end
            },
            {type = 'row', label = 'Precedido por' , value = 'precedido' , wikidata = function ( item )
                    return italics({entity = item, property = 'P155', conjtype = 'new line' , showlang = true })
                end
            },
            {type = 'row', label = 'Sucedido' , value = 'sucedido' ,wikidata = function ( item )
                    return italics({entity = item, property = 'P156', conjtype = 'new line' , showlang = true })
                end
            }},
        }},
    }}
}