Giter VIP home page Giter VIP logo

uip's People

Contributors

abhay-raizada avatar abhinavgpt avatar akshatnitd avatar aniq55 avatar darksoul11 avatar hackrush01 avatar hassi2016 avatar kirti0808 avatar lohani2280 avatar mohitshaw avatar nehau9 avatar nemani avatar nkprince007 avatar sachin-13 avatar sonalkr132 avatar sreeparna0795 avatar ssg2526 avatar swati707 avatar teja-315 avatar trump16 avatar vartika-arora avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

uip's Issues

Exit UIP cleanly with ctrl + C

So right now pressing ctrl - c during execution gives a very ugly traceback: This should be avoided.

hint : put call to scheduler in UIP.py in a try except block with KeynoardInterrupt as exception then use sys.exit(0)

Add support for MacOS

sadly none of our developers have a mac yet, so its impossble for us to test this right now :(

organise code into folders

let's use the structure:

UIP
|
  \uiplib\
     |
     \setWallpaper.py
     \scheduler.py
     \scrape.py
     \constants.py
  \tests\
     |
     \(empty for now or we can have place holder files)
|
|.gitignore
|requirement files
|Readme
|Contributing
|UIP.py

Nice Exit message

print Exiting UIP hope you had a nice time :) before system exit in UIP.py

HTTP Error 403

Traceback (most recent call last):
File "UIP.py", line 4, in
scheduler()
File "/home/sonu/UIP/scheduler.py", line 10, in init
self.initFetch()
File "/home/sonu/UIP/scheduler.py", line 17, in initFetch
get_images(WEBSITE)
File "/home/sonu/UIP/scrape.py", line 49, in get_images
urlretrieve(image,os.path.join(path,filename),reporthook=dlProgress)
File "/usr/lib/python3.5/urllib/request.py", line 188, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 472, in open
response = meth(req, response)
File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.5/urllib/request.py", line 510, in error
return self._call_chain(*args)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

option for other subreddits

all subreddits follow similar page structure so it shouldn't be difficult to allow for different subreddits

Flush images

Once the set amount of images are downloaded, they keep on repeating and no new images are downloaded.
This needs to change, as- the more the merrier.

Contributing.md should be added to readme.md

This would make it easier for newcomers to read the guidelines.
One doesn't go all the way to check the contributing.md file to know how to contribute.

Its open source :P Keep it as open as possible.

add support for bmp files

just add bmp to the list in scrape.py
change from:

if link['href'].endswith(('jpg','png','jpeg'))

to

if link['href'].endswith(('jpg','png','jpeg','bmp'))

PEP8 errors in scheduler.py

scheduler.py:1:5: E271 multiple spaces after keyword
scheduler.py:3:31: E231 missing whitespace after ','
scheduler.py:3:43: E231 missing whitespace after ','
scheduler.py:3:51: E231 missing whitespace after ','
scheduler.py:6:30: W291 trailing whitespace
scheduler.py:7:1: E302 expected 2 blank lines, found 0
scheduler.py:13:1: W293 blank line contains whitespace
scheduler.py:14:9: E265 block comment should start with '# '
scheduler.py:16:13: W291 trailing whitespace
scheduler.py:25:21: E225 missing whitespace around operator
scheduler.py:30:26: E225 missing whitespace around operator
scheduler.py:31:1: W293 blank line contains whitespace
scheduler.py:35:1: W293 blank line contains whitespace
scheduler.py:36:5: E303 too many blank lines (2)
scheduler.py:36:26: E231 missing whitespace after ','
scheduler.py:37:18: E225 missing whitespace around operator
scheduler.py:43:28: E225 missing whitespace around operator

doesn't download wallpapers when pics directory exists and is empty

$ python UIP.py 
Hey this is UIP! you can use it to download images from reddit and also to schedule the setting of these images as your desktop wallpaper.
Press 1 to connect to internet or any other key to use this application in offline mode
1
1479450423.197908
No downloaded images. Try again in online mode.

Needs fixing the use of os.path.isdir combined with os.path.exists

Add option for not connecting to the internet

i think it would cool if we could add an option for not connecting to the internet and changing the wallpapers directly from the directory, all the functionality is there we just need to add an option

Use rultor for deployement

it would be nice to have newcommer commits as standalone commits instead of those stupid merge commits for that we'll need rultor.

Put screenshot of a UIP wallpaper in Readme

it will be a great way to advertise UIP. The image should go inside an example folder and the screenshot in the readme should be under the heading example right after set up

Add command to Empty pics folder

often the pics folder get's stale and then we get the same images repeatedly its best if there's a command to like python3 UIP.py --flush to delete all the pics in the pics folder

Specify the parser for better output

/usr/lib/python3/dist-packages/bs4/init.py:181: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line 4 of the file UIP.py. To get rid of this warning, change code that looks like this:

BeautifulSoup([your markup])

to this:

BeautifulSoup([your markup], "lxml")

PEP8 errors in UIP.py

There are the following PEP8 errors in UIP.py:

UIP.py:4:1: W191 indentation contains tabs
UIP.py:4:13: W292 no newline at end of file

Correct Readme to write supported OS'

right now Readme states, `"applies wallpaper in a gnome desktop" change this "applies wallpaper on your desktop. Works with windows, mac and gtk based desktops on Linux"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.