Pavel_Los_lospawel@yandex.ru#28
Conversation
|
Please make your PR name correspond to the one specified in our README.md |
|
Doesn't work, because you need to install mysql, then database final_task_database and table nes_cache like in readme |
|
So the user should install MySQL client, create specific database schema and create specific table inside by himself just to be able to run your application? How does this work with setuptools? |
|
Yes |
|
I used database, because it will be necessary in 6 iteration. But now I think that don't have time to do it, that is why I can change datebase storage to store data in simple file. The database doesn't depend on setuptools |
|
It is just not a good practice then. An average user (who does not know MySQL at all) will not be able to use your application. It is up to you to decide what you are going to do, you still have 4 full days until the deadline. If you really using database for Iteration 6 then it is ok, but make sure that steps of schema and table creation will be automated, so the user will just need to write 1-2 lines in the console to get things going on Iteration 6. You also can try some libs that use mysql, but actually do not require MySQL server installed and operational. If you are not going to do the 6th iteration the it is of course preferable to simplify things for user: either try to automate it using Or you can leave it as is. Of course it is not a good practice to make user manually setup the database, but we will surely not deny/fail your hard work just because of this issue. P.S. I will test your app today a bit later |
|
Please check my comment on your README.md |
|
…move parsing arguments in separate function, --date and --version can be used without source, fix bugs with writing and reading database. Some other little changes
Argument that user specifies for conversion to another format should be a directory, not a specific file. Moreover right now if you specify a directory instead of filename it will throw an exception with traceback in stdout
|
--date, redo --to-fb2 and --to-html: now the argument is directory and file news.fb2 or news.html are created in this directory. Some other little changes
|
I did not discover issues with Iteration 5 functionality. Still be sure to test it yourself, in case I missed something. |
| news_list.append({'Feed': | ||
| html.unescape(parsed_rss['feed']['title']), | ||
| 'Title': | ||
| html.unescape(parsed_rss['entries'][index]['title']), | ||
| 'Date': | ||
| str(date_parser.parse(parsed_rss['entries'][index]['published'])).split(" ")[0], | ||
| 'Link': | ||
| parsed_rss['entries'][index]['link'], | ||
| 'Image description': | ||
| html.unescape(get_image_description(parsed_rss['entries'][index]['summary'])), | ||
| 'New description': | ||
| html.unescape(get_new_description(parsed_rss['entries'][index]['summary'])), | ||
| 'Image links': | ||
| [content['url'] for content in parsed_rss['entries'][index]['media_content']]}) |
There was a problem hiding this comment.
For multiline dictionary declarations it is better to use this codestyle:
news_dict = {
"key`": value1,
....
}
| from database_functions import get_news_list_by_date, write_news_to_database | ||
| from parse_rss_functions import get_news_list | ||
| from custom_exceptions import NoInternet, IncorrectURL, IncorrectFilePath, DatabaseConnectionError | ||
| from print_functions import print_news_colorize, print_news_JSON_colorize, print_news, print_news_JSON |
There was a problem hiding this comment.
Here and everywhere else:
If you are using all functions inside imported module it is preferable to use just import
|
Here is some feedback on your application: Commit messages are informative enough and correspond to the recommended commit message style. |
| usage: rss_reader.py [-h] [--source SOURCE] [--version] [--json] [--verbose] | ||
| [--limit LIMIT] [--date DATE] | ||
|
|
||
| Pure Python command-line RSS reader. | ||
|
|
||
| optional arguments: | ||
|
|
||
| -h, --help show this help message and exit | ||
| --source SOURCE RSS URL | ||
| --version Print version info | ||
| --json Print result as JSON in stdout | ||
| --verbose Outputs verbose status messages | ||
| --limit LIMIT Limit news topics if this parameter provided | ||
| --date DATE News from the specified day will be printed out. Format: YYYYMMDD | ||
| It is mandatory to specify date or/and time. | ||
| If both are specified, then news will be searched by date and by source. |
There was a problem hiding this comment.
And what about Iteration 4 options?




5 iterations