[opensuse] Need better ... icons? thumbnails?
I have Apache set up on my file server so that I can access ~anton/public_html, and I have symlinked in "My Documents" and "My Photographs" and "My Music" and "My Downloads". This means I can pull down anything I've downloaded or created onto my phone or tablet via my home based wifi. The thing is, though, I only get directory listings. That's OK for documents, which have meaningful titles, and for music, similarly, but the photographs just have the strings generated by the camera, sequence numbers. DSCF0043.JPG DSCF0045.JPG or date sequences 2013-09-09-DSCF0152.jpg Yes, I do have subdirectories by date or sometimes by event 2014/05/Gardenparty/ but the files are still those unhelpful strings unless I have specifically renamed them. I'd like to see proper thumbnails. I don't want full blown "Gallery" software. I have that on one of my blogs and to be quite frank the process of uploading to it is tedious. The work-flow of downloading from the camera, running 'exiftool' to stamp with copyright and move the downloads to "<year>/<month>" is scripted and automated. Once there I have no problems viewing them with Konqueror/Dolphin and drilling down with Gwenview/Darktable. The point here is that Konqueror/Dolphin lets me see the thumbnails. I saw, for example, this http://www.askdavetaylor.com/create_apache_image_browser_script/ but have not been able to get it to work. And yes, I've added the cgi module to the Apache2 config. I've also added ExecCGI in mod_userdir.conf, which I realise is a security risk, but I'm not sure how else to address this. Can anyone help with this? Once again, I don't want a full blown gallery. I don't want to have to zoom down on the images, I just want thumbnails. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hi! You could consider adding PHP functionality as you are already running apache. There are loads of galleries for PHP out there on the web which should be much or less straight forward to install. Simon Am Freitag, 27. Juni 2014, 10:25:29 schrieb Anton Aylward:
I have Apache set up on my file server so that I can access ~anton/public_html, and I have symlinked in "My Documents" and "My Photographs" and "My Music" and "My Downloads". This means I can pull down anything I've downloaded or created onto my phone or tablet via my home based wifi.
The thing is, though, I only get directory listings. That's OK for documents, which have meaningful titles, and for music, similarly, but the photographs just have the strings generated by the camera, sequence numbers.
DSCF0043.JPG DSCF0045.JPG
or date sequences
2013-09-09-DSCF0152.jpg
Yes, I do have subdirectories by date or sometimes by event
2014/05/Gardenparty/
but the files are still those unhelpful strings unless I have specifically renamed them.
I'd like to see proper thumbnails.
I don't want full blown "Gallery" software. I have that on one of my blogs and to be quite frank the process of uploading to it is tedious. The work-flow of downloading from the camera, running 'exiftool' to stamp with copyright and move the downloads to "<year>/<month>" is scripted and automated.
Once there I have no problems viewing them with Konqueror/Dolphin and drilling down with Gwenview/Darktable. The point here is that Konqueror/Dolphin lets me see the thumbnails.
I saw, for example, this http://www.askdavetaylor.com/create_apache_image_browser_script/ but have not been able to get it to work.
And yes, I've added the cgi module to the Apache2 config. I've also added ExecCGI in mod_userdir.conf, which I realise is a security risk, but I'm not sure how else to address this.
Can anyone help with this?
Once again, I don't want a full blown gallery. I don't want to have to zoom down on the images, I just want thumbnails.
> Q: Are you sure? > >> A: Because it reverses the logical flow of conversation. >> >>> Q: Why is top posting frowned upon?
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/27/2014 12:18 PM, Simon Heimbach wrote:
Hi!
You could consider adding PHP functionality as you are already running apache. There are loads of galleries for PHP out there on the web which should be much or less straight forward to install
I don't want a gallery. I said that. I don't want to have to manage a gallery. I don't want to have to install a RDBS. I don't need to comment. I don't need to kow the exif. I just want to see the thumbnails so I can tell which photos I want to download onto my tablet to process there. I DON'T WANT A GALLERY ! ! ! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 6/27/2014 10:59 AM, Anton Aylward wrote:
On 06/27/2014 12:18 PM, Simon Heimbach wrote:
Hi!
You could consider adding PHP functionality as you are already running apache. There are loads of galleries for PHP out there on the web which should be much or less straight forward to install
I don't want a gallery. I said that. I don't want to have to manage a gallery. I don't want to have to install a RDBS. I don't need to comment. I don't need to kow the exif.
I just want to see the thumbnails so I can tell which photos I want to download onto my tablet to process there.
I DON'T WANT A GALLERY ! ! !
Actually, you DO, you just don't want to manage one, while at the same time you are demanding some of the functionality of a gallery without the commenting crap. Your best bet is to automate the creation of thumbnails and linking them into a index page so that you can do it once and forget about it. I ran into this same problem when I moved multiple gigabytes of family photos to a NAS box. They are all of a sudden hard to find visually. Even with gigabit ethernet browsing and trying to force Dolphin to show previews is horribly slow. Windows Explorer will do it, but not quickly. -- _____________________________________ ---This space for rent--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/27/2014 02:24 PM, John Andersen wrote:
On 6/27/2014 10:59 AM, Anton Aylward wrote:
On 06/27/2014 12:18 PM, Simon Heimbach wrote:
Hi!
You could consider adding PHP functionality as you are already running apache. There are loads of galleries for PHP out there on the web which should be much or less straight forward to install
I don't want a gallery. I said that. I don't want to have to manage a gallery. I don't want to have to install a RDBS. I don't need to comment. I don't need to kow the exif.
I just want to see the thumbnails so I can tell which photos I want to download onto my tablet to process there.
I DON'T WANT A GALLERY ! ! !
Actually, you DO, you just don't want to manage one, while at the same time you are demanding some of the functionality of a gallery without the commenting crap.
No don't want a gallery. I want the FTP-syyle browser with a web interface that I view from my tablet -- Konqueror/Dolphin have absolutely nothing to do with this -- to show thumbnails. I see no reason the pre-generate thumbnails. The mode I'm running now. Minus the thumbnails, allows me to use the hierarchy of the file system and fits in with my work flow for automatically uploading from my camera with exiftool organizing into the hierarchy AutoMaTiCalLy by <year>/<month> More to the point I don't want to have to regenerate the thumbnails every time I take a new photograph.
Your best bet is to automate the creation of thumbnails and linking them into a index page so that you can do it once and forget about it.
Automation I already have, but this is not a one-time thing, it gets updated almost daily.
I ran into this same problem when I moved multiple gigabytes of family photos to a NAS box. They are all of a sudden hard to find visually. Even with gigabit ethernet browsing and trying to force Dolphin to show previews is horribly slow.
Yes, I can see how its a one-time for you. But I can't see what Dolphin has to do with it. I'm using Apache2 and it is presenting the files, be they photographs, documents, PDFs, music, in a FTP-style mode. Referring again to the site I've mentioned: http://i2.wp.com/www.askdavetaylor.com/0-blog-pics/apache-directory-listing.... But another reason I am not interested in 'gallery' is that its not for viewing, its ONLY so that I know which pictures I'm going to download to the tablet. The ONLY purpose is to select the right ones to download to the tablet. My use-case is so radically different from yours ... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 27/06/2014 19:59, Anton Aylward a écrit :
I just want to see the thumbnails so I can tell which photos I want to download onto my tablet to process there.
well... it's a sort of tiny gallery :-) solution, script and cron job. So not immediate (I don't know how to trigger a script from a html page, but it may be possible): warning, this script *replace the image by the result*: for I in *.jpg ; do convert -resize 1920x1920 $I $I done change the second I by th-$I to have thumnails, then buils an html page convert is from imagemagic, resize argument gives the max size in the two directions jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 6/27/2014 11:44 AM, jdd wrote:
Le 27/06/2014 19:59, Anton Aylward a �crit :
I just want to see the thumbnails so I can tell which photos I want to download onto my tablet to process there.
well... it's a sort of tiny gallery :-)
solution, script and cron job. So not immediate (I don't know how to trigger a script from a html page, but it may be possible):
warning, this script *replace the image by the result*:
for I in *.jpg ; do convert -resize 1920x1920 $I $I done
change the second I by th-$I to have thumnails, then buils an html page
convert is from imagemagic, resize argument gives the max size in the two directions
jdd
It would be better to put the thumbnails in a second directory: thumbs/$1-th and it would be wiser to make the thumbs much smaller, under 500x500, because all of this has to be transmitted across the net to his tablet. Also that bit you mentioned "Builds an html page", how is that done? Isn't that the hardest part? -- _____________________________________ ---This space for rent--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/27/2014 02:56 PM, John Andersen wrote:
On 6/27/2014 11:44 AM, jdd wrote:
Le 27/06/2014 19:59, Anton Aylward a �crit :
I just want to see the thumbnails so I can tell which photos I want to download onto my tablet to process there.
well... it's a sort of tiny gallery :-)
solution, script and cron job. So not immediate (I don't know how to trigger a script from a html page, but it may be possible):
warning, this script *replace the image by the result*:
for I in *.jpg ; do convert -resize 1920x1920 $I $I done
change the second I by th-$I to have thumnails, then buils an html page
convert is from imagemagic, resize argument gives the max size in the two directions
jdd
It would be better to put the thumbnails in a second directory: thumbs/$1-th and it would be wiser to make the thumbs much smaller, under 500x500, because all of this has to be transmitted across the net to his tablet.
That seems crazy to me. Why would I go to a separate directory ... And those would still be viewed in ftp-mode.
Also that bit you mentioned "Builds an html page", how is that done? Isn't that the hardest part?
Please read the URL I keep sending. Its not a HTML page you want but HTML streams to the web interface of the client. The script at that URL generates such a stream. All dynamic and all dynamically picking up on the image files, even if they are dynamically added to. No need to generate a directory of thumbnails. Personally I'd use a <ul>..</ul> wrapper and have the items <li> tagged, but that's me. Bandwidth? I'm in the next room and there's no-one else using it. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
sure I understood what you want. And believe me you can achieve this easily with PHP. I'm a developer for almost ages. But I can't imagine you'll get a satisfying solution when you reject any suggestions from the list instead of actively helping to develop an idea. Just browse the web and get some inspiration. If you have trouble setting it up, you may want to ask and I'd be happy to help out. S. Am Freitag, 27. Juni 2014, 16:00:15 schrieb Anton Aylward:
On 06/27/2014 02:56 PM, John Andersen wrote:
On 6/27/2014 11:44 AM, jdd wrote:
Le 27/06/2014 19:59, Anton Aylward a �crit :
I just want to see the thumbnails so I can tell which photos I want to download onto my tablet to process there.
well... it's a sort of tiny gallery :-)
solution, script and cron job. So not immediate (I don't know how to trigger a script from a html page, but it may be possible):
warning, this script *replace the image by the result*:
for I in *.jpg ; do
convert -resize 1920x1920 $I $I
done
change the second I by th-$I to have thumnails, then buils an html page
convert is from imagemagic, resize argument gives the max size in the two directions
jdd
It would be better to put the thumbnails in a second directory: thumbs/$1-th and it would be wiser to make the thumbs much smaller, under 500x500, because all of this has to be transmitted across the net to his tablet.
That seems crazy to me. Why would I go to a separate directory ... And those would still be viewed in ftp-mode.
Also that bit you mentioned "Builds an html page", how is that done? Isn't that the hardest part?
Please read the URL I keep sending. Its not a HTML page you want but HTML streams to the web interface of the client. The script at that URL generates such a stream. All dynamic and all dynamically picking up on the image files, even if they are dynamically added to. No need to generate a directory of thumbnails.
Personally I'd use a <ul>..</ul> wrapper and have the items <li> tagged, but that's me.
Bandwidth? I'm in the next room and there's no-one else using it.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/27/2014 04:15 PM, Simon Heimbach wrote:
sure I understood what you want. And believe me you can achieve this easily with PHP. I'm a developer for almost ages. But I can't imagine you'll get a satisfying solution when you reject any suggestions from the list instead of actively helping to develop an idea.
Just browse the web and get some inspiration. If you have trouble setting it up, you may want to ask and I'd be happy to help out.
I've browsed the web and seen at least a dozen 'possibilities'. For reasons I think I've made clear I rejected to ones that were clearly 'gallery' as in 'web site for showing off your photographs'. I have one of those of my own as an adjunct to my blog and don't use it much because it requires so much setting up on a step-and-repeat basis. And its not congruent with the use-case I'm trying for here. If my came has a 10" screen that would be fine, I'd never download! But that's not the case so I need to get the photos to the computer and selectively to the tablet to use as a display. I can do _some_ manipulation on the tablet. I can't bring all my peers and managers home to look at my screen and I can't go on site to compare 'then and now' photographs. Yes my tablet has split screen capability. Tablet are wonderful 'mobile' devices for us in the field. But their cameras are very deficient. Image processing software is good, but cameras are lousy. Be that as it may .... The article I referred to describes a CGI script that, with a bit of modification described in a later article http://www.askdavetaylor.com/create_apache_image_browser_script/ and http://www.linuxjournal.com/article/9622 does just what I want. But I can't get it to work. The author says <quote> Turns out you can do just that with a simple shell script named as index.cgi in the images directory (well, you might have to slightly tweak your httpd.conf configuration, but fundamentally it should be easy). </quote> Well I have that script by that name in my photographs directory and tweaked the httpd.conf to include user_mod and added the "Options ExecCGI" and ... It doesn't work. I'm far from an Apache guru. I can write a fair bit of html and can maintain a bit of javascript, but making this 'run' is beyond me. I have a specific use case, and it is NOT to run a gallery that can only be viewed on my home LAN. It is to identify the images to download to my tablet without actually downloading them. The 'ftp-mode' interface makes that latter a necessity. I'd appreciate some help getting a shell script as 'index.cgi' to work and getting it to work all the way down the photographs hierarchy rather than just the top level. I've referred to this article which I found by googling and trying out things that didn't work (like one based on dynamic light-table) four times now. I think it matches the very limited and focused use case I have. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/27/2014 02:44 PM, jdd wrote:
Le 27/06/2014 19:59, Anton Aylward a écrit :
I just want to see the thumbnails so I can tell which photos I want to download onto my tablet to process there.
well... it's a sort of tiny gallery :-)
solution, script and cron job. So not immediate (I don't know how to trigger a script from a html page, but it may be possible):
warning, this script *replace the image by the result*:
for I in *.jpg ; do convert -resize 1920x1920 $I $I done
change the second I by th-$I to have thumnails, then buils an html page
convert is from imagemagic, resize argument gives the max size in the two directions
PLEASE! Read http://www.askdavetaylor.com/create_apache_image_browser_script/ and tell me why that won't work? I'm trying it and I'm having some problems getting the index.cgi to wok. -- I never give them hell. I just tell the truth and they think it's hell. - H. Truman -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 27/06/2014 21:53, Anton Aylward a écrit :
PLEASE!
Read http://www.askdavetaylor.com/create_apache_image_browser_script/ and tell me why that won't work?
I'm trying it and I'm having some problems getting the index.cgi to wok.
well, it's not about creating thumbnails, but howto display images. In fact, precisely, I said I do not know how to run a script from apache. But I would like to know, so I experienced a bit. right now the problem is only: "how to run a cgi from apache" tutorials are here http://httpd.apache.org/docs/2.2/howto/cgi.html and here http://httpd.apache.org/docs/2.2/howto/htaccess.html it's a bit late here for me to test this now, may be tomorrow if times allows jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 27/06/2014 22:48, jdd a écrit :
it's a bit late here for me to test this now, may be tomorrow if times allows
made some tests, without successs... I use a script to write a listing of *some* files in a folder, but I can only make it work running it locally - in my server, "ftp" listings are not allowed. script result: http://dodin.info/essai/th/index1.html without script http://dodin.info/essai/th/ the script is pretty basic: file="index.html"; echo "<html><body>" > $file; for I ; do echo $I echo -n "<a href=\"" >> $file ; echo -n "$I" >> $file ; echo -n "\">" >> $file; echo -n "$I" >> $file; echo -n "</a><br />" >> $file; echo >> $file; done ; echo -n "</body></html>" >> $file; you can easily change it to have images displayed. Use width and higth arguments to make images smaller (but this still needs downloading the hole image), or make thumnails at first with convert -resize 192x192 $I th-$I or similar. and if somebody can help making the script run right from index.cgi, I take it :-) jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 28/06/2014 09:09, jdd a écrit :
and if somebody can help making the script run right from index.cgi, I take it :-)
right now, the Apache2 options are: <Directory "/srv/www/essai/"> Options +ExecCGI AddHandler cgi-script .cgi Order allow,deny Allow from all </Directory> and http://dodin.org/essai/th/index.cgi ask me to download the file in place of executing it. the content of the file is the OP link: #!/bin/sh echo “Content-type: text/html” echo “” for name in * do echo “<img src=$name><br />$name<br />” "done exit 0 I'm not sure the syntax is correct, but it shouldn't prevent execution at all? jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/28/2014 03:48 AM, jdd wrote:
Le 28/06/2014 09:09, jdd a écrit :
and if somebody can help making the script run right from index.cgi, I take it :-)
right now, the Apache2 options are:
<Directory "/srv/www/essai/"> Options +ExecCGI AddHandler cgi-script .cgi Order allow,deny Allow from all </Directory>
and
http://dodin.org/essai/th/index.cgi
ask me to download the file in place of executing it.
the content of the file is the OP link:
#!/bin/sh
echo “Content-type: text/html” echo “”
for name in * do echo “<img src=$name><br />$name<br />” "done
exit 0
I'm not sure the syntax is correct, but it shouldn't prevent execution at all?
Ah, good, you're trying the example, the simple script which dynamically generates html as a stream to the client, in the web page I've referenced in this thread, what, a half dozen times now :-) You should read the follow page I also referenced so that the "*" gets replaces by a pattern of only graphic files. You also have a spurious '"' in the above. I hope its not in the actual .cgi :-) But all in all the result I'm getting is the same. Its not executing. I said that, didn't I? As I said in Message-ID: <53ADD854.4080408@antonaylward.com> Date: Fri, 27 Jun 2014 16:47:16 -0400 <quote> The article I referred to describes a CGI script that, with a bit of modification described in a later article http://www.askdavetaylor.com/create_apache_image_browser_script/ and http://www.linuxjournal.com/article/9622 does just what I want. But I can't get it to work. The author says <quote> Turns out you can do just that with a simple shell script named as index.cgi in the images directory (well, you might have to slightly tweak your httpd.conf configuration, but fundamentally it should be easy). </quote> Well I have that script by that name in my photographs directory and tweaked the httpd.conf to include user_mod and added the "Options ExecCGI" and ... It doesn't work. </quote> There's a lot the author doesn't explain about the Apache setup "tweaks". -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sat, 28 Jun 2014 09:05:00 -0400 Anton Aylward wrote: 8<- - - - - snipped - - - - - >8
There's a lot the author doesn't explain about the Apache setup "tweaks".
Whenever I copy bash script examples from the web and fancy quotation marks (“,”) appear in lieu of plain ones ("), my experience has been that this breaks things. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 28/06/2014 15:05, Anton Aylward a écrit :
But all in all the result I'm getting is the same. Its not executing. I said that, didn't I?
I was confused in the beginning by the "thumnail" part. The script do not display thunbnails. fact is it do not work at all, so eventual typos in it do not matter atm I'm pretty sure it's some (obscure?) apache config, because I followed strictly the apache page mays it's the apache version, (2.4) - I already had problem with some directive not doing exacltly what I expected. jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 27/06/2014 22:48, jdd a écrit :
right now the problem is only: "how to run a cgi from apache"
tutorials are here
to solve the OP problem, first we have to see why apache is not running cgi. the cgi of the OP is a bash script. The example in the apache page is perl, so may be begin to look at the very apache example: #!/usr/bin/perl print "Content-type: text/html\n\n"; print "Hello, World."; writing this very script here http://dodin.info/essai/th/test.pl it works. Good, so at least the OP can write his script in perl :-(. Then I tried an other bash script found on the net and it worked. What do not seems to work is bash loops. The following script http://dodin.info/essai/th/image.sh do (at time of writing) print Hello world end but the loop is ignored. Other syntax makes the "end" to be also ignored #!/bin/bash echo "Content-type: text/html" echo "" echo '<html>' echo '<head>' echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' echo '<title>Hello World</title>' echo '</head>' echo '<body>' echo 'Hello World' for name in *.jpg do echo “<img src=$name>" "<br />" "$name" "<br />”; done echo '<br />' echo 'end' echo '</body>' echo '</html>' exit 0 I'm sure somebody will point out the error :-) thanks jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/28/2014 01:12 PM, jdd wrote:
for name in *.jpg do echo “<img src=$name>" "<br />" "$name" "<br />”; done
Just for examples, try this for the guts of it echo '<div><ul>' for name in *.jpg do echo '<li> '<img ' "src=$name" '>' "$name" '</li> echo '</ul></div>' Please pay attention to the quotes. Yes I'm being paranoid. It sometimes helps. In the extreme case add in a sprinkling of <span>..</span> -- /"\ \ / ASCII Ribbon Campaign X Against HTML Mail / \ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/28/2014 01:42 PM, Anton Aylward wrote:
echo '<li> '<img ' "src=$name" '>' "$name" '</li>
OOPS! Missed the trailing close single quote echo '<li> '<img ' "src=$name" '>' "$name" '</li>' -- /"\ \ / ASCII Ribbon Campaign X Against HTML Mail / \ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
got it :-)) Here is the script. beware to don't mix single and double quotes, it's even more picky in cgi than in html :-(. I named this script images.sh, but the extension must probably only meet the .htaccess one #!/bin/bash echo "Content-type: text/html" echo "" echo '<html>' echo '<head>' echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' echo '</head>' echo '<body>' for name in *.jpg do echo "<br />" echo '<img src='$name' height="42" >'; echo $name echo "<br />" done echo '</body>' echo '</html>' exit 0 my .htaccess: Options +ExecCGI AddHandler cgi-script .cgi .pl .sh Order allow,deny Allow from all and be warned: this displays only thumbnails, but download the hole image, so may be impracticable on 3g network or aeven on wifi with simpler smartphone/tablet jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/28/2014 02:42 PM, jdd wrote:
got it :-))
Here is the script. beware to don't mix single and double quotes, it's even more picky in cgi than in html :-(. I named this script images.sh, but the extension must probably only meet the .htaccess one
#!/bin/bash
echo "Content-type: text/html" echo ""
echo '<html>' echo '<head>' echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' echo '</head>' echo '<body>'
for name in *.jpg do echo "<br />" echo '<img src='$name' height="42" >'; echo $name echo "<br />" done
echo '</body>' echo '</html>'
exit 0
my .htaccess:
Options +ExecCGI AddHandler cgi-script .cgi .pl .sh Order allow,deny Allow from all
Looks goo. I tried that I got Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. If you think this is a server error, please contact the webmaster. Error 500 localhost Apache/2.4.6 (Linux/SUSE) I have no idea why. -- /"\ \ / ASCII Ribbon Campaign X Against HTML Mail / \ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 28/06/2014 21:12, Anton Aylward a écrit :
I have no idea why.
did you follow the apache documentation page I have quoted several times? it's to be done first jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
On 06/27/2014 12:18 PM, Simon Heimbach wrote:
Hi!
You could consider adding PHP functionality as you are already running apache. There are loads of galleries for PHP out there on the web which should be much or less straight forward to install
I don't want a gallery. I said that. I don't want to have to manage a gallery. I don't want to have to install a RDBS. I don't need to comment. I don't need to kow the exif.
I just want to see the thumbnails so I can tell which photos I want to download onto my tablet to process there.
I DON'T WANT A GALLERY ! ! !
Anton, with all the replies in this thread, I guess you've worked out a solution by now? If not, I find thumbnails are most easily generated on the fly with imagemagick. If you're still looking, I can probably dig up some working code+config. /Per -- Per Jessen, Zürich (13.9°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Per Jessen wrote:
Anton Aylward wrote:
On 06/27/2014 12:18 PM, Simon Heimbach wrote:
Hi!
You could consider adding PHP functionality as you are already running apache. There are loads of galleries for PHP out there on the web which should be much or less straight forward to install
I don't want a gallery. I said that. I don't want to have to manage a gallery. I don't want to have to install a RDBS. I don't need to comment. I don't need to kow the exif.
I just want to see the thumbnails so I can tell which photos I want to download onto my tablet to process there.
I DON'T WANT A GALLERY ! ! !
Anton, with all the replies in this thread, I guess you've worked out a solution by now? If not, I find thumbnails are most easily generated on the fly with imagemagick. If you're still looking, I can probably dig up some working code+config.
It took a little while, but I found this: http://gallery.jessen.ch/ It's made up of two php files - index.phtml and makethumb.php, plus an apache rewrite config. http://gallery.jessen.ch/verysimplegallery.tar.gz -- Per Jessen, Zürich (14.2°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Per Jessen wrote:
Per Jessen wrote:
Anton Aylward wrote:
On 06/27/2014 12:18 PM, Simon Heimbach wrote:
Hi!
You could consider adding PHP functionality as you are already running apache. There are loads of galleries for PHP out there on the web which should be much or less straight forward to install
I don't want a gallery. I said that. I don't want to have to manage a gallery. I don't want to have to install a RDBS. I don't need to comment. I don't need to kow the exif.
I just want to see the thumbnails so I can tell which photos I want to download onto my tablet to process there.
I DON'T WANT A GALLERY ! ! !
Anton, with all the replies in this thread, I guess you've worked out a solution by now? If not, I find thumbnails are most easily generated on the fly with imagemagick. If you're still looking, I can probably dig up some working code+config.
It took a little while, but I found this:
It's made up of two php files - index.phtml and makethumb.php, plus an apache rewrite config.
Further instructions - - you need ImageMagick installed, I use 'convert' to create the thumbnails. - you need a working php installation, the scripts are php - you need apache module rewrite loaded - /index.phtml just lists whatever JPG files are in the same directory - you need to create a directory "tn/" with owner = wwwrun (or whichever userid your apache uses). I emphasize "very simple", plenty of room for usability improvements. -- Per Jessen, Zürich (18.8°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 6/27/2014 7:25 AM, Anton Aylward wrote:
Once there I have no problems viewing them with Konqueror/Dolphin and drilling down with Gwenview/Darktable. The point here is that Konqueror/Dolphin lets me see the thumbnails. ...
Once again, I don't want a full blown gallery. I don't want to have to zoom down on the images, I just want thumbnails.
--
Kong and Dolphin are opening the file for you, and either extracting the thumbnail that was built into the JPeg file or creating them on the fly. This is all very fast in the same machine, but once those images are stored across the room in a different machine Kong and Dolphin have enough sense to stop doing that on the fly because the bandwidth requirements become ridiculous. (A lot of cameras don't imbed the thumbnail on jpgs in order to save space). But I've never gotten thumbnails from a web browser without them being separate files. I distinctly remember when I used to do this that there was a script that would create a thumbnails sub-directory in every photos directory which contained nothing but thumbnails, and a file called index.html, which linked the thumbnails to the actual photos. Seems to me that mess was automated away by things like phpthumb http://phpthumb.sourceforge.net/ and nobody does it that way any more (although it is a lot less resource intensive than on-the-fly generation). -- _____________________________________ ---This space for rent--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/27/2014 01:48 PM, John Andersen wrote:
On 6/27/2014 7:25 AM, Anton Aylward wrote:
Once there I have no problems viewing them with Konqueror/Dolphin and drilling down with Gwenview/Darktable. The point here is that Konqueror/Dolphin lets me see the thumbnails. ...
Once again, I don't want a full blown gallery. I don't want to have to zoom down on the images, I just want thumbnails.
--
Kong and Dolphin are opening the file for you, and either extracting the thumbnail that was built into the JPeg file or creating them on the fly. This is all very fast in the same machine, but once those images are stored across the room in a different machine Kong and Dolphin have enough sense to stop doing that on the fly because the bandwidth requirements become ridiculous.
That's interesting but I'm not accessing the files from my tablet in Konq/Dolphin.
But I've never gotten thumbnails from a web browser without them being separate files. I distinctly remember when I used to do this that there was a script that would create a thumbnails sub-directory in every photos directory which contained nothing but thumbnails, and a file called index.html, which linked the thumbnails to the actual photos.
The example reference I gave was a CGI shell script. http://www.askdavetaylor.com/create_apache_image_browser_script/ Let me quote #!/bin/sh echo “Content-type: text/html” echo “” for name in * do echo “<img src=$name><br />$name<br />” done exit 0 Now that really should be '*.jpg' :-) So I put that in ~/Photographs, made it executable and tried setting up ExecCGI for /home/*/public_html. I agree its a poor script, there needs to be something to limit the size :-) But why shouldn't it work? The point here is that there really isn't a need to generate thumbnails in a separate location. This is not a gallery application. Resource intensive? I don't care. When I'm doing this I'm not doing anything else on the server. And its really just a single user machine. So only I would be inconvenienced anyway :-) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, 27 Jun 2014 14:11:29 -0400 Anton Aylward wrote:
So I put that in ~/Photographs, made it executable and tried setting up ExecCGI for /home/*/public_html.
Have you tested the configuration with a known good CGI script? Just a simple index.cgi test page will do. I did this after I couldn't get that little script to work and discovered I've got some troubleshooting to do tomorrow. Thanks a lot! ;-) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hi Anton, On Friday 27 June 2014 10:25:29 Anton Aylward wrote:
The thing is, though, I only get directory listings. That's OK for documents, which have meaningful titles, and for music, similarly, but the photographs just have the strings generated by the camera, sequence numbers.
DSCF0043.JPG DSCF0045.JPG
I'd like to see proper thumbnails.
A quick web search for 'apache directory listing images with thumbnails' brought up http://larsjung.de/h5ai and especially the demo folder http://larsjung.de/h5ai/sample/image%20preview/ Maybe you want to give it a try. Regards mararm -- Dealing with failure is easy: Work hard to improve. Success is also easy to handle: You've solved the wrong problem. Work hard to improve. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (7)
-
Anton Aylward
-
Carl Hartung
-
jdd
-
John Andersen
-
mararm
-
Per Jessen
-
Simon Heimbach