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