EdJoPaTo / website-stalker

Track changes on websites via git
GNU Lesser General Public License v2.1
54 stars 6 forks source link

Overriding filename? #179

Closed josephguillaume closed 1 year ago

josephguillaume commented 1 year ago

Describe your goal I have a url that includes a long query string. The run fails with File name too long (os error 36)

Expected The easiest option would seem to be allowing a custom filename to be defined for a given url? E.g. with a new key filename

Thanks for considering it!

EdJoPaTo commented 1 year ago

Thank you for the report! Yeah, I see the point.

The basic idea was to prevent manual handling of filenames to allow them to be automagically handled. Overriding the generated filename should be possible with these file handling operations I think.

Not sure if there is a better option. 🤔 Hashing might result in conflicts so a strict filename might be the most error proof option.

Teufelchen1 commented 1 year ago

Hi! @josephguillaume I opened a PR implementing your idea like this:

sites:
  - url: "https://edjopato.de/api?token=0123456789&action=hack%20the%20planet"
    filename: de-edjopato-api-planet-hack

Would that work for you?

josephguillaume commented 1 year ago

Looks great! Thanks!

Teufelchen1 commented 1 year ago

@josephguillaume the feature is in main since #180 got merged two weeks ago. Can we close the issue?

EdJoPaTo commented 1 year ago

I planned a release once I have time in the days after in case something needs a fix. Probably on Tuesday. Then I’ll write a „it’s release now“ and close it 😇

EdJoPaTo commented 1 year ago

The release is there: https://github.com/EdJoPaTo/website-stalker/releases/tag/v0.20.0

Thank you for bringing up your thoughts when using this tool @josephguillaume!

josephguillaume commented 11 months ago

Very belatedly - thank you, this is perfect!