Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotkovets Gennadiy #49

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

ge2nadiy
Copy link

No description provided.

@AlexeiBuzuma AlexeiBuzuma added the MissedPRDeadline Pull request has been opened after hard deadline. label Nov 11, 2019
@AlexeiBuzuma AlexeiBuzuma added the [Deadline] Iteration 1-2 This is a marker for first and second iterations deadline. label Nov 17, 2019
long_description = f.read()


setup(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

почему-то help нехочет работать

# rss-reader --help
Traceback (most recent call last):
  File "/usr/local/bin/rss-reader", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/rss_app/main.py", line 21, in main
    args=get_args()
  File "/usr/local/lib/python3.8/site-packages/rss_app/main.py", line 17, in get_args
    args = parser.parse_args()
  File "/usr/local/lib/python3.8/argparse.py", line 1768, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/local/lib/python3.8/argparse.py", line 1800, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/lib/python3.8/argparse.py", line 2006, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/local/lib/python3.8/argparse.py", line 1946, in consume_optional
    take_action(action, args, option_string)
  File "/usr/local/lib/python3.8/argparse.py", line 1874, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/lib/python3.8/argparse.py", line 1044, in __call__
    parser.print_help()
  File "/usr/local/lib/python3.8/argparse.py", line 2493, in print_help
    self._print_message(self.format_help(), file)
  File "/usr/local/lib/python3.8/argparse.py", line 2477, in format_help
    return formatter.format_help()
  File "/usr/local/lib/python3.8/argparse.py", line 282, in format_help
    help = self._root_section.format_help()
  File "/usr/local/lib/python3.8/argparse.py", line 213, in format_help
    item_help = join([func(*args) for func, args in self.items])
  File "/usr/local/lib/python3.8/argparse.py", line 213, in <listcomp>
    item_help = join([func(*args) for func, args in self.items])
  File "/usr/local/lib/python3.8/argparse.py", line 213, in format_help
    item_help = join([func(*args) for func, args in self.items])
  File "/usr/local/lib/python3.8/argparse.py", line 213, in <listcomp>
    item_help = join([func(*args) for func, args in self.items])
  File "/usr/local/lib/python3.8/argparse.py", line 529, in _format_action
    help_text = self._expand_help(action)
  File "/usr/local/lib/python3.8/argparse.py", line 621, in _expand_help
    return self._get_help_string(action) % params
ValueError: unsupported format character 'Y' (0x59) at index 26

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Исправлено


def print_news(self, entries):
self.log.info("Printing news")
for thefeedentry in entries:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а изображения?

rss_app/RSS.py Outdated
"Link": thefeedentry.link,
"Discription": BeautifulSoup(thefeedentry.description, "html.parser").text
}
print("--------------------------------------------------")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

с аргументом --json утилита должна выводить json в консоль (чтобы этот аутпут можно было в прямом смысле конвертировать в json и использовать в других утилитах)
Однако сейчас аутпут не является корреткным json
нужно удалить эти раздилители в виде черточек и запихнуть все новости в список

@ge2nadiy ge2nadiy changed the title [WIP] Kotkovets Gennadiy Kotkovets Gennadiy Dec 1, 2019
@AlexeiBuzuma AlexeiBuzuma removed Hard Deadline [Deadline] Iteration 1-2 This is a marker for first and second iterations deadline. labels Dec 12, 2019
@AlexeiBuzuma
Copy link
Collaborator

Моменты, которые можно улучшить:

  1. Не совсем понятно, за что отвечает класс RssAggregator, он просто содержит в себе большое количество функций, которые особо не связаны между собой. Есть смысл более детально подумать над архитектурой приложения.
  2. такая же ситуация с классом конвертера. Он выступает прост ов виде контейнера для функций.
  3. Не совсем понятно, зачем так много шрифтов лежит в репозитории
  4. я бы посоветовал в файле requirements.txt прописывать конкретные версии библиотек, которые используются в проекте
  5. Работа с фалйами в пайтоне обычно производится с помощью контекстных менеджеров (ключевое слово with)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants