videlais / extwee

Extwee is a story compiler supporting Twine formats
MIT License
33 stars 4 forks source link

Search '{$npm}/lib/node_modules/extwee/story-formats' directory if a full path isn't provided. #334

Open bryanrieger opened 2 years ago

bryanrieger commented 2 years ago

It would be really helpful to be able to use ext wee -c file.twee -s chapbook-1.2.0 -o file.html where the story format is derived from the '{$npm}/lib/node_modules/extwee/story-formats' directory (using the latest version of a story format if a version number isn't provided, ie: "…-s chapbook …") if a full path (relative or absolute) isn't provided.

Having to always remember to enter the full path to various story-formats is a bit painful.

videlais commented 2 years ago

@bryanrieger As a command-line tool, Extwee works best as part of NPM scripts or other functionality. An example within the Snowman testing suite uses the local path for the Twee input and HTML output, which is also something to consider.

I have not written documentation on this yet, as I want to implement the configuration file format I mentioned on the other issue, #335, but I highly recommend using one specific story format and putting it in your project instead of trying to pull from the Extwee code, as I plan to change that functionality in the future.

I do agree with you that searching for a specific version could be really useful, though. I might see about making it easier in a future version, perhaps when working a separate repo dedicated to holding story formats for Twine 2.