ULOG: Scripting a Small Program to Help Writing My Shop Posts

in #ulog5 years ago (edited)
Salam (Peace) to You All

This post is part #ulog part #programming. I considered writing it for #utopian-io as a blog, but I think it's not deep enough for them (not to mention I haven't uploaded it to GitHub.) Also the post is about me, more than it is about the code... So, here we go:

If you don't already know I run a games shop here on steemit as weekly posts, here's this week at the time of writing, and you can see the latest one resteemed by @ahmadgameslist.

FiftyWords_ScriptingASmallProgram.jpg

So,

Yesterday I felt too lazy to write my weekly Steam games shop. I said so in @opgaming discord group and talked a bit with @rainite. I casually said to him "Maybe I should write a program to ease the job for me."

I didn't mean to actually make the program. It was just a thought, but after a short while I decided to try coding it. There are two things I wanted automate creation:

  • Featured Games Section.
  • Bundled Games Section.

I haven't started working on Bundled game section yet, but I finished the featured games section.

Featured Games Section

Every week I feature 4 games @ahmadgameslist and write about them. The pretty look of it needs a combination of markdown and HTML. My goal of this program is to automate creating this markdown:

Featured Games

Featured #1
Game Maker Studio 2
Original price: $99.99

My Price: $33.99

One of the best Programs ever

Here's how it looks in markdown:

| <center><h2>Featured Games</h2></center> |
| - |
| <center>Featured #1</center> |
| [Game Maker Studio 2](https://store.steampowered.com/app/585410/GameMaker_Studio_2_Desktop/) |
| <div class="pull-left">https://steamcdn-a.akamaihd.net/steam/apps/585410/header.jpg</div><div class="pull-right"><strike>Original price: $99.99</strike><h2>My Price: $33.99</h2></div> |
| One of the best Programs ever |

Hard to edit isn't it?

I created a HTML5/Javascript application where I put the game's name, price, Steam link and description. The program automates the markdown for me. It might not be big but I felt a great sense of achievement as I wrote it? Here's how the app looks like:

screenshot.1541307076.jpg

Coding in Atom

Before yesterday I used Notepad++ for editing codes. This time I downloaded Atom code editor, because it was praised and because it can be easily integrated with Git/Github.

So I wrote the code using Atom, for the featured games section automation, here's what the code looked like:

screenshot.1541273700.jpg

To Do Next

Next I'll work on Bundled Game Section, and maybe optimize the code I wrote yesterday too. I faced many errors and fixed them without thinking of optimization.

The way I'm thinking of coding the other section is by putting the games data list in google sheets, export it a * .CSV file then automate them into Markdown.

I haven't worked CSV or Excel file before so I don't know how hard making this would be.

Time to look up tutorials


Game Maker Studio 2 image is taken from its Steam page. All other images in are screenshots taken by me.

This post was made from https://ulogs.org

Sort:  



This post has been rated by the user-run curation platform CI! In this platform users are able to manually curate content. This is done regardless of Steem Power, for both rewards and vote size calculation.

Join in at our site here!
https://collectiveintelligence.red/

Or join us on discord to interact with the community!
https://discord.gg/sx6dYxt



This post was submitted for curation by: @theironfelix
This post was given a rating of: 0.9847074822010111
This post was voted: 58.05%

Two posts in one day, what is this a miracle? Anyways, no post question? Heresy! But nie, love the post and love what yah did to streamline the process so you have ready made posts at the get go. Upvot'd and resteem'd.

Coolio.gif

Thanks for reading... Actually it's another day for me (now is morning) but I wanted to post this yesterday so you're right:

Two posts in one day, what is this a miracle?

I think this post needs editing, :sweat_smile: you reminded me.

no post question?

Thank you for reading all my posts!

Hello! Your post has been resteemed and upvoted by @ilovecoding because we love coding! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On!

Reply !stop to disable the comment. Thanks!

Congratulations @ahmadmanga! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 5000 upvotes. Your next target is to reach 6000 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do not miss the last post from @steemitboard:

The new Steemfest³ Award is ready!
Be ready for the next contest!

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by ahmadmanga from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.033
BTC 62996.10
ETH 3122.17
USDT 1.00
SBD 3.88