all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 0e56a44dc9dfb615cee601052adcf775a71febb8 798 bytes (raw)
name: pdf-clobber-stamps.tl 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 
(let* ((epoch (or (tointz (getenv "SOURCE_DATE_EPOCH")) 0))
       (isotime (time-string-utc epoch "%FT%T+00:00"))
       (pdf (file-get-string "txr-manpage.pdf"))
       (start (search-str pdf "<?xpacket begin="))
       (end (if start (search-str pdf "<?xpacket end" start)))
       (xml (if end [pdf start..end]))
       (orig-len (len xml)))
  (unless xml
    (format *stderr* "XML block not found in PDF")
    (exit nil))
  (upd xml
    (regsub #/uuid:........-....-....-....-............/
            "uuid:00000000-0000-0000-0000-000000000000")
    (regsub #/Date>....-..-..T..:..:..-..:../
            `Date>@isotime`))
  (assert (eql (len xml) orig-len))
  (set [pdf start..end] xml)
  (file-put-string "txr-manpage.pdf.temp" pdf)
  (rename-path "txr-manpage.pdf.temp" "txr-manpage.pdf"))

debug log:

solving 0e56a44d ...
found 0e56a44d in https://yhetil.org/guix/96d55c0d8940c64eca79aa4a15a3cb8f@mail.kylheku.com/

applying [1/1] https://yhetil.org/guix/96d55c0d8940c64eca79aa4a15a3cb8f@mail.kylheku.com/
diff --git a/pdf-clobber-stamps.tl b/pdf-clobber-stamps.tl
new file mode 100644
index 00000000..0e56a44d

Checking patch pdf-clobber-stamps.tl...
Applied patch pdf-clobber-stamps.tl cleanly.

index at:
100644 0e56a44dc9dfb615cee601052adcf775a71febb8	pdf-clobber-stamps.tl

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.