Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evaporei/xkcd
index for the xkcd comics
https://github.com/evaporei/xkcd
Last synced: 15 days ago
JSON representation
index for the xkcd comics
- Host: GitHub
- URL: https://github.com/evaporei/xkcd
- Owner: evaporei
- Created: 2023-06-11T15:45:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-12T18:07:04.000Z (over 1 year ago)
- Last Synced: 2024-10-10T20:19:54.405Z (about 1 month ago)
- Language: Go
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# xkcd
Exercise:
```
The popular web comic xkcd has a JSON interface. For example, a request to
https://xkcd.com/571/info.0.json produces a detailed description of comic 571, one of many
favorites. Download each URL (once!) and build an offline index. Write a tool xkcd that, using this
index, prints the URL and transcript of each comic that matches a search term provided on the
command line.
```To run:
```bash
# to build the index
go run ./cmd/xkcd_fetch# or
# to find all comics with the search term "banana"
go run ./cmd/xkcd "banana"
```