Gedit’s little annoying “Untitled Document” feature, which apparently isn’t a bug ?

While I’m pretty much used to use gedit for all my text-editing needs. One of it’s most annoying, and therefore distracting “ features, ” is : When you wish to use alt+f2 — which pops up a ‘ run command window ’ akin to win+run. To run for example : kdesudo gedit /etc/fstab in kde, and gksudo gedit /etc/fstab in gnome. Then gedit does indeed open the intended file, plus 1. I’m glad to see I’m not the only one, who has this annoyance.

So I followed the instructions at : UBF

Exec=gedit $1 < /dev/null

And got surprised at the new behavior. Which is described perfectly at LMF. 😆

But if I then open the same file from Nautilus it actually makes things several times worse. I get a file called ‘$1’, another called ‘<' , another called 'dev/null' and lastly the file that I actually want to open.

So I took their suggestion, and as of right now, except for : While using gksudo ? Everything is in working order now. 😉

Exec=gedit %u

See the pictures at my cloudup for examples, of this particular behavior.

Target : Self.

• Firefox’ about:config page.

Firefox’ about:config page.

So now that I’ve almost completely ditched google-chrome, chromium, and all of its other derivatives, in favor of mozilla firefox for good (nah, not quite there yet)! 😆

It’s that time to see, if I can speed up firefox. And yes, I’ve found me several ways on how to do this. Now I’ve already put up a few pages earlier, detailing exactly what one could do, to achieve the same.

So what’s your post going to be about then?

Well, I haven’t decided yet. I like the sharing feature wordpress offers me, so why not use it to my advantage this time? To post (spam! 😆 ) it simultaneously onto several other platforms. 😉

For one, I could bitch, and whine about chromium/google-chrome’s “ he’s dead jim ” message, or how it takes forever “ to process ” some page. Or how it so often just crapped out on me, right in the middle of, well you guessed it: When it was important. sighs Well, not anymore it won’t! 😉 Aside from keeping my chromium profile, and the corresponding sync around for safekeeping. I doubt I’ll be using it much, from now on? Who knows, right?

End of rant. 🙂

In the meantime: Let’s sing. 😉

Don’t worry, be happy!

Continue reading

Welcome, to my new playground. :-)

Welcome, to my new playground. 😆

As I’ve noticed Tumblr being very liberal in regards to the use of javascript, and custom css. I’ve decided, no I’ve more or less chosen, to spend more time on my tumblr.

Things I’ve changed:
Custom CSS:

In the “ custom css ” section, of tumblr’s customize section.

pre.prettyprint {
font-family: 'Noticia Text', serif;
font-size:0.8em;
overflow-x: auto;
margin: 5px 5px 5px;
color: #ff6600;
background-color: #d3d3d3;
}
h1{font-family:'Ubuntu', sans-serif;font-size:1.8em;margin-bottom:0em;font-weight:bold;margin-top:0;text-shadow:4px 4px 4px #666666;}
h4{font-family:'Ubuntu', sans-serif;font-size:1.4em;margin-bottom:0em;font-weight:bold;margin-top:0;text-shadow:2px 2px 2px #4c4c4c;}
h5{font-family:'Ubuntu', sans-serif;font-size:1.2em;margin-bottom:0em;font-weight:bold;margin-top:0;text-shadow:4px 4px 4px #333333;}
p{font-family:'Ubuntu', sans-serif;font-size:1.0em;text-align:left;margin-top:0.5em;margin-bottom:0.5em;text-shadow:1px 1px 1px #191919;text-indent:1em;padding:0.15cm;}
Google-Fonts

I’ve added “ google-fonts ” to the equation:

	<link href="https://fonts.googleapis.com/css?family=Ubuntu&subset=latin,greek-ext" rel="stylesheet" type="text/css" />
	<link href="https://fonts.googleapis.com/css?family=Noticia+Text" rel="stylesheet" type="text/css" />
The acquiring of new skills.

And I’m learning new skills, as I go …

<a name="_top"></a>
[TB]: https://www.tumblr.com/  "Tumblr main."
[ddgw]: https://duckduckgo.com/?q=wysiwyg+!google "What you see is what you get"
[ddgp]: https://duckduckgo.com/?q=plain+text+editing+for+die+hard+coders.+!google "Real coders prefer RAW! :-D"
[ddgh]: https://duckduckgo.com/?q=How+to+use+markdown+on+tumblr+!google  "Duck duck goose!"
[MD]:http://daringfireball.net/projects/markdown/syntax+!google "Markdown's syntax."

I'm so used, to either use [tumblr][TB]'s [wysiwyg][ddgw] editor, or its [plain-text][ddgp] one, while blogging/reblogging on here. That I had totally forgotten [about markdown][MD]. lol

Granted, it takes a little time to get used to. But I like it so far. ;-)

Ok, enough with the chitchat, it's time for ...

***

**EXAMPLES**

#### Example Header &lt;h4&gt;  
(let's stay modest, unless we wish to shout, the &lt;h1&gt; tag tends to give me that feel :-) ).

# SEE WHAT I MEAN! HA! :-D ← &lt;h1&gt;

##### Example Section &lt;h5&gt;.

This is a paragraph.

This is another paragraph.

**This word** will be in **bold**, and *this one* will be in *italics*.

This is a para-  
graph with line-  
breaks.

This is an unordered list, with hanging indents.

* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.  
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,  
viverra nec, fringilla in, laoreet vitae, risus.
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.  
Suspendisse id sem consectetuer libero luctus adipiscing.

This is an ordered list:

1. Apples.
2. Oranges.
3. Pears.

> There is room for *a fancy quote*.
>> &laquo; On this line. &raquo;

How [to use markdown][ddgh] on [tumblr][TB]?
Speaking of javascript:

Google Translate Widget:

// Place the following, where you'd like your translate container to appear.
// <div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.FloatPosition.TOP_LEFT, multilanguagePage: true}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

Custom search engine:

<script>
  (function() {
    var cx = 'getYourOwnDarnCode';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
</script>
// Place the follwowing, where you'd like your cse to appear.
// <gcse:search></gcse:search>
TinyURL:

TinyURL form:

<form action="https://tinyurl.com/create.php" method="post" target="_blank">
<table align="center" cellpadding="5" bgcolor="#E7E7F7">
  <tr>
  <td>
  <strong>Enter a long URL to make <a target="_blank" href="https://tinyurl.com">tiny</a>:</strong><br />
  <input type="text" name="url" size="30"><input type="submit" name="submit" value="Make TinyURL!">
  </td>
  </tr>
</table>
</form>

Considering my tendency to tinker, while editing my tumblr’s html. Where apllicable, and available (and yes I checked them all! 😆 ), I turned on, the ssl counterpart, of every link I found in its source. It would be nice, if all parties concerned, would turn this on, by default. 😉


As for me,

I’ve more or less … “ Removed myself from the equation.

Walk along, nothing to see here.

Walk along, nothing to see here.

Act, don't think.

“ Act, don’t think … (Drink!) ! ”


That’s all folks! 😆

Kindest regards,

Alex

ღ Ƹ̵̡ Ӝ̵̨̄ Ʒ ☆ ˜ ” * ° • . ¸ł¸ . • ° * ” ☆ ★ ☆ ę ˜

♫ d(。◕‿◕。)b ♪♪

Use the contact-form below, for feedback purposes.







Back to top.

Too good to pass up on…! « I’ve found my Easter Egg today. ;-)

It’s your first impression: &laqou; When you put your unedited work out there, that’s what they see as your business-model, basically. And when you have your work edited and perfected, it will be better for you. »

^ So basically, never let your client see your unedited work. Good Advice. 😉

Experimenting with…

Images.

There isn’t much to say, except for the fact that I shot these a while ago with a “Point and click” camera. The only edit I did on the original jpgs (the before images) was using the ‘auto white-balance’ feature of the Gimp.

Then I “forked” them and did the following edits:
In order of appearance:

  • Decompose into HSV
  • Ran the unsharp mask (3.0 0.3 0.0) tool over it
  • Recomposed back into HSV
  • Duplicated the layer (visible part).
  • Removed the sky.
  • Cleaned up (and then some. 😉 ).
  • Color overlay (on the remaining part) in the orange/yellow range (ff6f11) transparency at 70%
  • Restored the old hidden layer.
  • Removed the layer where I used the color-overlay effect on.
  • Flattened image.
  • Saved as .png (as it is superior in quality to jpeg).

Before and after gallery goes here:

Before and after slideshow goes here:

This slideshow requires JavaScript.

Despite the “Ancient Nature” of my camera, I really do like how my edits turned out, but that’s just me. 😉

Always learning:

That’s all folks!

Kindest regards,

Alex

PS: My words are my own, my actions are my own. Everything I wrote and did in this post are my own responsibility. All I’m offering is: YAP! 😉

«Everything we do (in life) is meaningless, without the appropriate conviction

Before you comment!?

Back to top.

Introducing… *drum rollz*

The One Script to rule them all… 😆

Updated today Nov. 17, 2011

This post will be the natural successor to this one.

## Source of inspiration.
/etc/init.d/SCRIPT -> /lib/init/upstart-job

I took the liberty to recombine my three most used scripts into one. 😉
Its usage is simple:

## The scale and quote scripts take additional parameter(s).
## For 'scale': 4cif, pal or hd are the only options at the moment.
## But feel free to add your own.
## All others: script.name file.name
you@somewhere:~$ ./scale.avi name-of-your-movie.avi (4cif, pal, hd)
e.g.: ./scale.avi name-of-your-movie.avi hd # Upscale file to "$HD" i.e. 1280x720
you@somewhere:~$ ./quote.avi name-of-your-movie.avi (Start End (Either in whole seconds or HH:MM:SS.MSS))
e.g.: ./quote.avi name-of-your-movie.avi 30 60 # Starts at 30s and has a duration of 60s.
e.g.: ./quote.avi name-of-your-movie.avi 60 # Starts at 0s and has a duration of 60s.
you@somewhere:~$ ./xtract.z.avi name-of-your-movie.avi
## Or: (if the script is within your "$PATH"?
scale.avi name-of-your-movie.avi hd # Upscale file to "$HD" i.e. 1280x720
quote.avi name-of-your-movie.avi 30 60 # Starts at 30s and has a duration of 60s.
quote.avi name-of-your-movie.avi 59,04 # Starts at 0s and has a duration of 59.040s.
xtract.z.avi name-of-your-movie.avi
xtract.z.flv name-of-your-movie.flv # I.e. Youtube or equiv. ; - )
## 'z'? equals 'from' ; - )

As for one’s “$PATH”.

# http://linuxcommand.org/wss0010.php
## His Pah is very strong. : - )
## Insert the following in your ~/.bashrc
## Preferably at the end!
## What I use.
# PATH=$PATH:$HOME/.usr/bin
PATH=$PATH:$HOME/your/folder/of/choice
export PATH
## Then all scripts you create and which are placed in "$PATH"
## Can be executed from anywhere you have permission to execute those.
#
## Otherwise you'll have to 'cd' to the folder where your script lives and
## do: ./your-script with-whatever-options-you-have-concocted with-file.ext
## Oh, don't forget to do: chmod u+x on your script first.

In my enthusiasm to post this asap I forgot to mention that for one this script allows you to copy and paste directly from e.g. nautilus. 🙂

But (what I as well forgot to mention):
Your folders and files will be RENAMED if either of those contains space(s)!!! If you don’t want that to happen then simply renaming your file(s), and if applicable your folder(s), before running this script should do the trick. 😉

## When copied from nautilus:
## From:
file:///your/file/at%20some%20where/with%20nasty%20spaces.ext
## To:
/your/file/at.some.where/with.nasty.spaces.ext
## When using tab completion in your shell.
## Type and, if exist, tab until completion.
## From:
/your/file/at\ some\ where/with\ nasty\ spaces.ext
## To:
/your/file/at.some.where/with.nasty.spaces.ext

You might just want to save the following few lines just below for posterity’s sake!? 😉 Why? Well… In order for the script posted on this page to work you’ll have to embrace the concept of linking!

## You might just want to save the following few lines just below for posterity's sake. ; - )
SCRIPT="$(basename "$0")"
for FILE in quote.o{ga,gg,gm} quote.flac quote.avi quote.m{p2,p3,p4,pe,peg,pg,kv} quote.w{mv,av};do ln -s -T "${SCRIPT}" "$(echo "${FILE}")";done
for FILE in scale.o{gg,gm} scale.flac scale.avi scale.m{p4,pe,peg,pg,kv} scale.wmv;do ln -s -T "${SCRIPT}" "$(echo "${FILE}")";done
for FILE in xtract.z.o{gg,gm} xtract.z.avi xtract.z.flv xtract.z.m{p4,pe,peg,pg,kv} xtract.z.wmv;do ln -s -T "${SCRIPT}" "$(echo "${FILE}")";done

Part 1. Its head.

#!/bin/bash
# Modified: Today by E.L.F.
#
## Licensed as:
## http://www.opensource.org/licenses/mit-license.php
#
## Script-name - skel.sh
#
set -e
if [ "$USER" = root ];then
  echo -e ${RED}"Are you Insane!"${NC}
  echo -e ${RED}"Error: In order to use this script, one must NOT be "$USER""${NC}
  echo -e ${YELLOW}"Exiting..."${NC}
  exit 0
else
  echo ""
  echo -e ${BLUE}"    "$USER" may proceed."${NC}
  echo -e ${CYAN}"    May peace be with you."${NC}
fi
clear
for COMMAND in mencoder ffmpeg oggenc cat
do COMMAND=$(which "$COMMAND")
if [ ! -x "$COMMAND" ];then RESULT=NO
echo -e ${YELLOW}"    Please install "${COMMAND}" first before continuing.${NC}
${CYAN}sudo apt-get install "$(basename "${COMMAND}")""${NC};fi
done
if [ "$RESULT" = NO ]; then echo -e ${BLUE}"See (for example):${NC}${YELLOW} http://ubuntuforums.org/showthread.php?t=766683${NC}${BLUE} for more info on the matter."${NC};exit 0;fi
## Variables for the 'scale' command.
date="$(date +"%A, %B %-d, %Y")"
copy=$(echo "Up to you.")
publisher=$(echo "Up to you.")
UPS_EXT=.mkv
HD=1280x720
PAL=720x576
_4CIF=704x576
## Variables for the 'quote' command.
## If 'START' is 'empty' then.
ZERO=00:00:00.000
## If 'END' is 'empty' then.
HALF=00:00:30.000
## Variables for the 'xtract.z' command.
## Print working directory.
PWD=$(pwd)
## Scriptname.
SCRIPT="$(basename "$0")"
## 'basename' of the script.
BASE="$(basename ${SCRIPT%.*})"
## Its 'extension'.
EXT="${SCRIPT/${BASE}/}"
## End variables!
## What would you have your 'arbiter' do.
for OPTION in "${BASE}";do OPTION="${OPTION}";done
for CHOICE in "${EXT}";do CHOICE="${CHOICE}";done
#  ## When no argument is given, print its usage.
  if [ "$BASE" = scale ];then USAGE=$(echo "Usage: "${SCRIPT}" yourfile"${EXT}" 4cif, pal, hd")
  elif [ "$BASE" = quote ];then USAGE=$(echo "Usage: "${SCRIPT}" yourfile"${EXT}" Start End (Either in whole seconds or HH:MM:SS.MSS)")
  else USAGE="Usage: "${SCRIPT}" yourfile"${EXT}"";fi
  if [ "$#" == "0" ];then echo -e ${YELLOW}"$USAGE"${NC};exit 0;fi

Part 2. Its body part 1.

case "$OPTION" in
"cat" | "create")
  if [ "$#" == 1 ];then OUTPUT="$1";OUTPUT+="${EXT}";else echo -n "Enter filename: ";read OUTPUT;OUTPUT+="${EXT}";fi
  echo "$OUTPUT"
  case "$OPTION" in
  "cat")
    case "$CHOICE" in
    ".avi" | ".vob" | ".wmv")
    # LS=$(ls *.{avi,mp{e,eg,g},wmv} 2>/dev/null)
    LS=$(ls *"${EXT}" 2>/dev/null)
    echo "$LS"
    mencoder -forceidx -oac copy -ovc copy $(ls *.avi | sort -n) -o "$OUTPUT"
    mv "$OUTPUT" ../"$OUTPUT"
    \rm *"${EXT}" 2>/dev/null
    mv ../"$OUTPUT" .
    ;;
    ".mpg")
    VAR="mpg-files.txt"
    ls *.mp{e,eg,g} 2>/dev/null | sort > $VAR
    cat $VAR | while read line; do
    INPUT=$(echo ${line})
    cat "$INPUT" >> "$OUTPUT"
    done
    \rm $VAR
    mv "$OUTPUT" ../"$OUTPUT"
    \rm *.mp{e,eg,g} 2>/dev/null
    mv ../"$OUTPUT" .
    ;;
    esac
  ;;
  "create")
    echo "#EXTM3U" > "$OUTPUT"
    find -iname '*.ogg' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.mp2' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.mp3' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.mp4' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.mpg' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.wma' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.flv' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.f4v' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.avi' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.mkv' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.wmv' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    ;;
  esac
;;

Part 3. Its body part 2 (Ah, IT has no tail :lol:).

"scale" | "quote" | "xtract.z")
  ## Does the filename contain spaces.
  URLENC=$(echo "$1" | sed -e "s_%20_\\ _g")
  if [ -n "${URLENC}" ];then DIR=${URLENC/file:\/\//};else DIR="${DIR}";fi
  ## If so, then move the file into a more 'workable' state.
  MOVED=$(echo "${DIR}" | sed -e "s_\\ _._g")
  if [ -f "${MOVED}" ];then DIR="${DIR}";else mv "${DIR}" "${MOVED}";DIR=${MOVED};fi
  ## Filename. <-- Everything is a 'file' or should I say 'object'.
  FILE=$(basename "${DIR}")
  ## Its 'basename'.
  BASEF=$(basename ${FILE%.*})
  ## Its 'extension'.
  EXTF="${FILE/${BASEF}/}"
  ## Name of out-file.
  OUTPUT=$(basename ${DIR%.*})
  ## Uh oh! 'Error' time.
  if [ ! -f "$DIR" ];then echo -e ${YELLOW}"    The file: "$DIR" doesn't exist!${NC}\n${RED}    Exiting...!!!"${NC}; exit 0;fi
  if [ ! "$EXT" = "$EXTF" ];then
  echo -e ${YELLOW}"  You made a typo!?${NC} ${CYAN}*auto-correcting*${NC}\n
  ${BLUE}From:${NC} ${YELLOW}"$SCRIPT" "${DIR}"${NC}\n
  ${BLUE}To:${NC} ${YELLOW}  "$BASE""$EXTF" "${DIR}""${NC}
  echo
  SCRIPT="$BASE""$EXTF"
  unset EXT
  EXT="${SCRIPT/${BASE}/}"
  sleep 1
  fi
  case "$OPTION" in
  "scale")
    if [ -f "$DIR" ];then
    if [ "$#" == "1" ];then DIR="$DIR";RES=pal;else
    for RES in "$2";do RES=${RES};done
    case "${RES}" in
      "4cif" )
      RES="$HD"
      ;;
      "pal" )
      RES="$PAL"
      ;;
      "pal" )
      RES="$_4CIF"
      ;;
      *)
      echo -e ${YELLOW}"    Please choose a valid option!"${NC}
      echo -e ${BLUE}"    "Usage:"${NC} ${CYAN}"$SCRIPT" "$DIR"${NC} |${CYAN}"4cif"${NC}|${CYAN}"pal"${NC}|${CYAN}"hd"${NC}|"
      exit 0
      ;;
    esac
    fi
    OUTPUT+="$UPS_EXT"
    ffmpeg -y -i "$DIR" \
    -acodec copy \
    -alang eng \
    -vlang eng \
    -metadata title=""$(basename "$OUTPUT" "$UPS_EXT")". ®" \
    -metadata artist=""$USER"" \
    -metadata date="$date" \
    -metadata publisher="$publisher" \
    -metadata copyright="$copy" \
    -vcodec libx264 -vpre lossless_ultrafast -crf 18 \
    -s "$RES" \
    "$OUTPUT"
    fi
  ;;
  "quote")
    if [ -f "$1" ];then
      if [ "$#" == "3" ];then START="$2" && DUR="$3"
      elif [ "$#" == "2" ];then START="${ZERO}" && DUR="$2"
      else [ "$#" == "1" ]
        echo -e ${BLUE}"\tEither in seconds or...,"${NC}
        echo -e ${BLUE}"\tHH:MM:SS.MSS or...,"${NC}
        echo -e ${BLUE}"\tPress enter for starts at 0."${NC}
        echo -en "\tEnter Start Position : "
        read START
        echo -e ${BLUE}"\tEither in seconds or...,"${NC}
        echo -e ${BLUE}"\tHH:MM:SS.MSS"${NC}
        echo -e ${BLUE}"\tPress enter for lasts 30 seconds."${NC}        
        echo -en "\tEnter Duration : "
        read DUR
      fi
      if [ -z "$START" ];then START="${ZERO}";fi
      if [ -z "$DUR" ];then DUR="${HALF}";fi
      for DIGITS in "$START" "$DUR";do
      if [[ "$DIGITS" =~ [^\ 0-9.,:]+ ]];then exit 0;fi
      done
      ## Arg "$2" NEEDS TO BE "QUOTED", e.g. "00 01 30.200"! But at least it works now. ; - )
      SPACE=$(echo "$START" | sed -e "s_\\ _:_g")
      if [ -n "$SPACE" ];then START="$SPACE"
      else start=${START%[ .,_-]*};end=${START/${start}[ .,_-]/}
        if [ "${start}" = "${end}" ];then end=000;else end="$end";fi
        START="$start"."$end"
      fi
      ## My num pad doesn't have a dot but uses comma instead.
      COMMA=$(echo "$START" | sed -e "s_,_._g")      
      if [ "$COMMA" = . ];then COMMA="${ZERO}";fi
      if [ -n "$COMMA" ];then START="$COMMA"
      else start=${START%[ .,_-]*};end=${START/${start}[ .,_-]/}
        if [ "${start}" = "${end}" ];then end=000;else end="$end";fi
        START="$start"."$end"
      fi
      SPACE=$(echo "$DUR" | sed -e "s_\\ _:_g")
      if [ -n "$SPACE" ];then DUR="$SPACE"
      else start=${DUR%[ .,_-]*};end=${DUR/${start}[ .,_-]/}
        if [ "${start}" = "${end}" ];then end=000;else end="$end";fi
        DUR="$start"."$end"
      fi
      COMMA=$(echo "$DUR" | sed -e "s_,_._g")
      if [ "$COMMA" = . ];then COMMA="${HALF}";fi      
      if [ -n "$COMMA" ];then DUR="$COMMA"
      else start=${DUR%[ .,_-]*};end=${DUR/${start}[ .,_-]/}
        if [ "${start}" = "${end}" ];then end=000;else end="$end";fi
        DUR="$start"."$end"
      fi
      echo -e ${YELLOW}""${START}""${NC}
      echo -e ${YELLOW}""${DUR}""${NC}      
    OUTPUT+=.quote"$EXT"
    if [ "$EXT" = .oga ] || [ "$EXT" = .ogg ] || [ "$EXT" = .flac ] || [ "$EXT" = .wav ] || [ "$EXT" = .mp3 ];then Choice=AUDIO;else Choice=VIDEO;fi
      case "$Choice" in
      "AUDIO")
      echo -e ${BLUE}"\tffmpeg -y -i "$1" -ss "${START}" -t "${DUR}" -acodec copy -vn "${OUTPUT}""${NC}
      ;;
      "VIDEO")
      echo -e ${BLUE}"\tmencoder -ss "${START}" -endpos "${DUR}" -oac copy -ovc copy "$1" -o "${OUTPUT}""${NC}
      ;;
      esac
    fi
  ;;
  "xtract.z")
    if [ -f "$DIR" ];then WD=ripped/"${BASEF}";OUTPUT=${PWD}"/"${WD}"/"${BASEF};[ ! -d "${WD}" ] && mkdir -p "${WD}"
    ffmpeg -y -threads 2 -i "${DIR}" -vn -acodec pcm_s16le -ac 2 "${WD}"/${BASEF}.wav
    ffmpeg -y -threads 2 -i "${WD}"/${BASEF}.wav -f mp3 -acodec libmp3lame -ac 2 -ab 320k "${WD}"/${BASEF}.mp3
    oggenc "${WD}"/${BASEF}.wav -q 9
    ffmpeg -y -threads 2 -i "${DIR}" -an -vcodec copy "${WD}"/${BASEF}.rip.avi
    fi
  ;;
  esac
;;
esac
exit 0

Part 4. Its “tail” (Well sort of. :lol:).

Questions, suggestions, bugs found!? Feel free to let me know at this address: http://wp.me/PNJrg-p. Will I answer? That depends entirely upon you. ; - ) If you found a flaw/bug and you want me to point you out for that on here, then just say so. Otherwise all other email will be processed confidentially.

The actual script live and for the taking.

#!/bin/bash
# Modified: Today by E.L.F.
#
## Licensed as:
## http://www.opensource.org/licenses/mit-license.php
#
## Script-name - skel.sh
#
set -e
if [ "$USER" = root ];then
  echo -e ${RED}"\tError:${CYAN} \""$USER"\"${YELLOW} isn't allowed to use this script!"${NC};exit 0
else
  echo -e ${BLUE}"\t"$USER" may proceed.\n\t${CYAN}May peace be with you."${NC}
  echo
fi
clear
if [ "$(basename "$0")" = skel.sh ];then
  echo -e "${YELLOW}\tIf the${CYAN} \"Van\"${YELLOW} is${CYAN} Rockin'
  ${YELLOW}\tThen Don't Come a${CYAN} Knockin'"${NC};exit 0
fi
for COMMAND in mencoder ffmpeg oggenc cat
do COMMAND=$(which "$COMMAND")
if [ ! -x "$COMMAND" ];then RESULT=NO
echo -e ${YELLOW}"\tPlease install "${COMMAND}" first before continuing.${NC}
${CYAN}\tsudo apt-get install "$(basename "${COMMAND}")""${NC};fi
done
if [ "$RESULT" = NO ]; then echo -e ${BLUE}"\tSee (for example):${YELLOW} http://ubuntuforums.org/showthread.php?t=766683${BLUE} for more info on the matter."${NC};exit 0;fi
## Variables for the 'scale' command.
date="$(date +"%A, %B %-d, %Y")"
copy=$(echo "Up to you.")
publisher=$(echo "Up to you.")
UPS_EXT=.mkv
HD=1280x720
PAL=720x576
_4CIF=704x576
## Variables for the 'quote' command.
## If 'START' is 'empty' then.
ZERO=00:00:00.000
## If 'END' is 'empty' then.
HALF=00:00:30.000
## Variables for the 'xtract.z' command.
## Print working directory.
PWD=$(pwd)
## Scriptname.
SCRIPT="$(basename "$0")"
## 'basename' of the script.
BASE="$(basename ${SCRIPT%.*})"
## Its 'extension'.
EXT="${SCRIPT/${BASE}/}"
## End variables!
## What would you have your 'arbiter' do.
for OPTION in "${BASE}";do OPTION="${OPTION}";done
for CHOICE in "${EXT}";do CHOICE="${CHOICE}";done
#  ## When no argument is given, print its usage.
  if [ "$BASE" = scale ];then USAGE=$(echo "Usage: "${SCRIPT}" yourfile"${EXT}" 4cif, pal, hd")
  elif [ "$BASE" = quote ];then USAGE=$(echo "Usage: "${SCRIPT}" yourfile"${EXT}" Start End (Either in whole seconds or HH:MM:SS.MSS)")
  elif [ "$BASE" = clean.up ];then USAGE=$(echo "Usage: "${SCRIPT}" yourfile"${EXT}" norm, clean, rev, flash")
  else USAGE="Usage: "${SCRIPT}" yourfile"${EXT}"";fi
  if [ "$#" == "0" ];then echo -e ${YELLOW}"$USAGE"${NC};exit 0;fi
case "$OPTION" in
"cat" | "create")
  if [ "$#" == 1 ];then OUTPUT="$1";OUTPUT+="${EXT}";else echo -en "Enter filename: ";read OUTPUT;OUTPUT+="${EXT}";fi
  echo "$OUTPUT"
  case "$OPTION" in
  "cat")
    case "$CHOICE" in
    ".avi" | ".vob" | ".wmv")
    # LS=$(ls *.{avi,mp{e,eg,g},wmv} 2>/dev/null)
    LS=$(ls *"${EXT}" 2>/dev/null)
    echo "$LS"
    mencoder -forceidx -oac copy -ovc copy $(ls *"$EXT" | sort -n) -o "$OUTPUT"
    mv "$OUTPUT" ../"$OUTPUT"
    \rm *"${EXT}" 2>/dev/null
    mv ../"$OUTPUT" .
    ;;
    ".mpg")
    VAR="mpg-files.txt"
    ls *.mp{e,eg,g} 2>/dev/null | sort > $VAR
    cat $VAR | while read line; do
    INPUT=$(echo ${line})
    cat "$INPUT" >> "$OUTPUT"
    done
    \rm $VAR
    mv "$OUTPUT" ../"$OUTPUT"
    \rm *.mp{e,eg,g} 2>/dev/null
    mv ../"$OUTPUT" .
    ;;
    esac
  ;;
  "create")
    echo "#EXTM3U" > "$OUTPUT"
    find -iname '*.ogg' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.mp2' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.mp3' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.mp4' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.mpg' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.wma' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.flv' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.f4v' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.avi' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.mkv' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    find -iname '*.wmv' -exec ls "{}" \; | sort -n >> "$OUTPUT"
    ;;
  esac
;;
"scale" | "quote" | "xtract.z")
  ## Does the filename contain spaces.
  URLENC=$(echo "$1" | sed -e "s_%20_\\ _g")
  if [ -n "${URLENC}" ];then DIR=${URLENC/file:\/\//};else DIR="${DIR}";fi
  ## If so, then move the file into a more 'workable' state.
  MOVED=$(echo "${DIR}" | sed -e "s_\\ _._g")
  if [ -f "${MOVED}" ];then DIR="${DIR}";else mv "${DIR}" "${MOVED}";DIR=${MOVED};fi
  ## Filename. <-- Everything is a 'file' or should I say 'object'.
  FILE=$(basename "${DIR}")
  ## Its 'basename'.
  BASEF=$(basename ${FILE%.*})
  ## Its 'extension'.
  EXTF="${FILE/${BASEF}/}"
  ## Name of out-file.
  OUTPUT=$(basename ${DIR%.*})
  ## Uh oh! 'Error' time.
  if [ ! -f "$DIR" ];then echo -e ${YELLOW}"\tThe file: "$DIR" doesn't exist!\n${RED}    Exiting...!!!"${NC}; exit 0;fi
  if [ ! "$EXT" = "$EXTF" ];then
  echo -e ${YELLOW}"\tYou made a typo!? ${CYAN}*auto-correcting*\n
  ${BLUE}\tFrom: ${YELLOW}"$SCRIPT" "${DIR}"\n
  ${BLUE}\tTo: ${YELLOW}  "$BASE""$EXTF" "${DIR}""${NC}
  echo
  SCRIPT="$BASE""$EXTF"
  unset EXT
  EXT="${SCRIPT/${BASE}/}"
  sleep 1
  fi
  case "$OPTION" in
  "scale")
    if [ -f "$DIR" ];then
    if [ "$#" == "1" ];then DIR="$DIR";RES=pal;else
    for RES in "$2";do RES=${RES};done
    case "${RES}" in
      "4cif" )
      RES="$HD"
      ;;
      "pal" )
      RES="$PAL"
      ;;
      "pal" )
      RES="$_4CIF"
      ;;
      *)
      echo -e ${YELLOW}"\tPlease choose a valid option!"${NC}
      echo -e ${BLUE}"\t"Usage:" ${CYAN}"$SCRIPT" "$DIR" |${CYAN}"4cif"|${CYAN}"pal"|${CYAN}"hd"${NC}|"
      exit 0
      ;;
    esac
    fi
    OUTPUT+="$UPS_EXT"
    ffmpeg -y -i "$DIR" \
    -acodec copy \
    -alang eng \
    -vlang eng \
    -metadata title=""$(basename "$OUTPUT" "$UPS_EXT")". ®" \
    -metadata artist=""$USER"" \
    -metadata date="$date" \
    -metadata publisher="$publisher" \
    -metadata copyright="$copy" \
    -vcodec libx264 -vpre lossless_ultrafast -crf 18 \
    -s "$RES" \
    "$OUTPUT"
    fi
  ;;
  "quote")
    if [ -f "$DIR" ];then
      if [ "$#" == "3" ];then START="$2" && DUR="$3"
      elif [ "$#" == "2" ];then START="${ZERO}" && DUR="$2"
      else [ "$#" == "1" ]
        echo -e ${BLUE}"\tEither in seconds or...,"${NC}
        echo -e ${BLUE}"\tHH:MM:SS.MSS or...,"${NC}
        echo -e ${BLUE}"\tPress enter for starts at 0."${NC}
        echo -en "\tEnter Start Position : "
        read START
        echo -e ${BLUE}"\tEither in seconds or...,"${NC}
        echo -e ${BLUE}"\tHH:MM:SS.MSS"${NC}
        echo -e ${BLUE}"\tPress enter for lasts 30 seconds."${NC}
        echo -en "\tEnter Duration : "
        read DUR
      fi
      if [ -z "$START" ];then START="${ZERO}";fi
      if [ -z "$DUR" ];then DUR="${HALF}";fi
      for DIGITS in "$START" "$DUR";do
      if [[ "$DIGITS" =~ [^\ 0-9.,:]+ ]];then exit 0;fi
      done
      ## Arg "$2" NEEDS TO BE "QUOTED", e.g. "00 01 30.200"! But at least it works now. ; - )
      SPACE=$(echo "$START" | sed -e "s_\\ _:_g")
      if [ -n "$SPACE" ];then START="$SPACE"
      else start=${START%[ .,_-]*};end=${START/${start}[ .,_-]/}
        if [ "${start}" = "${end}" ];then end=000;else end="$end";fi
        START="$start"."$end"
      fi
      ## My num pad doesn't have a dot but uses comma instead.
      COMMA=$(echo "$START" | sed -e "s_,_._g")
      if [ "$COMMA" = . ];then COMMA="${ZERO}";fi
      if [ -n "$COMMA" ];then START="$COMMA"
      else start=${START%[ .,_-]*};end=${START/${start}[ .,_-]/}
        if [ "${start}" = "${end}" ];then end=000;else end="$end";fi
        START="$start"."$end"
      fi
      SPACE=$(echo "$DUR" | sed -e "s_\\ _:_g")
      if [ -n "$SPACE" ];then DUR="$SPACE"
      else start=${DUR%[ .,_-]*};end=${DUR/${start}[ .,_-]/}
        if [ "${start}" = "${end}" ];then end=000;else end="$end";fi
        DUR="$start"."$end"
      fi
      COMMA=$(echo "$DUR" | sed -e "s_,_._g")
      if [ "$COMMA" = . ];then COMMA="${HALF}";fi
      if [ -n "$COMMA" ];then DUR="$COMMA"
      else start=${DUR%[ .,_-]*};end=${DUR/${start}[ .,_-]/}
        if [ "${start}" = "${end}" ];then end=000;else end="$end";fi
        DUR="$start"."$end"
      fi
    OUTPUT+=.quote"$EXT"
    if [ "$EXT" = .oga ] || [ "$EXT" = .ogg ] || [ "$EXT" = .flac ] || [ "$EXT" = .wav ] || [ "$EXT" = .mp3 ];then Choice=AUDIO;else Choice=VIDEO;fi
      case "$Choice" in
      "AUDIO")
      ffmpeg -y -i "${DIR}" -ss "${START}" -t "${DUR}" -acodec copy -vn "${OUTPUT}"
      ;;
      "VIDEO")
      mencoder -ss "${START}" -endpos "${DUR}" -oac copy -ovc copy "${DIR}" -o "${OUTPUT}"
      ;;
      esac
    fi
  "xtract.z")
    if [ -f "$DIR" ];then WD=ripped/"${BASEF}";OUTPUT=${PWD}"/"${WD}"/"${BASEF};[ ! -d "${WD}" ] && mkdir -p "${WD}"
    ffmpeg -y -threads 2 -i "${DIR}" -vn -acodec pcm_s16le -ac 2 "${WD}"/${BASEF}.wav
    ffmpeg -y -threads 2 -i "${WD}"/${BASEF}.wav -f mp3 -acodec libmp3lame -ac 2 -ab 320k "${WD}"/${BASEF}.mp3
    oggenc "${WD}"/${BASEF}.wav -q 9
    ffmpeg -y -threads 2 -i "${DIR}" -an -vcodec copy "${WD}"/${BASEF}.rip.avi
    fi
  ;;
  esac
;;
esac
exit 0