This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
: ' | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU Affero General Public License as | |
published by the Free Software Foundation, either version 3 of the | |
License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python | |
# | |
# Script to rip srt/ssa subtitles out of .mkv files | |
# Usage: scriptname.py [filename.mkv] | |
# If the filename isn't specified all .mkv files in the current directory will be processed | |
# Developed with ffmpeg 2.1.1, you probably want that or higher if this doesn't work | |
# | |
import glob, re, argparse | |
from subprocess import call |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this in the class | |
def get_visible_indexes(self, column=0): | |
"find all galleries in viewport" | |
# used to find first index | |
gridW = self.W # width of single items | |
gridH = self.H # height of single items | |
region = self.viewport().visibleRegion() | |
idx_found = [] | |
def idx_is_visible(idx): |