Aivean / royalroad-downloader

https://royalroad.com book downloader
MIT License
57 stars 4 forks source link

Add option to strip Royal Road site title suffix from filename #33

Closed trilader closed 7 months ago

trilader commented 8 months ago

The site title is "Story Name | Royal Road" which gets transformed into "Story_Name_Royal_Road" for the filename. Personally I don't care for the "_Royal_Road" part of the filename as I keep all my archived/saved stories from there in an appropriately named folder.

This commit adds the --strip-site-title/-s option to skip that part of the filename and just use the story name (and the chapter counts of course).

Aivean commented 8 months ago

Thanks for the PR!

I personally think this behavior can just be enabled by default. Are there any arguments for having it optional?

trilader commented 8 months ago

The only reason I can see that it is changing the default/current behavior. I'm okay with it and don't think anyone else relies on it.

The only change this would need is a rename of the option, I'd suggest --keep-site-title/-k, and adjusted logic. I'll go ahead and push an adjustment commit on this branch that you can squash-merge if you want.

Aivean commented 7 months ago

I don't think anybody was reliant on the previous behavior. I think for simplicity we can just remove the option altogether and make the new behavior always enabled. Sorry if I communicated that poorly in my first comment.

trilader commented 7 months ago

I'm okay with just removing the option and always stripping the title suffix and just pushed a commit for that.