petits-scripts-persos/dbm_daily_vim

33 lines
720 B
Plaintext
Raw Permalink Normal View History

2024-01-11 15:27:23 +00:00
#!/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"