-
Notifications
You must be signed in to change notification settings - Fork 0
/
Listail - List File Generator
executable file
·30 lines (22 loc) · 1.21 KB
/
Listail - List File Generator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
####### Listail Create a list of images to 'lst' file
####### Version 0.2
####### Created by Anderson Prado (AndeOn), andeons.com
####### Licensed under the GNU GENERAL PUBLIC LICENSE, Version 2
### Install in ~/.local/share/nautilus/scripts
### Set Permissions of script to "Allow executing file as program"
### You need to be running Nautilus 1.0.3+ or above to use scripts menu.
t_wtitlebar="Listail - List File Generator"
t_about="The list file is simply a text file consisting of a frame rate
followed by a list of images to display."
t_quest="Do you want to generate a list file for Synfig Studio?"
t_fps="Please enter the number of Frames per Second (FPS):"
t_file="Please enter the filename for your file list:"
t_sucess="was successfully generated!"
gdialog --title "$t_wtitlebar" --yesno "$t_about\n\n$t_quest" 20 0 &&
c_frames=`gdialog --title "$t_wtitlebar" --inputbox "$t_fps" 0 0 24 2>&1` &&
c_list=`gdialog --title "$t_wtitlebar" --inputbox "$t_file" 0 0 list-img 2>&1`
[ $? -ne 0 ] && exit 1
echo FPS $c_frames > $c_list.lst
ls -p *.jpg *.jpeg *.png *.ppm *.tiff *.tif *.gif | grep -v / | sed "/$c_list.lst/d" >> $c_list.lst
gdialog --title "$t_wtitlebar" --msgbox "$c_list.lst $t_sucess" 0 0