![]() |
[Script][N900][19/9/2014] NatGeo photo of the day script.
1 Attachment(s)
Hi guys!!
I want to share with all of you a script made by me for download and apply the National Geographic Photo of the day.. It will auto download the new photo and will auto apply the photo as wallpaper on all 4 the screen of hildon home!! 1) You have to install bash3 from HAM or FAM 2) in X-Term type chsh and than, when you see Code:
Login Shell [/bin/sh]: Code:
/bin/bash 3) restart X-Term to have bash fully working.. 4) type Code:
sudo gainroot Code:
apt-get install wget 1) From x-term type Code:
cd MyDocs/ Code:
mkdir photos Code:
wget --no-check-certificate http://github.com/marcphemt/scrpts/raw/master/n900photooftheday.sh Code:
chmod +x n900photooftheday.sh To execute the script type in x-term Code:
cd MyDocs/ Code:
./n900photooftheday.sh To add the icon and .desktop to hildon follow this instruction ;) 1) Download zip attached, unzip it, and put files in MyDocs 2) With x-term as root type Code:
cp /home/user/MyDocs/natgeo.png /opt/usr/share/icons/hicolor/64x64/hildon/ Code:
cp /home/user/MyDocs/natgeo.desktop /usr/share/applications/hildon For problems write here or pm me!! :D Changelog 15/9/2014: Added the command to view the photo just downloaded with image-viewer...if you don't like the new photo of the day you have to simply close x-term!! :) Changelog 16/9/2014: Added instruction to add icon to hildon :) Changelog 19/9/2014: Cleaning up the code and added switch for those who use it with QueenBeeCon and corrected lines for file comparison (All thanks goes to Ilew and shawnjefferson)..Just download another time from github!! Cheers. To Do: 1) Add graphic interface using zenity (i think). 2) Add an option to revert back the old wallpaper. I ll tell you all changes with changelog.. Hope you like this script. Cheers Marcphemt |
Re: [Script][N900] NatGeo photo of the day script.
Wow nice wallpapers everyday ! Also consider uploading to the repos later then maybe a gui or an icon to the script would do even better ;)
|
Re: [Script][N900] NatGeo photo of the day script.
Nice new guy and already with the scripts! Keep it going :)
|
Re: [Script][N900] NatGeo photo of the day script.
Thanks guys!! :) i m very happy that you like the script..
About graphic interface: I m planning to learn how to use zenity for a simple interface..hope i can learn something in few time eheheheheeheheheheh :D !!Than i ll learn about make a .deb file to install my works ;) |
Re: [Script][N900] NatGeo photo of the day script.
Hi guys, thanks for the comments...i m happy because you like my work...soon i ll post other works of mine!! :)
BTW now i m studing for the last exam for my veterinary university, so i don't have so much time to study for zenity...but i want to add a graphic interface to my works!! Thanks for the suggestions!! Cheers Marcphemt |
Re: [Script][N900][16/9/2014] NatGeo photo of the day script.
....don't know why, but i can't see my answers.. :confused:
|
Re: [Script][N900][16/9/2014] NatGeo photo of the day script.
I was taking a look at this and I'm not the strongest in shell scripting (so I could be wrong), but it looks like you aren't always using the PICTURE_DIR variable.
In the check if the picture already exists: Code:
if [ ! -e ~/Immagini/${TODAY}_ngeo.jpg ]; then Code:
/usr/bin/dbus-send --print-reply --dest=com.nokia.image_viewer /com/nokia/image_viewer com.nokia.image_viewer.mime_open string:file:///home/user/MyDocs/photos/${TODAY}_ngeo.jpg in the code that sets the wallpaper: Code:
gconftool -s --type string /apps/osso/hildon-desktop/views/1/bg-image ~/MyDocs/photos/${TODAY}_ngeo.jpg |
Re: [Script][N900][16/9/2014] NatGeo photo of the day script.
You are right...i write this script for my pc and than converted for N900..so...thank you for reporting!! :) I ll correct this error as soon as possible!! ;)
|
Re: [Script][N900][16/9/2014] NatGeo photo of the day script.
PS, also the file size comparison doesn't work, at least on my system. wget returns a comma in the filesize and stat doesn't.
Feature request: how about adding a switch (-batch or -quiet or something) to run without prompting the user, so we can run it via a QueenBeeCon or other scheduled task? |
Re: [Script][N900][16/9/2014] NatGeo photo of the day script.
Quote:
Sorry, but for now i don't use queenBeeCon, so i don't know how it works.. :) Thanks for comment!! :cool: EDIT: i'm working at the file comparison, and i see that don't work anymore..so i ll cancel that line...we don't need it beacause we don't have duplicates of the same photo.. |
All times are GMT. The time now is 14:01. |
vBulletin® Version 3.8.8