#!/bin/bash #Authors: # Bruno Goncalves Araujo # #License: GPLv2 or later ################################################# ############### #####Importa o tema ############### . /usr/share/bigcontrolcenter/default/theme-categories.sh.htm export TEXTDOMAINDIR="/usr/share/locale-langpack" export TEXTDOMAIN=bigcontrolcenter-others-bigconvert ############### #####Criar diretorio para configuracoes ############### mkdir ~/.bigconvert 2> /dev/null ################ #####Confere configuracoes na home do usuario ################ if [ "$p_embutirlegenda" = "true" ] then echo "yes" > ~/.bigconvert/embutirlegenda fi if [ "$p_embutirlegenda" = "false" ] then echo "no" > ~/.bigconvert/embutirlegenda fi if [ "$(cat ~/.bigconvert/embutirlegenda)" = "" ] then echo "no" > ~/.bigconvert/embutirlegenda fi if [ "$p_corlegenda" = "yes" ] then kdialog --getcolor | sed 's/#//g' > ~/.bigconvert/corlegenda fi if [ "$(cat ~/.bigconvert/corlegenda)" = "" ] then echo "FFFF00" > ~/.bigconvert/corlegenda fi if [ "$p_bordalegenda" = "true" ] then echo "yes" > ~/.bigconvert/bordalegenda fi if [ "$p_bordalegenda" = "false" ] then echo "no" > ~/.bigconvert/bordalegenda fi if [ "$(cat ~/.bigconvert/bordalegenda)" = "" ] then echo "yes" > ~/.bigconvert/bordalegenda fi if [ "$p_brilho" != "" ] then echo "$p_brilho" > ~/.bigconvert/brilho fi if [ "$(cat ~/.bigconvert/brilho)" = "" ] then echo "0.0" > ~/.bigconvert/brilho fi if [ "$p_contraste" != "" ] then echo "$p_contraste" > ~/.bigconvert/contraste fi if [ "$(cat ~/.bigconvert/contraste)" = "" ] then echo "1.0" > ~/.bigconvert/contraste fi if [ "$p_saturacao" != "" ] then echo "$p_saturacao" > ~/.bigconvert/saturacao fi if [ "$(cat ~/.bigconvert/saturacao)" = "" ] then echo "1.0" > ~/.bigconvert/saturacao fi if [ "$p_fontsize" != "" ] then echo "$p_fontsize" > ~/.bigconvert/fontsize fi if [ "$(cat ~/.bigconvert/fontsize)" = "" ] then echo "20" > ~/.bigconvert/fontsize fi tip_legenda=$"Os arquivos de legenda devem estar na mesma pasta que o video e com o mesmo nome, sendo diferenciados apenas pela extensao.
Caso existam legendas .ass e .srt sera utilizada a .ass.
Somente legendas .srt obedecem a formatacao desse configurador." tip_bordalegenda=$"Insere uma borda escura em torno da fonte que torna a leitura da legenda muito agradavel." echo ' ' ############### #####Variaveis de nomes ############### title=$"Big Converter" apply=$"Iniciar conversao" back=$"Voltar" preview=$"Prever resultado" ############### #####Titulo ############### echo "$title" ############### #####Carregar o tema ############### echo '' open_header echo "$title" '
' $"Converta videos ou extraia audio." close_header ############### #####Inicio da exibicao da GUI ############### #O uso do echo pode ser separado em diversos pedacoes dentro do mesmo comando #O uso de aspas simples faz o sistema exibir exatamente o que esta escrito #Quando se utiliza aspas duplas o sistema executa algumas partes do codigo antes de passar a resposta, entre essas execucoes inclui a interpretacao de variaveis #Para incluir textos a serem exibidos ao usuario utilize aspas duplas com $ antes, para que funcione o sistema de tradução, exemplo: $"texto" #No exemplo abaixo o memso comando echo foi aberto e fechado diversas vezes de acordo com a necessidade, aspas simples, duplas e duplas com traducao. ############## ####Converter para ############## echo '
' . /usr/share/bigcontrolcenter/categories/others/bigconvert/simples/$(cat ~/.bigconvert/formatsimples) ############### #####LEGENDA ############### echo '
' echo '

' if [ "$(cat ~/.bigconvert/embutirlegenda)" = "yes" ] then embutirlegenda_check="checked" fi echo "' echo '' echo '

' echo '
' ############### #####Opcoes da legenda ############### echo 'Tamanho:' echo "' echo $"Cor:" '' "" if [ "$(cat ~/.bigconvert/bordalegenda)" = "yes" ] then bordalegenda_check="checked" fi echo "
' echo '
' if [ "$(cat ~/.bigconvert/qualidadevideo)" = "manual" ] then echo '" echo '
' echo "
' echo $"Bitrate em kbps" echo '
' fi echo "
" echo '
' ################## # EXTRAS ################## echo '

' $"Extras" '

' echo '' echo '
' $"Brilho" '
' echo "' echo '
' $"Contraste" '
' echo "' echo '
' $"Saturacao (Cor)" '
' echo "' echo "
" echo '
' ############### #####RODAPE ############### echo "
"