Posts for: #Python

Create a bit.ly like shorturl static website

I decided to create my own shorturl website last week for personal use and ended up developing a python project (deecubes)that can be used by anyone to do the same. This is a post to explain what/why/how about it.

Why my own shorturl website?

So far I had been using sites like bit.ly or TinyURL whenever I needed to generate a shorturl (e.g. for giving to someone for easily remember, noting down on paper, putting links on resume, etc) but I had concerns that:

email-actions: An SMTP server that triggers actions from email

Releasing my project email-actions today. You install it from github or from pypi.

email-actions

email-actions is a tiny SMTP server with a rules based engine to trigger any actions (notifications/commands etc) based on the emails sent to this server. Think of it like IFTTT but where input trigger is email and can be set up and run locally as well.

Why did you make email-actions

Like most of my projects, email-actions is a ‘scratch-your-own-itch’ project. I bought a NAS (Synology ds216j) which also doubled as a downloader of anime/tv shows etc through RSS using its inbuilt “Download Station” app. I also used Plex to watch them over the network but these needed to be moved to a proper folder and named in a specific format (and some crap deleted and other maintenance done or sometimes some post processing done) to have Plex display/play them properly. I used Filebot and a few custom scripts for this but had to either do this manually or use a fixed time task scheduling (which tended to delay watching). This was semi-irritating. I also wanted to know when something had been downloaded so I could binge on that latest episode as soon as it was done :) Download station had a hack (by changing internal files) to run custom script after a download was completed but it had to be redone after every firmware update and sometimes, after every restart. And finally it stopped working altogether with recent updates.

Fixing the problem of matplotlib and ggplot not showing graphs in python

While trying to make some graphs for one of my side projects recently, I came across an issue that both matplotlib and ggplot did not show up the graphs. I was able to save the graphs to an image file just fine, but if I tried to show them directly on screen while running the script, it just printed a number and exited. After tearing apart my hair for some time, I checked the backend being used by matplot lib:

Display Message on Samsung TVs in Python (Samsung MessageBox Service Exploitation)

This script is the result of a weekend’s hacking to get my TV to display incoming calls/texts which I miss invariably because the phone is buried under a sofa or in a different room. Earlier I had done this using my Odroid U2 and Tasker/AutoRemote but this was limiting as this meant that I could see the notifications only when I was watching something through the Odroid. Samsung TVs, which are DLNA enabled, also include a hidden service called “Message Box” which can display different information on the TV natively irrespective of which display mode/input mode you are in.