saif-ellafi / play-by-the-writing

Play by the Writing is a bundle of scripts for Espanso, written in python to expand SOLO RPG rulesets as you write
Apache License 2.0
24 stars 6 forks source link

Fix card commands [fixes #8] #9

Closed jeremy-w closed 8 months ago

jeremy-w commented 8 months ago

Before, the user directory cards_tables/ was not created on fresh install, which made card commands fail when trying to read the deck state from within the directory.

Now, the directory is created.

Note

This introduces a new helper for getting subpaths of the user directory. If that's cool, then I'll follow this up with a PR adopting it across the common file. It should make the code a bit more readable.

(I'm not familiar with the overall codebase, so it's totally possible that belongs in a shared utility module for all the scripts files to work with.)

saif-ellafi commented 8 months ago

Looks good! Will test soon and review all potential next improvements