Blog Log In Register

πŸ“° Update 20201211#02

A new random update is out...


What a great day is today!

A new random update is out and you're gonna read 🧐 about some new little improvements I made.


Share without RSS feeds

First of all let's go back to the Update 20201209#01.

The theme of that update was RSS feeds because I added to the discord server the capability to auto post figure skating articles in the πŸ’„-gossip channel from a list of websites RSS feed's links.

All that was a huge improvement but not enough.

There are some websites that doesn't have a RSS feed page but they publish tons of interesting content every day.

So how to share their articles without a RSS feed or a dedicated API? πŸ€·β€β™‚οΈ

Web scraping was the only solution I found and it was quite easy to implement too. The function only takes the link of the articles from a filtered page and post only the new ones.

I know it's a solution dependent on the style of the web page but I don't expect those big website to change the html of their pages so often.

For sure I will merge those check in the RSS check when a RSS feed link will be available.


Titles translation

A big slice of the figure skating daily news is written in Russian language πŸ‡·πŸ‡Ί.

This is not a problem in a normal context but the Figure Skating Stats Discord server's language is English πŸ‡¬πŸ‡§ so I need to provide english titles for the articles.

So how to translate something automatically?

It’s kinda weird to say; using Google Translate that comes with some API I can use to get Russian titles translated in English without any effort 😁

And that is what I have done πŸ‚ <--(not that...the translation thing).


Website, wait what? 😳

Yes you are reading well 😁!

As said in the last update I was working in beckground on the website.

The major update I've added is the blog django app.

As you can see reading this article, the website has now a blog section that allows me to write about new updates and things I'm working on πŸŽ‰.

In order to achive this result, I had to add a django app, add new models for the database and of course write πŸ’» all the code.

I decided to use the MarkDown as way to write the articles.

I like it's minimalism and the way I can just run a python 🐍 function to translate it into HTML thanks to the markdown2

from markdown2 import Markdown

Markdown().convert()

MarkDown is also a good way to manage the articles if I need to export them.

Going into details, the features added are:

  • πŸ“Write articles (just for me πŸ˜…)

  • πŸ“°Paginated article list preview

  • πŸ”¦Filter articles by category

  • πŸ”¦Filter articles by tag

  • πŸ‘“Read an article


New menu and smartphone πŸ“± navbar

As you know better than me, talking about surfing πŸ„β€β™‚οΈ the web, today people use mobile devices more than desktop ones.

So a menu designed for small screens it's a need.

That's why I edited the navbar adding icons, colors and a new menu for small screens (less than 768 pixels in width).

Of course there are also other addition to the style here and there.

A thing that I've never done before was styling the scrollbar ↕. I think it's a cool thing to add.

And this is it for the second random update!

Cheers πŸ‘‹


Author: Fantantonio 

Date: 27-12-2020

Categories: service

Tags: #update #website #discord