Skip to content

Instantly share code, notes, and snippets.

@p3lim
p3lim / trakt_to_yamtrack.py
Created August 4, 2026 20:37 — forked from mammuth/trakt_to_yamtrack.py
Convert a manual Trakt export zip into a Yamtrack (v0.25.3) import CSV — full history, rewatches, ratings, watchlist, TMDB metadata prefill
#!/usr/bin/env python3
"""Convert a manual Trakt export (.zip contents) into a Yamtrack import CSV.
Targets Yamtrack v0.25.3's CSV importer (integrations/imports/yamtrack.py).
Key importer facts this script relies on:
- Row order determines bulk-create order: movie, tv, season, episode.
- TV is unique per (user, item); Season per (related_tv, item); Episode and
Movie rows may repeat (that is how rewatches are stored).
- Episodes are linked to seasons via (media_id, season_number) after seasons
are created (update_episode_references), so season rows must precede
@p3lim
p3lim / source.sh
Last active January 26, 2024 02:43
firefox extension badge
#!/bin/bash
# https://extensionworkshop.com/documentation/publish/promoting-your-extension/
curl -sSLO https://blog.mozilla.org/addons/files/2020/04/get-the-addon-fx-apr-2020.svg
inkscape --export-type=png --export-width=172 --export-background-opacity=0 get-the-addon-fx-apr-2020.svg
#!/usr/bin/env python3
# requires nautilus, nautilus-python
# put in ~/.local/share/nautilus-python/extensions/
# or /usr/share/nautilus-python/extensions/
TERMINAL_NAME='kitty'
TERMINAL_ARGS=[]
from gi import require_version
@p3lim
p3lim / ask.sh
Created October 20, 2016 19:31
Bash: General-purpose Yes/No prompt function ("ask")
# This is a general-purpose function to ask Yes/No questions in Bash, either
# with or without a default answer. It keeps repeating the question until it
# gets a valid answer.
ask() {
# http://djm.me/ask
local prompt default REPLY
while true; do
@p3lim
p3lim / formatted.md
Last active January 8, 2022 06:19
Planetside2 - Formatted API dumps

Servers - census

id name
1 Connery
10 Miller
13 Cobalt
17 Emerald
25 Briggs