geonode.people.profileextractors

Profile extractor utilities for social account providers

Attributes

PROVIDER_ID

Classes

BaseExtractor

Base class for social account data extractors.

FacebookExtractor

Base class for social account data extractors.

LinkedInExtractor

Base class for social account data extractors.

OpenIDExtractor

Base class for social account data extractors.

OpenIDGroupRoleMapper

GeoNode will look for names like: ["GroupProfile1.Role", "GroupProfile2.Role", ..., "GroupProfileN.Role"]

Functions

_get_latest_position(data)

Module Contents

class geonode.people.profileextractors.BaseExtractor[source]

Base class for social account data extractors.

In order to define new extractors you just need to define a class that implements:

  • Some of the method stubs defined below - you don’t need to implement all of them, just use the ones you need;

In the spirit of duck typing, your custom class does not even need to inherit from this one. As long as it provides the expected methods geonode should be able to use it.

Be sure to let geonode know about any custom adapters that you define by updating the SOCIALACCOUNT_PROFILE_EXTRACTORS setting.

abstract extract_area(data)[source]
abstract extract_city(data)[source]
abstract extract_country(data)[source]
abstract extract_delivery(data)[source]
abstract extract_email(data)[source]
abstract extract_fax(data)[source]
abstract extract_first_name(data)[source]
abstract extract_last_name(data)[source]
abstract extract_organization(data)[source]
abstract extract_position(data)[source]
abstract extract_profile(data)[source]
abstract extract_voice(data)[source]
abstract extract_zipcode(data)[source]
class geonode.people.profileextractors.FacebookExtractor[source]

Bases: BaseExtractor

Base class for social account data extractors.

In order to define new extractors you just need to define a class that implements:

  • Some of the method stubs defined below - you don’t need to implement all of them, just use the ones you need;

In the spirit of duck typing, your custom class does not even need to inherit from this one. As long as it provides the expected methods geonode should be able to use it.

Be sure to let geonode know about any custom adapters that you define by updating the SOCIALACCOUNT_PROFILE_EXTRACTORS setting.

extract_email(data)[source]
extract_first_name(data)[source]
extract_last_name(data)[source]
extract_profile(data)[source]
class geonode.people.profileextractors.LinkedInExtractor[source]

Bases: BaseExtractor

Base class for social account data extractors.

In order to define new extractors you just need to define a class that implements:

  • Some of the method stubs defined below - you don’t need to implement all of them, just use the ones you need;

In the spirit of duck typing, your custom class does not even need to inherit from this one. As long as it provides the expected methods geonode should be able to use it.

Be sure to let geonode know about any custom adapters that you define by updating the SOCIALACCOUNT_PROFILE_EXTRACTORS setting.

extract_email(data)[source]
extract_first_name(data)[source]
extract_last_name(data)[source]
_extract_field(name, data)[source]
geonode.people.profileextractors.PROVIDER_ID[source]
class geonode.people.profileextractors.OpenIDExtractor[source]

Bases: BaseExtractor

Base class for social account data extractors.

In order to define new extractors you just need to define a class that implements:

  • Some of the method stubs defined below - you don’t need to implement all of them, just use the ones you need;

In the spirit of duck typing, your custom class does not even need to inherit from this one. As long as it provides the expected methods geonode should be able to use it.

Be sure to let geonode know about any custom adapters that you define by updating the SOCIALACCOUNT_PROFILE_EXTRACTORS setting.

extract_email(data)[source]
extract_first_name(data)[source]
extract_last_name(data)[source]
extract_country(data)[source]
extract_language(data)[source]
extract_timezone(data)[source]
extract_city(data)[source]
extract_zipcode(data)[source]
extract_organization(data)[source]
extract_voice(data)[source]
extract_keywords(data)[source]
extract_groups(data)[source]
extract_roles(data)[source]
geonode.people.profileextractors._get_latest_position(data)[source]
class geonode.people.profileextractors.OpenIDGroupRoleMapper[source]

GeoNode will look for names like: [“GroupProfile1.Role”, “GroupProfile2.Role”, …, “GroupProfileN.Role”]

parse_group_and_role(group_role_name)[source]
is_manager()[source]