Closed j3soon closed 3 years ago
Thanks for reporting! Yeah, it would be welcome! I never used efforts in org-mode so I guess that's why I haven't noticed. If you could add some tests here https://github.com/karlicoss/orgparse/blob/ce8f6ccf60d6dca60c5f03890d730676a5d1ac21/orgparse/node.py#L130-L131 would be great as well
You can use tox
to run all tests, or more specifically this command https://github.com/karlicoss/orgparse/blob/45b366eb5c23e4149d8bc7a319f10dc74888fe51/tox.ini#L9
P.S. I guess another thing to think about is that it's probably not great to crash on a relatively minor parsing issue, but not sure what would be a good way to do it. Maybe orgparse could work in 'strict' and 'defensive' modes, so people could adjust to their level of tolerance. (not for this change of course, just thinking out loud :) )
Now on pypi! thanks https://pypi.org/project/orgparse/
The following code produces error in orgparse 0.2.3:
Error message:
Other formats listed below results in similar errors:
The available effort formats are mentioned in org-duration.el. I can parse these formats by adding some tests and modifying orgparse/node.py line140-143. If supporting such format is preferable, I can work on this during my free time and open a PR.