Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cl-site
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vincent Dardel
cl-site
Commits
4f389667
Commit
4f389667
authored
Oct 28, 2018
by
Erik Huelsmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use 'setq' whereever possible
parent
ec0a4aa0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
process.lisp
process.lisp
+9
-9
No files found.
process.lisp
View file @
4f389667
...
...
@@ -117,7 +117,7 @@
(
current-news
))
(
block
done
(
flet
((
next-node
()
(
set
f
node
(
plump:next-sibling
node
))
(
set
q
node
(
plump:next-sibling
node
))
(
when
(
null
node
)
;;(print "DONE")
(
return-from
done
))
...
...
@@ -129,7 +129,7 @@
(
:start
(
if
(
and
(
plump:element-p
node
)
(
equalp
(
plump:tag-name
node
)
"html"
))
(
set
f
state
:html
(
set
q
state
:html
node
(
plump:first-child
node
))
;; else
(
next-node
)))
...
...
@@ -137,7 +137,7 @@
(
:html
(
if
(
and
(
plump:element-p
node
)
(
equalp
(
plump:tag-name
node
)
"body"
))
(
set
f
state
:body
(
set
q
state
:body
node
(
plump:first-child
node
))
;; else
(
next-node
)))
...
...
@@ -145,14 +145,14 @@
(
:body
(
if
(
and
(
plump:element-p
node
)
(
equalp
(
plump:tag-name
node
)
"main"
))
(
set
f
state
:main
(
set
q
state
:main
node
(
plump:first-child
node
))
(
next-node
)))
(
:main
(
if
(
and
(
plump:element-p
node
)
(
equalp
(
plump:tag-name
node
)
"h3"
))
(
set
f
state
:read-news-heading
)
(
set
q
state
:read-news-heading
)
(
next-node
)))
(
:read-news-heading
...
...
@@ -162,14 +162,14 @@
(
return-from
done
))
;; Start a new one
(
set
f
current-news
(
set
q
current-news
(
plump:make-element
news
"section"
))
(
let
((
title-node
(
shallow-copy-object
node
)))
(
set
f
(
plump:tag-name
title-node
)
"h7"
)
(
set
q
(
plump:tag-name
title-node
)
"h7"
)
(
plump:append-child
current-news
title-node
))
(
next-node
)
(
set
f
state
:read-news-content
))
(
set
q
state
:read-news-content
))
(
:read-news-content
;; We assume the node is a paragraph and we read its content
...
...
@@ -178,7 +178,7 @@
(
progn
(
plump:append-child
current-news
(
shallow-copy-object
node
))
(
next-node
)
(
set
f
state
:main
))
(
set
q
state
:main
))
;; else
(
next-node
)))))))
(
plump:serialize
news
nil
))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment