-
Notifications
You must be signed in to change notification settings - Fork 32
Borodin Ilya #43
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
base: master
Are you sure you want to change the base?
Borodin Ilya #43
Conversation
Добавлен файл setup.py Добавлен метож main Изменена версия программы на "2.0"
App/Args_parser.py
Outdated
|
||
|
||
def parsing_args(): | ||
"""Парсим аргументы""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
комментарии на русском лучше, чем транслитом, но на английском языке они лучше всего :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Принял)
App/Portal.py
Outdated
except Exception as e: | ||
print("Problems with rss processing") | ||
logging.error(str(e)) | ||
exit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
у программы такого размера может быть одна точка выхода, в данном случае их минимум 7
тут имеет смысл сделать одну точку выхода из програмы (примерно рядом с точкой входа)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Поправил, спасибо
Убрал все лишние exit Добавил прокидывание ошибок дальше по вертикали
Добавлены классы ToPDF и ToHtml Добавлены новые аругемнты для конвертации Изменена версия программы
self.links = [] | ||
self.clear_text() | ||
|
||
def pars_date(self, struct): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А чем datetime
или аналогичные библиотеки не подходит для этой задачи?
или я что-то не до конца понимаю
logging.warning("Problems with tag parsing:\n" + str(e)) | ||
|
||
def __str__(self): | ||
string = "Channel name: {0}\n" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это мое субъективное мнение, но мне кажется, что это слишком "тяжелая" логика для метода "str"
Лично я бы вынес это в отдельный метод и не использовал для этих задач str
но это мое мнение :)
App/RSSListener.py
Outdated
|
||
|
||
class RSSListener: | ||
"""""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
док стринг
delete_list.append(new_d) | ||
for new_d in delete_list: | ||
date_handler[date].remove(new_d) | ||
with open("./Cache/" + date, 'wb') as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в различных операционных системах могут отличаться разделители в пути. Советую не хардкодить такие вещи, а пользоваться функционалом os.path
# rss-reader https://news.tut.by/rss/world.rss --help
unsupported format character 'y' (0x79) at index 49
The program suddenly completed its work |
Прошу оставить какие-либо комментарии по оформлению кода. До этого работал там, где не важна была чистота кода и оформление, а важен был только результат. Поэтому приму замечания с удовольствием)
Последние сутки? Пора браться за задания)
Сделано: