Hi, I'm Alex. Iβm a software developer, writer, and hand crafter from the UK. π
I have a mix of projects on GitHub β some stuff for my day job, some personal code.
A site to track what I've been reading :books:
Home Page: https://books.alexwlchan.net/
License: MIT License
Hi, I'm Alex. Iβm a software developer, writer, and hand crafter from the UK. π
I have a mix of projects on GitHub β some stuff for my day job, some personal code.
I want a fixed seed for determinism, and I want a consistent seed to get a consistent shape β but that also means I get a consistent pattern of light/dark/dark/light/etc.
I should really use:
seed = 0
)colour.as_int(16)
)This will be more obvious once I actually implement it.
Currently I'm setting the width/height of the cover images with max-width/max-height
attributes in the CSS, but this means a browser which hasn't loaded all the images will have to keep redrawing the page layout as they load in.
It's a static site! I can know what the dimensions are! If I load them and set them as width/height
attributes, a browser can render the whole page when it gets the HTML, then do lazy loading of the remaining images.
Occasionally the build will fail because the GitHub Releases API will refuse to return results for an unauthenticated GET. It should be possible to give Netlify a token with minimal permissions that avoids this issue.
I used to do this, but I think it got lost in the move from Python to Rust.
Hi Alex! π Great job with building your book-tracking website. I like the design and idea. However, I do have a question: What is the architecture of this project? What role does the π¦ play? I have a similar project here. Mandy is a new static-site generator built solely by me in the last two weeks. The architecture is quite simple: Mandy fetches all the info from the Mandy project directory, stores this info in a structure and generates the static site's files from this info. In the same way, what is the architecture you used for your project? I'm just curious! π
e.g. https://brill.com/cover/covers/9789004369054.jpg
Mimicking the User-Agent of a different browser would get around this.
There's a bug in the Netlify deploy process where:
vfd
from that release, finds it's missing, and breaksThis is clearly suboptimal; I have to restart the build whenever this happens. For some reason Netlify interprets "build failed" as "upload an empty folder as the site", which is wrong.
$ vfd add_review
A newer version of vfd is available, please update:
https://github.com/alexwlchan/books.alexwlchan.net/releases/tag/v1.4.2
? What's the title of the book? Mah
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: OperationInterrupted', src/add_review.rs:56:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
If you run an out-of-date version of vfd, you get a helpful message:
A newer version of vfd is available, please update:
https://github.com/alexwlchan/books.alexwlchan.net/releases/tag/v1.3.3
Unfortunately this message will also appear locally if you're running a newer version than what's on GitHub, and you haven't pushed your changes yet. This is mildly annoying, and should be fixable.
This build should either have failed or done the right thing, but not delete the entire site: https://app.netlify.com/sites/books-alexwlchan/deploys/62e58d3317db330008cacbdc
That's what I was doing before the big Rust rewrite.
Currently I can only deploy the site when running locally on a Mac that has the binaries installed. But Linux binaries are available through the GitHub releases β Netlify could download those and build the site.
This would allow me to make edits through the GitHub web interface/from an iOS device.
Either detect them as Markdown and drop a warning, or fail the build on unrecognised file extensions.
Precisely because it's not read by any of the rendering code, and is just for my personal records, it's in at least two places (book.format
and review.format
). It's a property of the book, so I should move it there.
In particular the boost
filter passed to the templates. If you over-boost, the colours get washed out to white β that's not what I want. I should look at maybe boosting the saturation or something, rather than the RGB values.
As part of the Jekyll rewrite, I changed the URL structure from /reviews/{slug}
to /{year}/{slug}
.
/reviews/
namespace is unnecessary; there's nothing on this site except reviewsBut to make sure any existing links keep working, I should create some redirects from the old URLs to the new URLs.
I have a bunch of books that I know I read at sometime, but I don't have any more information than that. In those cases, there's no point capturing the review metadata β it will always be empty.
I should have a better way of handling this β possibly fetching those "reviews" separately, maybe even having them in a separate directory β which will make the internal code cleaner.
That is a better way to say βnear instantβ, but without implying these operations take no time at all.
Currently I'm shelling out to ImageMagick, which is both crude and arguably unnecessary β I already have the Rust image libraries available.
vfd 1.3.4, observe:
$ vfd deploy
Building HTML pages... done in 997ms
Syncing static files... done in 1ms
Creating thumbnail images... done in 9ms
Deploying to Netlify...
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:218:86
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The actual problem is that I was running this on a laptop without the Netlify CLI, but that's not obvious from this error.
Currently I have to modify the scripts every time I add a new type of contributor; I should change it so it can accommodate new contributor types on a per-book basis.
I don't need a big list of tags, but being able to find books by fiction/non-fiction/genre might be useful.
I've got https://github.com/alexwlchan/inquire_tag_autocomplete as a component for getting this data when I save a review.
There are a handful of books that have null
as their publication year; this is probably a data bug that was introduced by an old version of the scripts.
I should:
Something I want to know is how many books I didn't finish, but this isn't counted in the HTML. A vfd subcommand to count that might be helpful.
Browsers will cache the CSS for a very long time (good!) but they don't know to invalidate it when the CSS changes (bad!).
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.