Con questo la serie degli scriptini, utili, da convertire è finita, solo due ne restano gaudioconvert e gimageconvert.
Lo script in Bash equivalente è qui.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# AUTHOR: Maurizio di NuvoleSparse
#
# License: GNU General Public version 2 or any later version.
# This program comes with ABSOLUTELY NO WARRANTY; for details
# see the COPYING file or visit "http://www.gnu.org/licenses/gpl.html".
# This is free software, and you are welcome to redistribute it under
# certain conditions. See the GPL license for details.
#
# Dependence:
# mencoder
# lame
# python
# zenity
import os
from sys import argv, exit
if len(argv[1:]) == 0:
os.system('zenity --title="Attenzione - gtheora2avi" --error\
--text="Seleziona almeno un file."')
exit(1)
count = 1
while count < len(argv):
if search(r"\.[aA][vV][iI]$", argv[count]):
filename = argv[count]).replace("ogg", "avi")
os.system("mencoder '"+argv[count]+\
"' -oac mp3lame -lameopts mode=2:cbr -ovc lavc -o '"+filename+\
"' 2>>/tmp/gtheora2avi.log")
else:
os.system('echo -e "Attenzione: \''+argv[count]+\
'\' non e\' un avi." >>/tmp/gtheora2avi.log')
count = count + 1
if os.path.isfile("/tmp/gtheora2avi.log") and \
os.path.getsize("/tmp/gtheora2avi.log") != 0:
os.system("cat /tmp/gtheora2avi.log | zenity \
--title='Errore - gtheora2avi' --text-info")
os.remove("/tmp/gtheora2avi.log")
else:
os.system('zenity --title="gtheora2avi" --info \
--text="Lo script è terminato con successo.')
Ultimo aggiornamento 06 Aprile 2006