Scripts to generate HTML for a photo gallery of Steemit posts
Steemit tools
- What is the project about?
Code to build a file with the html containing all the images and links to the blog posts they came from. This is so Steemit bloggers can collect all their images into one gallery post. See instructions at https://steemit.com/steemit/@bardionson/how-to-monetize-your-old-posts
Technology Stack
Python 2.7, javascript, Selenium, BeautifulSoup, requests, steem.jsRoadmap
Will be adding code that runs as a server side component that generates the html using a web interface. I will add other tools that help make posts. I want to make a script that will output the date a follower starts following me and the country they list on their profile. I also need a tool that shows a report on the number of views per post. Another idea is a website that will generate a report on all transactions by date with conversions to dollars at the time of conversion.How to setup and use?
It will filter out any resteems you have done and any images from @steemitboard.
But you have to install Python and some Python packages to get it to work. I am still using Python 2.7
Install Python on a Macintosh
Macintosh
Install Brew with the directions at https://brew.sh/
brew install python or sudo easy_install pip
Install Python on Windows:
https://github.com/BurntSushi/nfldb/wiki/Python-&-pip-Windows-installation
https://matthewhorne.me/how-to-install-python-and-pip-on-windows-10/
Install Python on Linux
https://www.tecmint.com/install-pip-in-linux/
sudo apt-get install python2
sudo apt-get install python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
Specific Packages Needed for the Script
sudo pip install BeautifulSoup4
sudo pip install selenium
sudo pip install requests
Chrome and Chromedriver Install
I am using Selenium to read the list of posts from a page I created at http://wowak.com/blog.html?user=bardionson. This page will show a list of your blog posts if you put your username after user= .
The script uses Chrome in way that you will not see the browser startup. (headless) So you need to install Chrome and the Chromedriver.
On Macintosh use this commands
brew install chromedriver
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
On Windows see these directions and down load the software.
The Output
The "Make Photo Post" script will output a list of html links. The links will point at the original post the image came from. Inside the link is the html image tag that will display the image on the page. Copy the list of html links called "<a href" from the output and paste into the Steemit blog post editor. You need to add your own title and heading and any text you want.
The Script
I have placed the most up to date script at my github repository. https://github.com/bardionson/steemit-tools If I need to make a change to the code it will show up there. Shown below is a static version of that code.
The command to run this code is
python make_photo_gallery.py [your username] > [the file you want the links in]
python make_photo_gallery.py bardionson > my_photo_gallery_post.html
- How to contribute?
Contact me at github:
https://github.com/bardionson or bardionson at wowak.com
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved. Next time try to post only in Utopian and not in Steemit as according to Utopian Rules
Also try to improve the length of your contribution as we feel the number of lines in the code is very small as compared to other contributions.
You can contact us on Discord.
[utopian-moderator]
Thanks for accepting it.
I did not notice that rule about only putting it in utopian first.
Does "Contents already shared anywhere else may still be rejected if submitted in Utopian." apply to sharing it on github first?
I am planning on adding more to the repository.
The development should of course happen on GitHub. Bug reports on the other hand, must not be shared on GitHub before.
I have improved this and added a web interface. Users can now use my tool to build a photo gallery on the internet. https://steemit.com/steemit/@bardionson/gallery-builder-web-interface
Hey @bardionson I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
I have improved this and added a web interface. Users can now use my tool to build a photo gallery on the internet. https://steemit.com/steemit/@bardionson/gallery-builder-web-interface
This is great. Thanks for the big gift.