Git Product home page Git Product logo

xkcd-favorites's Introduction

A GitHub pages website that lists my favorite xkcd's.

The MIT License applies to the code in this repository, I claim no ownership to the comics; xkcd is licensed under CC BY-NC 2.5

If you wish to create your own favorites list, you can:

  1. Fork this repository
  2. git clone ... your repository to your computer.
  3. Edit favorites.yaml to have your the corresponding IDs for your favorite xkcd's. The IDs are in the URL when viewing an xkcd.
  4. pip3 install -r requirements.txt
  5. python3 generate.py

Then, either push the branch and use github pages, or host the index.html, custom.css and index.js on a website somewhere.

generate.py will use data.json as a cache, so any items previously downloaded won't have to be downloaded again.

For debugging whether or not something has already been downloaded, you can increase log verbosity by editing the XKCD_LOGLEVEL environment variable; e.g.:

XKCD_LOGLEVEL=DEBUG python3 generate.py

More about log levels here.

I've also included a script ssg which 'pre-renders' the page, removing the javascript from the page so there's no rendering client side. After I clone this to my server, I do: ./ssg && mv static.html index.html.

xkcd-favorites's People

Contributors

seanbreckenridge avatar

Stargazers

 avatar

Watchers

 avatar  avatar

xkcd-favorites's Issues

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.