Skip to content
This repository was archived by the owner on Jan 25, 2020. It is now read-only.

Conversation

@mvartanyan
Copy link

No description provided.


def parse_anekdot():
'''
Simple func for collecting jokes from anekdotitut.ru
Copy link
Author

Choose a reason for hiding this comment

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

don't abbreviate or shorten words. Spelling is important.

for joke in jokes:
# Check for entry in DB.
if not bool(Joke.query.filter_by(joke_text = joke.text).first()):
j = Joke(joke_text = joke.text, user_id = 999)
Copy link
Author

Choose a reason for hiding this comment

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

Magic number 999

@@ -0,0 +1 @@
Generic single-database configuration. No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

You forget new line at end of file

@@ -0,0 +1,18 @@
# Config Classes
Copy link
Contributor

Choose a reason for hiding this comment

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

Useless comments

@@ -0,0 +1 @@
{{ feed_blank }} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

don't forget about new line at end of file

if not bool(Joke.query.filter_by(joke_text = joke.text).first()):
j = Joke(joke_text = joke.text, user_id = 999)
db.session.add(j)
db.session.commit() No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

No new line at end of file

'''
jokes_out = []
for i in range(1, 10):
url = url = 'https://anekdotitut.ru/pro_armyanskoe_radio' + str(
Copy link
Contributor

Choose a reason for hiding this comment

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

url = url What is that?

'''
Return generate wrapped in jingles file from upload_file
'''
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

:(

'''
Return generate base audio file from joke_text
'''
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

:(

'''
Return generate file with name of episode prefix from upload_file
'''
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

:(

@@ -0,0 +1 @@
# Here will be Flask Web Forms
Copy link
Contributor

Choose a reason for hiding this comment

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

Useless comment

scheduler.start()

# Shut down the scheduler when exiting the app
atexit.register(lambda: scheduler.shutdown())
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need lambda here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants