Permalink
Browse files

IG Burn Tools 0.6

added -joliet-long to burn.sh mkisofs_base
added Find In Snapshots Search Terms/Regular Expression options
Find In Snapshots fix 'no matches' msg on grep exit status
renamed to IG Burn Tools IG-Burn-Tools.spacefm-plugin.tar.gz
  • Loading branch information...
IgnorantGuru
IgnorantGuru committed Feb 15, 2013
1 parent 479f774 commit 9174b2ca3dc7e2f2dc1fdd8d2f95090a441fc913
View
@@ -1,4 +1,8 @@
spacefm-plugins
===============
IgnorantGuru's SpaceFM Plugins Repo
===================================
IgnorantGuru's SpaceFM Plugins
This repo contains plugins developed by IgnorantGuru for use in the [SpaceFM](https://github.com/IgnorantGuru/spacefm/) file manager.
To see the list and instructions visit [IgnorantGuru's SpaceFM Plugins](https://github.com/IgnorantGuru/spacefm-plugins/wiki).
To see ***ALL SpaceFM Plugins*** visit the [SpaceFM Plugins Wiki](https://github.com/IgnorantGuru/spacefm/wiki/plugins).
View
Binary file not shown.
Binary file not shown.
@@ -1,10 +1,10 @@
#!/bin/bash
$fm_import # import file manager variables (scroll down for info)
#
# Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# IG Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# License: GPL2+ ( See README )
#
# exec.sh: This script shows the Find In Snapshots command dialog.
# exec.sh: This script shows the Find In Snapshots command dialog and searches
mkdir -p "$fm_cmd_data"
@@ -19,13 +19,19 @@ choosersizefile="$fm_cmd_data/choosersize"
if [ ! -e "$choosersizefile" ]; then
echo "800x600" > "$choosersizefile"
fi
searchtermsfile="$fm_cmd_data/searchtermsopt"
searchregexfile="$fm_cmd_data/searchregexopt"
eval "`spacefm -g --title "Find In Snapshots" --window-size "@$choosersizefile" \
--label "Open a snapshot folder to search recursively:" \
--chooser --dir "$path/." \
--vbox --compact \
--label --wrap "\nEnter grep search regex (case insensitive) or leave blank to find currently selected filenames:" \
--hbox --compact \
--radio "Search Terms:" "@$searchtermsfile" \
--radio "Regular Expression:" "@$searchregexfile" \
--close-box \
--input \
--label --wrap "(case insensitive - leave blank to find currently selected filenames)" \
--close-box \
--button cancel --button ok 2>/dev/null`"
@@ -37,35 +43,54 @@ path="$dialog_chooser1_dir"
if [ -d "$path" ]; then
echo "$path" > "$snapshotpathfile"
fi
regex=$dialog_radio2
terms="$dialog_input1"
if [ "$dialog_input1" = "" ]; then
unset out
if [ "$terms" = "" ]; then
if [ "${fm_filenames[0]}" = "" ]; then
echo "Select one of more files in the file list to search for."
exit 0
fi
echo "Searching for ${#fm_filenames[@]} filenames..."
echo
found=0
if [ "${fm_filenames[1]}" = "" ]; then
echo "Searching for file '${fm_filename}'..."
else
echo "Searching for ${#fm_filenames[@]} filenames..."
fi
n=$'\n'
for f in "${fm_filenames[@]}"; do
test=`grep -Fr "$f" "$path" 2> /dev/null`
if [ "$test" != "" ]; then
echo "$test"
found=1
if [ "$terms" = "" ]; then
terms="$f"
else
terms="$terms$n$f"
fi
done
if (( !found )); then
echo
echo "No matches."
fi
else
echo ">>> grep -ir \"$dialog_input1\" \"$path\""
out=`grep -rF "$terms" "$path"`
elif (( regex == 1 )); then
echo ">>> grep -ir '$terms' '$path'"
echo
grep -ir "$dialog_input1" "$path"
out=`grep -ir "$terms" "$path"`
else
echo "Searching for AND terms: $terms"
for term in $terms; do
if [ "$out" = "" ]; then
out=`grep -irF "$term" "$path"`
else
out=`echo "$out" | grep -i "$term"`
fi
if [ "$out" = "" ]; then
break
fi
done
fi
if [ $? -ne 0 ]; then
echo
echo "No matches."
fi
echo
if [ "$out" = "" ]; then
echo "No matches."
else
echo "$out"
fi
exit 0
@@ -1,7 +1,7 @@
#!/bin/bash
$fm_import
# Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# IG Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# License: GPL2+ ( See README )
#
# verify.sh: This script verifies disc contents by one of three methods. A
@@ -98,6 +98,7 @@ elif [ "$burn_verify" = "Compare To Dir" ]; then
IFS=$'\n'
diffcount=0
filecount=0
prosize=0
treelen=${#tree}
for f1 in `find -L "$tree" -type f`;
do
@@ -120,7 +121,12 @@ elif [ "$burn_verify" = "Compare To Dir" ]; then
fi
fsize=`stat -Lc %s "$f1"`
(( completed += fsize ))
setprogress
# don't setprogress too rapidly on small files
(( prosize += fsize ))
if (( prosize > 26214400 )); then
prosize=0
setprogress
fi
done
IFS="$IFS_OLD"
@@ -0,0 +1,6 @@
0.6 2013-02-15:
added -joliet-long to burn.sh mkisofs_base
added Find In Snapshots Search Terms/Regular Expression options
Find In Snapshots fix no matches msg on grep exit status
0.5 2012-12-30:
initial release
@@ -1,21 +1,31 @@
README for Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
README for IG Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
https://github.com/IgnorantGuru/spacefm-plugins/blob/master/ig-burn-tools/src/cstm_697dd9ec/README
Updated: v0.5.0 2012-Dec-27 beta
Updated: v0.6 2013-Feb-15
https://github.com/IgnorantGuru/spacefm-plugins/blob/master/ig-burn-tools/src/cstm_697dd9ec/ChangeLog
Thanks to Thomas Schmitt and OmegaPhil for help and testing.
Browse IgnorantGuru's SpaceFM Plugins:
https://github.com/IgnorantGuru/spacefm-plugins/wiki
Browse ALL SpaceFM Plugins:
https://github.com/IgnorantGuru/spacefm/wiki/Plugins
CONTENTS
DESCRIPTION
DEPENDENCIES
INSTRUCTIONS
SUPPORT
LICENSE
DESCRIPTION
The Burn Tools plugin allows SpaceFM to be used as a simple GUI burning
The IG Burn Tools plugin allows SpaceFM to be used as a simple GUI burning
app. While it can be used as-is, it also allows you to easily
customize burn commands and add additional functionality. You are also
free to release modified versions of this plugin under a new name.
@@ -25,7 +35,7 @@ directory, while the plugin displays the total size of files and
remaining space on disc. Alternatively, an existing filesystem image
can be burned, or a disc can be copied.
This version of Burn Tools burns single session data discs only. It
This version of IG Burn Tools burns single session data discs only. It can
optionally save md5 checksums for all files on the disc, so a disc can
later be verified even if the original files are gone. It uses either
mkisofs, xorrisofs, or genisoimage to create a filesystem image as a
@@ -35,7 +45,7 @@ burn. Finally, it can verify the burn by verifying checksums,
comparing the disc to the filesystem image, or comparing disc contents
to directory contents.
Burn Tools adds the following commands to SpaceFM:
IG Burn Tools adds the following commands to SpaceFM:
Burn Disc Prepares disc content and burns a directory or image
to disc, or copies a disc. Also adds checksums,
@@ -49,13 +59,13 @@ to directory contents.
Take Snapshot Saves a text file snapshot of disc contents for later
reference and searching.
Find In Snapshots Searches through snapshots to find files or using a
regex expression.
Find In Snapshots Searches through snapshots to find files, search
terms, or a regex expression.
DEPENDENCIES
Burn Tools REQUIRES:
IG Burn Tools REQUIRES:
spacefm v0.8.3 or later
cdrecord OR cdrskin OR wodim (OR customize your burn commands)
@@ -66,10 +76,13 @@ DEPENDENCIES
NOTE: Use of the genuine cdrtools or cdrskin is recommended over wodim
(cdrkit). See http://cdrecord.berlios.de/private/linux-dist.html
Plugin Installation Instructions:
http://ignorantguru.github.com/spacefm/spacefm-manual-en.html#plugins-install
INSTRUCTIONS
Select Plugins|Burn Tools|Burn Disc to open the Burn Disc dialog (this
Select Plugins|IG Burn Tools|Burn Disc to open the Burn Disc dialog (this
command can also be copied to another menu). This dialog is used to
compose disc contents and monitor burn progress. The dialog has the
following elements:
@@ -172,18 +185,18 @@ INSTRUCTIONS
SUPPORT
For issues with this plugin, please post an issue to
https://github.com/IgnorantGuru/spacefm/issues
or email IgnorantGuru <ignorantguru@gmx.com>
For bugs, requests, or questions with this plugin, please post an issue to
https://github.com/IgnorantGuru/spacefm-plugins/issues
Support is provided for the Burn Tools GUI and internal functionality,
but not for general errors or failures in the burn programs (eg
cdrecord, etc), which you will need to research independently.
Support is provided for the IG Burn Tools GUI and internal
functionality, but not for general errors or failures in the burn
programs (eg cdrecord, etc), which you will need to research
independently.
LICENSE
Copyright (C) 2012 IgnorantGuru <ignorantguru@gmx.com>
Copyright (C) 2013 IgnorantGuru <ignorantguru@gmx.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1,16 +1,17 @@
#!/bin/bash
# Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# IG Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# License: GPL2+ ( See README )
#
# burn.sh: This script contains the commands to create filesystem images
# and burn them to disc. Adjust your burn commands or options here.
# NOTE: If you have prefered cdrecord/mkisofs programs, set them in config.sh
# The base command to create a filesystem image:
# ( Note that xorrisofs requires options to be separated eg NO -fRrJ )
mkisofs_base="$mkisofs -f -R -r -J -iso-level 3"
# ( Note that earlier xorrisofs requires options to be separated eg NO -fRrJ )
mkisofs_base="$mkisofs -f -R -r -J -joliet-long -iso-level 3"
if [ "$1" = "--verbose" ]; then
verbose=1
@@ -1,7 +1,7 @@
#!/bin/bash
$fm_import
# Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# IG Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# License: GPL2+ ( See README )
#
# checksums.sh: This script creates checksums for files on a disc.
@@ -1,7 +1,7 @@
#!/bin/bash
$fm_import
# Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# IG Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# License: GPL2+ ( See README )
#
# config.sh: This script sets up the initial configuration and is sourced by
@@ -1,7 +1,7 @@
#!/bin/bash
$fm_import # import file manager variables (scroll down for info)
# Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# IG Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# License: GPL2+ ( See README )
#
# configure.sh: This script shows the Configuration dialog (Configure button).
@@ -1,6 +1,6 @@
#!/bin/bash
# Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# IG Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# License: GPL2+ ( See README )
#
# depends.sh: This source script tests dependencies and exits with status 1
@@ -1,7 +1,7 @@
#!/bin/bash
$fm_import
# Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# IG Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# License: GPL2+ ( See README )
#
# exec.sh: This script shows the Burn Disc dialog and conducts the burn.
@@ -720,6 +720,7 @@ mountburner()
point="${point%%, *}"
vollabel="`echo "$info" | grep "^ label:" | sed 's/.*: *\(.*\)/\1/'`"
if [ ! -d "$point" ]; then
echo "*** Unable to determine mount point" > "$viewpipe"
return 1
fi
}
@@ -800,6 +801,7 @@ startiso()
settask to "$burner"
settask from "$burn_path"
settask progress 0
settask progress ""
settask curremain
settask avgremain
echo "set progress1 0" > "$cmdpipe" &
@@ -901,6 +903,7 @@ startburn()
startsnapshot()
{
echo "--- Writing Snapshot..." > "$viewpipe"
echo "set progress1 " > "$cmdpipe"
settask item "Writing Snapshot"
settask total
settask progress 0
@@ -942,6 +945,7 @@ startsnapshot()
startverify()
{
echo "--- $burn_verify..." > "$viewpipe"
echo "set progress1 " > "$cmdpipe"
settask item "$burn_verify"
settask total
settask progress 0
@@ -1353,6 +1357,7 @@ while [ -p "$respipe" ] && [ -p "$cmdpipe" ] && ps -p $dlgpid 2>&1 >/dev/null; d
reloadtray
if (( burn_snapshot )) || [ "$burn_verify" != "Don't Verify" ]; then
if ! mountburner; then
showmsg "Verification failed - unable to mount."
runalarm
setstate BUILD
else
@@ -1,7 +1,7 @@
#!/bin/bash
$fm_import
# Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# IG Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# License: GPL2+ ( See README )
#
# savelog.sh: This script shows the Save Log dialog (from Save Log button).
@@ -1,6 +1,6 @@
#!/bin/bash
# Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# IG Burn Tools ( a SpaceFM Plugin ) by IgnorantGuru
# License: GPL2+ ( See README )
#
# status.sh: This script sets the spacefm status bar to show deep size once.
Oops, something went wrong.

0 comments on commit 9174b2c

Please sign in to comment.