Closed raphodn closed 4 years ago
Hello! Thank you for your issue and your interest!
However, I must warn you that this package is not maintained anymore for now (it may be updated in the future, but I don't have any date). Of course you can use it and modify it as you wish, but I don't have so many time and energy to spend, unfortunately.
In fact, one of the major problems of HOH's implementation is that it's very difficult to properly parse something like an opening_hours
field, because it has so many complicated specifications. Mo-Th 09:00-19:00
is a valid field, as well as Mo+ open
or 2020-2021 Jan-Feb Sa[2,3] dawn-(dusk+01:30) "on appointement"
. To make a parser that can handle all these fields is a very hard task, and that is the main reason I quite gave up...
I looked in the code and in my memory, and the reason for that is both an historical reason and an error. This method was written for one of the very first versions of HOH, and it was more a utility to check if the field was correctly parsed. Also, as I used HOH for very simple purposes, I used this method directly at the time. When the description()
method was added, I quite forgot it because description()
was way more powerful and versatile. I left it mainly for backward compatibility.
You can do a PR for that. However, I'm not very satisfied the way HOH works. It could be so much better and optimized, I would be a little ashamed to continue on this way. I think it would deserve a new rewriting, and it would probably be a good idea to give up to parse all the types of fields. So, I would prefer not to publish a new version on PyPi for now, to draw attention on the fact that HOH is not very maintained for now.
Hey, thank you for your long reply. I've gotten back to parsing and using opening_hours, I'll see what I can do and if I feel the need to make some improvements to the package :)
It's okay, good luck to you! :)
Hello ! Thanks for creating this package :)
I was slightly surprised that
oh.description()
returned a list, butoh.plaintext_week_description()
returned a string using\n
. Is there a historical reason or issue for that ? Would you be ok if I considered doing a PR to addoh.week_description()
that returns a list ? (and why notoh.plaintext_description()
that returned a string using\n
- and you could even push it by choosing the delimiter)Anyway I know I can also just simply do
oh.plaintext_week_description().split("\n")
so I'm using it like this for now :)Sorry for the bother