FE Nautilus Scripts

Script Naming Convention

( FE = Freedom Environment )


This image was made with the TitleBlock FE tkGooie.

FE Home page > FE Downloads page (among other parent pages) > This 'FE Nautilus Scripts' NAMING CONVENTION page

! Note ! This page may be touched up or revised occasionally
--- especially after a new release of 'feNautilusScripts'.

INTRODUCTION :

After about a year and a half of fairly constant development and usage of the 'feNautilusScripts' (from mid-2010 to early-2012), I finally determined a suitable naming convention to use for the names of the script files.

A little history: I initially developed a set of about 20 ImageProcessing scripts. Then I found that there were at least 10 other categories of scripts that I wanted to develop --- and I found that I could put them in separate directories of my Nautilus scripts directory --- which is the '.gnome2/nautilus-scripts' directory of one's home directory.

I soon had a set of Nautilus utility scripts organized into the following categories (and directories) :

  • AUDIOtools
  • CHANGEfiles     (for general file changes: mostly multi-file renaming)
  • EXAMINEfiles
  • FILESlists
  • FINDfiles
  • IMAGEtools
  • LinuxHELPS
  • PROC-MEMlists
  • SPACElists
  • TERMINALtools
  • VIDEOtools
  • zMORE   (with about a dozen more categories, such as PDFtools, PLOTtools and PRINTtools)

Note that when you open the Nautilus 'Scripts   >' menu and go to one of these subgroups of scripts, each subgroup menu shows the filenames that were given to the script files in that subgroup.

The naming of the scripts in each subgroup is important to understanding how to use the scripts. (The ordering and grouping of the scripts within each subgroup menu can be helpful too.)

Over the afore-mentioned development-usage time period (mid-2010 to early-2012), I had been changing the names of some of the scripts in each release of 'feNautilusScripts' --- especially as I went to use a script but found that I could no longer remember some aspect of the script (relation of the script to others in the group, inputs, function, method of action).

During a period of intense development of about thirty scripts in the subgroups 'imgEFFECTStools' and 'imgANIGIFtools' of the 'IMAGEtools' subgroup, I finally devised a naming convention that would solve most of my issues in using (and naming) the scripts.


The NAMING CONVENTION :

The naming convention is based on the following 4-part name structure.

    [part1]_[part2]_[part3]_[part4].sh

The parts are separated by the underscore character and every script ends in the 'extension' '.sh'. The parts are described as follows.

  • part1 is used for ordering and grouping the scripts within a subgroup

  • part2 is used to indicate what kind of file(s) to select in Nautilus --- to initiate the script

  • part3 is used to describe the function of the script, such as 'RENAME' or 'PLAY' or 'LIST' or 'SHOW' or 'ROTATE' or 'COMPRESS'.

  • part4 is used to indicate some of the main utilities (and parameters) used in the script, such as ImageMagick 'convert' or Linux/Unix commands such as 'mv', 'man', 'df', 'du', 'ls', or 'find'.

Within each 'part' of the filename, a combination of upper- and lower-case letters may be used --- and some separators may be used, such as hyphens ... or more underscores.

Some examples --- chosen with particular attention to demonstrating various examples of 'part2', the file-selection indicator:

  • 00_anyfile_LIST-bin-DIRs-FILES_ls.sh
    --- in the 'LinuxHELPS' subgroup

  • 01_anyfile_SHOW-man-HELP-4topic_man-w-zcat-groff-col.sh
    --- in the 'LinuxHELPS' subgroup

  • D0_anyfile4Dir_LIST-DIRS-all_allLEVS_find-d.sh
    --- in the 'FILESlists' subgroup   (lists even 'hidden' directories)

  • 01_anyfile4Dir_findFILES4MASK_allLEVS_find-NOTdir-mask.sh
    --- in the 'FINDlists' subgroup

  • 00_anyfile4Dir_START-Gterminal-here_gnome-terminal.sh
    --- in the 'TERMtools' subgroup

  • 00_1imgfile_shoVerboseINFO_identify-verbose.sh
    --- in the 'IMAGEtools' subgroup

  • 00_multi-img-files_RESIZEpercent_convert-resize.sh
    --- in the 'IMAGEtools' subgroup

  • 01b_multi-png-files_COMPRESSpng_pngcrush-brute.sh
    --- in the 'IMAGEtools' subgroup

  • 02a_multi-img-files_EDITwith_mtpaint_forLoop.sh
    --- in the 'IMAGEtools' subgroup

  • 01_multi-img-files_CONVERT-TOgif_convert-colors-upto256.sh
    --- in the 'IMAGEtools' subgroup

  • 01_multi-JPG-files_RENAME-JPG2jpg_cut-sed-mv.sh
    --- in the 'imgsRENAMEtools' subgroup of the 'IMAGEtools' subgroup

  • ani02a_1ani-gif_SPLIT_convert-adjoin-coalesce.sh
    --- in the 'imgANIGIFtools' subgroup of the 'IMAGEtools' group

  • fx70_3imgfiles_toCUBE-inPNG_convert-shear-3-times.sh
    --- in the 'imgEFFECTStools' subgroup of the 'IMAGEtools' group

  • 02a_2files_shoDIFFS-sideBYside_sdiff.sh
    --- in the 'EXAMINEfiles' subgroup

  • 00_multiFiles_SHOW-with-XPG_for-loop.sh
    --- in the 'EXAMINEfiles' subgroup

  • 02_anyfile_show-CUM-CPU4processes_ps-awk-sort.sh
    --- in the 'PROC-MEMlists' subgroup

  • 01b_anyfile4Dir_SPACE-USEDby-SUBDIRS_allLEVS_SIZEsort_du-awk.sh
    --- in the 'SPACElists' subgroup

  • 0A_1audioFile_show-PROPERTIES_ffmpeg-i.sh
    --- in the 'AUDIOtools' subgroup

  • 01_multi-audio-files_RENAME-withDURATION-MINS-SECS_ffmpeg-i.sh
    --- in the 'AUDIOtools' subgroup

  • 07t_anyfile4Dir_PLAYall-mp3sOfDir-in-Totem_ls-grep.sh
    --- in the 'AUDIOtools' subgroup


The Parts - discussed :

Part1 - discussion:

From these examples, one sees that 2-digit numbers (sometimes aided by alphabetic characters) are used in part1 of the names --- to order (and group) scripts within each subdirectory/submenu. Two digits are enough because, whenever more than about 20 scripts are in a group, a new subgroup is started to keep the submenus from becoming excessively long.

Part2 examples - discussion:

  • anyfile indicates that any file can be selected using Nautilus --- a 'regular' file or a directory file. This is an indication that the script is independent of the directory in which one is positioned in Nautilus, and the script does not need to pass any 'regular' filenames to the script. Most of the scripts in the 'LinuxHELPS' group and in the 'PROC-MEMlists' group are of this type.

  • anyfile4Dir indicates that navigation to a particular directory is important, but that any file within that directory can be selected using Nautilus --- a 'regular' file or a directory file. Scripts of this type DO use the directory in which one is positioned (the 'current' directory) but the script does not need to pass any 'regular' filenames to the script. Most of the scripts in the 'SPACElists' group, in the 'FINDlists' group, and in the 'TERMtools' group are of this type.

  • 1imgfile indicates that ONE file should be selected using Nautilus --- and that the file should be an 'image file'. If you look at 'part4' of the scriptname and see that the ImageMagick 'convert' command is being used, then you can be reasonably sure that any of the more than 30 image file types supported by ImageMagick can be used as input.

  • 1ani-gif indicates that ONE file should be selected using Nautilus --- and that the file should be an 'animated GIF' file.

  • multi-img-files indicates that ONE OR MORE files can be selected using Nautilus --- and that each file selected should be an 'image file'. Look at 'part4' of the scriptname to get an idea of the types of image file that can be supported. (See the comments for '1imgfile', above.)

  • 3imgfiles indicates that precisely THREE image files should be selected using Nautilus --- using the Ctrl or Shift keys to make a multi-file selection.

  • multi-mp3-files indicates that ONE OR MORE files can be selected using Nautilus --- and that each file selected should be a '.mp3' file.

  • multi-JPG-files indicates that ONE OR MORE files can be selected using Nautilus --- and that each file selected should be a '.JPG' file.

  • multiFiles indicates that ONE OR MORE files can be selected using Nautilus --- and that the files can be essentially any kind of 'regular' file --- text or binary. This is true of the FE 'xpg' utility.

Part3 - discussion:

One of the longer examples above for demonstrating part3 is the script in which part3 is

    'SPACE-USEDby_SUBDIRS_allLEVS_SIZEsort'.

Note that this part3 is a combination of upper- and lower-case letters and it uses two kinds of separators --- hyphens and underscores.

Part4 - discussion:

Part4 of that same 'SPACElists' script is 'du-awk' --- which indicates that the 'du' command is used to get the file space used by the sub-directories. It also indicates that the results from 'du' are piped into 'awk', to format the listing nicely.

You can examine other examples above to see more examples of 'part3' and 'part4' of the naming system.


To shorten some of the names, I may use various techniques to shorten some words within the names, yet, hopefully, keep the names readable --- at least to me, when I come back to them months later. Examples:

  • 'anyfil' in place of 'anyfile'
  • 'sho' in place of 'show'
  • '2' in place of 'to'
  • '4' in place of 'for'


Summary :

With this naming convention, I will not be going through so many 'gyrations' in script names, from release to release of 'feNautilusScripts'.

A script name will be determined, to a great extent, by

  • script input(s) --- that is, the files that may be selected using the Nautilus file manager

  • script function(s) --- that is, the purpose of the script

  • the main utilities used to perform the function(s).

So you Linux users out there (you know who you are, you rebels), I hope you take this opportunity to use these freedom-enhancing scripts that are available to you FREE of cost. I want to share, and I want to leave something positive behind in this world.

With this kind of script naming, I hope that the scripts will be easy for you to use --- whether you are using them for the first time or you are coming back to them after not using them for a while.

AND, if the names are not clear to you, you can always rename any of the scripts after installing them. Now that's some FREEDOM --- more than you get with the menus in most applications.

You can even add your own scripts to the menus. And you can even rename the directories (the submenus) and re-organize them --- splitting, merging, etc. What FREEDOM!!!

TA-DAAAA!

"FE Nautilus Scripts . . . . The Prescriptions for Many Ailments."

Bottom of the FE Nautilus Scripts NAMING CONVENTION page.

To return to a previously visited web page location, click on the
Back button of your web browser a sufficient number of times.
OR, use the History-list option of your web browser.
OR ...

< Go to Top of Page, above. >

OR ...

< Go to the FE Home page >

Page was created 2012 Feb 28.
Page was changed 2017 Sep 13. (Updated the example script names.)