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 | |
| # -*- coding: utf-8 -*- | |
| import json | |
| import re | |
| import subprocess as sp | |
| from dataclasses import dataclass | |
| from os import listdir, path, readlink | |
| from sys import argv, platform | |
| from typing import Dict, List, TypedDict |
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 | |
| """A single-file program for assigning icons to filenames in the `catppuccin.catppuccin-vsc-icons` vscode extension.""" | |
| import argparse | |
| from dataclasses import dataclass | |
| from os import listdir, path | |
| from typing import List | |
| class Colours: | |
| """ANSI color codes""" |
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 py | |
| """ | |
| Python wrapper for the create-shortcut command packaged with 'git' on windows. | |
| Based on https://superuser.com/a/1571247 | |
| """ | |
| import argparse | |
| import subprocess as sp | |
| from dataclasses import dataclass |
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
| # SGR color constants | |
| # rene-d 2018 | |
| class Colors: | |
| """ ANSI color codes """ | |
| BLACK = "\033[0;30m" | |
| RED = "\033[0;31m" | |
| GREEN = "\033[0;32m" | |
| BROWN = "\033[0;33m" | |
| BLUE = "\033[0;34m" |
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 | |
| """ | |
| mediainfo, grep, and ffmpeg must be in your path for this to work | |
| """ | |
| import argparse | |
| import subprocess as sp | |
| from dataclasses import dataclass | |
| from os import path | |
| from typing import List |
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 | |
| import argparse | |
| from dataclasses import dataclass | |
| from math import floor, log, pow | |
| from os import path, walk | |
| from typing import List | |
| @dataclass | |
| class CliArgs: |
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
| @ECHO OFF | |
| REM You need to first install https://github.com/pnappa/CLImage | |
| IF "%~1"=="" GOTO HELP | |
| FOR /F "usebackq tokens=2* delims=: " %%W IN (`mode con ^| findstr Columns`) DO SET CONSOLE_WIDTH=%%W | |
| SET /a modulo=%CONSOLE_WIDTH% %% 2 | |
| IF NOT [%module%] == [0] ( |
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 py | |
| import argparse | |
| import json | |
| import os | |
| from dataclasses import dataclass | |
| from typing import Dict, List | |
| from rich.console import Console, ConsoleOptions, RenderResult | |
| from rich.table import Column, Table | |
| from rich.text import Text |
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.10 | |
| """ shrink-video.py | |
| Required: | |
| ffmpeg (with libx265 and libfdk_aac) | |
| set-thumbnail (a script that takes the video_filename and the thumbnail_filename in that order) | |
| mediainfo | |
| recycle (command that sends file to the Recycle Bin) | |
| Notes: | |
| Only tested on windows. |
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 sys import argv | |
| import subprocess as sp | |
| import os | |
| def win2unix_path(path: str) -> str: | |
| """Convert \\ to / | |
| Args: |
NewerOlder