mbutterick/quad

add libraries' versions to PDF metadata

Closed this issue · 4 comments

especially while quad is still unstable, it might be interesting to add version information to the PDF output metadata (something like the git version hash?). that way PDF output would be more reproducible.

raco show quad shows me git checksum information, and I thought of having metadata like:

Creator:        Racket 7.5 [Quad library - version XXX]
Producer:       Racket 7.5 [Pitfall library - version XXX]

do you think this is a good idea? maybe there's something akin to python's pip freeze/requirements.txt and this would be overengineering.

If someone tells me a nice way of doing this automatically, OK.

By “doing this” I mean generating a build number that is unique to each commit. I can’t do it manually, for every component of Quad.

I have a similar system for Pollen that generates a timestamp file for each commit. But it requires a lot of local configuration with git hooks.

> (require pkg/path)
> (hash-ref (read-pkgs-db 'user) "quad")
'#s(pkg-info
    (clone "../../../sites/quad" "https://github.com/mbutterick/quad.git")
    "5d7a2af8d2c6b2aa4d88b33cb6a4f77f391180c2"
    #f)

can get the checksum of the installed package. the tricky part is to know which scope to supply to read-pkgs-db; I have no idea how bad it would be to just use 'user and default to nothing if it's not there. I can implement the patch if that's acceptable to you!

Good tip thanks.