View previous topic :: View next topic |
Author |
Message |
PboY Apprentice
Joined: 02 Feb 2005 Posts: 238 Location: Italia - Monza
|
Posted: Sun Apr 10, 2005 5:13 pm Post subject: [SCRIPT] per il forum... |
|
|
so che per qualcuno sembrerà inutile ma gente che come me usa torsmo e simili interesserà (spero )
Code: |
#!/bin/bash
#url of the gentoo forum
FGENTOO_URL=http://forums.gentoo.org/viewforum-f-41.html
#download file name
FGENTOO_URL_OUTPUT=gentoo.html
#temporary file
FGENTOO_URL_OUTPUT_TEMP=$FGENTOO_URL_OUTPUT.tmp
#max result number
FGENTOO_MAX_RESULT=5
if [ ! -d ~/.fgentoo/ ]
then
mkdir ~/.fgentoo
fi
wget -q -nv -O ~/.fgentoo/$FGENTOO_URL_OUTPUT http://forums.gentoo.org/viewforum-f-41.html
grep topictitle ~/.fgentoo/$FGENTOO_URL_OUTPUT > ~/.fgentoo/$FGENTOO_URL_OUTPUT_TEMP
grep -v Sticky ~/.fgentoo/$FGENTOO_URL_OUTPUT_TEMP > ~/.fgentoo/$FGENTOO_URL_OUTPUT
grep -v Announcement: ~/.fgentoo/$FGENTOO_URL_OUTPUT > ~/.fgentoo/$FGENTOO_URL_OUTPUT_TEMP
head -n $FGENTOO_MAX_RESULT ~/.fgentoo/$FGENTOO_URL_OUTPUT_TEMP > ~/.fgentoo/$FGENTOO_URL_OUTPUT
html2text ~/.fgentoo/$FGENTOO_URL_OUTPUT
|
non fa altro che scaricare la pagina del forum in italiano, togliere i post in sticky e gli announcement per buttarne fuori l'output in formato testo...
per farlo andare copiate tutto in un file e date un
oltre a questo è necessario anche html2text che è in portage, quindi diamo
fatto questo lanciamo ./nomefile ed avremmo i topic in console
spero sia utile a qualcuno |
|
Back to top |
|
|
randomaze Bodhisattva
Joined: 21 Oct 2003 Posts: 9985
|
Posted: Sun Apr 10, 2005 5:45 pm Post subject: Re: [SCRIPT] per il forum... |
|
|
PboY wrote: | non fa altro che scaricare la pagina del forum in italiano, togliere i post in sticky e gli announcement per buttarne fuori l'output in formato testo... |
Elimini le cose inutili, insomma _________________ Ciao da me! |
|
Back to top |
|
|
PboY Apprentice
Joined: 02 Feb 2005 Posts: 238 Location: Italia - Monza
|
Posted: Sun Apr 10, 2005 6:31 pm Post subject: Re: [SCRIPT] per il forum... |
|
|
randomaze wrote: | PboY wrote: | non fa altro che scaricare la pagina del forum in italiano, togliere i post in sticky e gli announcement per buttarne fuori l'output in formato testo... |
Elimini le cose inutili, insomma |
no, che vuol dire... serve solamente per vedere i topic piu recenti. non che io reputi gli sticky etc.. inutili, ma per il suo scopo non servono ... si otterrebbe un output troppo lungo, no ? |
|
Back to top |
|
|
|