On Mon, Apr 12, 2010 at 1:27 PM, narendra sisodiya < [email protected]> wrote:
> here is a very small script - > > save to following file with name as "Print File" > and make it executable - > chmod +x "Print File" > and move into > *~/.gnome2/nautilus-scripts* > directory > > * > +++++++++++++++++++++++++ > #!/bin/bash > > ## Ny Narendra Sisodiya, for SchoolOS > ## [email protected] > ## If you modify it, Please let me know. > ## released under GPLv3 > > IFS=$'\n' > for FILENAME in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS > do > > ##TODO to add file checking extensions > lp "$FILENAME" > done > > exit 0 > +++++++++++++++++++++ > > You can now print files using right click on a file > > Can sombody test and modify so that before giving print command we need to > check that file must be .odp, .txt odt, .pdf format. Also, we can show some > menu using zenity > > ** > * > > -- > ┌─────────────────────────┐ > │ Narendra Sisodiya ( नरेन्द्र सिसोदिया ) > │ Society for Knowledge Commons > │ Web : http://narendra.techfandu.org > └─────────────────────────┘ > > -- > l...@iitd - http://tinyurl.com/ycueutm > *Will this work for checking file formats ? +++++++++++++++++++++++++ #!/bin/bash ## Ny Narendra Sisodiya, for SchoolOS ## [email protected] ## If you modify it, Please let me know. ## released under GPLv3 IFS=$'\n' for FILENAME in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS do ##TODO to add file checking extensions extension=${FILENAME##*.} if( exension="odp" -o extension="txt" -o extension="odt" -o extension="pdf" ) then lp "$FILENAME" else echo "Error: File of this format cannot be printed" done exit 0 +++++++++++++++++++++ * -- !...@n -- l...@iitd - http://tinyurl.com/ycueutm To unsubscribe, reply using "remove me" as the subject.
