Script - Youtube Video Downloader

Navegando no Dicas-L encontrei um shell-script super útil que faz download de vídeos no youtube sem precisar de nenhum programa adicional, mas o problema é que ele só baixa em flv, tarefa que várias extensões do Firefox fazem com competencia. Olhando os comentários encontrei alguns scripts semelhante só que usando a interface gráfica Zenity e realizando a conversão do vídeo para AVI com o FFmpeg. Para executar o script você precisará justamente do Zenity e do FFmpeg, ambos podem ser encontrados no apt do Debian ou no site oficial de cada. Segue abaixo o script, para executar você deve dar permissão de execução antes ( # chmod +x youtubedownloader.sh).

#!/bin/bash
 
TITLE="Youtube Downloader"
link=$(zenity --title "$TITLE" --entry --text "Endereço do vídeo:" --width 370 --height 100)
[ $? == 1 ] && exit
[ -z "$link" ] && ( zenity --title "$TITLE" --error --text "Faltou digitar a url..." ; exit 1 ; )
nome=$(zenity --title "$TITLE" --entry --text "Digite um nome para o vídeo:")
[ $? == 1 ] && exit
cd $(zenity --title "$TITLE" --entry --text 'Digite o diretório de destino')
URL="http://www.youtube.com"
DOWNLOAD=`wget -qO - "$link" | grep -oE 'video_id=.*&t=[^\"&]*' | head -1`
wget -O "$nome.flv" "${URL}/get_video?${DOWNLOAD}" 2>&1 | sed -u 's/.*\ \([0-9]\+%\)\ \+\([0-9.]\+\ [KMB\/s]\+\)$/\1\n# Baixando a \2/' | zenity --progress --title "$TITLE" --auto-kill --auto-close
zenity --title "$TITLE" --question --text "Converter video para avi"
[ $? == 1 ] && exit
ffmpeg -i "$nome.flv" -ab 56 -ar 22050 -b 50 -s 320x240 "$nome.avi" | zenity --progress --percentage "1" --auto-kill --auto-close
zenity --title "$TITLE" --question --text "Apagar flv baixado e ja convertido"
[ $? == 1 ] && exit
rm "$nome.flv"
exit

Slackware - Distro de psicopata

tsc tsc tsc…
Eu sempre achei que havia algo de errado com os usuários de Slackware. Notícia publicada no Jornal Hora H da Baixada Fluminense.

Fonte: lista slack-users

O Firefox 3 terá um segundo Release Candidate

O RC1 do Firefox 3 foi apontado inicialmente como suficientemente estável, podendo assim concluir-se que seria o último antes do lançamento final, mas não será assim, foram encontrados 12 bugs críticos no RC1, quase todos comuns em todas as plataformas. O lançamento do RC2 está previsto para o dia 6 de junho.

Fonte: http://www.mozilla-hispano.org/2008/05/28/143-firefox-3-tendra-un-segundo-release-candidate

apt-get install wife

Fonte: lessaid.net

KDE 4.1 beta1

Algumas pessoas tiveram a oportunidade de testar o KDE 4.0 (inclusive eu) e a maioria concluiu a mesma coisa, a versão não estava madura o suficiente para ser lançada ainda. O projeto KDE lançou o beta 1 do KDE 4.1, que promete várias melhorias em relação ao KDE 4.0. As mudanças mais notáveis são o número de aplicativos portados para essa versão e a personalização do desktop, que aumentaram significamente.

Screenshots

Krunner

Panel Controller

Cover Switch (alt+tab)

Wobbly

O beta 1 do KDE 4.1 já está disponível no gerenciador de pacotes de algumas distribuições:

  • Debian tem KDE 4.1beta1 no experimental.
  • Kubuntu os pacotes estão no preparation.
  • Mandriva
  • openSUSE

Fonte: Site oficial do projeto KDE

Mario Bros Drum Solo


Não precisa ser baterista pra perceber, o cara manda bem…

Are you gay?

Fonte: Álbum do Gabriel “Pnórdico” Menezes no orkut

WinterBells

Em um dos meus momentos desocupados encontrei um joguinho simples e viciante, chama-se Winterbells, é bem fácil jogar, basta ir guiando o coelho com o mouse puland sobre os sinos e não deixar ele cair, os pássaros dobram os pontos.

Para jogar clique aqui

Amarok NP 0.1.0

Script para xchat desenvolvido no canal #gnu_xiitas@irc.freenode.net que mostra a música que está tocando no Amarok e também oferece alguns comandos simples para o controle do player.

# coding=utf-8
# 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
# Authors:
# Thomas Fortes
# Weslly Honorato
# Gabriel "Pnordico" Menezes
# #gnu_xiitas@freenode.org
 
__module_name__ = "Amarok_NP"
__module_version__ = "0.1.0" 
__module_description__ = "Executes dcop to print the Now Playing music info only when it changes and control amarok."
 
import time
import xchat
import threading
import commands
import string
 
class Amarok:
 
   status = 'off'
   prevSong = ''
   amarokHook = None
 
   amarok_msg_help = '''Amarok Np Plugin:
	/np start       Start the plugin loop
	/np finish      Stop the plugin loop
	/np show        Show the current song
	/np next        Go to next song
	/np prev        Go to previous song
	/np play        Play amarok
	/np pause       Pause amarok
	/np stop        Stop amarok'''
 
   # Functions to control amarok
 
   def amarok_next(self, word, word_eol, userdata):
      msg = commands.getoutput('dcop amarok player next')
      return xchat.EAT_ALL
 
   def amarok_prev(self, word, word_eol, userdata):
      msg = commands.getoutput('dcop amarok player prev')
      return xchat.EAT_ALL
 
   def amarok_play_pause(self, word, word_eol, userdata):
      msg = commands.getoutput('dcop amarok player playPause')
      return xchat.EAT_ALL
 
   def amarok_stop(self, word, word_eol, userdata):
      msg = commands.getoutput('dcop amarok player stop')
      return xchat.EAT_ALL
 
 
 
   # Now Playing functions   
 
 
   def amarok_loop(self, userdata):
      xchat.command('amaroknp')
      return 1
 
   def amarok_show_now(self, word, word_eol, userdata):
      if self.status == 'off':
         mystatus = 'off'
      else:
	 mystatus = 'on'
 
      self.prevSong = ''
      self.status = 'on'
      xchat.command('amaroknp')
      self.status = mystatus
 
   def amarok_loop_start(self, word, word_eol, userdata):
      self.status = 'on'
      return 1
 
   def amarok_loop_stop(self, word, word_eol, userdata):
      self.status = 'off'
      self.prevSong = ''
      return 1
 
   def amarok_send(self, word, word_eol, userdata):
 
     artist = commands.getoutput('dcop amarok player artist')
     title = commands.getoutput('dcop amarok player title')
     disc = commands.getoutput('dcop amarok player album')
     year = commands.getoutput('dcop amarok player year')
     genre = commands.getoutput('dcop amarok player genre')
     songtime = commands.getoutput('dcop amarok player totalTime')
 
     if self.prevSong != title:
        # Here we check if status is on and dcop succeeded
	if self.status == 'on' and songtime != 'call failed' and songtime != '?':
	   self.prevSong = title
	   xchat.command('allchan me is listening ' + artist + " - " + title + " ( " + "Album" + ": " +
           disc + " / Year: " + year + " / Genre: " + genre + " / Songtime: " + songtime + ")")
     return xchat.EAT_ALL
 
 
   def amarok_command_callback(self, word, word_eol, userdata):
      try:
	 if word[1].lower() == 'start':
	     return self.amarok_loop_start(word[1], word_eol[1], userdata)
	 if word[1].lower() == 'finish':
 	     return self.amarok_loop_stop(word[1], word_eol[1], userdata)
	 if word[1].lower() == 'next':
	     return self.amarok_next(word[1], word_eol[1], userdata)
	 if word[1].lower() == 'prev':
	     return self.amarok_prev(word[1], word_eol[1], userdata)
	 if word[1].lower() == 'play':
	     return self.amarok_play_pause(word[1], word_eol[1], userdata)
	 if word[1].lower() == 'pause':
	     return self.amarok_play_pause(word[1], word_eol[1], userdata)
	 if word[1].lower() == 'stop':
	     return self.amarok_stop(word[1], word_eol[1], userdata)
	 if word[1].lower() == 'show':
	     return self.amarok_show_now(word[1], word_eol[1], userdata)
 
	 if word[1].lower() == 'help':
	    print self.amarok_msg_help
 
      except IndexError:
	 print self.amarok_msg_help
      return xchat.EAT_ALL
 
   def run(self):
      xchat.hook_command('np', self.amarok_command_callback, help=self.amarok_msg_help)
      xchat.hook_command('amaroknp', self.amarok_send)
 
      amarokHook = xchat.hook_timer(5000, self.amarok_loop)
 
      xchat.prnt('Amarok np, Use /np start to start the loop, /np finish to stop and /np help for more info.')
 
 
class Script:
   Amarok().run()
 
if __name__ == "__main__":
   Script()

Microsoft: Leading the world in selling expensive pieces of shit


Os winusers que me perdoem mas é a verdade…
  1. Busca

  2. Arquivo

  3. Amiguinhos

  4. Posts recentes

  5. Nuvem de tags

  6. Comentários Recentes

  7. Licença

    Creative Commons License
    Esta obra está licenciada sob uma Licença Creative Commons. Overflow by Weslly Honorato is licensed under a Creative Commons Attribution-ShareAlike 2.5 Brazil License.
  8. Estatísticas

    eXTReMe Tracker
  9. /etc

    Firefox Powered by Wordpress tracker RSS Add to Technorati Favorites
  10. Meta

  11. Capitalismo

    Saiba onde tem o melhor preço antes de comprar