Open FilipBB opened 7 years ago
Thanks a lot. I'll review it as soon as possible.
So, I was making tests with the opml command and stumbled upon a feed that does not have a "version" attribute, which messes with line 307 of commands.py
:
Traceback (most recent call last):
File "/home/manolo/Scripts/Oggregator/greg/venv/lib/python3.6/site-packages/f
return self.__getitem__(key)
File "/home/manolo/Scripts/Oggregator/greg/venv/lib/python3.6/site-packages/f
return dict.__getitem__(self, key)
KeyError: 'version'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/manolo/Scripts/Oggregator/greg/venv/bin/greg", line 11, in <modul
load_entry_point('Greg==0.4.7', 'console_scripts', 'greg')()
File "/home/manolo/Scripts/Oggregator/greg/venv/lib/python3.6/site-packages/g
function(vars(args))
File "/home/manolo/Scripts/Oggregator/greg/venv/lib/python3.6/site-packages/g
feedtype = aux.feedparser.parse(feedurl).version
File "/home/manolo/Scripts/Oggregator/greg/venv/lib/python3.6/site-packages/f
raise AttributeError("object has no attribute '%s'" % key)
AttributeError: object has no attribute 'version'
Another thing I've noticed is that you have substituted sys.exit()
with print
in many instances. I'm fine with it, but at least I'd send that output to sys.stderr
, thus: print("blahblah", file=sys.stderr, flush=True)
I'd try to keep one convention on function names. I have_been_using_underscores, and you have added a number of camelCase functions.
Still going through the PR! :-) Thanks a lot for the ton of work @FilipBB
Sure, thanks for the feedback Manolo. It's quite hacky because I don't have formal programming experience, so I don't know best practices. Let me know when you're done looking it over and I'll try to implement the changes you suggest and send a new PR.
I was able to merge my recent feature additions with your new file layout. I also added the ability to parse urls with spaces or other funny coded symbols: https://github.com/manolomartinez/greg/commit/f8c7c97b5a1d63269d477503cf5cd3ca88eae7b3
Fixes issue https://github.com/manolomartinez/greg/issues/7