atiumcache / pure-recipe

Input a recipe URL and receive well-formatted, ad-free recipes to your terminal, or save the output to a markdown file.
MIT License
71 stars 9 forks source link

Save does not correctly create the filename #7

Closed rileyyy closed 10 months ago

rileyyy commented 10 months ago

Issue encountered

Attempting to save a recipe using the example recipe created the filename with the word recipes at the front: image

Expected result

The file should be named crispy-baked-potato-wedges.md and located inside the recipes/ directory.

You could consider the .replace() function that is built into python as well for name sanitization. e.g. title = scraper.title().replace(' ', '-') + ".md"

atiumcache commented 10 months ago

Thanks a bunch @rileyyy for the thorough testing and suggestions. Much appreciated.

rileyyy commented 10 months ago

Not a problem! I'll pull down the latest changes later when I have some time and give it another go. Seems like a super handy utility!