                    NAUTILUS SCRIPTS

  All the Nautilus scripts that I have written are compressed into the ASP file
(Airelle Scripts Package). They can be used in Nautilus, the standard files
browser for Gnome desktop (Linux). Like all other scripts, you can launch them
via the "Scripts" menu that appear after a right clic on desktop or a window of
the files explorer.

  However, they can be used with an desktop other than Gnome, and even without
Nautilus! Indeed, Just create a launcher (shortcut) to the script, available in
a menu or, even more convenient, by keyboard shortcut. Here are the ones I use
(Super = Windows key):
- Super-A: sh /home/airelle/.gnome2/nautilus-scripts/Alerter
- Super-S: sh /home/airelle/.gnome2/nautilus-scripts/Sauver
- Super-Delete: sh /home/airelle/.gnome2/nautilus-scripts/Nettoyer

  Since I do not like the latest versions of Ubuntu (with Unity as desktop), I
now work under Xubuntu (with XFCE), faster although it is very customizable.
Nautilus settles easily and the launchers work fine. If you are disappointed by
the recent versions of Ubuntu, I highly recommend you Xubuntu, especially as the
compatibility is perfect.

  Since version 3.6 appeared with Gnome 3, Nautilus lost very useful functions
and became really bad! I advise you to stay with version 3.4, or switch to its
fork used with Cinnamon: Nemo (Captain Némo was the commandant of the Nautilus
in the famous novel "20 000 lieues sous les mers "by Jules Verne).

  Attention: if you want to use Nemo, some modifications are needed:
1. work directory is ~/.gnome2/nemo-scripts and no ~/.gnome2/nautilus-scripts
2. change NAUTILUS_SCRIPT_SELECTED_FILE_PATHS to NEMO_SCRIPT_SELECTED_FILE_PATHS
 
  Other tips and last versions can be downloaded from my website:
http://rlwpx.free.fr/WPFF/nautilus.htm


================================================================================
Installation:
================================================================================

- decompress the archive
  7z e ASP.7z
- make executable the scripts
  chmod u+x Alerter Comparer Decueper Editer Info IP Lister Nettoyer Ouvrir Prop Sauver Scanner UltraCP UltraMV
- move the scripts into the good directory
  mv -u Alerter Comparer Decueper Editer Info IP Lister Nettoyer Ouvrir Prop Sauver Scanner UltraCP UltraMV ~/.gnome2/nautilus-scripts

  If you want to use these scripts as root: first, be sure that the scripts are
installed in the root directory (root/.gnome2/nautilus-scripts/) and executable;
second, open Nautilus as root and run the script.
  You can open a terminal as root, too.

================================================================================
Dependencies:
================================================================================

In addition to zenity, some scripts need other dependencies:

- "Alerter":
 mplayer (if you want an audible alarm)

- "Comparer":
 meld

- "Decueper":
 cuetools
 flac
 shntool
 xmms2-plugin-apefile (for monkey files .ape)
 wavpack (for wavpack files .wv)

- "Nettoyer":
 sqlite3 (if you want to defragment the SQLite files)

- "Prop":
 mplayer

- "Sauver":
 7zip (you can also use another compression like tgz)

- "Scanner":
 clamav
 clamav-freshclam (for updates)

- "UltraCP" and "UltraMV":
 Ultracopier (http://ultracopier.first-world.info/)

You can install some packages with a command like:
 sudo apt-get install zenity clamav clamav-freshclam cuetools flac meld mplayer p7zip shntool sqlite3

Note: "IP" need an active Internet connection.


================================================================================
Tips:
================================================================================

- Alerter:
  -------
  The current time is shown in the dialog box (for example, if you want to be
alerted after 15 minutes, enter time equal to the displayed time + 0:15). But it
is easiest to enter the waiting delay i.e. 15 (15 minutes after current time).
It is the only thing you have to do! Great, no?
  Example 1: if you have to wait 45 minutes before downloading a file, run the
script and just enter 45.
  Example 2: if you listen some music but you don't want to miss your favorite
emission of an another webradio that start at 11:30, simply launch Alerter and
enter 11:30.
  Note that you can launch this script as many time as you want so you can have
alerts, for example, in two minutes (2), in ten minutes (10), at 09:00 (9:) and
at 20:15 (20:15).
  Version 3.0 use a file ("Alerte") for choosing a sound or a video to play. If
this file is missing ou empty, a short alarm of an alarm-clock will be played by
default (so the script "Alerter" will start without problem if you delete the
"Alerte" file).
  If you want a silent alarm add this text into the "Alerte" file: "Please, I
don't want that a sound is played when the alarm goes on." No, it's a joke! Just
write something that is not a valid URL, such as "NoSound" or "X" or comment the
URL I have added. Replace 
"/usr/share/sounds/freedesktop/stereo/phone-incoming-call.oga"
by 
"#/usr/share/sounds/freedesktop/stereo/phone-incoming-call.oga"
  And - not bad! - you can use Alerte as a playing list if you write several
URLs. For example, with these three links, Alerter will play an alarm, a phone
call and an alarm again:
/usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga
/usr/share/sounds/freedesktop/stereo/phone-incoming-call.oga
/usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga
  Better than that, you can use links to a movie! Of course, good codecs have
to be installed.
  Finally, if you want to choose the sound each time you run Alerter, uncomment
(delete "#") the 72th line:
# msg_son=`zenity --file-selection --title="${msg_titre}" --filename="/usr/share/sounds/" --text=${msg_param3}`
  I've included in the archive ASP a highlight of the French music composer
Marc-Antoine Charpentier and you can download some excerpts here:
wget rlwpx.free.fr/private/FCM.7z
  Despite its nearly 300 years, I would be happy that you enjoy the music of
these French composers of the 17th and 18th centuries.

- Comparer :
  --------
  You can compare two files or folders that are not necessarily in the same
directory: simply select the first and run the script, then select the second
and run the script again!
  If both files or folders in the same directory, you can select them all and
obviously run the script only once.

- Decueper:
  --------
  The audio image file must have the same name - case sensitive - as the cue
sheet file (this which is usually the case) and its extension should be ape,
flac, wav or wv (for example, my_file.cue and my_file.flac).
  You have to right clic on the cue file, not the audio image file.
  For security, initial files - cue and flac (or other) - aren't deleted,
especially as the index file may contain useful data.
  You can edit the cue file comments before execute the script so that the name
of the tracks is more in line to what you want.

- Editer :
  ------
  A simple way to use a file editor - for example a basic text editor like gEdit
and a hexadecimal editor such as gHex - to open one or several files. The most
frequently used editors are listed but you can edit the list and change the
default application (I have chosen medit that I find light and efficient).
  Not bad, you can edit protected files as superuser (su) without the need to
open Nautilus as su (be careful!). By default, you edit files with rights of
current user.

- Info:
  ----
  You can copy the selected text with the mouse, the contextual menu (right
clic) or keyboard shortcuts (Ctrl-A, Ctrl-C, Ctrl-V).

- IP:
  --
  This script displays your public IP (IPv4 or IPv6). If you want to know your
private IP address, just type "ifconfig" in a terminal (or run "Info" script).

- Lister:
  ------
  Logs are automatically opened with one of the most common text editors, namely
gedit (Ubuntu/Gnome) Kwrite (Kubuntu/KDE), Leafpad (Xubuntu/Xfce) or even with 
medit or Kate (KDE advanced text editor).
  If there are several logs and if the application can do it, files are opened
in different tabs!

- Nettoyer:
  --------
  Some operations are disabled (cleaning of /var/backups/ for example) by
prudence. You can uncomment these lines if you wish to do this cleaning.
  Conversely, you can delete or uncomment other command lines if you don't
want to delete some files or if you want simply go faster.
  Note that for convenience there is no option (it doesn't matter  if software
is not installed: the specific cleaning command will be interrupted due to a
file or directory not found).
  After the deletion of the bash history (.bash_history), which is often full
of unnecessary commands, this script can restore a backup of this file. So it
would be a good idea to create a clean file with the most useful commands for
you and in the order you prefer (to be placed in ~/Documents/ for example).
  If you want to see all what is done, you have just to start the script from
a terminal.

- Ouvrir:
  ------
  With recent versions of Ubuntu (and variants) the "open with" dialog box is
very bad and often you cannot use the application that you want: this is very
annoying!
  This script allows you to easily select an application installed on your
machine to do that.

- Sauver:
  ------
  For security, personal directory are saved in tar.gzip, that is extractible
without trouble on Linux, while the application directories are compressed in
7-zip, more compact. You can edit the code for your convenience to change the
compression mode to gain speed (tgz) or size (7z).
  WARNING! The /tmp/ directory into which the files are written will be ERASED.
You have to move these backups to an external storage device (CD, HD, USBK...).
  To restore the list of installed packages:
   sudo apt-get update
   sudo dpkg --set-selections < [backup_directory]/liste_paquets
   sudo apt-get -u dselect-upgrade
  To restore the personal configuration:
   gconftool-2 --load=[backup_directory]/user_conf.xml

- Scanner :
  -------
  The result of the analysis is available in the ClamAV.log file placed in the
directory where it was launched.

Hoping that one or several of them will be useful for you.

Airelle
