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/zsh | |
| if [[ "$1" == "--help" || "$1" == "-h" || $# -eq 0 ]]; then | |
| echo "Usage: parakeet [options] <audio_file>" | |
| echo "Format:" | |
| echo " -t, --txt: plain text file (default)" | |
| echo " -s, --srt: subtitle file next to input file" | |
| echo " -f, --file: force txt output next to source file" | |
| echo " -c, --copy-txt: also create txt file when using -s" | |
| echo "Output:" | |
| echo " -o, --output-dir <dir>: override output directory" |
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/osascript -l JavaScript | |
| ObjC.import('stdlib'); | |
| const app = Application('Things3'); | |
| app.includeStandardAdditions = true; | |
| const VERSION = '1.1.0'; | |
| const CONFIG = { |
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 osascript -l JavaScript | |
| function run(argv) { | |
| const app = Application.currentApplication(); | |
| app.includeStandardAdditions = true; | |
| let content; | |
| if (argv.length > 0) { | |
| // Use file from command line | |
| content = app.read(Path(argv[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 osascript -l JavaScript | |
| function run(argv) { | |
| const app = Application.currentApplication(); | |
| app.includeStandardAdditions = true; | |
| let content; | |
| if (argv.length > 0) { | |
| // Use file from command line | |
| content = app.read(Path(argv[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
| Application('TaskPaper').documents[0].evaluate({ | |
| script: `function(editor, options) { | |
| editor.outline.groupUndoAndChanges(function() { | |
| let items = editor.outline.root.descendants; | |
| items.forEach(item => { | |
| let attrs = item.attributes; | |
| for (let attr in attrs) { | |
| let value = attrs[attr]; |
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
| Application('TaskPaper').documents[0].evaluate({ | |
| script: `function(editor, options) { | |
| // CONFIGURATION | |
| const REMOVE_COMPLETED_TASK = false; // true = remove old task, false = keep it in archive | |
| let result = {found: 0, processed: 0, tasks: []}; | |
| editor.outline.groupUndoAndChanges(function() { | |
| const items = editor.outline.root.descendants; | |
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/zsh | |
| # YouTube Stream Aliases | |
| # requires IINA and yt-dlp | |
| # Save as ~/.config/zsh/youtube_streams.zsh or ~/.zsh_youtube_streams | |
| # Then source in ~/.zshrc with: source ~/.config/zsh/youtube_streams.zsh | |
| # Lo-fi Hip Hop streams | |
| alias lofi='iina --music-mode "$(yt-dlp -g --no-warnings "https://www.youtube.com/watch?v=jfKfPfyJRdk")"' | |
| alias chillhop='iina --music-mode "$(yt-dlp -g --no-warnings "https://www.youtube.com/watch?v=5yx6BWlEVcY")"' | |
| alias chill='iina --music-mode "$(yt-dlp -g --no-warnings "https://www.youtube.com/watch?v=28KRPhVzCus")"' |
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
| bak() { | |
| # If a basic .bak file doesn't exist, create it | |
| if [ ! -e "$1.bak" ]; then | |
| cp "$1" "$1.bak" | |
| else | |
| # Otherwise, create a timestamped backup with .bak at the end | |
| cp "$1" "$1_$(date +%Y%m%d_%H%M%S).bak" | |
| fi | |
| } |
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 | |
| # Audio to M4B Audiobook Converter | |
| # Converts multiple audio files per book into single M4B files with metadata | |
| set -e | |
| # Default settings | |
| DEFAULT_BITRATE="copy" | |
| DEFAULT_CHAPTER_LENGTH=300 |
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 sys | |
| from pathlib import Path | |
| try: | |
| from docx import Document | |
| except ImportError: | |
| print("Error: python-docx package not installed.") | |
| print("Install it with: pip install python-docx") | |
| sys.exit(1) |
NewerOlder