Skip to content

Commit

Permalink
Merge pull request #168 from qtwyeuritoiy/master
Browse files Browse the repository at this point in the history
Add Blog Link to the OP when Archiving Likes
  • Loading branch information
bbolli authored Dec 11, 2018
2 parents 2be4cc1 + 7625a9b commit 30e140a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tumblr_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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'<article class=%s id=p-%s>\n' % (typ, self.ident)
post += u'<header>\n<p><time datetime=%s>%s</time>\n' % (self.isodate, strftime('%x %X', self.tm))
post += u'<header>\n'
if options.likes:
post += u'<p><a href=\"http://{0}.tumblr.com/\" class=\"tumblr_blog\">{0}</a>:</p>\n'.format(self.creator)
post += u'<p><time datetime=%s>%s</time>\n' % (self.isodate, strftime('%x %X', self.tm))
post += u'<a class=llink href=%s%s/%s>¶</a>\n' % (save_dir, post_dir, self.llink)
post += u'<a href=%s>●</a>\n' % self.shorturl
if self.reblogged_from and self.reblogged_from != self.reblogged_root:
Expand Down

0 comments on commit 30e140a

Please sign in to comment.