[Klug-general] Auto Updating Photo Slide Show
David Halliday
david.halliday at gmail.com
Sat Jul 16 16:22:48 UTC 2011
Well, this was interesting!
My full documentation and script are here:
http://david-halliday.co.uk/wiki/doku.php?id=linux:scripts:slide_show_from_email
Got the script working last night to these requirements:
1. Check email account, download new messages, extract images and copy to
image dir.
2. Update a database with new images (sqlite for example from shell
script).
3. Select image file from database (which contains numbers on priority
and times image shown) semi random favouring new images or those with high
priority.
4. Handing the file name to an application (qiv for example) which will
then display that image.
5. Every 5 images (perhaps we can make this variable) display a nice
image saying “send your picture to whatever at email.com”
Solutions:
1. This was managed by offlineimap and mpack.
2. Bash script and sqlite3.
3. The image priority is using a 4 digit random number (which can have
preceding 0's) + (times viewed * 100). The length of the random number and
the multiplier are both variables.
4. I used feh as it had the "cycle once" option which qiv didn't seem to
have (and then exit to rebuild the list of files).
5. I created a custom image to display separately from the rest.
If people like I will demo this and explain in more detail at a future lug
meeting. I feel good about this one :)
On 16 July 2011 16:32, Mike Evans <mike at tandem.f9.co.uk> wrote:
>
>
> On 16/07/11 16:01, David Halliday wrote:
>
>> Thanks for that, although I think it will have the same issue many
>> applications have which is not noticing new files added after it was
>> started. My other issue is controlling priority (show new images more).
>>
>> Well you can fix that in one of two ways:
>
> 1) look at the C source and see if it re-scans once it reaches the end of
> the list of files before starting again and if not tweak it
>
> 2) If you don't want to tweak the C then run the slideshow program without
> the -loop option and put it in a small script which loops. This will force
> it to find the files again each time.
>
> ______________________________**_________________
>
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/**mailman/listinfo/kent<https://mailman.lug.org.uk/mailman/listinfo/kent>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/kent/attachments/20110716/26d95071/attachment.htm>
More information about the Kent
mailing list