Git Product home page Git Product logo

wonderful_bing's People

Contributors

j67678 avatar lord63 avatar modten avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

wonderful_bing's Issues

More platforms support? More desktop environtment support?

I use Linux Mint 16(cinnamon) most of my time, sometimes Windows in my virtualbox.
Currently, wonderful_bing only supports Linux(Gnome and xfce4).
I'd appreciate it that if you think wonderful_bing is good and you'd like to make it more widely used.

bing set -d ~/Obrázky/ gnome

Traceback (most recent call last): File "/usr/local/bin/bing", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/wonderful_bing/wonderful_bing.py", line 159, in main wonderful_bing = WonderfulBing(arguments) File "/usr/local/lib/python2.7/dist-packages/wonderful_bing/wonderful_bing.py", line 126, in __init__ self.picture_path = path.join(self.directory, self.bing.picture_name) File "/usr/lib/python2.7/posixpath.py", line 73, in join path += '/' + b UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 15: ordinal not in range(128)

Fix the problem in notify

貌似Bing改版了,之前可以得到的今日图片故事的内容暂时无法直接从html中找到。

Change the command?

From wonderful_bing to bing? The original one was too long, but I always make it run automatically so I don't feel much annoying.

Test

v0.4.3 released. because the test used the old way in v0.4.2, so the travis ci failed. You can also hava a look at #7. So, we need write a better test case or just drop it.

Can't get the right desktop environment if you use cron or add it to startup

In v0.5.1, I add support for xfce4, so I need to detect the desktop environment, you can use it gracefully in the terminal, but fail in cron or if you add it to startup. It seems that the program can't get the right desktop environment.

e.g. run this test.py in cron

# test.py
import os
print os.environ.get("DESKTOP_SESSION")

I get None instead of the right answer cinnamon

About the wired picture url

self.url = "http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&nc=1409879295618&pid=hp"
information = requests.get(self.url).json()["images"][0]
self.picture_url = information["url"]

if I use proxy, the json file would be like this:

{"images":[{"startdate":"20140925","fullstartdate":"201409250700","enddate":"20140926","url":"/az/hprichbg/rb/LakeButtermere_ROW10783939870_1366x768.jpg",...}

If I don't use proxy, the json file would be like this:

{"images":[{"startdate":"20140924","fullstartdate":"201409241600","enddate":"20140925","url":"http://s.cn.bing.net/az/hprichbg/rb/TsinghuaArche_ZH-CN7826742772_1366x768.jpg",...}

And you should notice that the url in the first json file is not the full url.


You can find the details about why the build failed here

requests.exceptions.MissingSchema: Invalid URL u'/az/hprichbg/rb/LakeButtermere_EN-US10467595735_1366x768.jpg': No schema supplied. Perhaps you meant http:///az/hprichbg/rb/LakeButtermere_EN-US10467595735_1366x768.jpg?

I tested it at local and it was fine(because I didn't use proxy), when I pushed the code to github, the test failed, I think that's the reason why the test failed.

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.