Skip to main content

Posts

Showing posts from May, 2016

Download All Images from a Wordpress.com Media Library

After a few months of blogging photos from my life events, I realised that I should have kept a local version (dummy me). I kept everything else, so why did I forget this time?! Anyways, I realised that this is not an easy job if you are free hosting on Wordpress.com. All I could have is either an XML with posts and references to images, or a full migration to another Wordpress blog. So I rolled up my sleeves and reused a python script I used before. Here is the script: #!/usr/bin/python # -*- coding: utf-8 -*- # This script parses a wordpress backup XML and downloads the contained media files. # Example: # python wordpress-media-downloader.py /Users/madly/Downloads/mycoolblog.wordpress.2016-05-02.xml /Users/madly/Downloads/media-library import sys import urllib2 import re # # Takes a url and a directory for saving the file. Directory must exist. # def download(url, dir_name): file_name = url.split('/')[-1] u = urllib2.urlopen(url) f = open(dir_name+'/...

PENNY (Congstar) USB Internet on Linux Mint 17 - Ubuntu 14.04

So, I've been in Germany for a while. And after using the fast WiFi in hotels, I moved to a personal apartment, with no Internet for now. I bought a PENNY USB surf stick as I thought it is a bit cheaper. But there was a problem, it is not working on Linux :(.   I lived with this fact for a while, but now I want to get back to programming. So, after some searching and trying, here is how I could use my PENNY Mobil Internet Stick, without their Internet manager of course, and that's a bit bad for calculating my overall usage. Anyways, it is straight forward: 1. Open 'Network Connections'. Click 'Add'. 2.  Choose 'Mobile Broadband'. 3. The default device is 'Internetstick'. 4. Choose your country. Mine is 'Germany'. 5. The service provider is 'Congstar'. 6. The default plan is 'Prepaid Contracts', which is my case. 7. Verify your data and click 'Apply'. 8. The connection form is p...