diff options
| author | LLLL Colonq <llll@colonq> | 2024-04-26 01:53:24 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2024-04-26 01:53:24 -0400 |
| commit | 6fa49e57f7313aad8852ce2721c2fcf7d0cec030 (patch) | |
| tree | 34a2e4a851c663bc6d71d148e59b59ba345a5fdb /src/gizmo/wasp-newspaper.el | |
| parent | 782c667e824d426b5443591afeefc37d0ae17785 (diff) | |
Updates
Diffstat (limited to 'src/gizmo/wasp-newspaper.el')
| -rw-r--r-- | src/gizmo/wasp-newspaper.el | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/gizmo/wasp-newspaper.el b/src/gizmo/wasp-newspaper.el index 4a8463ac..9723ad63 100644 --- a/src/gizmo/wasp-newspaper.el +++ b/src/gizmo/wasp-newspaper.el @@ -159,23 +159,24 @@ Pass the path of the generated PDF to K." (interactive) (w/db-get "newspaper:edition" - (lambda (edition) - (w/newspaper-pdf - (w/newspaper-tex - (w/make-newspaper - :slogan (w/pick-random w/newspaper-slogans) :price (w/pick-random w/newspaper-prices) - :edition (string-to-number edition) - :articles - w/newspaper-todays-articles)) - (lambda (path) - (make-process - :name "fig-newspaper-publish" - :command (list "scp" path (format "llll@pub.colonq.computer:~/public_html/news/%03d.pdf" edition)) - :sentinel - (lambda (_ _) - (w/db-set "newspaper:edition" (number-to-string (1+ (string-to-number edition)))) - (browse-url (format "https://pub.colonq.computer/~llll/news/%03d.pdf" edition)) - ))))))) + (lambda (edstr) + (let ((edition (string-to-number edstr))) + (w/newspaper-pdf + (w/newspaper-tex + (w/make-newspaper + :slogan (w/pick-random w/newspaper-slogans) :price (w/pick-random w/newspaper-prices) + :edition edition + :articles + w/newspaper-todays-articles)) + (lambda (path) + (make-process + :name "fig-newspaper-publish" + :command (list "scp" path (format "llll@pub.colonq.computer:~/public_html/news/%03d.pdf" edition)) + :sentinel + (lambda (_ _) + (w/db-set "newspaper:edition" (number-to-string (1+ edition))) + (browse-url (format "https://pub.colonq.computer/~llll/news/%03d.pdf" edition)) + )))))))) (provide 'wasp-newspaper) ;;; wasp-newspaper.el ends here |
