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
import pyocr | |
from PIL import Image | |
import cv2 | |
import srt #https://media.readthedocs.org/pdf/srt/latest/srt.pdf | |
from datetime import timedelta | |
import time | |
import unicodedata | |
import numpy as np | |
import multiprocessing as mp | |
import re |
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
#!/bin/bash | |
if [[ "$1" = "fourbox" ]]; then | |
(i3-save-tree |sed -e's/^\s*\/\/\s[^\"].*//g' -e's/^\s*\/\///g' | \ | |
jq '..|objects|select(.type=="con")|select(has("nodes")|not)'| \ | |
jq -s '{layout:"splith","type":"con",nodes:[{"layout":"splitv",nodes:[.[0],.[1]]},{"layout":"splitv",nodes:[.[2],.[3]]}]}') > /tmp/layout | |
else | |
(i3-save-tree |sed -e's/^\s*\/\/\s[^\"].*//g' -e's/^\s*\/\///g' | \ | |
jq '..|objects|select(.type=="con")|select(has("nodes")|not)'| \ | |
jq -s '{layout:"'$1'","type":"con",nodes:.}') > /tmp/layout |