Re: [Chicken-users] can't get phoghorn running

2012-08-21 Thread Christian Kellermann
* Markus Klotzbuecher m...@marumbi.de [120821 08:51]:
 Hi Peter and Mario,

 On Mon, Aug 20, 2012 at 10:26:41PM +0200, Peter Bex wrote:
  On Mon, Aug 20, 2012 at 10:11:04PM +0200, Markus Klotzbuecher wrote:
   Hi All,
  
   I would like to try the phoghorn image gallery generator, but I just
   can't get the egg compiled. It fails because it can't find the epeg
   library and epeg-config. I can't find it either, not as a debian
   package nor as sources on the net.
  
   Is the epeg code still developed?
 
  No, epeg is dead, even more dead than imlib2.  I think the current
  replacement library from the E project for both these libraries
  is the evas library.  I had plans to convert phoghorn to evas
  someday (and make an evas egg), but I don't currently use phoghorn
  anymore.
 
   From looking at the phoghorn code it seems that imlib2 is also
   supported. Could it be used with the latter only?
 
  I think you could easily hack out the epeg bits; imlib2 supports
  jpeg as well, I think.

 Thanks for the hints, I'll give that a try!

Another gallery generator has been written by Ivan Raikov: sigma. It
produces static html pages. You can find it in the usual place, the
docs are here: http://wiki.call-cc.org/eggref/4/sigma

I am using it to post the pictures of chicken events:
http://www.call-cc.org/pictures/t-dose2011/

Of course the layout etc can be tweaked beyond recognition which I did
not do...

HTH,

Christian

--
Be right back -- Godot.

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] can't get phoghorn running

2012-08-21 Thread Markus Klotzbuecher
On Mon, Aug 20, 2012 at 10:26:41PM +0200, Peter Bex wrote:
 On Mon, Aug 20, 2012 at 10:11:04PM +0200, Markus Klotzbuecher wrote:
  Hi All,
  
  I would like to try the phoghorn image gallery generator, but I just
  can't get the egg compiled. It fails because it can't find the epeg
  library and epeg-config. I can't find it either, not as a debian
  package nor as sources on the net.
  
  Is the epeg code still developed?
 
 No, epeg is dead, even more dead than imlib2.  I think the current
 replacement library from the E project for both these libraries
 is the evas library.  I had plans to convert phoghorn to evas
 someday (and make an evas egg), but I don't currently use phoghorn
 anymore.
 
  From looking at the phoghorn code it seems that imlib2 is also
  supported. Could it be used with the latter only?
 
 I think you could easily hack out the epeg bits; imlib2 supports
 jpeg as well, I think.

That indeed turned out to be easy (patch attached).
But I can't get it to work with spiffy. I added the following to
launch and configure spiffy:

;; runspiffy.scm
(use spiffy ssp-handler)

(file-extension-handlers `((ssp . ,ssp-handler)))
(index-files '(index.ssp))
(server-port 8080)
(root-path /home/mk/web/wwwroot)


and in wwwroot there is

galleries/ 
galleries/index.ssp   ;; copied from the phoghorn egg page
galleries/zoomed.ssp  ;; 
galleries/gallery1/   ;; folders with images
...

Now when browse to localhost:8080/galleries/ I see the contexts of
index.ssp (apparently as a result of executing index.sspx)

No need to mention I'm a web-development noob...

Thanks for any hints!
Markus


From b4a0d5d8b37a5e0164c33346688c7a54fc53b913 Mon Sep 17 00:00:00 2001
From: Markus Klotzbuecher markus.klotzbuec...@mech.kuleuven.be
Date: Tue, 21 Aug 2012 08:48:56 +0200
Subject: [PATCH] remove epeg dependency from phoghorn

---
 release/4/phoghorn/trunk/phoghorn.meta |2 +-
 release/4/phoghorn/trunk/phoghorn.scm  |   31 ++-
 2 files changed, 7 insertions(+), 26 deletions(-)

diff --git a/release/4/phoghorn/trunk/phoghorn.meta b/release/4/phoghorn/trunk/phoghorn.meta
index a3432d4..aaba3ea 100644
--- a/release/4/phoghorn/trunk/phoghorn.meta
+++ b/release/4/phoghorn/trunk/phoghorn.meta
@@ -7,5 +7,5 @@
  (category web)
  (license BSD)
  (doc-from-wiki)
- (needs spiffy uri-common epeg imlib2 sxml-transforms)
+ (needs spiffy uri-common imlib2 sxml-transforms sxml-fu)
  (files phoghorn.scm phoghorn.meta phoghorn.release-info phoghorn.setup))
diff --git a/release/4/phoghorn/trunk/phoghorn.scm b/release/4/phoghorn/trunk/phoghorn.scm
index 957dfb7..c0fae2f 100644
--- a/release/4/phoghorn/trunk/phoghorn.scm
+++ b/release/4/phoghorn/trunk/phoghorn.scm
@@ -33,14 +33,12 @@
  (gallery-dir gallery-var entry-var root-gallery-name
   max-thumb-dimensions thumb-dir gallery-url zoomed-url movie-image
   current-gallery current-entry-filename gallery-contents
-  thumbnail thumbnail/epeg thumbnail/imlib2
-  galleries-up-to prev-entry next-entry phoghorn-rules)
+  thumbnail thumbnail/imlib2 galleries-up-to prev-entry
+  next-entry phoghorn-rules)
 
 (import chicken scheme extras data-structures files posix)
 (require-extension srfi-1 srfi-13 spiffy intarweb uri-common sxml-transforms)
 
-(require-library epeg)
-(import (prefix epeg epeg:))
 (require-library imlib2)
 (import (prefix imlib2 imlib2:))
 
@@ -56,13 +54,11 @@
 ;; #f if you want the filename displayed
 (define movie-image (make-parameter /pics/movie.jpg))
 
-(define epeg-extensions '(jpeg jpg))
-
 ;; This really is dependent on the loaders imlib2 has.  Mebbe make it
 ;; a parameter as well?
-(define imlib-extensions '(gif bmp xpm png mng pbm tif tiff
-			   tga pic pcx dxf cgm cdr wmf eps
-			   emf pict yuv))
+(define imlib-extensions '(jpeg jpg gif bmp xpm png mng pbm
+			   tif tiff tga pic pcx dxf cgm cdr
+			   wmf eps emf pict yuv))
 
 (define movie-extensions '(mpg mpeg avi ogg ogm vob asf wma
 			   wmv qt mov mp4 vivo fli flc ani
@@ -71,7 +67,7 @@
 ;; XXX: use extensions or file magic/mimetypes?
 (define (allowed-filetype? filename)
   (any (cut string-ci=? (or (pathname-extension filename) ) )
-   (append epeg-extensions imlib-extensions movie-extensions)))
+   (append imlib-extensions movie-extensions)))
 
 ;; Either the thumbs subdirectory is ok, or it can be created
 (define (thumbs-ok? dir)
@@ -112,8 +108,6 @@
   (let* ((ext (pathname-extension entry))
 	 (match? (lambda (s) (string-ci=? ext s
 (cond
- ((any match? epeg-extensions)
-  (thumbnail/epeg gallery entry))
  ((any match? imlib-extensions)
   (thumbnail/imlib2 gallery entry))
  ((any match? movie-extensions)
@@ -163,19 +157,6 @@
 (define (gallery-thumbs gallery)
   (make-pathname gallery (thumb-dir)))
 
-(define (thumbnail/epeg gallery entry)
-  (let ((target-file (local-file (gallery-thumbs gallery) entry)))
-(unless (file-exists? target-file)
-  (let ((img (epeg:image-open (local-file gallery entry
-	(receive (width 

Re: [Chicken-users] can't get phoghorn running

2012-08-21 Thread Peter Bex
On Tue, Aug 21, 2012 at 01:47:55PM +0200, Markus Klotzbuecher wrote:
 Now when browse to localhost:8080/galleries/ I see the contexts of
 index.ssp (apparently as a result of executing index.sspx)

You'll need to wrap that code in whatever you've set ssp-long-open-tag
and ssp-close-tag to.  By default ?scheme ... ?

Please note that the ssp and web-scheme handlers are deprecated.
If you still want to use these, I can put them in a separate egg, but
otherwise they will disappear in the next release.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music.
-- Donald Knuth

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users