- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
Adding windows support for News Reader #1
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?
Conversation
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.
Thanks for the commit 💯
| 
               | 
          ||
| if __name__ == '__main__': | ||
| 
               | 
          ||
| exit_flag = 0 | 
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.
No point in adding flag, just append code in one if-else
| @@ -0,0 +1,47 @@ | |||
| # -*- coding: utf-8 -*- | |||
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.
it would be great if you can have the same name "NewsReader" for windows version as well.
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.
Cool, changing whats_up.py to NewsReader.py
| ## Function to store key to file | ||
| def add_key(): | ||
| 
               | 
          ||
| key = input('Enter News-API key: ') | 
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.
Give them the link of page where they can generate the key.
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.
It's in the README file
| print(article["url"]) | ||
| print(article["description"]) | ||
| 
               | 
          ||
| 
               | 
          
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.
Good work here, but i feel we need to identify functions that are same for both versions, instead of repeating the same code.
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.
Correct. Need to have one single file to be called from windows or mac. Need to change the folder structure.
        
          
                windows/commands.bat
              
                Outdated
          
        
      | @@ -0,0 +1,2 @@ | |||
| chcp 65001 | |||
| python3 newsUpdate.py 9f055cb1404449f79aca035f832b32f9 No newline at end of file | |||
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.
hahaha now world knows your key
Adding support for windows