FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 09-14-2012, 10:24 PM
"hannes.harald@gmx.at"
 
Default bounty for help with dialog shell script/suggestions for a bounty-site

Dear Ubuntuusers,

I am looking for somebody who is willing to help me with a small dialog
shell script. Maybe you can recommend me a site where I can offer a
bounty for this task.


In case somebody on this list is interested in this task I append a
description of the desired functionality of the shell script. I want to
pay with bank transfer, paypal or the likewise. Bank transfer is
restricted to countries whose official currency is the Euro.
Alternatively I can donate a specified amount to your favourite software
project or the likewise.


I need this shell script for friends who want to copy their Mini-DV
videotapes onto their harddisk. My friends are between 60 and 70 years
now and have difficulties with programs which offer too many functions:
E.g dedicated video applications like kdenlive can be used to record
videos from tape. But when you close the application a dialog box
appears asking if you want to save the project. This confuses my friends
as they don’t know which “project” kdenlive is talking about.
This is why I want to offer them a simple shell script which asks them
just the necessary questions and then rewinds the tape and records the
whole tape. The user interaction should be done with “dialog” but
kdialog or zenity should be good as well.
I already spent some bucks on fiverr.com but the resulting script did
not work on my ubuntu machine. The author claims it works on Debian but
I need it to work on ubuntu, too. Maybe the script which is at the very
end of this post only needs some small fix.
If you are interested in this task just send my an email with your
desired remuneration.

Best regards,
harald

***** What the script should do and ask the user ********
1 Ask the user if the video is part of a series (yes/no). # In Case
an event has been recorded on several tapes.
1.1 If “yes” then ask for the number of the tape --> $number_of_tape
# Maybe with a radio dialog box (1-7 should be sufficient, I don’t
remember a case in which we recorded so many tapes at once.

2 Ask for the title of the video # Will be used as the $basename
2.1 If the video is part of a series the filename of the recorded
video should be something like $filename=$basename_$number_of_tape
3 # Create a directory for the video files # Not sure if this is
really necessary
3.1 mkdir ${filename}'date' # the appendix of ‘date’ is one idea to
prevent that files are deleted because the same filename has been used.
How series should be handles is not clear yet.
3.2 [Optional] Ask where the video should be saved. # Offer a
file/directory selection dialog to the user. This would be beneficial if
other users than my friends want to use this script. For my target
audience I want to hard code the path. $HOME/Videos .
4 Ask for a description/keywords of the video # There some
possibility to enter plain text should be offered. This text should be
saved as a textfile with the same basename as $filename. This should be
helpful to locate the videos with a search index.

5 format="raw"
dvgrab -buffers 200 -format $format -rewind -showstatus -srt -timestamp
"${filename}" # rewind the tape and start the recording.

6 Dialog prompt that the recording is complete.
6.1 If the recording was part of a series, ask to insert the next
tape, or offer a “Finished” button.


I am unsure if the script should be based on the dialog utility or
should rather use something graphical like zenity or kdialog. Kdialog
although it is a QT-application has a very similar syntax to dialog.


***** Here some links to dialog tutorials: *******
http://www.cc-c.de/german/linux/linux-dialog.php
http://www.linuxjournal.com/article/2460
http://www.linuxjournal.com/article/2807
http://bash.cyberciti.biz/guide/Bash_display_dialog_boxes

********** the dvgrab script as I received it by another author ********
The error message "Injection Detected, Restarting..." could not be
resolved by the original author.



#!/bin/bash
#DVGrab Utility
#Version 1.0.2
#Initialize System
exportdir="/home/$HOME/Videos"
tempdir="$exportdir/temp"
extension=".dv"
dialog --title "DVGrab Video Capture" --msgbox "Welcome to DVGrab, press
enter to continue." 9 20

continue=0
while [ $continue = 0 ]; do
dialog --title "DVGrab Video Capture" --yesno "Is the current media a
part of a series?" 9 20 2>$tempdir/_1.txt

series=$(cat _1.txt)
continue=0
case $series in
yes)
dialog --title "DVGrab Video Capture" --textbox "What is the Video
Number?" 9 20 2>$tempdir/_2.txt
dialog --title "DVGrab Video Capture" --textbox "What is the name of the
film?" 9 20 2>$tempdir/_3.txt

#check if Video Directory Exists
dialog --title "DVGrab Video Capture" --textbox "Is there any keywords
you'd like to add to this film? (Please separate with comma)" 9 20
2>$tempdir/_4.txt

#register Variables
vidnum=$(cat $tempdir/_2.txt)
videoname=$(cat $tempdir/_3.txt)
viddesc=$(cat $tempdir_4.txt)

if [ -d "$exportdir/$videoname/" ]; then
seriesexists="yes"
else
seriesexists="no"
fi
if [ -e $exportdir/$videoname/${videoname}_${vidnum}${extension} ]; then
echo "Video Already Exists."
rm $tempdir/_2.txt
rm $tempdir/_3.txt
rm $tempdir/_4.txt
rm $tempdir/_1.txt
dialog --title "DVGrab Video Capture" --infobox "Video Already Exists"
9 20

dialog --clear
continue=0
else #
#Finish Registering Variables
dialog --title "DVGrab Video Capture" --infobox "Ready To Start
Capturing with following settings: Video Number: $vidnum , Video Name:
$videoname , Series exists: $seriesexists" 9 20

sleep 1
if [ $seriesexists == "yes" ]; then
pushd $exportdir/$videoname/
else #
mkdir $exportdir/$videoname/
fi ##
filename=${videoename}_${vidnum}${extension}
echo "$viddesc" > $exportdir/$videoname/${videoname}_${vidnum}.txt
dialog --title "DVGrab Video Capture" --infobox "Processing Video....."
9 20

format="raw"
echo 'dvgrab -buffers 200 -format $format -rewind -showstatus -srt
-timestamp "${filename}'

continue=1
dialog --title "DVGrab Video Capture" --infobox "Done Capturing Video" 9 20
rm $tempdir/_1.txt
rm $tempdir/_2.txt
rm $tempdir/_3.txt
rm $tempdir/_4.txt
dialog --clear
echo "Finished"
fi ##
;;
no)
dialog --title "DVGrab Video Capture" --textbox "What is the name of the
film?" 9 20 2>$tempdir/_3.txt

#check if Video Directory Exists
dialog --title "DVGrab Video Capture" --textbox "Is there any keywords
you'd like to add to this film? (Please seperate with comma)" 9 20
2>$tempdir/_4.txt

videoname=$(cat $tempdir/_3.txt)
viddesc=$(cat $tempdir_4.txt)
if [ -d "$exportdir/$videoname/" ]; then
seriesexists="yes"
else
seriesexists="no"
fi
if [ -e $exportdir/$videoname/${videoname}${extension} ]; then
echo "Video Already Exists."
rm $tempdir/_2.txt
rm $tempdir/_3.txt
rm $tempdir/_1.txt
continue=0
dialog --title "DVGrab Video Capture" --msgbox "Video Already Exists" 9 20
dialog --clear
else
#Finish Registering Variables
dialog --title "DVGrab Video Capture" --infobox "Ready To Start
Capturing with following settings: Video Name: $videoname" 9 20

sleep 1
if [ $seriesexists == "yes" ]; then
pushd $exportdir/$videoname/
else
mkdir $exportdir/$videoname/
fi
filename=${videoename}${extension}
echo "$viddesc" > $exportdir/$videoname/${videoname}_.txt
dialog --title "DVGrab Video Capture" --infobox "Processing Video....."
9 20

format="raw"
echo 'dvgrab -buffers 200 -format $format -rewind -showstatus -srt
-timestamp "${filename}"'

continue=1
dialog --title "DVGrab Video Capture" --msgbox "Done Capturing Video" 9 20
rm $tempdir/_1.txt
rm $tempdir/_2.txt
rm $tempdir/_3.txt
dialog --clear
contiue=1
echo "Finished"
fi

;;
*)
dialog --title "DVGrab Video Capture" --msgbox "Injection Detected,
Restarting...." 9 20

dialog --clear
continue=0
rm $tempdir/_1.txt
;;
esac
done
***********************

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 09:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org