Skip to content

Instantly share code, notes, and snippets.

View bonnebulle's full-sized avatar
🎯
Focusing

vincent_b bonnebulle

🎯
Focusing
View GitHub Profile
@bonnebulle
bonnebulle / bpm_not__find_album_brain.sh
Last active August 11, 2025 20:29
Help find Album (with artist+title in filename) using MusicBrainz API
#!/bin/bash
# GIST
# https://gist.github.com/bonnebulle/8a245ecbc4acee7ef49108e64cedba66
# USED BY (part of)
# https://gist.github.com/bonnebulle/749b879f693a689dab10b836c2cb9745
# DEP yq
# https://github.com/mikefarah/yq/releases/tag/v4.47.1
### TODO autre piste (sans json/YQ) ==> https://github.com/emacsmirror/musicbrainz
@bonnebulle
bonnebulle / bpm_mp3_albums.sh
Last active August 12, 2025 07:34
batch add Album+Artist format=="eartiste name - album of the year" to flac/mp3, bypass if folder already scanned
#!/bin/zsh
# GIST
# https://gist.github.com/bonnebulle/749b879f693a689dab10b836c2cb9745/edit
# DEP (also use)
# https://gist.github.com/bonnebulle/8a245ecbc4acee7ef49108e64cedba66
# USE
# FILES NAMING FOR BEST : "artist - title name.mp3"
# bmp_mp3_albums.sh ./music_folder/any/ --force # default checkin if an .ok/.ok_album file exists, if yes, bypass folder (--force will check anyway)
# bmp_mp3_albums.sh ./music_folder/album_name/ # search album name w/ parent folder (is a sub)
@bonnebulle
bonnebulle / bmp_mp3.sh
Last active July 21, 2025 11:43
loop find mp3 in sub-folders, bypass when ok (already done), add BPM to etag (bypass if already)
#!/bin/zsh
## DEBIAN https://www.ryananddebi.com/2023/12/09/linux-adding-bpm-to-id3-tags/
# Directory containing music files
MUSIC_DIR="$1"
echo $MUSIC_DIR
sleep 1
if [[ $2 == "--force" ]];then
BYPASS_IF_OK_EXISTE="false"
else
@bonnebulle
bonnebulle / navidromeRemoveAllMissingFiles__french.js
Last active July 20, 2025 14:42 — forked from pdcmoreira/navidromeRemoveAllMissingFiles.js
Batch remove all missing files from all pages in Navidrome's "Missing files" list - copy-paste into the console and run
// Source https://gist.github.com/pdcmoreira/8ab7a2a26abf3d63aa041f535de942f5
// Navidrom -> TopRight menu -> Fichiers manquants...
// -> Navigateur -> Console (dev tools)
// > copy paste this + ENTER
(async () => {
const wait = (time) => new Promise(resolve => setTimeout(resolve, time))
const countElements = () => document.querySelectorAll('.MuiTableRow-root').length
while(countElements()) {
#!/bin/bash
###
## WHAT + HOW
# THUNAR ACTION fusion PDFs -- using pdftk
# ACTION : /bin/bash /usr/bin/batch_pdf_fusion_inputs.sh %f %F
# -- Multi select files --
# %f == current folder -> pwd
# %F == files
#
## ORG
#!/bin/bash
#### HERE... hide all but NOT Focused ONE
#### IF all are already minimized... raise.maximised them all back
# Alt to :: SHOW/HIDE (TOGGLE) Desktop
#if [ $status == "ON" ]; then
# wmctrl -k off
#else
# wmctrl -k on
## QUICKSTART --> search :
##### GO --- EDIT ME :
# V1.3 - add cleanup json files + creat md + add contents
## WHAT
# - Extracts highlight marks in PDFs (input)
# - Merge them by page
# - Filtre/select by colors /or/ any/all
# --> Output json datas /then/ md (readable)
@bonnebulle
bonnebulle / wmxtool_close_other_windows.sh
Created March 13, 2025 14:07
xdotool close all current app windows not the active one
#!/bin/bash
current=$(xprop -root | grep '^_NET_ACTIVE_W' | awk -F'# 0x' '{print $2}' | awk -F', ' '{print $1}')
echo current $current
class=$(xdotool getwindowfocus getwindowclassname)
echo class $class
currapp_windows=$(wmctrl -mlpx | grep $class | awk '{print $1}')
echo currapp_windows $currapp_windows
#!/bin/bash
# GIST
# https://gist.github.com/bonnebulle/0ed8f0b5e3022a486d5586007e4a859b
# OBJECTIF
# Remove unused/dead menu entries in xfce/linux menu
# VARS
editor_modifications="codium"
install_commande_auto="yay -Syu --noconfirm --needed --overwrite \*"
@bonnebulle
bonnebulle / ffmpeg_batch_subfolders_each.sh
Created October 16, 2023 07:44
Convert all vidéos files in all sub-folders (batch) with ffmpeg
#!/bin/bash
# DO Convert all vidéos files in all sub-folders (batch) with ffmpeg
# DEP ffmpeg
# TODO Change quality (-crf) + output file_name.ext
# OPT "ffmpeg_batch_subfolders_each.sh infos" => GIVE ffmpeg files infos only...
# GIST https://gist.github.com/bonnebulle/907026a0f96d8497fa63dc15472b07ce
echo "Carefull, will find all files in sub-folders and move them here ="
pwd
echo ": */**.mkv"