Last active
February 27, 2025 13:01
-
-
Save nd-dew/0eb28ceba458911fd65494c4920286c8 to your computer and use it in GitHub Desktop.
This file contains 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
# Put that into your zshrc or bashrc, enjoy | |
extract_tickets_from_string_and_open_them_in_chrome() { | |
# This function, allows you to quickly open multiple Odoo task URLs in Chrome. | |
# When you run the script, it prompts you to paste any text containing Odoo task URLs and then press Ctrl-D to finish. | |
echo "Please paste your text with Odoo task URLs, then press Ctrl-D when finished:" | |
input=$(cat) | |
ids=$(echo "$input" | grep -oP "project\.task\/([0-9]+)\b" | grep -oP '[0-9]+') | |
BROWSER_CMD="google-chrome" | |
echo "\nOpening tasks in Chrome..." | |
while IFS= read -r id; do | |
echo "Opening task $id" | |
$BROWSER_CMD --new-tab "https://www.odoo.com/odoo/project.task/$id" | |
done <<< "$ids" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment