def _create_author_by_row(self, record_dict): author = Author() author_osn_id = self._convert_to_unicode_value(record_dict["tumblog_id"]) author.author_osn_id = author_osn_id author.name = author_osn_id author.domain = self._domain author.author_guid = compute_author_guid_by_author_name(author.name) tumblr_blog_name = self._convert_to_unicode_value(record_dict["tumblr_blog_name"]) author.author_screen_name = tumblr_blog_name author.description = self._convert_to_unicode_value(record_dict["tumblr_blog_description"]) created_time_epoch = self._convert_to_unicode_value(record_dict["created_time_epoch"]) if created_time_epoch is not None: datetime, str_datetime = convert_epoch_timestamp_to_datetime(created_time_epoch) author.created_at = str_datetime else: author.created_at = self._set_start_date() author.url = self._convert_to_unicode_value(record_dict["tumblr_blog_url"]) author.protected = get_boolean_value(record_dict["is_private"]) author.time_zone = self._convert_to_unicode_value(record_dict["timezone"]) author.language = self._convert_to_unicode_value(record_dict["language"]) is_private = record_dict["is_private"] if is_private == "TRUE": author.protected = 1 else: author.protected = 0 return author
def create_umlaut_author(self): umlaut_author = Author() umlaut_author.name = self.umlaut_author_name umlaut_author.domain = self._domain umlaut_author.author_guid = self.author_guid umlaut_author.author_full_name = self.umlaut_author_full_name umlaut_author.description = self.umlaut_author_description umlaut_author.language = self.umlaut_language umlaut_author.location = self.umlaut_location return umlaut_author