user@local~$ vim ftp://hostip/file.py
OK thats it. Told you it was quick. Save and quit (:wq) and your file is updated and published.
There is a huge learning curve to Vim but I think that with time, you will find yourself being more efficient.
user@local~$ vim ftp://hostip/file.py
This is accomplished by combining a python script with the conky variable scroll. The python script will get the data, parse it and put it into a acceptable format for conky to handle the display. I've talked about conky earlier and using displaying the last instant message.#!/usr/bin/python
import urllib
# Open html page
fweb = urllib.urlopen("http://scores.espn.go.com/ncb/bottomline/scores")
gamestr=''
score=''
# Manipulate str for unneccessary chars
raw=str(fweb.readline())
raw=raw.replace('%20',' ');
raw=raw.replace('^','');
raw=raw.replace('&','\n')
# Open data storage
f=open('bottom.dat', 'w')
f.write(raw)
f.close()
f=open('bottom.dat', 'r')
# Parse each line, get game, create str, append str
for line in f:
if line.find('_left')>1:
gamestr=line[line.find('=')+1:-1]
score= score + gamestr + ' | '
f.close()
print score
#avoid flicker
double_buffer yes
#own window to run simultanious 2 or more conkys
own_window yes
own_window_transparent no
own_window_type normal
own_window_hints undecorate,sticky,skip_taskbar,skip_pager, above
#borders
draw_borders no
border_margin 0
#shades
draw_shades no
#position
gap_x 0
gap_y 0
alignment bottom_middle
#behaviour
update_interval 1
#colour
default_color 8f8f8f
#default_shade_color 000000
own_window_colour 262626
text_buffer_size 1400
#font
use_xft yes
xftfont bauhaus:pixelsize=10
#to prevent window from moving
use_spacer none
minimum_size 1400
TEXT
${color e0e0e0} ${scroll 2847 ${execpi 60 python ~/scripts/bottomscore.py}}
sudo apt-get install mpd mpc paprefsNext we need to set up Pulse Audio.
Go to System->Preferences->Pulse Audio PreferencesSet up mpd.conf (use your favorite text editor)
Check "enable network access to local sound device" & "Don't require authentication"
sudo gedit /etc/mpd.confAdd the following to the config file:
audio_output {In the mpd.conf file, look for "music_directory" and change the corresponding path to your music directory.
type "pulse"
name "Local MPD Output"
}
sudo mpd --create-dbFinally, restart mpd by:
sudo /etc/init.d/mpd restartUsing mpc: mpd/mpc is higly scriptable so I recommend create some bash files for yourself. You will find the manual to mpc here: http://linux.die.net/man/1/mpc
mpc search artist Radiohead | mpc addGood luck
mpc play
% startup.m
% Set Production Directory
prod='~/MATLAB/Production/';
% Prompt user for module name
module=input('What module do you want to work on? ','s');
% If module is set, add to top of path. Otherwise don't add
if ~isempty(module)
path([prod,module],path);
end
Place the startup.m in your MATLAB work directory.
