23 września 2009

Wordpress offline reading script for liferea

I'm using rss for reading news - nothing strange
but I hate a new manner of showing only part of article in feed
that's why I created python script which takes data from feed url,
parses it
and puts back in rss...

script is here and works for wordpress,
if you want to use this for other short feeds to make them full and
avoid annoing ads
change <i><b>scrapstart</b></i> and <i><b>scrapend</b></i> variables
according to full article page source

script is here in previous post
you can do with it whatever you want to

Liferea script

#!/usr/bin/python
import urllib2, string, sys, re

#define start end end

scrapstart="<div class=\'snap_preview\'>"
scrapend="</div>"
#define other
witemie=0


#funkcje

def remove_html_tags(data):
p = re.compile(r'<.*?>')
return p.sub('', data)

def wyciagnij(urla):
response = urllib2.urlopen(urla)
htmllines = response.readlines()
wtresci=0
tresc=""
for liniahtm in htmllines:
if scrapstart in liniahtm: wtresci=1
if scrapend in liniahtm: wtresci=0
if wtresci==1:
tresc=tresc+liniahtm

tresc = remove_html_tags(tresc)
return tresc

#get xml feed
feedlines = sys.stdin.readlines()

for linia in feedlines:
if "<item>" in linia: witemie=1
if witemie==0: sys.stdout.write(linia)
if witemie==1:
if "<item>" in linia :sys.stdout.write(linia)
if "<title>" in linia :sys.stdout.write(linia)
if "<link>" in linia:
tulink=linia;
linia=remove_html_tags(linia)
sys.stdout.write("<description>")
opis=wyciagnij(linia)
sys.stdout.write(opis)
sys.stdout.write("</description>")
sys.stdout.write(tulink)
if "</item>" in linia :
sys.stdout.write(linia)
witemie=0


#koniec

22 września 2009

Dobry darmowy Antywirus dla windowsa - AVG

Bardziej polecam, niż sobie zapisuję,
bo ja tego już używam od paru lat

Przetestowany na komputerach całej rodziny
Działa bardzo dobrze i nie obciąża kompa
i ma ciekawą cenę - za darmo

Producent postarał się, żeby darmowy soft nie był prosty do znalezienia
i podrzuca domyślnie jakieś triale, ale jest...

wchodzimy na:
http://free.avg.com/

Klikamy pod tym free (get it)
potem mamy trzy słupki - nas interesuje ten pierwszy (free) i guzik z
napisem download
a na następnej stronie, i tam gdzies na dole jest link do instalki
soft updatuje sie sam, codziennie, i updatu nie widac, bo updacik mały
a jak się coś złapie - to leczy i krzyczy

HP Laser Jet 1018 i samba

Zeby HP Laser Jet 1018 dzialalo pod linuxem
trzeba zciagnac zainstalowac z cupsem
http://foo2zjs.rkkda.com/
olewając systemowe foo2zjs
zresztą jest instrukcja na stronie
a zeby wszyscy w domu mogli drukowac, to m.in.
w smb.conf
[printers]
path = /var/spool/samba
guest ok = Yes
browsable = Yes
printable = Yes
use client driver = Yes
printing = cups

freedroidRPG

Gierka pod cokolwiek w stylu pierwszego Diablo ale w zupelnie innym świecie

http://freedroid.sourceforge.net/

Crap free Real Player

w skrócie:
BBC zostało kiedyś oskarżone o spamowanie reklamami z Real playera i zmusili Real-a do zrobienia dla nich wersji bez reklam
jest tu:

http://www.bbc.co.uk/radio/help/faq/download_and_install_realplayer.shtml

Eventlog to Syslog Service

Serwis windowsowy przerzucający nowe eventy do syslog-a



https://engineering.purdue.edu/ECN/Resources/Documents/UNIX/evtsys/