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()
class OAICreator(OAIContributor): schema = 'Creator' order_cited = ctx('index')
class Contributor(Parser): person = Delegate(Person, ctx) cited_name = ctx order_cited = ctx('index')
class Creator(Parser): agent = Delegate(Person, ctx) cited_as = ctx order_cited = ctx('index')
class OAIContributor(Parser): schema = 'Contributor' person = tools.Delegate(OAIPerson, ctx) cited_name = ctx order_cited = ctx('index')
class Creator(Parser): order_cited = ctx('index') agent = tools.Delegate(Person, ctx) cited_as = ctx.author
class Contributor(Parser): person = tools.Delegate(Person, ctx) order_cited = ctx('index') cited_name = tools.Join(tools.Concat(ctx.piFirstName, ctx.piLastName), joiner=' ')
class Contributor(Parser): person = tools.Delegate(Person, ctx) order_cited = ctx('index') cited_name = ctx.embeds.users.data.attributes.full_name
class Creator(Parser): order_cited = ctx('index') agent = tools.Delegate(Agent, ctx)
class Creator(Parser): schema = 'Contributor' person = tools.Delegate(CreatorPerson, ctx) cited_name = tools.Try(ctx.creatorName) order_cited = ctx('index')
class Contributor(Parser): person = tools.Delegate(ContributorPerson, ctx) cited_name = tools.Try(ctx.contributorName) order_cited = ctx('index')
class Contributor(Parser): order_cited = ctx('index') person = tools.Delegate(Person, ctx) cited_name = ctx.author
class CreatorRelation(ContributorRelation): schema = 'Creator' order_cited = ctx('index')
class Creator(Parser): agent = tools.Delegate(Agent, ctx) cited_as = ctx.name order_cited = ctx('index')