Skip to content

Instantly share code, notes, and snippets.

View Elettronik's full-sized avatar

Valentino Dell'Aica Elettronik

View GitHub Profile
# -*- coding: utf-8 -*-
import copy
import io
import logging
from babelfish import Language
from guessit import guessit
try:
from lxml import etree
except ImportError:
@Elettronik
Elettronik / stream_pulse.py
Created February 9, 2015 16:02
Stream pulseaudio in wifi network
import difflib
import re
import subprocess
def add_module(mod_props):
'''
Add a module to pulseaudio and return
the index
'''
setxkbmap -option kpdl:dot
@Elettronik
Elettronik / downloader.sh
Last active February 8, 2019 16:06
Download Manga
#!/bin/bash
TMP_FILE=$(tempfile)
echo $TMP_FILE
#Retrieve list
wget -O $TMP_FILE "http://www.mangareader.net/alphabetical" |& \
sed -n -e 's|.*[^0-9]\([0-9]\{1,3\}\)%.*|\1|p' | \
dialog --gauge " Retrieving Index" 6 100
MANGA_LIST=$(grep "<li><a" $TMP_FILE | sed -e "/_blank/d" -e "s/.*href=\"\(.*\)\">\(.*\)<\\/a>.*/\\1\t\\2/" -e "/^\\/privacy/d;/^\\/search/d;/\\/popular/d;/\\/alphabetical/d;/^#/d;/\\/\t/d")