Best way to search /prog/
1
Name:
Anonymous
2008-09-05 16:55
Any one have any good scripts/ways to search /prog/? I tried google but it sucks at finding /prog/ content.
2
Name:
curtains and a dog
!NAMdiwz0Sw
2008-09-05 17:19
Have you tried searching with 'site:dis.4chan.org'? The /prog sub-directory doesn't return useful results.
3
Name:
Anonymous
2008-09-05 17:32
One word, sqlite3, world4ch_archive.db and a LIKE statement.
4
Name:
Anonymous
2008-09-05 17:46
5
Name:
Anonymous
2008-09-05 18:18
>>2
this is because the threads are on
http://dis.4chan.org/read :it101:
p. sure site:dis.4chan.org/read/prog would work well enough.
6
Name:
Anonymous
2008-09-05 18:38
7
Name:
Anonymous
2008-09-05 18:45
8
Name:
Anonymous
2008-09-05 20:47
9
Name:
Anonymous
2008-09-05 21:05
>>7
D'oh, I'm a tard. I meant it to find
http://dis.4chan.org/read/prog/1205007075/25 but obviously that search wouldn't work for that.
10
Name:
Anonymous
2008-09-06 0:50
$ mkdir prog
$ mount -t shiichan http://dis.4chan.org/prog/ prog/
$ grep 'Best way to search /prog/' prog/*
prog/1220647315:Best way to search /prog/
$ umount prog/
$ rm -r prog/
11
Name:
Anonymous
2008-09-06 1:18
Obligatory:
http://cairnarvon.rotahall.org/misc/progfind
Only searches thread titles, though.
12
Name:
Anonymous
2008-09-06 1:22
>>10
You have a 4chan Shiichan system translator?
13
Name:
Anonymous
2008-09-06 1:27
>>12
It wouldn't be that hard to write, but it would be slow as fuck.
14
Name:
Anonymous
2008-09-06 1:32
>>11
#!/bin/sh
if [ -z $1 ]
then
echo "USAGE: $0 [regex]" 1>&2
fi
wget -qO- http://dis.4chan.org/prog/subject.txt | sed '/'"$*"'/!d;s/^\(.*\)<>.*<>.*<>\(.*\)<>.*<>.*<>\(.*\)$/echo; echo Title: \1; echo URL: http:\/\/dis.4chan.org\/read\/prog\/\2; echo -n "Posted: "; date -d @\2; echo -n "Last Post: "; date -d @\3; echo/' | sh
15
Name:
Anonymous
2008-09-06 2:03
>>12
No. No it wouldn't be slow. Download whole /prog/ and scan
http://dis.4chan.org/prog/subject.txt for changes with demon.
16
Name:
Anonymous
2008-09-06 2:16
>>15
Good point.
Downloading all of
subject.txt still takes five to ten seconds on a good day, but I suppose you would only need the first few lines every time.
17
Name:
Anonymous
2008-09-06 2:20
>>14
Not exactly cross-platform, is it?
18
Name:
Anonymous
2008-09-06 2:25
19
Name:
Anonymous
2008-09-06 3:05
>>17
that can be fixed pretty easily...
#!/bin/sh
if [ -z $1 ]
then
echo "USAGE: $0 [regex]" 1>&2
exit
fi
GET='basename \`which fetch curl wget lynx w3m links elinks | head -n1\``
case $GET in
fetch)
GET_OPTS="-qo-"
;;
curl)
GET_OPTS="-s"
;;
wget)
GET_OPTS="-qO-"
;;
lynx)
links)
elinks)
GET_OPTS="-source"
;;
w3m)
GET_OPTS="-dump_source"
;;
*)
echo "ERROR: could not find one of: fetch curl wget lynx w3m links elinks" 1>&2
exit
;;
esac
if date --help 2>&1 >/dev/null
then
DATECMD="date -d @" # assume gnu date if --help works
else
DATECMD="date -r " # assume bsd date otherwise
fi
$GET $GET_OPTS http://dis.4chan.org/prog/subject.txt | sed '/'"$*"'/!d;s/^\(.*\)<>.*<>.*<>\(.*\)<>.*<>.*<>\(.*\)$/echo; echo Title: \1; echo URL: http:\/\/dis.4chan.org\/read\/prog\/\2; echo -n "Posted: "; $DATECMD\2; echo -n "Last Post: "; $DATECMD\3; echo/' | sh
and if your system's
date utility doesn't work like the gnu or bsd one, you can just grab the source from
http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/date/ and compile it.
and the rest of it is all POSIX.
20
Name:
Anonymous
2008-09-06 3:06
>>19
oops...
#!/bin/sh
if [ -z $1 ]
then
echo "USAGE: $0 [regex]" 1>&2
exit
fi
GET=`basename \`which fetch curl wget lynx w3m links elinks | head -n1\``
case $GET in
fetch)
GET_OPTS="-qo-"
;;
curl)
GET_OPTS="-s"
;;
wget)
GET_OPTS="-qO-"
;;
lynx)
links)
elinks)
GET_OPTS="-source"
;;
w3m)
GET_OPTS="-dump_source"
;;
*)
echo "ERROR: could not find one of: fetch curl wget lynx w3m links elinks" 1>&2
exit
;;
esac
if date --help 2>&1 >/dev/null
then
DATECMD="date -d @" # assume gnu date if --help works
else
DATECMD="date -r " # assume bsd date otherwise
fi
$GET $GET_OPTS http://dis.4chan.org/prog/subject.txt | sed '/'"$*"'/!d;s/^\(.*\)<>.*<>.*<>\(.*\)<>.*<>.*<>\(.*\)$/echo; echo Title: \1; echo URL: http:\/\/dis.4chan.org\/read\/prog\/\2; echo -n "Posted: "; $DATECMD\2; echo -n "Last Post: "; $DATECMD\3; echo/' | sh
21
Name:
Anonymous
2008-09-06 7:13
>>14,15
This may surprise you, but scanning
subject.txt is absolutely fucking useless, since it contains only thread names.
22
Name:
Anonymous
2008-09-06 7:15
>>21
One of those numbers at the end is the date of the most recent post in that thread. It's a perfectly sensible way of keeping track of changes.
23
Name:
Anonymous
2008-09-06 7:17
>>22
Do you realize the topic of this thread is ``Best way to
search /prog/'', not ``Best way to track /prog/ changes'' (there was a practical /prog/ challenge about the latter topic some time ago, by the way)?
24
Name:
Anonymous
2008-09-06 8:32
>>23
And
>>15 is about keeping a hypothetical Shii
t chan filesystem up to date for easy searching, for which
subject.txt is perfect. Learn to read.
25
Name:
Anonymous
2008-09-06 10:10
>>24
I am
>>15 and I was talking about dumping /prog/ to local system. Maybe you missed the
Download whole /prog/ while you were reading.
And,
>>23 , this may surprise you, but we here in /prog/ don't really care about thread topics.
26
Name:
Anonymous
2008-09-06 13:06
>>25
You managed to miss the point of both posts you're replying to.
27
Name:
Anonymous
2008-09-06 14:02
>>25
(load "facepalm.scm")
28
Name:
Anonymous
2008-09-09 7:25
yeh, jus download the whole thing and then grep -ri it. easy
29
Name:
Anonymous
2008-09-09 9:23
>>1
You're going to have to maintain your own index of /prog/ if you want to search it. Now that I think about it, I feel like doing a Haskell bot to index the whole of /prog/.
30
Name:
Anonymous
2008-09-09 10:11
>>29
easier in python (no troll, srsly)
31
Name:
Anonymous
2008-09-09 11:09
32
Name:
Anonymous
2008-09-09 11:47
>>30
I challenge you to do it in COBOL.
(It's easier than you think.)
33
Name:
Anonymous
2008-09-09 12:00
>>30 here
i say it's easier in python because of easy sockets and sqlite3 integration.
i mite post some code later on...
34
Name:
Anonymous
2008-09-09 12:13
>>33
Because those are Python-only constructs, of course.
35
Name:
Anonymous
2008-09-09 12:20
>>34
>Because those are Python-only constructs, of course.
no one said that.
36
Name:
Anonymous
2008-09-09 16:20
>>34 has a point, it would be just as easy to do in PHP.
37
Name:
Anonymous
2008-09-10 0:22
I love Java!!!
38
Name:
Anonymous
2008-09-10 0:26
>>36
It's just as easy to do in lisp.
39
Name:
Anonymous
2008-09-10 6:55
Needs more Shiichan FUSE module.
40
Name:
Anonymous
2008-12-01 13:31
41
Name:
Anonymous
2008-12-01 13:42
hax my anus
42
Name:
Anonymous
2008-12-01 13:44
43
Name:
Anonymous
2008-12-01 14:10
>>42
It's more likely than you think.
44
Name:
Anonymous
2008-12-01 21:32
site:dis.4chan.org/read/prog/ ""
45
Name:
Anonymous
2008-12-01 23:29
stop bumping my old threads damn it.
46
Name:
Anonymous
2008-12-02 8:18
>>45
Bumping with legitimate content is rare enough that I think it can be justified in this case.
47
Name:
Anonymous
2008-12-02 20:35
I know how to search /prog/ . And I can tell you how.
(661) 333-0012
EXPERT PROGRAMMER'S OFFICE of California, apply now !
48
Name:
Anonymous
2009-02-25 7:07
-qo?
51
Name:
Anonymous
2010-12-27 14:35