Skip to content

Instantly share code, notes, and snippets.

@gala8y
gala8y / obsidian-dataviewjs-rename-pasted-images
Created April 7, 2025 16:48
Obsidian dataviewjs script to remove "Pasted image " from all image files in a vault (button)
```dataviewjs
// // Obsidian dataviewjs script to remove "Pasted image " from all image files in a vault (button)
// // ai generated
// Create a button to run the rename operation
const btn = this.container.createEl('button', {text: 'Rename Pasted Images'});
btn.addEventListener('click', async () => {
const vault = app.vault;
const files = vault.getFiles();
const imageFiles = files.filter(file =>
@gala8y
gala8y / vtt2text.py
Created January 11, 2023 08:33 — forked from glasslion/vtt2text.py
This script convert youtube subtitle file(vtt) to plain text.
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.