From 152d5a5382b2d9418506809f59bb568941194bb3 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Thu, 6 Jun 2019 19:42:57 -0400 Subject: hn/g: Add athing:link. * hn/g (athing:link): New function. --- hn/g | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hn/g b/hn/g index ae80410..e8c7640 100755 --- a/hn/g +++ b/hn/g @@ -40,3 +40,9 @@ (if (empty? id) (error "athing:id: Unable to get id") id))) +(define (athing:link a) + (let* ((s (sxpath "//a[@class=\"storylink\"]")) + (l (s a))) + (list (sxml:attr (car l) 'href) + (sxml:text l)))) + -- cgit v1.2.3