This file contains hidden or 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/bin/env python2.6 | |
# -*- coding: utf-8 -*- | |
import codecs | |
import csv | |
import os | |
import re | |
import sys | |
directory = sys.argv[1] |
This file contains hidden or 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/bin/env python2.6 | |
# -*- coding: utf-8 -*- | |
from array import array | |
from collections import defaultdict | |
from datetime import datetime, time | |
from StringIO import StringIO | |
import sys | |
This file contains hidden or 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/bin/env python | |
# coding: utf-8 | |
from subprocess import Popen, PIPE | |
import array | |
import itertools | |
import shlex | |
def stream(ch): | |
a = Popen(shlex.split("recpt1 {:d} - -".format(ch)), stdout=PIPE) |
This file contains hidden or 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/bin/env python | |
import hashlib | |
from collections import defaultdict | |
from io import BufferedReader, FileIO | |
from aribgaiji import GAIJI_MAP | |
""" | |
TSファイルから字幕を取り出すスクリプト。 |
This file contains hidden or 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/bin/env python3 | |
from collections import defaultdict | |
from io import BufferedReader, FileIO | |
from types import FunctionType | |
class SyntaxTable(dict): | |
def __init__(self): | |
self.history = [] | |
self.keys = [] |
This file contains hidden or 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/bin/env python3.1 | |
import sys | |
from itertools import dropwhile | |
from ariblib import TransportStreamFile | |
from ariblib.packet import pid | |
output = open(sys.argv[2], 'wb') | |
with TransportStreamFile(sys.argv[1]) as ts: | |
# SDを捨ててHDを残す場合。逆に前番組のHDを捨ててSDを残す場合は4 (ARIB-STD-B10 第2部第6章 表6-60) |
This file contains hidden or 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
from ariblib import tsopen | |
from ariblib.packet import transport_scrambling_control | |
import sys | |
output = open(sys.argv[2], 'wb') | |
with tsopen(sys.argv[1]) as ts: | |
for packet in ts: | |
if transport_scrambling_control(packet): | |
output = open(sys.argv[2], 'wb') | |
else: |