]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blob - htsn-import.cabal
Bump to version 0.2.0.
[dead/htsn-import.git] / htsn-import.cabal
1 name: htsn-import
2 version: 0.2.0
3 cabal-version: >= 1.8
4 author: Michael Orlitzky
5 maintainer: Michael Orlitzky <michael@orlitzky.com>
6 category: Utils
7 license: GPL-3
8 license-file: doc/LICENSE
9 build-type: Simple
10 extra-source-files:
11 doc/dbschema/*.png
12 doc/htsn-importrc.example
13 doc/man1/htsn-import.1
14 doc/CHANGES.database
15 doc/README.development
16 doc/TODO
17 makefile
18 schema/*.dtd
19 schemagen/AutoRacingResultsXML/*.xml
20 schemagen/Auto_Racing_Schedule_XML/*.xml
21 schemagen/CBASK_3PPctXML/*.xml
22 schemagen/Cbask_All_Tourn_Teams_XML/*.xml
23 schemagen/CBASK_AssistsXML/*.xml
24 schemagen/Cbask_Awards_XML/*.xml
25 schemagen/CBASK_BlocksXML/*.xml
26 schemagen/Cbask_Conf_Standings_XML/*.xml
27 schemagen/Cbask_DivII_III_Indv_Stats_XML/*.xml
28 schemagen/Cbask_DivIII_Team_Stats_XML/*.xml
29 schemagen/Cbask_DivII_Team_Stats_XML/*.xml
30 schemagen/CBASK_FGPctXML/*.xml
31 schemagen/CBASK_FoulsXML/*.xml
32 schemagen/CBASK_FTPctXML/*.xml
33 schemagen/Cbask_Indv_Scoring_XML/*.xml
34 schemagen/CBASK_Lineup_XML/*.xml
35 schemagen/CBASK_MinutesXML/*.xml
36 schemagen/Cbask_Polls_XML/*.xml
37 schemagen/cbaskpreviewxml/*.xml
38 schemagen/CBASK_ReboundsXML/*.xml
39 schemagen/CBASK_ScoringLeadersXML/*.xml
40 schemagen/Cbask_Team_ThreePT_Made_XML/*.xml
41 schemagen/Cbask_Team_ThreePT_PCT_XML/*.xml
42 schemagen/Cbask_Team_Win_Pct_XML/*.xml
43 schemagen/CBASK_TopTwentyFiveResult_XML/*.xml
44 schemagen/Cbask_Top_Twenty_Five_XML/*.xml
45 schemagen/Cbask_Tourn_Awards_XML/*.xml
46 schemagen/Cbask_Tourn_Champs_XML/*.xml
47 schemagen/Cbask_Tourn_Indiv_XML/*.xml
48 schemagen/Cbask_Tourn_Leaders_XML/*.xml
49 schemagen/Cbask_Tourn_MVP_XML/*.xml
50 schemagen/Cbask_Tourn_Records_XML/*.xml
51 schemagen/cflpreviewxml/*.xml
52 schemagen/earlylineXML/*.xml
53 schemagen/Heartbeat/*.xml
54 schemagen/Injuries_Detail_XML/*.xml
55 schemagen/injuriesxml/*.xml
56 schemagen/jfilexml/*.xml
57 schemagen/LeagueScheduleXML/*.xml
58 schemagen/Matchup_NBA_NHL_XML/*.xml
59 schemagen/Minor_Baseball_League_Leaders_XML/*.xml
60 schemagen/Minor_Baseball_Standings_XML/*.xml
61 schemagen/Minor_Baseball_Transactions_XML/*.xml
62 schemagen/minorscoresxml/*.xml
63 schemagen/mlbbattingavgxml/*.xml
64 schemagen/mlbdoublesleadersxml/*.xml
65 schemagen/MLB_ERA_Leaders/*.xml
66 schemagen/MLB_Fielding_XML/*.xml
67 schemagen/MLBGamesPlayedXML/*.xml
68 schemagen/MLB_Gaming_Matchup_XML/*.xml
69 schemagen/MLBGIDPXML/*.xml
70 schemagen/MLBHitByPitchXML/*.xml
71 schemagen/mlbhitsleadersxml/*.xml
72 schemagen/mlbhomerunsxml/*.xml
73 schemagen/MLBHRFreqXML/*.xml
74 schemagen/MLBIntWalksXML/*.xml
75 schemagen/MLBKORateXML/*.xml
76 schemagen/MLB_Lineup_XML/*.xml
77 schemagen/MLB_Matchup_XML/*.xml
78 schemagen/mlbonbasepctxml/*.xml
79 schemagen/MLBOPSXML/*.xml
80 schemagen/MLB_earlylineXML/*.xml
81 schemagen/MLB_Pitching_Appearances_Leaders/*.xml
82 schemagen/MLB_Pitching_Balks_Leaders/*.xml
83 schemagen/MLB_Pitching_CG_Leaders/*.xml
84 schemagen/MLB_Pitching_ER_Allowed_Leaders/*.xml
85 schemagen/MLB_Pitching_Hit_Batters_Leaders/*.xml
86 schemagen/MLB_Pitching_Hits_Allowed_Leaders/*.xml
87 schemagen/MLB_Pitching_HR_Allowed_Leaders/*.xml
88 schemagen/MLB_Pitching_IP_Leaders/*.xml
89 schemagen/MLB_Pitching_Runs_Allowed_Leaders/*.xml
90 schemagen/MLB_Pitching_Saves_Leaders/*.xml
91 schemagen/MLB_Pitching_Shut_Outs_Leaders/*.xml
92 schemagen/MLB_Pitching_Starts_Leaders/*.xml
93 schemagen/MLB_Pitching_Strike_Outs_Leaders/*.xml
94 schemagen/MLB_Pitching_Walks_Leaders/*.xml
95 schemagen/MLB_Pitching_WHIP_Leaders/*.xml
96 schemagen/MLB_Pitching_Wild_Pitches_Leaders/*.xml
97 schemagen/MLB_Pitching_Win_Percentage_Leaders/*.xml
98 schemagen/MLB_Pitching_WL_Leaders/*.xml
99 schemagen/MLBPlateAppsXML/*.xml
100 schemagen/mlbpreviewxml/*.xml
101 schemagen/mlbrbisxml/*.xml
102 schemagen/mlbrunsleadersxml/*.xml
103 schemagen/MLBSacFliesXML/*.xml
104 schemagen/MLBSacrificesXML/*.xml
105 schemagen/MLBSBSuccessXML/*.xml
106 schemagen/mlbsluggingpctxml/*.xml
107 schemagen/mlbstandxml/*.xml
108 schemagen/mlbstandxml_preseason/*.xml
109 schemagen/mlbstolenbasexml/*.xml
110 schemagen/mlbtotalbasesleadersxml/*.xml
111 schemagen/mlbtriplesleadersxml/*.xml
112 schemagen/MLBWalkRateXML/*.xml
113 schemagen/mlbwalksleadersxml/*.xml
114 schemagen/MLBXtraBaseHitsXML/*.xml
115 schemagen/MLS_Preview_XML/*.xml
116 schemagen/NBA3PPctXML/*.xml
117 schemagen/NBAAssistsXML/*.xml
118 schemagen/NBABlocksXML/*.xml
119 schemagen/nbaconfrecxml/*.xml
120 schemagen/nbadaysxml/*.xml
121 schemagen/nbadivisionsxml/*.xml
122 schemagen/NBAFGPctXML/*.xml
123 schemagen/NBAFoulsXML/*.xml
124 schemagen/NBAFTPctXML/*.xml
125 schemagen/NBA_Gaming_Matchup_XML/*.xml
126 schemagen/NBALineupXML/*.xml
127 schemagen/NBAMinutesXML/*.xml
128 schemagen/NBA_Playoff_Matchup_XML/*.xml
129 schemagen/nbapreviewxml/*.xml
130 schemagen/NBAReboundsXML/*.xml
131 schemagen/NBAScorersXML/*.xml
132 schemagen/nbastandxml/*.xml
133 schemagen/NBAStealsXML/*.xml
134 schemagen/nbateamleadersxml/*.xml
135 schemagen/NBA_Team_Stats_XML/*.xml
136 schemagen/nbatripledoublexml/*.xml
137 schemagen/NBATurnoversXML/*.xml
138 schemagen/NCAA_Conference_Schedule_XML/*.xml
139 schemagen/NCAA_FB_Preview_XML/*.xml
140 schemagen/newsxml/*.xml
141 schemagen/nflfirstdownxml/*.xml
142 schemagen/NFLFumbleLeaderXML/*.xml
143 schemagen/NFLGiveTakeXML/*.xml
144 schemagen/NFLInside20XML/*.xml
145 schemagen/NFL_KickingLeaders_XML/*.xml
146 schemagen/NFLKickoffsXML/*.xml
147 schemagen/NFLMondayNightXML/*.xml
148 schemagen/NFL_NBA_Draft_XML/*.xml
149 schemagen/NFL_NCAA_FB_Matchup_XML/*.xml
150 schemagen/NFLPassLeadXML/*.xml
151 schemagen/nflpreviewxml/*.xml
152 schemagen/NFLQBStartsXML/*.xml
153 schemagen/NFL_Roster_XML/*.xml
154 schemagen/NFLSackLeadersXML/*.xml
155 schemagen/nflstandxml/*.xml
156 schemagen/NFLTeamRankingsXML/*.xml
157 schemagen/NFL_Team_Stats_XML/*.xml
158 schemagen/NFLTopPerformanceXML/*.xml
159 schemagen/NFLTotalYardageXML/*.xml
160 schemagen/nhlpreviewxml/*.xml
161 schemagen/Odds_XML/*.xml
162 schemagen/recapxml/*.xml
163 schemagen/Schedule_Changes_XML/*.xml
164 schemagen/scoresxml/*.xml
165 schemagen/Transactions_XML/*.xml
166 schemagen/weatherxml/*.xml
167 schemagen/Weekly_Sched_XML/*.xml
168 schemagen/WNBA3PPctXML/*.xml
169 schemagen/WNBAAssistsXML/*.xml
170 schemagen/WNBABlocksXML/*.xml
171 schemagen/WNBAFGPctXML/*.xml
172 schemagen/WNBAFoulsXML/*.xml
173 schemagen/WNBAFTPctXML/*.xml
174 schemagen/WNBAMinutesXML/*.xml
175 schemagen/WNBAReboundsXML/*.xml
176 schemagen/WNBAScorersXML/*.xml
177 schemagen/wnbastandxml/*.xml
178 schemagen/WNBAStealsXML/*.xml
179 schemagen/WNBA_Team_Leaders_XML/*.xml
180 schemagen/WNBATurnoversXML/*.xml
181 schemagen/WorldBaseballPreviewXML/*.xml
182 test/shell/*.test
183 test/xml/*.xml
184 test/xml/*.dtd
185 test/xml/gameinfo/*.xml
186 test/xml/gameinfo/*.dtd
187 test/xml/sportinfo/*.xml
188 test/xml/sportinfo/*.dtd
189 synopsis:
190 Import XML files from The Sports Network into an RDBMS.
191 description:
192 /Usage/:
193 .
194 @
195 htsn-import [OPTIONS] [FILES]
196 @
197 .
198 The Sports Network <http://www.sportsnetwork.com/> offers an XML feed
199 containing various sports news and statistics. Our sister program
200 /htsn/ is capable of retrieving the feed and saving the individual
201 XML documents contained therein. But what to do with them?
202 .
203 The purpose of /htsn-import/ is to take these XML documents and
204 get them into something we can use, a relational database management
205 system (RDBMS), i.e. \"a SQL database\". The structure of
206 relational database, is, well, relational, and the feed XML is not. So
207 there is some work to do before the data can be inserted.
208 .
209 First, we must parse the XML. Each supported document type (see below)
210 has a full pickle/unpickle implementation (\"pickle\" is simply a
211 synonym for serialize here). That means that we parse the entire
212 document into a data structure, and if we pickle (serialize) that data
213 structure, we get the exact same XML document tha we started with.
214 .
215 This is important for two reasons. First, it serves as a second level
216 of validation. The first validation is performed by the XML parser,
217 but if that succeeds and unpicking fails, we know that something is
218 fishy. Second, we don't ever want to be surprised by some new element
219 or attribute showing up in the XML. The fact that we can unpickle the
220 whole thing now means that we won't be surprised in the future.
221 .
222 The aforementioned feature is especially important because we
223 automatically migrate the database schema every time we import a
224 document. If you attempt to import a \"newsxml.dtd\" document, all
225 database objects relating to the news will be created if they do not
226 exist. We don't want the schema to change out from under us without
227 warning, so it's important that no XML be parsed that would result in
228 a different schema than we had previously. Since we can
229 pickle/unpickle everything already, this should be impossible.
230 .
231 Examples and usage documentation are available in the man page.
232
233 executable htsn-import
234 build-depends:
235 base >= 4.6 && < 5,
236 cmdargs >= 0.10.6,
237 configurator >= 0.2,
238 directory >= 1.2,
239 filepath >= 1.3,
240 hslogger >= 1.2,
241 htsn-common >= 0.0.1,
242 hxt >= 9.3,
243 groundhog >= 0.5,
244 groundhog-postgresql >= 0.5,
245 groundhog-sqlite >= 0.5,
246 groundhog-th >= 0.5,
247 MissingH >= 1.2,
248 old-locale >= 1,
249 split >= 0.2,
250 tasty >= 0.8,
251 tasty-hunit >= 0.8,
252 time >= 1.4,
253 transformers >= 0.3,
254 tuple >= 0.2
255
256 main-is:
257 Main.hs
258
259 hs-source-dirs:
260 src/
261
262 other-modules:
263 Backend
264 CommandLine
265 Configuration
266 ConnectionString
267 ExitCodes
268 OptionalConfiguration
269 TSN.Codegen
270 TSN.Database
271 TSN.DbImport
272 TSN.Location
273 TSN.Parse
274 TSN.Picklers
275 TSN.Team
276 TSN.XmlImport
277 TSN.XML.AutoRacingResults
278 TSN.XML.AutoRacingSchedule
279 TSN.XML.EarlyLine
280 TSN.XML.GameInfo
281 TSN.XML.Heartbeat
282 TSN.XML.Injuries
283 TSN.XML.InjuriesDetail
284 TSN.XML.JFile
285 TSN.XML.MLBEarlyLine
286 TSN.XML.News
287 TSN.XML.Odds
288 TSN.XML.ScheduleChanges
289 TSN.XML.Scores
290 TSN.XML.SportInfo
291 TSN.XML.Weather
292 Xml
293
294 ghc-options:
295 -Wall
296 -fwarn-hi-shadowing
297 -fwarn-missing-signatures
298 -fwarn-name-shadowing
299 -fwarn-orphans
300 -fwarn-type-defaults
301 -fwarn-tabs
302 -fwarn-incomplete-record-updates
303 -fwarn-monomorphism-restriction
304 -fwarn-unused-do-bind
305 -O2
306
307 ghc-prof-options:
308 -prof
309 -fprof-auto
310 -fprof-cafs
311 -- The following unbreak profiling with template haskell. We have
312 -- to build the program twice; once without profile and again with
313 -- these flags.
314 -hisuf hi_p
315 -osuf o_p
316
317
318 test-suite testsuite
319 type: exitcode-stdio-1.0
320 hs-source-dirs: src test
321 main-is: TestSuite.hs
322 build-depends:
323 base >= 4.6 && < 5,
324 cmdargs >= 0.10.6,
325 configurator >= 0.2,
326 directory >= 1.2,
327 filepath >= 1.3,
328 hslogger >= 1.2,
329 htsn-common >= 0.0.1,
330 hxt >= 9.3,
331 groundhog >= 0.5,
332 groundhog-postgresql >= 0.5,
333 groundhog-sqlite >= 0.5,
334 groundhog-th >= 0.5,
335 MissingH >= 1.2,
336 old-locale >= 1,
337 split >= 0.2,
338 tasty >= 0.8,
339 tasty-hunit >= 0.8,
340 time >= 1.4,
341 transformers >= 0.3,
342 tuple >= 0.2
343
344 -- It's not entirely clear to me why I have to reproduce all of this.
345 ghc-options:
346 -Wall
347 -fwarn-hi-shadowing
348 -fwarn-missing-signatures
349 -fwarn-name-shadowing
350 -fwarn-orphans
351 -fwarn-type-defaults
352 -fwarn-tabs
353 -fwarn-incomplete-record-updates
354 -fwarn-monomorphism-restriction
355 -fwarn-unused-do-bind
356 -O2
357
358
359 test-suite doctests
360 type: exitcode-stdio-1.0
361 hs-source-dirs: test
362 main-is: Doctests.hs
363 build-depends:
364 base >= 4.6 && < 5,
365 -- Additional test dependencies.
366 doctest >= 0.9
367
368 -- It's not entirely clear to me why I have to reproduce all of this.
369 ghc-options:
370 -Wall
371 -fwarn-hi-shadowing
372 -fwarn-missing-signatures
373 -fwarn-name-shadowing
374 -fwarn-orphans
375 -fwarn-type-defaults
376 -fwarn-tabs
377 -fwarn-incomplete-record-updates
378 -fwarn-monomorphism-restriction
379 -fwarn-unused-do-bind
380 -rtsopts
381 -threaded
382 -optc-O3
383 -optc-march=native
384 -O2
385
386
387 -- These won't work without shelltestrunner installed in your
388 -- $PATH. Maybe there is some way to tell Cabal that.
389 test-suite shelltests
390 type: exitcode-stdio-1.0
391 hs-source-dirs: test
392 main-is: ShellTests.hs
393
394 build-depends:
395 base >= 4.6 && < 5,
396 cmdargs >= 0.10.6,
397 configurator >= 0.2,
398 directory >= 1.2,
399 filepath >= 1.3,
400 hslogger >= 1.2,
401 htsn-common >= 0.0.1,
402 hxt >= 9.3,
403 groundhog >= 0.5,
404 groundhog-postgresql >= 0.5,
405 groundhog-sqlite >= 0.5,
406 groundhog-th >= 0.5,
407 MissingH >= 1.2,
408 old-locale >= 1,
409 split >= 0.2,
410 process >= 1.1,
411 tasty >= 0.8,
412 tasty-hunit >= 0.8,
413 time >= 1.4,
414 transformers >= 0.3,
415 tuple >= 0.2
416
417
418
419 source-repository head
420 type: git
421 location: http://michael.orlitzky.com/git/htsn-import.git
422 branch: master