Skip to content

Conversation

@brentwilder
Copy link

Resolves #8 by calling variables directly from Katana INI file (so users don't need to repeat inputs here).

This implementation is slightly sensitive to having dates structured with dashes. Although with these types of things I would assume a user would simply follow the template, which is very clear and contained within this repo. @jomey if you have any other strategies for pulling happy to make any changes here.

@brentwilder brentwilder requested a review from jomey October 31, 2025 15:19
# Extract variables from ini file.
START_DATE=$(grep -E '^start_date' "$KATANA_INI" | cut -d':' -f2 | awk '{$1=$1;print}')
START_YEAR=$(echo "$START_DATE" | cut -d'-' -f1)
START_MONTH=$(echo "$START_DATE" | cut -d'-' -f2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestion to make these calls a little simpler and have you tried to use a date parse to get to year and month. Pseudo code:

year=$(date -d "$START_DATE" +%Y)
month=$(date -d "$START_DATE" +%m)

@jomey
Copy link
Member

jomey commented Oct 31, 2025

❤️ - Thanks for this improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inputs to katana

2 participants