Skip to content

joshday/XKCD.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI

XKCD

A Julia package for retrieving data from the XKCD webcomic: xkcd.com.

Usage

Use the Comic struct to retrieve a comic's metadata. The comic function retrieves the comic's data and optionally opens the image in a browser.

using XKCD

julia> Comic(552)
Comic
{
        "month": "3",
          "num": 552,
         "link": "",
         "year": "2009",
         "news": "",
   "safe_title": "Correlation",
   "transcript": "[[A man is talking to a woman]]\nMan: I used to think correlation implied causation.\nMan: Then I took a statistics class.  Now I don't.\nWoman: Sounds like the class helped.\nMan: Well, maybe.\n{{Title text: Correlation doesn't imply causation, but it does waggle its eyebrows suggestively and gesture furtively while mouthing 'look over there'.}}",
          "alt": "Correlation doesn't imply causation, but it does waggle its eyebrows suggestively and gesture furtively while mouthing 'look over there'.",
          "img": "https://imgs.xkcd.com/comics/correlation.png",
        "title": "Correlation",
          "day": "6"
}

Special Features:

Display in Pluto/Jupyter

Retrieve a comic at random

rand(Comic)