Whatever is on your mind, whether Lisp related or not.
-
dmitry_vk
- Posts: 96
- Joined: Sat Jun 28, 2008 8:01 am
- Location: Russia, Kazan
-
Contact:
Post
by dmitry_vk » Fri Jun 19, 2009 5:06 am
Harleqin wrote:
- Reading a page into a string should be possible much easier.
The easy way is to use DRAKMA.
will return you a string (http-request has _a lot_ of options, it can return not just strings).
-
schoppenhauer
- Posts: 99
- Joined: Sat Jul 26, 2008 2:30 pm
- Location: Germany
-
Contact:
Post
by schoppenhauer » Fri Jun 19, 2009 8:06 am
Maybe another interesting question would be whether the thing it basically does is usefull to provide an RSS-Feed for this Forum (no matter how exactly it is implemented now).
-
Harleqin
- Posts: 71
- Joined: Wed Dec 17, 2008 5:18 am
- Location: Bonn, Germany
Post
by Harleqin » Fri Jun 19, 2009 9:24 am
schoppenhauer wrote:Harleqin wrote:Regarding the HTML parsing: I haven't done this before, but I thought of
Closure HTML.
Try it

(Its possible, but annoying)
This
should work, but I can't test it currently:
Code: Select all
(defun get-entries (path)
(let ((page (chtml:parse (trivial-http:http-get path) (stp:make-builder)))
(entries ()))
(stp:do-recursively (el page)
(when (and (typep el 'stp:element)
(equal (stp:local-name el) "a")
(equal (stp:attribute-value el "class") "topictitle"))
(push (cons (stp:attribute-value el "href")
(stp:string-value el))
entries)))))
Note that it parses the stream directly, and doesn't need the html-page-to-string function. It uses Closure HTML and CXML-STP (a nice alternative for DOM).
schoppenhauer wrote:Maybe another interesting question would be whether the thing it basically does is usefull to provide an RSS-Feed for this Forum (no matter how exactly it is implemented now).
Yes, absolutely.

"Just throw more hardware at it" is the root of all evil.
Svante
-
findinglisp
- Posts: 447
- Joined: Sat Jun 28, 2008 7:49 am
- Location: Austin, TX
-
Contact:
Post
by findinglisp » Fri Jun 19, 2009 9:33 am
Just so we're clear... LispForum runs on phpBB on a shared hosting account. I have no ability to run any CL on that system, so it really doesn't matter in terms of adding RSS capabilities to the forums. There are several RSS systems for phpBB, but phpBB being written in PHP, they all require you to actually patch the phpBB source code directly. I simply haven't had the time to try them all out. Kroger offered to do some research to come up with the best RSS implementation and then I'll have to go in and patch things.
-
Jasper
- Posts: 209
- Joined: Fri Oct 10, 2008 8:22 am
- Location: Eindhoven, The Netherlands
-
Contact:
Post
by Jasper » Fri Mar 19, 2010 2:39 pm
Just +1 on wanting RSS. Tbh that this forum system doesn't support it defaultly seems little pathetic... I made an(admittedly untested) rss writer for
'my' project, and
it isn't that hard..
Not to diss anyone except for phpBB board :p
-
findinglisp
- Posts: 447
- Joined: Sat Jun 28, 2008 7:49 am
- Location: Austin, TX
-
Contact:
Post
by findinglisp » Mon Mar 22, 2010 6:08 pm
Jasper wrote:Just +1 on wanting RSS. Tbh that this forum system doesn't support it defaultly seems little pathetic... I made an(admittedly untested) rss writer for
'my' project, and
it isn't that hard..
Not to diss anyone except for phpBB board :p
Yes, agreed. I would thought that having RSS embedded into every web application these days would be the default, but alas it is not.