Posted from my blog with SteemPress : https://robertyan.000webhostapp.com/2019/06/steem-%e8%8a%b1%e5%90%8d%e5%86%8c%ef%bc%9a%e3%80%8asteem%e6%8c%87%e5%8c%97%e3%80%8b%e5%ad%90%e9%a1%b9%e7%9b%ae-steem-roster-a-sub-project-of-steem-people
Posted from my blog with SteemPress : https://robertyan.000webhostapp.com/2019/05/steem-links%ef%bc%9a%e3%80%8asteem%e6%8c%87%e5%8d%97%e3%80%8b%e5%ad%90%e9%a1%b9%e7%9b%ae-subproject-of-steem-guides
def_write_content(self, post): folder = self._get_content_folder() c = SteemComment(comment=post)
# retrieve necessary data from steem title = post.title.replace('"', '') body = post.body date_str = post.json()["created"] date = date_str.replace('T', ' ') tags = "\n".join(["- {}".format(tag) for tag in c.get_tags()]) category = c.get_tags()[0] thumbnail = c.get_pic_url() or'' url = c.get_url()
organization = BLOG_ORGANIZATION logo = BLOG_AVATAR favicon = BLOG_FAVICON
language = settings.get_env_var("LANGUAGE") or"en"
a = SteemAccount(self.account) author = self.account name = a.get_profile("name") or"" # about = a.get_profile("about") or "" location = a.get_profile("location") or"" avatar = a.get_profile("profile_image") or"" website = a.get_profile("website") or""
# build config file with template template = get_message("config") config = template.format(organization=organization, language=language, name=name, author=author) filename = CONFIG_FILE with open(filename, "w", encoding="utf-8") as f: f.write(config) logger.info("{} file has been updated for the account @{}".format(filename, author))
# build config theme file with template template = get_message("config.theme") config = template.format(organization=organization, favicon=favicon, logo=logo, author=author, name=name, location=location, avatar=avatar, website=website) filename = CONFIG_THEME_FILE with open(filename, "w", encoding="utf-8") as f: f.write(config) logger.info("{} file has been updated for the account @{}".format(filename, author))
# URL ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' url:http://{organization}.github.io root:/@{author}/ permalink::category/:post_title/ permalink_defaults:
@task(help={ }) defbuild_all(ctx): """ download the posts of all the accounts, and generate pages """
accounts = settings.get_env_var("STEEM_ACCOUNTS") or [] if accounts and len(accounts) > 0: for account in accounts.split(","): clean(ctx) download(ctx, account) build(ctx)
Posted from my blog with SteemPress : https://robertyan.000webhostapp.com/2019/05/%e7%94%a8github%e5%88%9b%e5%bb%basteem%e6%96%87%e7%ab%a0%e9%95%9c%e5%83%8f-mirroring-your-steem-blogs-on-github-%e5%85%8d%e8%b4%b9%e5%8d%9a%e5%ae%a2%e5%a4%87%e4%bb%bd%e6%9c%8d%e5%8a%a1%ef%bc%9a-st