Skip to content

Instantly share code, notes, and snippets.

@olbotta
olbotta / p7m-extract
Created October 21, 2025 09:51
p7m nautilus script for PDF extraction
#!/bin/bash
# based on the [p7m software](https://github.com/eniocarboni/p7m) by @eniocarboni
# Be sure to clone it and include it in your `~/bin/`
# This script runs `p7m -x` on each selected .p7m file
echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | while IFS= read -r file; do
# Check if the file ends with .p7m (case-insensitive)
if [[ "${file,,}" == *.p7m ]]; then
p7m -x "$file"
@olbotta
olbotta / git_hist_complete.txt
Last active November 19, 2024 18:35
git history complete to get all git tree, even of non-parent branches
git config --global alias.hist-c '!git cat-file --batch-all-objects --batch-check | cut -d " " -f 1 | xargs git hist --all'