bookmark_borderOrganizing your dropbox Camera Upload folder with Go

A few years ago I wrote a small Python script to organize the photos uploaded from your phone to Dropbox. Lately, I have been rewriting some of my python scripts to golang for practice and also performance.

All photos are uploaded to Dropbox with a name pattern like 2018-08-01 05.56.40.jpg. What all it does is to parse the date and move it to the right place, for example, 2018-08-01 will move it to a folder called 08-August inside 2018.

golang dropbox photo organizer

Source code:

You can also download the compiled file below, just make sure you make it executable with

chmod +x organize_photos

and run it with

./organize_photos

Download link.

bookmark_borderAutomated door system

Earlier this year we moved from Berlin to Lisbon and found a nice apartment not too far from the city center.

Our apartment building door, like most around Lisbon, is old and doesn’t work very well. And with many friends coming to visit this summer, I decided to automate the door so that me and my friends can open the door using our mobile phones instead of spending 5 minutes trying to jiggle the key in the lock to get it open.

Continue reading “Automated door system”

bookmark_borderWacken 2018 Band Parser

Today I decided to write a quick script to parse the bands who are confirmed for the Wacken Open Air 2018 festival. I am still not sure if I will do much else with it, but thinking it could be interesting to improve the code to send an email every time a new band is added, what do you think?

The repo for the project -> https://github.com/dansku/wacken_parser

The response is a JSON file like:

[  
  {  
    "bandAddedOn":"06.08.2017",
    "bandUrl":"http://www.wacken.com/en/...",
    "bandName":"Amorphis",
    "bandImage":"http://www.wacken.com/....png"
  }
]

bookmark_borderAutomating screenshot sharing on Windows

One thing that I really liked about mac was how easy it was to generate a screenshot from my screen and share with people. Now that I am pretty much a full-time windows user (besides all the time I spend on a Linux terminal), I needed to find an easy and fast way to share screenshots. And that is where Greenshot comes in handy!

The plan:
A keyboard shortcut to select a region of my screen, automatically generate the image, upload it to my server on a specific FTP folder (can also be done with rsync) and copy the shareable URL to the clipboard.

Step 1: Download Greenshot at http://getgreenshot.org/downloads/ and install it.

Step 2: Download and install NCFTP from http://www.ncftp.com/download/ (NcFTP Client 3.2.6 for Microsoft Windows). After installing it, the ncftp executable files are going to reside on C:\Windows

Step 3: Create a .bat file with the automating code below (changing yourdomain, ftp user and password).

Step 4: Configure greenshot:

Change the path where you save your screenshots on your computer, but the important thing is to change the “Filename pattern” to:

${YYYY}${MM}${DD}_${hh}${mm}${ss}

and uncheck “Copy file path to clipboard every time an image is saved“, this part is important!

Go to Plugins tab, click in “External command Plugin” and “Configure“.

Create a name for your automation. On command, link to the .bat file you created and make sure the “Argument” is

"{0}"

Done, now whenever you take a screenshot, it will automatically upload to your server and copy the URL to the clipboard automatically, making it super fast and easy to share anything on your screen 🙂