Phuks-co / throat

Open Source link aggregator and discussion platform powering Phuks
https://phuks.co
MIT License
73 stars 32 forks source link

Web feeds on global search #512

Closed why-not-try-calmer closed 2 years ago

why-not-try-calmer commented 2 years ago

This is pretty straightforward: it adds the option to render a global search as a web feed, taking inspiration from Reddit. I also added a small edit to the README as installing dependencies from the repository as is will fail if the interpreter is 3.9 or above. I didn't bother to try all interpreter versions down to 3.7, though.

globalistas commented 2 years ago

Can you maybe ensure full diacritics compatibility by using a-zA-ZÀ-ž0-9 instead?

Thanks!

why-not-try-calmer commented 2 years ago

Can you maybe ensure full diacritics compatibility by using a-zA-ZÀ-ž0-9 instead?

Thanks!

I do not know what vision the maintainers have about localization, so I don't want to make micro-optimizations without a principled basis. This PR is consistent with the authors' use of regular expressions throughout the code base, and for me that is enough right now.

Of course, one could discuss the use of regexps instead of a more generic approach, and for sure there is something to do about compatibility with diacritics. But I think that's for another time.

Polsaker commented 2 years ago

We're planning to replace A-Za-z with \w in the future, but for now it's OK to use it

Polsaker commented 2 years ago

Looks like the check for allow_search_feeds was removed

why-not-try-calmer commented 2 years ago

Looks like the check for allow_search_feeds was removed

Thanks, it should be fixed now.