コード例 #1
0
def generate_article2(input_dict, instance, bulkload_state_copy):
	time = transform.import_date_time('%Y-%m-%d %H:%M:%S')(input_dict['post_date_gmt'])
	mod_time = transform.import_date_time('%Y-%m-%d %H:%M:%S')(input_dict['post_modified_gmt'])
	return Article(key=db.Key.from_path('Article', int(input_dict['ID'])), title=input_dict['post_title'],
		url=formatted_date_for_url(time) + input_dict['post_name'], content=input_dict['post_content'], format=2,
		published=(input_dict['post_status'] == 'publish'), time=time, mod_time=mod_time, keywords=[], tags=[],
		category=None, replies=int(input_dict['comment_count']))
コード例 #2
0
def generate_comment2(input_dict, instance, bulkload_state_copy):
	return Comment(key=db.Key.from_path('Article', int(input_dict['comment_post_ID']),
		'Comment', int(input_dict['comment_ID'])),
	    email=input_dict['comment_author_email'], content=input_dict['comment_content'], format=2,
		time=transform.import_date_time('%Y-%m-%d %H:%M:%S')(input_dict['comment_date_gmt']))