nogarcia / xkcdn Goto Github PK
View Code? Open in Web Editor NEWxkcd, in your terminal.
License: MIT License
xkcd, in your terminal.
License: MIT License
Everyone loves mousing over the image and getting those little extra kicks of humor.
Difficult way: get every single comic title and return the one that matches.
I'd be grateful if anyone could think of a better way.
I realize not everyone likes to download webcomics, so I'll probably add in @itsron717's approach.
Build tests are good for making sure your code works. Plus, you get that nice little checkmark.
I'm not sure whether it's a good practice or not, but it sure makes the code look way better.
In the following form, please.
try:
# do what you do
except RandomError:
# Report error
Good opensource practice: label your code.
Committing to master isn't really a good practice, but at the same time, there's not really not very much code to be unstable. It either works or not works. You get system exclusive bugs in larger systems.
Describe the bug
When downloading an animated comic, the script downloads the bytes and names them as a PNG. The file fails to load in an image editor. 1264 is a still image in ImageMagick. The file is verifiably a GIF when viewed in a hex editor.
To Reproduce
Steps to reproduce the behavior:
1.
$ xkcdn --num 1264 # any animated comic
Expected behavior
The image is recognized as a GIF and is aptly named.
Desktop (please complete the following information):
I don't want this to be too much like the original terminal XKCD, but I want this feature.
Get num of latest comic and pick a random number in between 1 and that number.
The code is a mess currently. It'd be helpful to have a logic rewrite and a separation of all the processes.
Can't leave out those guys without desktop environments. I'd like to use @purrleterian's 2ASCIIpy, but it is not in a package manager.
While the name is punny, it's annoying to type repeatedly.
XKCD can get pretty meta. I'd like to get an explanation.
This would require some web-scraping, which can get kludgy really quickly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.