Compare commits

..

No commits in common. "a47a0d7e9575c308c1aae66e9f20630730bb2ff9" and "538957e043c2740b67496f9c43f5faa0ce98c81b" have entirely different histories.

4 changed files with 10 additions and 79 deletions

View File

@ -94,11 +94,11 @@ See `justfile` for more examples
- [x] Add types/enums
- [x] ~~tui?~~ run `just new`
- [x] add Update to CLI
- [x] add Date to update menu. sometimes i add the session log after the session has happened!
- [x] refactor edit/update search functions
- [x] change Recent Games from 'recently created' to 'recently updated' ?
- [ ] CLI flags mode
- [ ] refactor edit/update search functions
- [ ] rename Update to Log or Session Log?
- [ ] change Recent Games from 'recently created' to 'recently updated' ?
- [ ] add Date to update menu. sometimes i add the session log after the session has happened!
## Resources

View File

@ -13,8 +13,6 @@
db="db/games.rec"
function main_menu {
cat<<EOF
@ -27,8 +25,6 @@ EOF
read -p "> " selection;
}
function new_game () {
read -p "System: " system
read -p "Module: " module
@ -72,8 +68,6 @@ recins $db --verbose -t Game \
gamemenutmpl="{{Id}}. {{Module}} ({{System}})
"
function edit_game () {
id="$1"
shift
@ -93,31 +87,21 @@ case $selection in
esac
}
function update () {
id="$1"
shift
read -p "Date> " created
tmp=$(mktemp)
$EDITOR "$tmp"
Text=$(< "$tmp")
recins --verbose $db -t Update -f Game -v "$id" -f Text -v "$Text" -f Created -v "$created"
recins --verbose $db -t Update -f Game -v "$id" -f Text -v "$Text"
recsel $db -t Update -q "$Text"
main_menu
}
function recent_updates () {
count=`recsel -t Update $db -c`
function recent_games_update () {
count=`recsel -t Game $db -c`
recent="$((count - 7))"
recsel $db \
-t Update \
-e "Id > ${recent}" \
-j Game \
-p Game_Id:Id,Game_Module:Module,Game_System:System \
| recfmt "${gamemenutmpl}"
recsel $db -t Game -e "Id > ${recent}" | recfmt "${gamemenutmpl}"
read -p "Number> " id
case $id in
"" | "b" | "B" | "x" | "X" | "q" | "Q")
@ -127,9 +111,7 @@ case $id in
esac
}
function search_updates () {
function search_games_update () {
read -p "Query> " q
recsel $db -t Game -i -q "${q}" | recfmt "${gamemenutmpl}"
read -p "Number> " id
@ -141,8 +123,6 @@ case id in
esac
}
function recent_games () {
count=`recsel -t Game $db -c`
recent="$((count - 7))"
@ -156,8 +136,6 @@ case $id in
esac
}
function search_games () {
read -p "Query> " q
recsel $db -t Game -i -q "${q}" | recfmt "${gamemenutmpl}"
@ -170,8 +148,6 @@ case id in
esac
}
function update_menu () {
cat<<EOF
@ -184,9 +160,9 @@ read -p "> " menu
case "$menu" in
1 | "r" | "R")
recent_updates;;
recent_games_update;;
2 | "s" | "S")
search_updates;;
search_games_update;;
3 | "m" | "M" | "q" | "Q" | "b" | "B")
main_menu;;
*)
@ -194,8 +170,6 @@ case "$menu" in
esac
}
function edit_menu () {
cat<<EOF
@ -218,9 +192,6 @@ case "$menu" in
esac
}
function main () {
main_menu
case "$selection" in
@ -235,7 +206,3 @@ case "$selection" in
*)
echo "Select a letter or number from the menu";;
esac
}
main

18
dist/index.html vendored
View File

@ -9,24 +9,6 @@
border-bottom: solid 1px black;
margin-top: 3rem;
}
h2, h3 {
position: relative;
}
h2 a, h3 a {
position: absolute;
left: -1.2rem;
text-decoration: none;
opacity: 0.2;
}
h2 a {
line-height: 1.4;
}
h3 a {
line-height: 1.2;
}
h2:hover a, h3:hover a {
opacity: 1;
}
</style>
<h1>Gamelogs</h1>
<p>All the roleplaying games I've played.</p>

View File

@ -68,24 +68,6 @@ html:
border-bottom: solid 1px black;
margin-top: 3rem;
}
h2, h3 {
position: relative;
}
h2 a, h3 a {
position: absolute;
left: -1.2rem;
text-decoration: none;
opacity: 0.2;
}
h2 a {
line-height: 1.4;
}
h3 a {
line-height: 1.2;
}
h2:hover a, h3:hover a {
opacity: 1;
}
</style>
EOF
## END: STYLE ##