-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.lisp
138 lines (120 loc) · 3.17 KB
/
package.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
;;
;; Copyright 2016 Drew Thoreson
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation, version 2 of the
;; License.
;;
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
;;
(in-package :cl-user)
(defpackage :config
(:use :cl)
(:export :merge-config :load-from-file :get-value))
;; Data store, type definitions
(defpackage :feed-store
(:use :cl)
(:import-from :postmodern
:with-transaction
:insert-dao
:select-dao
:save-dao
:update-dao
:query-dao
:query
:execute)
(:import-from :s-sql :sql :sql-compile)
(:import-from :simple-date :universal-time-to-timestamp)
(:export :with-connection
:initialize
:feed
:feed-id
:feed-name
:feed-fetcher
:feed-parser
:feed-source
:feed-added
:feed-updated
:feed-new-items
:feed-schedule
:feed-schedule-parameter
:feed-unread
:feed-tags
:feed-metadata
:item
:item-id
:item-feed
:item-added
:item-read
:item-tags
:item-metadata
:tag
:metadata
+metadata-element+
+metadata-attribute+
:delete-metadata
:element
:element-name
:element-text
:element-children
:element-attributes
:attribute
:attribute-name
:attribute-value
:object-id
:object-type
:object-metadata
:add-feed
:save-feed
:save-metadata
:rm-feed
:get-feeds
:get-feed
:mark-item-read
:mark-feed-read
:mark-all-read
:add-items
:add-item
:get-items
:get-item
:query-items
:query-feeds
:update-feed-unread
:count-feed-unread))
;; Fetchers
(defpackage :feed-source
(:use :cl)
(:export :fetch))
;; Parser meta-package
(defpackage :feed-parser
(:use :cl)
(:export :parse
:get-parser
:register-parser))
(defpackage :curator
(:use :cl)
(:export :curate))
;; Feed update logic and etc.
(defpackage :controller
(:use :cl)
(:export :add-feed
:update-feed
:update-all))
;; Feed update scheduling
(defpackage :scheduler
(:use :cl :split-sequence)
(:export :schedule-feed
:schedule-all
:register-schedule))
;; HTTP server with RESTful API
(defpackage :http-server
(:use :cl :hunchentoot)
(:shadow :start :stop)
(:export :start :stop))