Are you a spammer

Please note, that the first 3 posts you make, will need to be approved by a forum Administrator or Moderator before they are publicly viewable.
Each application to join this forum is checked at the Stop Forum Spam website. If the email or IP address appears there when checked, you will not be allowed to join this forum.
If you get past this check and post spam on this forum, your posts will be immediately deleted and your account inactivated.You will then be banned and your IP will be submitted to your ISP, notifying them of your spamming. So your spam links will only be seen for an hour or two at most. In other words, don't waste your time and ours.

This forum is for the use and enjoyment of the members and visitors looking to learn about and share information regarding the topics listed. It is not a free-for-all advertising venue. Your time would be better spent pursuing legitimate avenues of promoting your websites.

Ultimate Edition - CLI Tools

Source code I have written openly published for your viewing pleasure.


Ultimate Edition - CLI Tools

Postby TheeMahn » Wed Apr 11, 2012 4:21 pm

There are many cli based tools that hide under the hood of Ultimate Edition. Probably beyond the scope of a single thread. I would like to share one such tool I am currently writing a simple bash script. My original intention of said script was to aid in the scanning of TV Shows / Movies for XBMC.

What this article assumes:
General knowledge of Samba and how to setup network shares.

Preamble: Please do not use this tool on your original files. Copy them to a separate folder.

This tool is probably the lightest tool, in the tm-tools package; actually maybe second lightest. The below is intended for an mid - advanced audience.

The Code:
Code: Select all
#!/bin/bash
###########################################################
##                      TheeMahn Rename Tool                   ##     
## Created by TheeMahn: <[email protected]>  ##
## Licensed under GNU GPL v3 or later, at your option.   ##
##       http://www.gnu.org/licenses/gpl.html            ##
###########################################################
#
# TMRename is a part of the tm-tools package.
# Many of the tools are heavy and are not
# intended to be ran by the common user. 
# The tools are typically geared for the admininstrator.
# please see man tmtools for more info.
#
# http://ultimateedition.info
VERSION="1.0-2"
id=0
# set colors so errors etc. stand out.

txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m'   # Black - Background
bakred='\e[41m'   # Red
badgrn='\e[42m'   # Green
bakylw='\e[43m'   # Yellow
bakblu='\e[44m'   # Blue
bakpur='\e[45m'   # Purple
bakcyn='\e[46m'   # Cyan
bakwht='\e[47m'   # White
txtrst='\e[0m'    # Text Reset
#Directory Manipulation
#======================

#Reset error count and set as integer.
declare -i ELINE
declare -i ERR
ERR=0
declare -i WARN
WARN=0
declare -i RR
RR=0
declare -i DLENGTH
DLENGTH=0
declare -i SUCCESS


function Dupes {
ls * > tmp.txt 2>/dev/null
cat tmp.txt | while read FILE
do
filename=$(basename $FILE)
extension=${filename##*.}
filename2=${filename%.*}
echo "Filename:" $filename
echo "EXT:" $extension
echo "Filename2:" $filename2
#Toss a little eyecandy
  echo -e -n "${txtwht}======================="
  RR=0; DLENGTH=`expr length $FILE`; while [ $RR -le $DLENGTH ]; do echo -n "="; RR=RR+1; done; echo;
  echo "Beginning extraction of "$FILE
  echo -n "======================="
  RR=0; DLENGTH=`expr length $FILE`; while [ $RR -le $DLENGTH ]; do echo -n "="; RR=RR+1; done; echo;
done
}


function Tag {
for FILE in *.{Avi,Mov,Mpeg,Mpg,Mkv,Mp4,M4v}
do
  DIR="${FILE%.*}"
echo "$DIR"
   if [[ "$DIR" != "*" ]]; then
      if [[ "$2" != "" ]]; then
         echo "Tag '$FILE' with '$DIR'"
      else
         echo "Tag '$FILE' with '$DIR'"
         #mkvpropedit Star.Wars-Episode.1.The.Phantom.Menace.1999.720p.Bluray.Mkv --edit info --set "title=Star.Wars-Episode.1.The.Phantom.Menace"

      fi
   fi
done
}

function Sort {
echo -e "${bldwht}TheeMahn's Rename - Sort function invoked.${txtwht}"
case $2 in
   -f ) FD='*.*';;
   -d ) FD="*/";;
   * ) echo 'Invalid option '$2;exit 0;;
esac
echo 'Pattern: '$FD
for FILE in $FD

do
       dirs="${FILE%.*}"
       name=`echo "$FILE"|sed 's/ -.*//'`
       letter=`echo "$name"|cut -c1`
   if [[ "$dirs" != "*" && "$dirs" != "*/" ]]; then
   id=$((id +1))
      dir="$letter/$dirs"
      if [[ "$3" == "-Y" ]]; then
         echo -e "${txtcyn}Making directory: "'"'"$dirs/"'"'"${bldred}"
         echo -e "${txtcyn}Moving: mv "'"'"$FILE"'"' '"'"$dirs/"'"'"${bldred}"
         mkdir -p "$dirs"
         `mv -f "$FILE" "$dirs/"`
      else
         echo -e "${txtcyn}mkdir "'"'"$dirs/"'"'"${bldred}"
         echo -e "${txtcyn}mv "'"'"$FILE"'"' '"'"$dirs/"'"'"${bldred}"
      fi
   fi
done
if [[ "$3" != "-Y" ]]; then
   echo -e "${txtgrn}Folder(s) / Files(s) to be effected: "$id
else
   echo -e "${txtgrn}Folder(s) / Files(s) have been effected: ${txtrst}"$id
fi
}

function Subs {
echo -e "${bldwht}TheeMahn's Rename - Sub directory function invoked.${txtwht}"
case $2 in
   -f ) FD='*.*';;
   -d ) FD="*/";;
   * ) echo -e "${bldred}Invalid option: "$2"${txtrst}";exit 0;;
esac
echo 'Pattern: '$FD
for FILE in $FD

do
echo $FILE
done
# Otherwise or the user answered yes.
cat tmp.txt | while read FILE
do
target=$(echo "$FILE" | sed -e "s/\///g")
FTR=$(find $FILE -type f -name '*')
EXT=$(echo "$FTR"|awk -F . '{print $NF}')
if [[ "$FTR" != "$FILE$target.$EXT" ]]; then
id=$((id +1))
   if [[ "$2" != "-Y" ]]; then
      echo 'mv "'$FTR'"' '"'$FILE$target.$EXT'"'
   else
      echo -e "${txtgrn}Moving:" mv '"'"$FTR"'"' '"'"$FILE$target.$EXT"'"'
      #`mv -f "$FTR" "$FILE$target.$EXT"`
   fi
fi
done
if [[ "$3" != "-Y" ]]; then
   echo -e "${txtgrn}Folder(s) / Files(s) to be effected: "$id
else
   echo -e "${txtgrn}Folder(s) / Files(s) have been effected: ${txtrst}"$id
fi
}

#File / Directory Manipulation
#=============================
function CustomAdd {
echo $1 $2 $3 $4
if [[ "$2" == "-f" ]]; then
   FD="*"
else
   FD="./*/"
fi
echo $4
case "$1" in
   -ab ) SS="s/^/${3}/";;
   -ae ) echo "Add to ending";;
   * ) exit 0;;
esac
if [[ "$3" == "" ]]; then
   exit 0

else

for dir in $FD;
do
SEDED=$(echo $dir | sed "s/${3}//g" | sed $SS)
   case "$dir" in
     * )  if [[ "$dir" != "$SEDED" ]]; then
   #:Set auto increment ID:#
   id=$((id +1))
   if [[ "$4" != "-Y" ]]; then
   echo -e "${txtwht}"mv '"'"$dir"'"' '"'"$SEDED"'"'
   else
   `mv -f "$dir" "$SEDED"`
   fi
   fi ;;
   esac
done
if [[ "$4" == "-Y" ]]; then
   echo -e "${txtgrn}Folder(s) / Files(s) to be effected: "$id
else
   echo -e "${txtgrn}Folder(s) / Files(s) have been effected: ${txtrst}"$id
fi
fi
}

function Custom {
echo $1 $2 $3
if [[ "$2" == "-f" ]]; then
   FD="*"
else
   FD="./*/"
fi

if [[ "$3" == "" ]]; then
   exit 0

else

for dir in $FD;
do
SEDED=$(echo $dir | sed "s/${3}//g")
   case "$dir" in
     * )  if [[ "$dir" != "$SEDED" ]]; then
   #:Set auto increment ID:#
   id=$((id +1))
   if [[ "$4" != "-Y" ]]; then
   echo -e "${txtwht}"mv '"'"$dir"'"' '"'"$SEDED"'"'
   else
   `mv -f "$dir" "$SEDED"`
   fi
   fi ;;
   esac
done
if [[ "$3" != "-Y" ]]; then
   echo -e "${txtgrn}Folder(s) / Files(s) to be effected: "$id
else
   echo -e "${txtgrn}Folder(s) / Files(s) have been effected: ${txtrst}"$id
fi
fi
}

function Process {
echo -e "${bldwht}TheeMahn's Rename - Process function invoked.${txtwht}"
if [[ "$1" == "-f" ]]; then
FD="*"
else
FD="./*/"
fi
if [[ "$2" == "" ]]; then
for dir in $FD;
do
if [[ "$1" == "-d" ]]; then
SEDED=$(echo $dir  | sed 's/\(.*\)/\L\1/' | sed 's/720p.*$/720p\//' | sed 's/\[\]//g' | sed 's/.Dual.Audio//i' | sed 's/BDRip/Bluray/i' | sed 's/\<./\U&/g' | sed 's/ /\./g' | sed 's/xvid//i' | sed 's/\[/\.\[/i' | sed 's/\[\]//g' | sed 's/.Dual.Audio//i' | sed 's/\.-//i' | sed 's/BDRip/Bluray/i' | sed 's/\<./\U&/g' | sed 's/_/\./g' | sed 's/\.\.\.*/\./i' | sed 's/\.\/$/\//' | sed 's/Dvdrip$/Dvdrip/g')
else
SEDED=$(echo $dir  | sed 's/\(.*\)/\L\1/' | sed 's/\[\]//g' | sed 's/.Dual.Audio//i' | sed 's/BDRip/Bluray/i' | sed 's/\<./\U&/g' | sed 's/ /\./g' | sed 's/xvid//i' | sed 's/\[/\.\[/i' | sed 's/\[\]//g' | sed 's/.Dual.Audio//i' | sed 's/\.-//i' | sed 's/BDRip/Bluray/i' | sed 's/\<./\U&/g' | sed 's/_/\./g' | sed 's/\.\.\.*/\./i' | sed 's/\.\/$/\//' | sed 's/Dvdrip$/Dvdrip/g')
fi
   case "$dir" in
     * )  if [[ "$dir" != "$SEDED" ]]; then
   #:Set auto increment ID:#
   id=$((id +1))
   echo -e "${txtwht}"mv '"'"$dir"'"' '"'"$SEDED"'"'
   fi ;;
   esac
#echo 'SEDED: '$SEDED

done
if [[ "$2" != "-Y" ]]; then
   echo -e "${txtgrn}Folder(s) / Files(s) to be effected: "$id
else
   echo -e "${txtgrn}Folder(s) / Files(s) have been effected: "$id
fi
else
for dir in $FD;
do
SEDED=$(echo $dir  | sed 's/\(.*\)/\L\1/' | sed 's/720p.*$/720p\//' | sed 's/\[\]//g' | sed 's/.Dual.Audio//i' | sed 's/BDRip/Bluray/i' | sed 's/\<./\U&/g' | sed 's/ /\./g' | sed 's/xvid//i' | sed 's/\[/\.\[/i' | sed 's/\[\]//g' | sed 's/.Dual.Audio//i' | sed 's/\.-//i' | sed 's/BDRip/Bluray/i' | sed 's/\<./\U&/g' | sed 's/_/\./g' | sed 's/\.\.\.*/\./i' | sed 's/\.\/$/\//' | sed 's/Dvdrip$/Dvdrip/g')
   case "$dir" in
     * )  if [[ "$dir" != "$SEDED" ]]; then
   #:Set auto increment ID:#
   id=$((id +1))
   echo -e "${txtgrn}Moving:" mv '"'"$dir"'"' '"'"$SEDED"'"'
   `mv -f "$dir" "$SEDED"`
   #`mv '"$dir"' '"$SEDED"'`

   fi ;;
   esac
#echo 'SEDED: '$SEDED

done
if [[ "$2" != "-Y" ]]; then
   echo -e "${txtgrn}Folder(s) / Files(s) to be effected: "$id
else
   echo -e "${txtgrn}Folder(s) / Files(s) have been effected: ${txtrst}"$id
fi
fi
}
#sed 's/\[^\]*//g'
#Lowercase
#sed 's/\(.*\)/\L\1/'
#Cap firstletter
#sed 's/\<./\U&/g'
#Slew
#sed 's/\.\.*/./g' | sed 's/\[/\.\[/i' | sed 's/\[\]//g' | sed 's/.Dual.Audio//i' | sed 's/\.-//i' | sed 's/BDRip/Bluray/i' | sed 's/\<./\U&/g'
#Strip periods
#sed 's/\.\.\.*//i'
#Last period
#sed 's/\.\/$/\//'
function Help {
   echo -e "${txtwht}

TMRename $VERSION
==============

TMRename is a part of the tm-tools package.  Many of the tools are heavy and are not
intended to be ran by the common user.  The tools are geared for the admininstrator.
please see man tmtools for more info.

tmrename -<COMMAND> <[option] [file/folder]> [option] [option]

   possible commands...
   -v   --version      dump version info
   -f   --files         Renames file(s)
   -s   --sort         Makes folder abc etc based on filename(s) and moves them
   -S   --sub-directory      Renames folders as file in subdirectory.
   -t   --tag         Tag file to embed info as filename implies.
   -ab   --add-begining      Add a custom field to begining of filename
   -ae   --add-ending      Add a custom field to the end of filename prior to extention.
   -c   --custom      This is the heaviest command you can implement please read the manual.
   -d   --directories      Process directories instead of files.
   -D   --dupes         Scan for duplicate files.
   -Y   --YES         Danger Will Robinson... when used will implement all changes displayed.
   -h   --help         this help message

   Useage files;
   tmrename -f

   Will process all files with default settings.
   Showing output of commands to be preformed. Adding -Y as
   a secondary switch or fourth switch in custom will
   preform the actions for you, please use ${bldred}CAUTION${txtwht}, review before
   implementing this switch.

   Useage Help;
   tmrename -h

   Displays this message. For futher information please refer to the manpages. 

   man tmrename
   "
   echo -e "${txtgrn}"
   echo -e "Example 1: tmrename -f"
   echo -e "${txtwht}Will scan all file(s) and output commands to be preformed to renaame
   the file(s) unix friendly."

   echo -e "${txtgrn}"
   echo -e "Example 2: tmrename -f Indiana.Jones.1.1981.Raiders.Of.The.Lost.Ark.Mkv"
   echo -e "${txtwht}Will make a folder called Indiana.Jones.1.1981.Raiders.Of.The.Lost.Ark and move the file into that folder."
   echo -e "${txtgrn}"
   echo -e "Example 3: tmrename -s -f"
   echo -e "${txtwht}Will scan all file(s) in current folder and copy pasteably show the commands to create the folder and move appropriatley.
   A -Y after will do all for you as said above please use ${bldred}CAUTION${txtwht}."
echo "
GNU tmrename home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word tmrename somewhere in the Subject: field."
   exit 0
}

function Version {
echo "TMRename $VERSION
==============
GNU repomaster home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word repomaster somewhere in the Subject: field."
}

    case "$1" in
      -h|--help|-\?) Help; exit 0;;
      -v|--version) Version; exit 0;;
      -f|--files) Process $1 $2; exit 0;;
      -d|--directories) Process $1 $2; exit 0;;
      -c|--custom) Custom $1 $2 $3 $4; exit 0;;
      -ab|--add-begining) CustomAdd $1 $2 $3 $4; exit 0;;
      -D|--dupes) Dupes $1 $2; exit 0;;
      -ae|--add-ending) CustomAdd $1 $2 $3 $4; exit 0;;
      -t|--tag) Tag $1 $2; exit 0;;
      -s|--sort) Sort $1 $2 $3; exit 0;;
      -S|--sub-directories) Subs $1 $2 $3; exit 0;;
      *) Help; exit 0;;
    esac

The above is far from done, but work in progress please note #comments.

The tool itself was Debianized using Repomaster a component of what will be in the tm-tools package:
theemahn@JackHammer:~$ repomaster -b tm-rename-1.0.2_all
Repomaster 1.7.0-3 is begining initial build.
First build or no previous errors.

=======================================
Beginning build of tm-rename-1.0.2_all
=======================================

Relaxing permissions of tm-rename-1.0.2_all
[sudo] password for theemahn:
Cleaning up any tmp or backup files.
Setting individual file permissions to 644.
No /etc/ so need to build conffiles.
Scanning for executables in tm-rename-1.0.2_all Stage 1.
tm-rename-1.0.2_all/bin/tmrename
Scanning for executables in tm-rename-1.0.2_all Stage 2.
Calculating Installed size & inserting into control file if necessary.
tm-rename-1.0.2_all is 56. Control file reporting: 24
Size Mismatch, replacing with 56.
Calculating MD5SUMS in tm-rename-1.0.2_all
Setting ownership to root in tm-rename-1.0.2_all
Setting individual folder permissions to 755.
Setting permissions rights for control etc.
Building of tm-rename-1.0.2_all
dpkg-deb: building package `tm-rename' in `tm-rename-1.0.2_all.deb'.
Lintian resulting package tm-rename-1.0.2_all.deb.

We have built a totally perfect deb.
Recursively removing tm-rename-1.0.2_all since we have a perfect deb.
Moving tm-rename-1.0.2_all.deb to .debs/
We have had 100% error warning free deb(s) built this session.
theemahn@JackHammer:~$


Resulting deb:
tm-rename-1.0.2_all.deb
tm-rename Tool Debianized.
(6.12 KiB) Downloaded 288 times

As a script:
tmrename.sh
as a script
(11.43 KiB) Downloaded 274 times


The deb has a man page initially & automatically generated via repomaster as same the changelog (creates a generic man & changelog).
I don't mean to break away from the scope of this thread, but I have many tools coming your way:
theemahn@JackHammer:~$ ls /media/Storage/tm-toolz-1.0-2/bin/
copycover-offline coverlovin custom_icon custom-icons id3reader repomaster scanpackages tmrename
theemahn@JackHammer:~$


Enuff already lets learn about the program ;)

Why all the trouble / re-create the wheel??
I have setup a laptop (called clawhammer on the network) in the living room dropped in a SSD, installed Ultimate Edition 3.2 and hooked it to a 3D HD LED TV. I have played with XBMC & have probably a million streams to said such TV (will never pay for cable tv again - on demand & commercial free), however when scanning to add for example two and a half men from the JackHammer my main PC, failes miserably. Yes, I know there are many tools to aid in such functions, they also fail if you for example re-install (they do not physically rename files & the ones I see that did are very complicated).

Oh yeah, I have downloaded a tool to my droid to allow me to control the laptop with my droid.
0405122201.jpg
Also available in the market search "XBMC"


What is XBMC looking for at smb://JackHammer/TV/Two.And.A.Half.Men/ ???

XBMC uses "scrapers" a regx expression in xml format to compare / attempt to determine what it is viewing. Connects to a database online to "fill in the blanks". Generates .nfo files for said content in ~/.xbmc.... But what if it does know what the content is? I typically get Formula 1 Season etc. Why? My file names are not compliant, with the database. This tool steps in and fixes it for good and on a heavily level. I can tell it to add my TV folder and it adds every season / show it finds even on a fresh install of Ultimate Edition 3.2 & it finds 100%. So once again the question resounds. What is it looking for?
Code: Select all
theemahn@JackHammer:/media/Storage/TV$ ls -R Two.and.a.Half.Men/
Two.and.a.Half.Men/:
Extras  Season 01  Season 02  Season 03  Season 04  Season 05  Season 06  Season 07  Season 08  Season 09  Two and a Half Men Icon.ico

Two.and.a.Half.Men/Extras:
Two.And.A.Half.Men.Extra.01.Enrique.Backstage.Mp4
Two.And.A.Half.Men.Extra.02.Jake'S.A.Regular.Kid.Mp4
Two.And.A.Half.Men.Extra.03.Jennifer.Taylor.On.Charlie.Sheen,.Jon.Cryer.Marriage.Problems.Mp4
Two.And.A.Half.Men.Extra.04.Jon.Cryer.Wins.An.Emmy.For.Two.And.A.Half.Men.At.The.2009.Primetime.Emmy.Awards.Mp4
Two.And.A.Half.Men.Extra.05.Behind.The.Scenes.Mp4
Two.And.A.Half.Men.Extra.05.Finding.Angus.Mp4
Two.And.A.Half.Men.Extra.06.Getting.Charlie.Sheen.Mp4
Two.And.A.Half.Men.Extra.07.Jennifer.Taylor.Mp4
Two.And.A.Half.Men.Extra.08.Jon'S.Advice.To.Charlie.Mp4
Two.And.A.Half.Men.Extra.09.Mama'S.Boys.Mp4
Two.And.A.Half.Men.Extra.10.Marin.Hinkle.Mp4
Two.And.A.Half.Men.Extra.11.Two.And.A.Half.Men.And.Csi.-.Behind.The.Scenes.Cross.Over.Mp4
Two.And.A.Half.Men.Extra.12.Two.And.A.Half.Men.And.Csi.-.Behind.The.Scenes.Cross.Over.2.Mp4
Two.And.A.Half.Men.Extra.13.Bloopers.Season.01.Mp4
Two.And.A.Half.Men.Extra.14.Bloopers.Season.02.Mp4
Two.And.A.Half.Men.Extra.15.Bloopers.Season.03.Mp4
Two.And.A.Half.Men.Extra.16.Bloopers.Season.04.Mp4
Two.And.A.Half.Men.Extra.17.Bloopers.Season.06.Mp4
Two.And.A.Half.Men.Extra.18.Bloopers.Season.07.Mp4

Two.and.a.Half.Men/Season 01:
S01E01.Pilot.-.Most.Chicks.Wont.Eat.Veal.Avi                            S01E13.Sarah.Like.Puny.Alan.Avi
S01E02.Big.Flappy.Bastards.Avi                                          S01E14.I.Can'T.Afford.Hyenas.Avi
S01E03.Go.East.On.Sunset.Until.You.Reach.The.Gates.Of.Hell.Avi          S01E15.Round.One.To.The.Hot.Crazy.Chick.Avi
S01E04.If.I.Can'T.Write.My.Chocolate.Song,.I'M.Going.To.Take.A.Nap.Avi  S01E16.That.Was.Saliva,.Alan.Avi
S01E05.The.Last.Thing.You.Want.To.Do.Is.Wind.Up.With.A.Hump.Avi         S01E17.Ate.The.Hamburgers,.Wearing.The.Hats.Avi
S01E06.Did.You.Check.With.The.Captain.Of.The.Flying.Monkeys.Avi         S01E18.An.Old.Flame.With.A.New.Wick.Avi
S01E07.If.They.Do.Go.Either.Way,.They'Re.Usually.Fake.Avi               S01E19.I.Remember.The.Coatroom,.I.Just.Don'T.Remember.You.Avi
S01E08.Twenty-Five.Little.Pre-Pubers.Without.A.Snoot-Ful.Avi            S01E20.Hey,.I.Can.Pee.Outside.In.The.Dark.Avi
S01E09.Phase.One,.Complete.Avi                                          S01E21.No.Sniffing,.No.Wowing.Avi
S01E10.Merry.Thanksgiving.Avi                                           S01E22.My.Doctor.Has.A.Cow.Puppet.Avi
S01E11.Alan.Harper,.Frontier.Chiropractor.Avi                           S01E23.Just.Like.Buffalo.Avi
S01E12.Camel.Filters.And.Pheromones.Avi                                 S01E24.Can.You.Feel.My.Finger.Avi

Two.and.a.Half.Men/Season 02:
Episode.17.Woo-Hoo,.A.Hernia.Exam!.Avi                     S02E12.A.Lungful.Of.Alan.Avi
S02E01.Back.Off,.Mary.Poppins.Avi                          S02E13.Zejdz.Z.Moich.Wlosów.(Get.Off.My.Hair).Avi
S02E02.Enjoy.Those.Garlic.Balls.Avi                        S02E14.Those.Big.Pink.Things.With.Coconut.Avi
S02E03.A.Bag.Full.Of.Jawea.Avi                             S02E15.Smell.The.Umbrella.Stand.Avi
S02E04.Go.Get.Mommy'S.Bra.Avi                              S02E16.Can.You.Eat.Human.Flesh.With.Wooden.Teeth.Avi
S02E05.Bad.News.From.The.Clinic.Avi                        S02E18.It.Was.'Mame,'.Mom.Avi
S02E06.The.Price.Of.Healthy.Gums.Is.Eternal.Vigilance.Avi  S02E19.A.Low,.Guttural.Tongue-Flapping.Noise.Avi
S02E07.A.Kosher.Slaughterhouse.Out.In.Fontana.Avi          S02E20.I.Always.Wanted.A.Shaved.Monkey.Avi
S02E08.Frankenstein.And.The.Horny.Villagers.Avi            S02E21.A.Sympathetic.Crotch.To.Cry.On.Avi
S02E09.Yes,.Monsignor.Avi                                  S02E22.That.Old.Hose.Bag.Is.My.Mother.Avi
S02E10.The.Salmon.Under.My.Sweater.Avi                     S02E23.Squab,.Squab,.Squab,.Squab,.Squab.Avi
S02E11.Last.Chance.To.See.Those.Tattoos.Avi                S02E24.Does.This.Smell.Funny.To.You.Avi

Two.and.a.Half.Men/Season 03:
S03E01.Weekend.In.Bangkok.With.Two.Olympic.Gymnasts.Avi  S03E09.Madame.And.Her.Special.Friend.Avi    S03E17.The.Unfortunate.Little.Schnauser.Avi
S03E02.Principal.Gallagher'S.Lesbian.Lover.Avi           S03E10.Something.Salted.And.Twisted.Avi     S03E18.The.Spit-Covered.Cobbler.Avi
S03E03.Carpet.Burns.And.A.Bite.Mark.Avi                  S03E11.Santa'S.Village.Of.The.Damned.Avi    S03E19.Golly.Moses,.She'S.A.Muffin.Avi
S03E04.Your.Dismissive.Attitude.Toward.Boobs.Avi         S03E12.That.Special.Tug.Avi                 S03E20.Always.A.Bridesmaid,.Never.A.Burro.Avi
S03E05.We.Called.It.Mr.Pinky.Avi                         S03E13.Humiliation.Is.A.Visual.Medium.Avi   S03E21.And.The.Plot.Moistens.Avi
S03E06.Hi,.Mr.Horned.One.Avi                             S03E14.Love.Isn'T.Blind,.It'S.Retarded.Avi  S03E22.Just.Once.With.Aunt.Sophie.Avi
S03E07.Sleep.Tight,.Puddin'.Pop.Avi                      S03E15.My.Tongue.Is.Meat.Avi                S03E23.Arguments.For.The.Quickie.Avi
S03E08.That.Voodoo.That.I.Do.Do.Avi                      S03E16.Ergo,.The.Booty.Call.Avi             S03E24.That.Pistol-Packin'.Hermaphrodite.Avi

Two.and.a.Half.Men/Season 04:
S04E01.Working.For.Caligula.Avi                 S04E09.Corey'S.Been.Dead.For.An.Hour.Avi      S04E17.I.Merely.Slept.With.A.Commie.Avi
S04E02.Who'S.Vod.Kanockers.Avi                  S04E10.Kissing.Abe.Lincoln.Avi                S04E18.It.Never.Rains.In.Hooterville.Avi
S04E03.The.Sea.Is.A.Harsh.Mistress.Avi          S04E11.Walnuts.And.Demerol.Avi                S04E19.Smooth.As.A.Ken.Doll.Avi
S04E04.A.Pot.Smoking.Monkey.Avi                 S04E12.Castrating.Sheep.In.Montana.Avi        S04E20.Aunt.Myra.Doesn'T.Pee.A.Lot.Avi
S04E05.A.Live.Woman.Of.Proven.Fertility.Avi     S04E13.Don'T.Worry,.Speed.Racer.Avi           S04E21.Tucked,.Taped.And.Gorgeous.Avi
S04E06.Apologies.For.The.Frivolity.Avi          S04E14.That'S.Summer.Sausage,.Not.Salami.Avi  S04E22.Mr.Mcglue'S.Feedbag.Avi
S04E07.Repeated.Blows.To.His.Unformed.Head.Avi  S04E15.My.Damn.Stalker.Avi                    S04E23.Anteaters.They'Re.Just.Crazy-Lookin'.Avi
S04E08.Release.The.Dogs.Avi                     S04E16.Young.People.Have.Phlegm.Too.Avi       S04E24.Prostitutes.And.Gelato.Avi

Two.and.a.Half.Men/Season 05:
S05E01.Large.Birds,.Spiders.And.Mom.Avi           S05E08.Is.There.A.Mrs.Waffles.Avi              S05E15.Rough.Night.In.Hump.Junction.Avi
S05E02.Media.Room.Slash.Dungeon.Avi               S05E09.Tight'S.Good.Avi                        S05E16.Look.At.Me,.Mommy,.I'M.Pretty.Avi
S05E03.Dum.Diddy.Dum.Diddy.Doo.Avi                S05E10.Kinda.Like.Necrophilia.Avi              S05E17.Fish.In.A.Drawer.Avi
S05E04.City.Of.Great.Racks.Avi                    S05E11.Meander.To.Your.Dander.Avi              S05E18.If.My.Hole.Could.Talk.Avi
S05E05.Putting.Swim.Fins.On.A.Cat.Avi             S05E12.A.Little.Clammy.And.None.Too.Fresh.Avi  S05E19.Waiting.For.The.Right.Snapper.Avi
S05E06.Help.Daddy.Find.His.Toenail.Avi            S05E13.The.Soil.Is.Moist.Avi
S05E07.Our.Leather.Gear.Is.In.The.Guest.Room.Avi  S05E14.Winky-Dink.Time.Avi

Two.and.a.Half.Men/Season 06:
S06E01.Taterhead.Is.Our.Love.Child.Avi  S06E09.The.Mooch.At.The.Boo.Avi                   S06E17.The.'Ocu'.Or.The.'Pado'.Avi
S06E02.Pie.Hole,.Herb.Avi               S06E10.He.Smelled.The.Ham,.He.Got.Excited.Avi     S06E18.My.Son'S.Enormous.Head.Avi
S06E03.Damn.You,.Eggs.Benedict.Avi      S06E11.The.Devil'S.Lube.Avi                       S06E19.The.Two.Finger.Rule.Avi
S06E04.The.Flavin'.And.The.Mavin.Avi    S06E12.Thank.God.For.Scoliosis.Avi                S06E20.Hello,.I.Am.Alan.Cousteau.Avi
S06E05.A.Jock.Strap.In.Hell.Avi         S06E13.I.Think.You.Offended.Don.Avi               S06E21.Above.Exalted.Cyclops.Avi
S06E06.It'S.Always.Nazi.Week.Avi        S06E14.David.Copperfield.Slipped.Me.A.Roofie.Avi  S06E22.Sir.Lancelot'S.Litter.Box.Avi
S06E07.Best.H.O.Money.Can.Buy.Avi       S06E15.I'D.Like.To.Start.With.The.Cat.Avi         S06E23.Good.Morning,.Mrs.Butterworth.Avi
S06E08.Pinocchio'S.Mouth.Avi            S06E16.She'Ll.Still.Be.Dead.At.Halftime.Avi       S06E24.Baseball.Was.Better.With.Steroids.Avi

Two.and.a.Half.Men/Season 07:
S07E01.818-Jklpuzo.Avi                         S07E09.Captain.Terry'S.Spray-On.Hair.Avi      S07E17.I.Found.Your.Moustache.Avi
S07E02.Whipped.Unto.The.Third.Generation.Avi   S07E10.That'S.Why.They.Call.It.Ball.Room.Avi  S07E18.Ixnay.On.The.Oggie.Day.Avi
S07E03.Mmm,.Fish.Yum..Avi                      S07E11.Warning,.It'S.Dirty.Avi                S07E19.Keith.Moon.Is.Vomiting.In.His.Grave.Avi
S07E04.Laxative.Tester,.Horse.Inseminator.Avi  S07E12.Fart.Jokes,.Pie.And.Celeste.Avi        S07E20.I.Called.Him.Magoo.Avi
S07E05.For.The.Sake.Of.The.Child.Avi           S07E13.Yay,.No.Polyps.Avi                     S07E21.Gumby.With.A.Pokey.Avi
S07E06.Give.Me.Your.Thumb.Avi                  S07E14.Crude.And.Uncalled.For.Avi             S07E22.This.Is.Not.Gonna.End.Well.Avi
S07E07.Untainted.By.Filth.Avi                  S07E15.Aye,.Aye,.Captain.Douche.Avi
S07E08.Gorp.Fnark..Schmegle..Avi               S07E16.Tinkle.Like.A.Princess.Avi

Two.and.a.Half.Men/Season 08:
S08E01.Three.Girls.And.A.Guy.Named.Bud.Avi    S08E07.The.Crazy.Bitch.Gazette.Avi                S08E13.Skunk,.Dog,.Crap.And.Ketchup.Avi
S08E02.A.Bottle.Of.Wine.And.A.Jackhammer.Avi  S08E08.Springtime.On.A.Stick.Avi                  S08E14.Lookin'.For.Japanese.Subs.Avi
S08E03.A.Pudding-Filled.Cactus.Avi            S08E09.A.Good.Time.In.Central.Africa.Avi          S08E15.Three.Hookers.And.A.Philly.Cheesesteak.Avi
S08E04.Hookers,.Hookers,.Hookers.Avi          S08E10.Ow,.Ow,.Don'T.Stop.Avi                     S08E16.That.Darn.Priest.Avi
S08E05.The.Immortal.Mr.Billy.Joel.Avi         S08E11.Dead.From.The.Waist.Down.Avi
S08E06.Twanging.Your.Magic.Clanger.Avi        S08E12.Chocolate.Diddlers.Or.My.Puppy'S.Dead.Avi

Two.and.a.Half.Men/Season 09:
S09E01.Nice.To.Meet.You,.Walden.Schmidt.Avi  S09E08.Thank.You.For.The.Intercourse.Avi     S09E15.The.Duchess.Of.Dull-In-Sack.Avi
S09E02.People.Who.Love.Peepholes.Avi         S09E09.Frodo'S.Headshots.Avi                 S09E16.Sips,.Sonnets.And.Sodomy.Avi
S09E03.Big.Girls.Don'T.Throw.Food.Avi        S09E10.Fishbowl.Full.Of.Glass.Eyes.Avi       S09E17.Not.In.My.Mouth.Avi
S09E04.Nine.Magic.Fingers.Avi                S09E11.A.Lovely.Landing.Strip.Avi            S09E18.He.War.Against.Gingivitis.Mp4
S09E05.A.Giant.Cat.Holding.A.Churro.Avi      S09E12.One.False.Move,.Zimbabwe.Avi          S09E19.Palmdale,.Ech.Mp4
S09E06.The.Squat.And.The.Hover.Avi           S09E13.Slowly.And.In.A.Circular.Fashion.Avi  S09E20.Grandmas.Pie.On.The.Line.Mp4
S09E07.Those.Fancy.Japanese.Toilets.Avi      S09E14.A.Possum.On.Chemo.Avi
theemahn@JackHammer:/media/Storage/TV$


Naming convention means everything. Sorry for the delay let's begin in a terminal:
Code: Select all
tmrename

TMRename 1.0-2
==============

TMRename is a part of the tm-tools package. Many of the tools are heavy and are not
intended to be ran by the common user. The tools are geared for the adininstrator.
please see man tmtools for more info.

tmrename -<COMMAND> <[option] [file/folder]> [option] [option]

possible commands...
-v --version dump version info
-f --files Renames file(s)
-s --sort Makes folder abc etc based on filename(s) and moves them
-S --sub-directory Renames folders as file in subdirectory.
-t --tag Tag file to embed info as filename implies.
-ab --add-begining Add a custom field to begining of filename
-ae --add-ending Add a custom field to the end of filename prior to extention.
-c --custom This is the heaviest command you can implement please read the manual.
-d --directories Process directories instead of files.
-D --dupes Scan for duplicate files.
-Y --YES Danger Will Robinson... when used will implement all changes displayed.
-h --help this help message

Useage files;
tmrename -f

Will process all files with default settings.
Showing output of commands to be preformed. Adding -Y as
a secondary switch or fourth switch in custom will
preform the actions for you, please use CAUTION, review before
implementing this switch.

Useage Help;
tmrename -h

Displays this message. For futher information please refer to the manpages.

man tmrename


Example 1: tmrename -f
Will scan all file(s) and output commands to be preformed to renaame
the file(s) unix friendly.

Example 2: tmrename -f Indiana.Jones.1.1981.Raiders.Of.The.Lost.Ark.Mkv
Will make a folder called Indiana.Jones.1.1981.Raiders.Of.The.Lost.Ark and move the file into that folder.

Example 3: tmrename -s -f
Will scan all file(s) in current folder and copy pasteably show the commands to create the folder and move appropriatley.
A -Y after will do all for you as said above please use CAUTION.

GNU tmrename home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word tmrename somewhere in the Subject: field.
theemahn@JackHammer:/media/Storage/TV$


The main thing it is looking for be it Two.And.Half.Men or be it two and a half men is not the Season 1 folder or Season.1 folder, but the file name S01E06 for example, you can with this tool strip all occurrence of anything from the beginning of a file or anywhere within the file. Droppping any of it's switches will not modify the file at all only show you the commands to be preformed.

-Y --YES Danger Will Robinson... when used will implement all changes displayed.


The above is the exception ;)

Please feel free to provide feedback. It does way beyond this initial posts's scope, I however do not want people to be mad at me when it trashes files because:
Preamble: Please do not use this tool on your original files. Copy them to a separate folder.


I have used this tool on Terabytes of files in a single rip & at least felt the need to share, your mileage may vary.

Music vids to show up in 3.2 / Eden? I have applied for a API key from yahoo & have began coding ;) I love nothing more then "Things to just work". Please never question me, I have a job and I see it before anyone else. Cocky or Honesty?

Additional switches are in the works to be implemented:
work.png

Desktop.tar.gz
I rolled through over 3000 vids, you will not have this until it is perfect.
(11.54 MiB) Downloaded 273 times

Sort the files in the archive by date if you want to see, what it will do. You do know movies will be no exception. Well I guess will be, if I do not have a result turned for your movie, etc. Will generate the info.
TheeMahn,
Attachments
gui.png
You do know, GUI implementation is only a step away.
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: MASSIVE on the network.(10 Gigabit, 48 port, multiple servers)
Monitors: Dual 4K 43" LG, 4K Samsung 28"
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers

Servers in the basement.
User avatar
TheeMahn
Site Admin
 
Posts: 4201
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 53
Operating System: Ultimate Edition Developer



Re: Ultimate Edition - CLI Tools

Postby synrgy87 » Thu Apr 12, 2012 8:49 am

using mobile / cell phone for controlling pc / laptop is good idea, used to use my old sony ericsson k750i and k800i for that but that was a long time ago in a windows pc far far away
Gigabyte GA-890GPA-UD3H
AMD Phenom II X6 1090T
8GB (2x4gb) Kingston HyperX DDR1600

160GB Hitachi deskstar(os and boot) 1TB deskstar(data) 1TB WD USB drive(backup+)
2x XFX ATI 5830 1024mb in crossfire
Saitek Eclipse keyboard + Saitek Cyborg V3 mouse + Thrustmaster T.Flight HotasX

Acer 23" HDTV/monitor + AOC 21"
Xigmatek Midgard Case.
multibooting all sorts + Ultimate Edition 3.5 / BlackOpal64 / windies 7 home premium 64bit
User avatar
synrgy87
U.E. Graduate
U.E. Graduate
 
Posts: 81
Joined: Thu Jan 19, 2012 11:42 am
Location: Belfast, Ireland
Age: 37
Operating System: Ultimate Edition 3.5 64 BIT



Re: Ultimate Edition - CLI Tools

Postby tanmay.01 » Thu Apr 12, 2012 9:13 am

" Allow me to introduce my self. I am the l the leading developer of Ultimate Edition Linux. A programmer of 30 years. I have been writing software that complements XBMC quite well.I am a huge fan of XBMC and have been including it in every version of Ultimate Edition I have been developing. That being said I am a fairly avid user of XBMC. The tools I have been developing, tmrename being one of them has saved me countless hours taking the time to rename file by file to comply with databases such as tvdb etc. Let's get on it already "

This is what i read the other day on xbmc forum and i was confused that was it orignal Thee Mahn because i have used Ultimate Edition 2.3, 2.5, 2.8, 2.9, 3.0, 3.01 but never seen xbmc pre installed in it and infact i wrote in a post earlier that xbmc was the only thing i was missing by default in U.E .... So i would like someone to clarify this for me..

UPDATE : Here is the link to that post ..http://forum.xbmc.org/showthread.php?tid=128342
Last edited by tanmay.01 on Thu Apr 12, 2012 10:29 am, edited 1 time in total.
HP ENVY 15
•3rd generation Intel(R) Core(TheeMahn) i5-3210M Processor (2.5 GHz with Turbo Boost up to 3.1 GHz)
• 1GB Radeon(TheeMahn) HD 7750M GDDR5 Graphics [HDMI]
• 6GB 1600DDR3 System Memory (2 Dimm)
• 750GB 7200 rpm Hard Drive
• Intel 2x2 802.11a/b/g/n WLAN + Bluetooth(R)
• Full-size Radiance backlit keyboard.

Image
User avatar
tanmay.01
Moderator
 
Posts: 253
Joined: Wed Dec 07, 2011 1:03 pm
Location: India
Age: 33
Operating System: Other Linux



Re: Ultimate Edition - CLI Tools

Postby billhedrick » Thu Apr 12, 2012 9:30 am

yea, that doesn't sound like Thee, also did a quick check and XBMC is not installed in my 2.9 install. Think we have a fraud.
Image
User avatar
billhedrick
Site Admin
 
Posts: 1244
Joined: Tue Jun 16, 2009 4:15 pm
Location: Saint Paul, MN. USA
Age: 72
Operating System: Ultimate Edition 3.2 32 BIT



Re: Ultimate Edition - CLI Tools

Postby JOHNNYG » Thu Apr 12, 2012 12:28 pm

billhedrick wrote:yea, that doesn't sound like Thee, also did a quick check and XBMC is not installed in my 2.9 install. Think we have a fraud.

No, That sounds exactly like Thee, you can tell by the "cryptic" speak ! and read the post, all is what he has posted here ! and XBMC is a "New" addition in 3.2 and has not been installed by default in any other release ! :ugeek:
JOHNNYG
Image
Ultimate Eddiction<
Ultimate Edition STUDIO
Ultimate-E
Onyx 64
Pentium 4 processor
2x512 Kingston DDR memory
Maxtor Diamondmax 500 gig
Maxtor Maxline 80 gig, Split for testing only !
Maxtor Diamondmax 500 gig, Storage
Booting 8 OS's, No MS !
ATI 9600 series (RV350 AQ)graphics card
Sony DVD/CD Rewritable Drive DOUBLE LAYER DRU-820A/Sony DRU-800A CD DVD±RW Dual DVD Recorder
Team Leader at
http://www.ultimateeditionoz.com/
Image
Image
Image
User avatar
JOHNNYG
Site Admin
 
Posts: 1456
Joined: Mon Apr 13, 2009 12:02 am
Location: U.S.A. Illinois
Operating System: Ultimate Edition 3.2 32 BIT



Re: Ultimate Edition - CLI Tools

Postby billhedrick » Thu Apr 12, 2012 12:36 pm

OK yea the code is Thee
Image
User avatar
billhedrick
Site Admin
 
Posts: 1244
Joined: Tue Jun 16, 2009 4:15 pm
Location: Saint Paul, MN. USA
Age: 72
Operating System: Ultimate Edition 3.2 32 BIT



Re: Ultimate Edition - CLI Tools

Postby tanmay.01 » Thu Apr 12, 2012 12:53 pm

JOHNNYG wrote:
billhedrick wrote:yea, that doesn't sound like Thee, also did a quick check and XBMC is not installed in my 2.9 install. Think we have a fraud.

No, That sounds exactly like Thee, you can tell by the "cryptic" speak ! and read the post, all is what he has posted here ! and XBMC is a "New" addition in 3.2 and has not been installed by default in any other release ! :ugeek:


Exactly 3.2 is the version in which xbmc was added by default but the statement said all the versions which got me a bit confused :shock: (maybe TheeMahn may be personally using it after the releases) :)
HP ENVY 15
•3rd generation Intel(R) Core(TheeMahn) i5-3210M Processor (2.5 GHz with Turbo Boost up to 3.1 GHz)
• 1GB Radeon(TheeMahn) HD 7750M GDDR5 Graphics [HDMI]
• 6GB 1600DDR3 System Memory (2 Dimm)
• 750GB 7200 rpm Hard Drive
• Intel 2x2 802.11a/b/g/n WLAN + Bluetooth(R)
• Full-size Radiance backlit keyboard.

Image
User avatar
tanmay.01
Moderator
 
Posts: 253
Joined: Wed Dec 07, 2011 1:03 pm
Location: India
Age: 33
Operating System: Other Linux


Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests