petits-scripts-persos/dbm_daily_vim
Adrian Amaglio 7b73d35774 truc
2024-01-11 16:27:23 +01:00

33 lines
720 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
f=~/Desktop/daily
tmp="$(mktemp)"
final="$(mktemp)"
sed \
-e 's/adj/\n**Aujourdhui**\n/' \
-e 's/^hier/\n**Hier**\n/' \
-e 's/^diffic.*/\n**Difficultés**\n/i' \
-e 's/^ *information.*/# Points divers/i' \
-e 's/^point.* diver.*/# Points divers/i' \
-e 's/^\([^-*#@:][^*#@:]\+\) \+:/- \U\1 :/' \
"$f" > "$tmp"
sed -i -e 's/^\([^-*#\s]\)/# @\U\1/' "$tmp"
echo "
**Daily Stand-Up Meeting du $(date '+%d %h %Y')**
- Où : BBB/standup
- Participants : $(grep -o '@.*' "$tmp" | tr '\n' ',' | sed 's/,$/\n/')
- Quand : $(date '+%Y/%m/%d') 9:45
- Durée : 00:15 '(+0mn)
- Scribe : Adrian
- Relecteur :
" > "$final"
cat "$tmp" >> "$final"
# Display
cat "$final"
rm "$tmp" "$final"