Code Monkey home page Code Monkey logo

xkcd's Introduction

XKCD

Build Status MIT license

xkcd, sometimes styled XKCD is a webcomic created by American author Randall Munroe. It is a comic of Romance, Sarcasm, Math and Language.

About

xkcd is a command line tool written in Python which will fetch you the comics right in the terminal. This tool uses the xkcd API to get the image and the Click python package to wrap the script into a beautiful command line interface tool.

Supports only Python 3.x and Linux, MacOs and Windows :)

Installation

  • Run the following command

    $ pip install git+https://github.com/itsron717/XKCD
    
  • Now the package is successfully installed. Run it using the command

    $ xkcd
    
  • Instruction on how to use the package and it's arguments can be found using --help

    $ xkcd --help
    

    Feel free to contribute! Let me know if there are any issues with the installation or running of the package using the GitHub issues. All suggestion are welcome.

License

The MIT License (MIT)

Copyright (c) 2018 Rounak Vyas

xkcd's People

Contributors

itsron143 avatar jebby avatar thetechrobo avatar xrisk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

xkcd's Issues

Hardcoded random interval

Hi,

Neat project :)

However, when you use the --random option, it will always get a comic between ID 100 and 999.
I've created a branch when I have corrected it, but it says I don't have permission to push a new branch.

Can you correct it, or grant permission to push changes into a new branch and create pull request?

Thanks in advance!

Unidentified image error

There was a problem with the command, a python error, here is the log

Traceback (most recent call last):
File "/home/selene/.local/bin/xkcd", line 11, in
load_entry_point('xkcd==0.1', 'console_scripts', 'xkcd')()
File "/home/selene/.local/lib/python3.6/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/home/selene/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/selene/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/selene/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/selene/.local/lib/python3.6/site-packages/xkcd.py", line 29, in cli
img = Image.open(BytesIO(res.content))
File "/home/selene/.local/lib/python3.6/site-packages/PIL/Image.py", line 2862, in open
"cannot identify image file %r" % (filename if filename else fp)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f61173b5938>

I understand if you don't want to take time to fix this, but if you want to fix it you have the log now.
It doesn't seem easily reproductible, and happened with the xkcd --random command

Tested on Windows

Hi,

I have tested the application on windows and it seems to work. xkcd - -random opens up my default photo viewer and shows me a random xkcd comic every time.
Running only xkcd shows me the same comic every time, guessing this is intended?

Tested with :
Python 3.6.5
Windows 10 v1803

Followed your installation instructions in the readme

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.