Skip to content

Instantly share code, notes, and snippets.

View waltercacau's full-sized avatar

Walter Cacau waltercacau

View GitHub Profile
From 7955c0ba9cab03fe6975f66e20ad127705dee8ca Mon Sep 17 00:00:00 2001
From: Walter Cacau <waltercacau@gmail.com>
Date: Fri, 1 Feb 2013 00:00:44 -0300
Subject: [PATCH] Detecting language of subtitles using its filename
A user who has many subtitles for a single video can now distinguish
between them by the suffix containing language information.
So, for example, suppose the user has a video file named "video.mp4".
If he names a subtitle as "video.en.srt", the English language will
@waltercacau
waltercacau / jqlxml.py
Created April 20, 2013 11:39
Simple utility class for easing the use of LXML with CSS selectors, using a similar interface to jquery.
# Copyright 2013 Walter Cacau <waltercacau@gmail.com>
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions: