示例#1
0
class Creator(Parser):
    agent = Delegate(Person, ctx)
    order_cited = ctx('index')

    cited_as = RunPython('get_cited_as', ctx.name)

    def get_cited_as(self, obj):
        surname = obj.soup.surname
        given = obj.soup.find('given-names')
        if given:
            return '{}, {}'.format(surname.get_text(), given.get_text())
        return surname.get_text()
示例#2
0
文件: oai.py 项目: alexschiller/SHARE
class OAICreator(OAIContributor):
    schema = 'Creator'

    order_cited = ctx('index')
示例#3
0
class Contributor(Parser):
    person = Delegate(Person, ctx)
    cited_name = ctx
    order_cited = ctx('index')
示例#4
0
class Creator(Parser):
    agent = Delegate(Person, ctx)
    cited_as = ctx
    order_cited = ctx('index')
示例#5
0
class OAIContributor(Parser):
    schema = 'Contributor'

    person = tools.Delegate(OAIPerson, ctx)
    cited_name = ctx
    order_cited = ctx('index')
示例#6
0
class Creator(Parser):
    order_cited = ctx('index')
    agent = tools.Delegate(Person, ctx)
    cited_as = ctx.author
示例#7
0
class Contributor(Parser):
    person = tools.Delegate(Person, ctx)
    order_cited = ctx('index')
    cited_name = tools.Join(tools.Concat(ctx.piFirstName, ctx.piLastName),
                            joiner=' ')
示例#8
0
class Contributor(Parser):
    person = tools.Delegate(Person, ctx)
    order_cited = ctx('index')
    cited_name = ctx.embeds.users.data.attributes.full_name
示例#9
0
class Creator(Parser):
    order_cited = ctx('index')
    agent = tools.Delegate(Agent, ctx)
示例#10
0
class Creator(Parser):
    schema = 'Contributor'

    person = tools.Delegate(CreatorPerson, ctx)
    cited_name = tools.Try(ctx.creatorName)
    order_cited = ctx('index')
示例#11
0
class Contributor(Parser):
    person = tools.Delegate(ContributorPerson, ctx)
    cited_name = tools.Try(ctx.contributorName)
    order_cited = ctx('index')
示例#12
0
文件: normalizer.py 项目: sf2ne/SHARE
class Contributor(Parser):
    order_cited = ctx('index')
    person = tools.Delegate(Person, ctx)
    cited_name = ctx.author
示例#13
0
class CreatorRelation(ContributorRelation):
    schema = 'Creator'

    order_cited = ctx('index')
示例#14
0
class Creator(Parser):
    agent = tools.Delegate(Agent, ctx)
    cited_as = ctx.name
    order_cited = ctx('index')