Update for better reports

master
Laurent 2 years ago
parent 51212f2c93
commit a5e6233696
  1. 4
      TournamentStats.xcodeproj/project.pbxproj
  2. 12
      TournamentStats/AppDelegate.swift
  3. 5
      TournamentStats/NotablePlayers.swift
  4. 8
      TournamentStats/report/structures/TournamentWinner.swift
  5. 49
      TournamentStats/scrapper/Downloader.swift

@ -630,7 +630,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 526E96RFNP;
INFOPLIST_FILE = TournamentStats/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -652,7 +652,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 526E96RFNP;
INFOPLIST_FILE = TournamentStats/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",

@ -39,12 +39,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
// launchReports()
// let realm = try! Realm()
// try! realm.write {
// realm.deleteAll()
// }
//
// Downloader.downloadWSOPResults()
let realm = try! Realm()
try! realm.write {
realm.deleteAll()
}
Downloader.downloadWSOPResults()
let generator = ReportGenerator()
generator.generate()

@ -117,7 +117,10 @@ class NotablePlayers {
"John Hennigan",
"Kristen Foxen",
"Espen Jorstad",
"Greg Raymer"
"Greg Raymer",
"Patrick Leonard",
"Benny Glaser",
"Allen Kessler"
]
}

@ -26,7 +26,9 @@ struct TournamentWinner : HTMLRepresentable {
return [
ColumnDescriptor(header: "Buy-in", number: true, widthWeight: 0.5),
ColumnDescriptor(header: "Event", number: false, widthWeight: 3.0),
ColumnDescriptor(header: "Prizepool", number: true, widthWeight: 1.0)]
ColumnDescriptor(header: "Prizepool", number: true, widthWeight: 1.0),
ColumnDescriptor(header: "Entries", number: true, widthWeight: 1.0),
]
}
}
@ -43,7 +45,8 @@ struct TournamentWinner : HTMLRepresentable {
return [
tournament.buyin.currencyFormatted,
tournament.name,
tournament.prizepool.currencyFormatted
tournament.prizepool.currencyFormatted,
tournament.entries.formatted()
]
}
}
@ -57,6 +60,7 @@ struct TournamentWinner : HTMLRepresentable {
header.append("<td width=\"130\">Prize</td>")
} else {
header.append("<td width=\"130\">Prizepool</td>")
header.append("<td width=\"100\">Entries</td>")
}
return "<tr class=\"table-header\">\(header)</tr>"
}

@ -19,29 +19,38 @@ class Downloader {
static func downloadWSOPResults() {
let ids = [
// "21666", // 1
// "21667", // 2
// "21670", // 5
// "21671", // 6
// "21669", // 4
// "21672", // 7
// "21673", // 8
// "21674", // 9
// "21668", // 3
// "21675", // 10
// "21676", // 11
// "21677", // 12
// "21678", // 13
// "21679", // 14
// "21680", // 15
// "21681", // 16
// "21682", // 17
// "21684", // 19
// "21685", // 20
// "21686", // 21
"21666", // 1
"21667", // 2
"21670", // 5
"21671", // 6
"21669", // 4
"21672", // 7
"21673", // 8
"21674", // 9
"21668", // 3
"21675", // 10
"21676", // 11
"21677", // 12
"21678", // 13
"21679", // 14
"21680", // 15
"21681", // 16
"21682", // 17
"21684", // 19
"21685", // 20
"21686", // 21
"21687", // 22
"21688", // 23
"21689", // 24
"21690", // 25
"21691", // 26
"21692", // 27
"21693", // 28
"21694", // 29
"21695", // 30
"21696", // 31
"21697", // 32
]
for id in ids {

Loading…
Cancel
Save