[New Features on steemr] Functions for saving the posts and building an independent blog site!
Repo
https://github.com/pzhaonet/steemr
'steemr' is an open source R package for playing with Steem data in R environment. It is used to download, post process, analyze, and visualize Steem data on the basis of the powerful statistic power of R.
Previously on steemr:
- [New Project] steemr: an R package to download, play with, and visualize Steem data
- [New Features on steemr] Now steemr supports SteemSQL queries!
- [New Features on steemr] supports AppBase API and plots active hour diagrams!
- [New Features on steemr] Functions as vote reports!
- [New Features on steemr] Functions for accounts and comments report!
New Features
What features did I add?
- Do you want to backup your Steem posts in a local disk? The new function
bmd()
(build markdown files) saves the posts in the local path as markdown files easily.
The following example shows how to get all the posts by @dapeng and save the posts as markdown files in the local PC with bmd()
:
tgidposts <- gidposts(id = 'dapeng', method = 'appbase_api')
bmd(post_df = tgidposts)
Then the user gets the markdown files '*.md', each of which is a Steem post. The use can view them via any text editor (recommended: Typora).
If the parameter 'if_yaml' is TRUE, each md file will get a header with the title, posting time stamp, tags, original links, etc., which would be very useful for other R packages, such as R blogdown or R bookdown.
bmd(post_df = tgidposts, if_yaml = TRUE)
A screenshot of the markdown file created by steemr
bmd()
function.
- Do you want to build an independent blog site with your posts? The new function
bblog()
builds a Hugo blog from the given posts.
The following example shows how to build a blog site from all the Steem posts by @dapeng with bblog()
:
bblog(author = 'dapeng', post_df = tgidposts, initial = TRUE)
The user will get a folder, containing the structure of a Hugo blog site. It can be viewed locally with the R blogdown package, or deployed by netlify.com. More details could be found in the R blogdown book.
A screenshot of the blog site created by
bblog()
function.
Yes, you can visit this blog site even when steemit.com or busy.org is down!
Currently only simple blog template xmin is available. In the future more templates will come! For example, here is a backup site of my own:
- Some minor literal changes in the documentation were performed and small bugs were fixed.
How did I implement them?
I added these new functions in 'R/build.r'.
I created a template for the Hugo blog in 'inst/template/blogdown_xmin.zip'.
I added a clear_title()
function in 'R/internal.r' as an internal function to support the two functions mentioned above.
Links to relevant lines in the codes on GitHub can be found mainly in my latest commits (click to see the details):
Thanks for the contribution, @dapeng!
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Thank you for your review!
Wow would love to try with new updates.
Thanks for your attention.
https://a1leathershop.blogspot.com/2018/07/blue-white-and-black-color-motorbike.html
Hey @dapeng
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!