Skip to content

Conversation

@Sarvaswa
Copy link

Adding support for windows

Copy link
Owner

@TanayGahlot TanayGahlot left a comment

Choose a reason for hiding this comment

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

Thanks for the commit 💯


if __name__ == '__main__':

exit_flag = 0
Copy link
Owner

Choose a reason for hiding this comment

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

No point in adding flag, just append code in one if-else

@@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
Copy link
Owner

Choose a reason for hiding this comment

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

it would be great if you can have the same name "NewsReader" for windows version as well.

Copy link
Author

Choose a reason for hiding this comment

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

Cool, changing whats_up.py to NewsReader.py

## Function to store key to file
def add_key():

key = input('Enter News-API key: ')
Copy link
Owner

Choose a reason for hiding this comment

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

Give them the link of page where they can generate the key.

Copy link
Author

Choose a reason for hiding this comment

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

It's in the README file

print(article["url"])
print(article["description"])


Copy link
Owner

Choose a reason for hiding this comment

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

Good work here, but i feel we need to identify functions that are same for both versions, instead of repeating the same code.

Copy link
Author

Choose a reason for hiding this comment

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

Correct. Need to have one single file to be called from windows or mac. Need to change the folder structure.

@@ -0,0 +1,2 @@
chcp 65001
python3 newsUpdate.py 9f055cb1404449f79aca035f832b32f9 No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

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

hahaha now world knows your key

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants