From 7625a9b9c4462d945bd60023856f9d32e0f49f1c Mon Sep 17 00:00:00 2001 From: #MovingToGitlab Date: Tue, 11 Dec 2018 12:01:49 +0800 Subject: [PATCH] Add Blog URL of the OP when Archiving Likes --- tumblr_backup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tumblr_backup.py b/tumblr_backup.py index 338c7d3..3acfead 100755 --- a/tumblr_backup.py +++ b/tumblr_backup.py @@ -633,6 +633,7 @@ def __init__(self, post): self.content = '' self.post = post self.json_content = json.dumps(post, sort_keys=True, indent=4, separators=(',', ': ')) + self.creator = post['blog_name'] self.ident = str(post['id']) self.url = post['post_url'] self.shorturl = post['short_url'] @@ -908,7 +909,10 @@ def get_post(self): """returns this post in HTML""" typ = ('liked-' if options.likes else '') + self.typ post = self.post_header + u'
\n' % (typ, self.ident) - post += u'
\n

\n' % (self.isodate, strftime('%x %X', self.tm)) + post += u'

\n' + if options.likes: + post += u'

{0}:

\n'.format(self.creator) + post += u'

\n' % (self.isodate, strftime('%x %X', self.tm)) post += u'\n' % (save_dir, post_dir, self.llink) post += u'\n' % self.shorturl if self.reblogged_from and self.reblogged_from != self.reblogged_root: