Git Product home page Git Product logo

xkcd-ascii's Introduction

made for google code in 2019

xkcd-ascii

don't mind the code, it's completly rusty

Converts xkcd comics to ascii

USAGE:
    xkcd-ascii [id]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:
    <id>    Id of xkcd comic. If not provided then a random comic is fetched.

how to build

git clone https://github.com/HKGx/xkcd-ascii.git
cd xkcd-ascii
cargo build

the files should be somewhere in the target directory

how to use

simply invoke

./xkcd-ascii 

you can also specify which comic do you want to fetch by doing e.g.

./xkcd-ascii 5

proof of build

asciicast

proof of use

asciicast

xkcd-ascii's People

Contributors

hkgx avatar

Stargazers

 avatar

Watchers

 avatar  avatar

xkcd-ascii's Issues

Can't compile

error[E0599]: no method named timeout_connect found for struct ureq::Request in the current scope
--> src/xkcd.rs:52:10
|
51 | let resp = ureq::get(comic.img.as_str())
| _______-
52 | | .timeout_connect(8_000)
| | -^^^^^^^^^^^^^^^ method not found in Request
| |
|
|

error[E0599]: no method named timeout_connect found for struct ureq::Request in the current scope
--> src/xkcd.rs:77:10
|
76 | let resp = ureq::get("https://c.xkcd.com/api-0/jsonp/comic")
| _______-
77 | | .timeout_connect(4_000)
| | -^^^^^^^^^^^^^^^ method not found in Request
| |
|
|

error[E0599]: no method named timeout_connect found for struct ureq::Request in the current scope
--> src/xkcd.rs:93:10
|
92 | let resp = ureq::get(format!("https://c.xkcd.com/api-0/jsonp/comic/{}", id).as_str())
| _______-
93 | | .timeout_connect(4_000)
| | -^^^^^^^^^^^^^^^ method not found in Request
| |
|
|

warning: unused import: std::io::Read
--> src/xkcd.rs:10:5
|
10 | use std::io::Read;
| ^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default

For more information about this error, try rustc --explain E0599.
warning: xkcd-ascii (bin "xkcd-ascii") generated 1 warning
error: could not compile xkcd-ascii (bin "xkcd-ascii") due to 3 previous errors; 1 warning emitted

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.