;just: log: more
This commit is contained in:
parent
c825605721
commit
04449ea12c
115
Justfile
115
Justfile
@ -819,19 +819,20 @@ relprep VER:
|
|||||||
@datearg *DATEARG:
|
@datearg *DATEARG:
|
||||||
echo {{ if DATEARG == '' { `just reldate` } else { if DATEARG =~ '^\d+$' { `dateadd $(date +%Y-%m-%d) -$DATEARG` } else { DATEARG } } }}
|
echo {{ if DATEARG == '' { `just reldate` } else { if DATEARG =~ '^\d+$' { `dateadd $(date +%Y-%m-%d) -$DATEARG` } else { DATEARG } } }}
|
||||||
|
|
||||||
# Show activity that has happened since (mostly) DATE or DAYS ago or last release, to help write change docs/news. Eg: just log > log.org
|
# Show activity since (mostly) this date or days ago or last release. Eg: just log > log.org
|
||||||
log *DATE:
|
log *DATEARG:
|
||||||
#!/usr/bin/env osh
|
#!/usr/bin/env osh
|
||||||
ISODATE=`just datearg $DATE`
|
DATE=`just datearg $DATEARG`
|
||||||
printf "* Activity since $ISODATE:\n\n"
|
printf "* Activity since $DATE:\n\n"
|
||||||
printf "Last release: `just rel`\n\n"
|
printf "Last release: `just rel`\n\n"
|
||||||
just chlog
|
just chlog
|
||||||
just commitlog $DATE; echo
|
just commitlog $DATEARG
|
||||||
just timelog $DATE; echo
|
just timelog $DATEARG
|
||||||
just worklog $DATE
|
just worklog $DATEARG
|
||||||
just chatlog $DATE
|
just chatlog $DATEARG
|
||||||
just tootlog $DATE
|
just maillog $DATEARG
|
||||||
just redditlog $DATE
|
just redditlog $DATEARG
|
||||||
|
just tootlog $DATEARG
|
||||||
|
|
||||||
CHANGELOGS := 'CHANGES.md hledger/CHANGES.md hledger-ui/CHANGES.md hledger-web/CHANGES.md hledger-lib/CHANGES.md'
|
CHANGELOGS := 'CHANGES.md hledger/CHANGES.md hledger-ui/CHANGES.md hledger-web/CHANGES.md hledger-lib/CHANGES.md'
|
||||||
|
|
||||||
@ -850,60 +851,87 @@ chlog *CHANGELOG:
|
|||||||
|
|
||||||
GITLG := "git log --format='%ad %h %s' --date=short"
|
GITLG := "git log --format='%ad %h %s' --date=short"
|
||||||
|
|
||||||
# Show commits in the three repos since DATE or DAYS ago or last release date, briefly.
|
# Show commits in the three repos since this date or days ago or last release, briefly.
|
||||||
commitlog *DATE:
|
commitlog *DATEARG:
|
||||||
#!/usr/bin/env osh
|
#!/usr/bin/env osh
|
||||||
DATE=`just datearg $DATE`
|
DATE=`just datearg $DATEARG`
|
||||||
printf "** hledger commits:\n\n"
|
printf "** hledger commits\n\n"
|
||||||
{{ GITLG }} --since $DATE
|
{{ GITLG }} --since $DATE
|
||||||
echo
|
echo
|
||||||
printf "** hledger_site commits:\n\n"
|
printf "** hledger_site commits\n\n"
|
||||||
{{ GITLG }} --since $DATE -C site
|
{{ GITLG }} --since $DATE -C site
|
||||||
echo
|
echo
|
||||||
printf "** hledger_finance commits:\n\n"
|
printf "** hledger_finance commits\n\n"
|
||||||
{{ GITLG }} --since $DATE -C finance
|
{{ GITLG }} --since $DATE -C finance
|
||||||
|
echo
|
||||||
|
|
||||||
# Show hledger-related time logged since DATE or DAYS ago or last release date
|
# Show hledger-related time logged since this date or days ago or last release
|
||||||
timelog *DATE:
|
timelog *DATEARG:
|
||||||
#!/usr/bin/env osh
|
#!/usr/bin/env osh
|
||||||
DATE=`just datearg $DATE`
|
DATE=`just datearg $DATEARG`
|
||||||
printf "** Time log since $DATE\n\n"
|
printf "** Time log\n\n"
|
||||||
hledger -f $TIMELOG print hledger -b $DATE
|
hledger -f $TIMELOG print hledger -b $DATE | rg '^2|hledger'
|
||||||
|
echo
|
||||||
|
hledger -f $TIMELOG bal -S hledger -b $DATE -e tomorrow
|
||||||
|
echo
|
||||||
|
|
||||||
# Show hledger work log
|
WORKLOG := "../../notes/CLOUD/hledger.md"
|
||||||
@worklog:
|
|
||||||
|
# Show dates logged in hledger work log.
|
||||||
|
@worklogdates:
|
||||||
|
awk "/^## Journal/{p=1;next};/^## /{p=0};p" $WORKLOG | rg '^### (\d{4}-\d{2}-\d{2})' -or '$1'
|
||||||
|
|
||||||
|
# make ghc usable for scripting
|
||||||
|
GHC := 'ghc -package-env - -ignore-dot-ghci'
|
||||||
|
|
||||||
|
# try to find GNU date
|
||||||
|
GDATE := `type -P gdate || echo date`
|
||||||
|
|
||||||
|
# Show hledger work logged since this date or days ago or last release
|
||||||
|
worklog *DATEARG:
|
||||||
|
#!/usr/bin/env osh
|
||||||
|
DATE=`just datearg $DATEARG`
|
||||||
|
WORKDATE=`just worklogdates | $GHC -e "getContents >>= putStrLn . head . dropWhile (< \"$DATE\") . (++[\"9999-99-99\"]) . lines"`
|
||||||
printf "** Work log\n"
|
printf "** Work log\n"
|
||||||
awk '/^## Journal/{p=1;next};/^## /{p=0};p' ~/notes/CLOUD/hledger.md
|
awk "/^### $WORKDATE/{p=1;print;next};/^## /{p=0};p" $WORKLOG
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Copy some text to the system clipboard if possible
|
# Copy some text to the system clipboard if possible
|
||||||
@clip TEXT:
|
@clip TEXT:
|
||||||
type -P pbcopy >/dev/null && (printf "$TEXT" | pbcopy)
|
type -P pbcopy >/dev/null && (printf "$TEXT" | pbcopy)
|
||||||
|
|
||||||
# Show matrix chat since DATE or DAYS ago
|
# Show matrix chat since this date or days ago or last release
|
||||||
chatlog *DATE:
|
chatlog *DATEARG:
|
||||||
#!/usr/bin/env osh
|
#!/usr/bin/env osh
|
||||||
DATE=`just datearg $DATE`
|
DATE=`just datearg $DATEARG`
|
||||||
JUMP="/jumptodate $DATE"
|
JUMP="/jumptodate $DATE"
|
||||||
just clip "$JUMP"
|
just clip "$JUMP"
|
||||||
echo "** matrix: https://matrix.hledger.org, $JUMP"
|
echo "** matrix: https://matrix.hledger.org, $JUMP"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Show #hledger-tagged mastodon toots since DATE or DAYS ago
|
# Show mail list discussion since this date or days ago or last release
|
||||||
tootlog *DATE:
|
maillog *DATEARG:
|
||||||
#!/usr/bin/env osh
|
#!/usr/bin/env osh
|
||||||
DATE=`just datearg $DATE`
|
DATE=`just datearg $DATEARG`
|
||||||
|
DATE2=`$GDATE -d $DATE +"%b %-d"`
|
||||||
|
echo "** mail list: https://list.hledger.org, since $DATE2 ($DATE)"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Show /r/plaintextaccounting posts since this date or days ago or last release
|
||||||
|
redditlog *DATEARG:
|
||||||
|
#!/usr/bin/env osh
|
||||||
|
DATE=`just datearg $DATEARG`
|
||||||
|
DAYS=`datediff $DATE now`
|
||||||
|
echo "** reddit: https://www.reddit.com/r/plaintextaccounting/new, since $DAYS days ago ($DATE)"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Show #hledger-tagged mastodon toots since this date or days ago or last release
|
||||||
|
tootlog *DATEARG:
|
||||||
|
#!/usr/bin/env osh
|
||||||
|
DATE=`just datearg $DATEARG`
|
||||||
SEARCH="#hledger #plaintextaccounting after:$DATE"
|
SEARCH="#hledger #plaintextaccounting after:$DATE"
|
||||||
just clip "$SEARCH"
|
just clip "$SEARCH"
|
||||||
echo "** mastodon: https://fosstodon.org/search, $SEARCH"
|
echo "** mastodon: https://fosstodon.org/search, $SEARCH"
|
||||||
echo
|
|
||||||
|
|
||||||
# Show /r/plaintextaccounting posts since DATE or DAYS ago
|
|
||||||
redditlog *DATE:
|
|
||||||
#!/usr/bin/env osh
|
|
||||||
DATE=`just datearg $DATE`
|
|
||||||
DAYS=`datediff $DATE now`
|
|
||||||
echo "** reddit: https://www.reddit.com/r/plaintextaccounting/new, since $DAYS days ago ($DATE)"
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Some evil works against this..
|
# Some evil works against this..
|
||||||
@ -913,9 +941,10 @@ redditlog *DATE:
|
|||||||
# cat $$.tmp
|
# cat $$.tmp
|
||||||
# rm -f $$.tmp
|
# rm -f $$.tmp
|
||||||
#
|
#
|
||||||
# # Clean links copied from old.reddit.com.
|
# Clean links copied from old.reddit.com.
|
||||||
# @redditclean:
|
@redditclean:
|
||||||
# rg '^(\[.*?]\([^\)]+\)).*self.plaintextaccounting' -or '- $1\n' -
|
rg '^(\[.*?]\([^\)]+\)).*self.plaintextaccounting' -or '- $1\n' -
|
||||||
|
|
||||||
# *** hledger version number helpers
|
# *** hledger version number helpers
|
||||||
# (as hidden recipes, since just doesn't support global custom functions)
|
# (as hidden recipes, since just doesn't support global custom functions)
|
||||||
# See doc/RELEASING.md > Glossary.
|
# See doc/RELEASING.md > Glossary.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user