From 241ac2400a33d6ad804012ae11b36a38e223476f Mon Sep 17 00:00:00 2001 From: Lingzhu Xiang Date: Sun, 5 May 2013 22:53:21 +0800 Subject: [PATCH] Use better titles than None for Tumblr posts without title --- pelican/tools/pelican_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index 3c40dd56..3b5c55f2 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -355,7 +355,7 @@ def tumblr2fields(api_key, blogname): posts = get_tumblr_posts(api_key, blogname, offset) while len(posts) > 0: for post in posts: - title = post.get('title') or post.get('source_title') + title = post.get('title') or post.get('source_title') or post.get('type').capitalize() slug = post.get('slug') or slugify(title) tags = post.get('tags') timestamp = post.get('timestamp')