Added tournament scrapper

master
Laurent Morvillier 4 years ago
parent 6b385b7864
commit 4a5949cf4c
  1. 2
      Cartfile
  2. 2
      Cartfile.resolved
  3. 139
      TournamentStats.xcodeproj/project.pbxproj
  4. 2
      TournamentStats.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  5. 119
      TournamentStats.xcodeproj/xcuserdata/laurent.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  6. 78
      TournamentStats.xcodeproj/xcuserdata/laurent.xcuserdatad/xcschemes/xcschememanagement.plist
  7. 0
      TournamentStats/2019/event1
  8. 0
      TournamentStats/2019/event10
  9. 0
      TournamentStats/2019/event11
  10. 0
      TournamentStats/2019/event12
  11. 0
      TournamentStats/2019/event13
  12. 0
      TournamentStats/2019/event14
  13. 0
      TournamentStats/2019/event15
  14. 0
      TournamentStats/2019/event16
  15. 0
      TournamentStats/2019/event17
  16. 0
      TournamentStats/2019/event18
  17. 0
      TournamentStats/2019/event19
  18. 0
      TournamentStats/2019/event2
  19. 0
      TournamentStats/2019/event20
  20. 0
      TournamentStats/2019/event21
  21. 0
      TournamentStats/2019/event22
  22. 0
      TournamentStats/2019/event23
  23. 0
      TournamentStats/2019/event24
  24. 0
      TournamentStats/2019/event25
  25. 0
      TournamentStats/2019/event26
  26. 0
      TournamentStats/2019/event27
  27. 0
      TournamentStats/2019/event28
  28. 0
      TournamentStats/2019/event29
  29. 0
      TournamentStats/2019/event3
  30. 0
      TournamentStats/2019/event30
  31. 0
      TournamentStats/2019/event31
  32. 0
      TournamentStats/2019/event32
  33. 0
      TournamentStats/2019/event33
  34. 0
      TournamentStats/2019/event34
  35. 0
      TournamentStats/2019/event35
  36. 0
      TournamentStats/2019/event36
  37. 0
      TournamentStats/2019/event37
  38. 0
      TournamentStats/2019/event38
  39. 0
      TournamentStats/2019/event39
  40. 0
      TournamentStats/2019/event4
  41. 0
      TournamentStats/2019/event40
  42. 0
      TournamentStats/2019/event41
  43. 0
      TournamentStats/2019/event42
  44. 0
      TournamentStats/2019/event43
  45. 0
      TournamentStats/2019/event44
  46. 0
      TournamentStats/2019/event45
  47. 0
      TournamentStats/2019/event46
  48. 0
      TournamentStats/2019/event47
  49. 0
      TournamentStats/2019/event48
  50. 0
      TournamentStats/2019/event49
  51. 0
      TournamentStats/2019/event5
  52. 0
      TournamentStats/2019/event50
  53. 0
      TournamentStats/2019/event51
  54. 0
      TournamentStats/2019/event52
  55. 0
      TournamentStats/2019/event53
  56. 0
      TournamentStats/2019/event54
  57. 0
      TournamentStats/2019/event55
  58. 0
      TournamentStats/2019/event56
  59. 0
      TournamentStats/2019/event57
  60. 0
      TournamentStats/2019/event58
  61. 0
      TournamentStats/2019/event59
  62. 0
      TournamentStats/2019/event6
  63. 0
      TournamentStats/2019/event60
  64. 0
      TournamentStats/2019/event61
  65. 0
      TournamentStats/2019/event62
  66. 0
      TournamentStats/2019/event63
  67. 0
      TournamentStats/2019/event64
  68. 0
      TournamentStats/2019/event65
  69. 0
      TournamentStats/2019/event66
  70. 0
      TournamentStats/2019/event67
  71. 0
      TournamentStats/2019/event68
  72. 0
      TournamentStats/2019/event69
  73. 0
      TournamentStats/2019/event7
  74. 0
      TournamentStats/2019/event70
  75. 0
      TournamentStats/2019/event71
  76. 0
      TournamentStats/2019/event72
  77. 0
      TournamentStats/2019/event73
  78. 0
      TournamentStats/2019/event74
  79. 0
      TournamentStats/2019/event75
  80. 0
      TournamentStats/2019/event76
  81. 0
      TournamentStats/2019/event77
  82. 0
      TournamentStats/2019/event78
  83. 0
      TournamentStats/2019/event79
  84. 0
      TournamentStats/2019/event8
  85. 0
      TournamentStats/2019/event80
  86. 0
      TournamentStats/2019/event81
  87. 0
      TournamentStats/2019/event82
  88. 0
      TournamentStats/2019/event83
  89. 0
      TournamentStats/2019/event84
  90. 0
      TournamentStats/2019/event85
  91. 0
      TournamentStats/2019/event86
  92. 0
      TournamentStats/2019/event87
  93. 0
      TournamentStats/2019/event88
  94. 0
      TournamentStats/2019/event89
  95. 0
      TournamentStats/2019/event9
  96. 0
      TournamentStats/2019/event90
  97. 41
      TournamentStats/AppDelegate.swift
  98. 1
      TournamentStats/ChipCountParser.swift
  99. 1
      TournamentStats/UI/components/PieChart.swift
  100. 22
      TournamentStats/core/String+Extension.swift
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,2 +0,0 @@
github "realm/realm-cocoa"
github "danielgindi/Charts" == 3.3.0

@ -1,2 +0,0 @@
github "danielgindi/Charts" "v3.3.0"
github "realm/realm-cocoa" "v3.17.3"

@ -3,7 +3,7 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 50; objectVersion = 52;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
@ -45,8 +45,12 @@
4D39B6F722F8573900625E31 /* StackTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D39B6F622F8573900625E31 /* StackTableCell.swift */; }; 4D39B6F722F8573900625E31 /* StackTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D39B6F622F8573900625E31 /* StackTableCell.swift */; };
4D39B6FA22F85C3400625E31 /* UIView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D39B6F922F85C3400625E31 /* UIView+Extensions.swift */; }; 4D39B6FA22F85C3400625E31 /* UIView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D39B6F922F85C3400625E31 /* UIView+Extensions.swift */; };
4D39B6FC22F8686300625E31 /* CumulatedWins.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D39B6FB22F8686300625E31 /* CumulatedWins.swift */; }; 4D39B6FC22F8686300625E31 /* CumulatedWins.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D39B6FB22F8686300625E31 /* CumulatedWins.swift */; };
4D39B6FE22F87C3700625E31 /* Charts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D39B6FD22F87C3700625E31 /* Charts.framework */; };
4D5425CA23190EA900B16ECF /* TableSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D5425C923190EA900B16ECF /* TableSize.swift */; }; 4D5425CA23190EA900B16ECF /* TableSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D5425C923190EA900B16ECF /* TableSize.swift */; };
4D96B6902707C71B00804F9A /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 4D96B68F2707C71B00804F9A /* Realm */; };
4D96B6922707C71B00804F9A /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 4D96B6912707C71B00804F9A /* RealmSwift */; };
4D96B69A2707CBD600804F9A /* Charts in Frameworks */ = {isa = PBXBuildFile; productRef = 4D96B6992707CBD600804F9A /* Charts */; };
4D96B69D2708484500804F9A /* Downloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D96B69C2708484500804F9A /* Downloader.swift */; };
4D96B69F27084B9700804F9A /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D96B69E27084B9700804F9A /* String+Extension.swift */; };
4DA5CA1E22AD078A00AC628E /* CountryCounter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DA5CA1D22AD078A00AC628E /* CountryCounter.swift */; }; 4DA5CA1E22AD078A00AC628E /* CountryCounter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DA5CA1D22AD078A00AC628E /* CountryCounter.swift */; };
4DB113D72305480600D0C671 /* InfographyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4DB113D62305480600D0C671 /* InfographyView.xib */; }; 4DB113D72305480600D0C671 /* InfographyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4DB113D62305480600D0C671 /* InfographyView.xib */; };
4DB113D923054A4100D0C671 /* InfographyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DB113D823054A4100D0C671 /* InfographyView.swift */; }; 4DB113D923054A4100D0C671 /* InfographyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DB113D823054A4100D0C671 /* InfographyView.swift */; };
@ -62,8 +66,6 @@
4DF7609022A3FB98004B0EF1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4DF7608E22A3FB98004B0EF1 /* LaunchScreen.storyboard */; }; 4DF7609022A3FB98004B0EF1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4DF7608E22A3FB98004B0EF1 /* LaunchScreen.storyboard */; };
4DF7609B22A3FB98004B0EF1 /* TournamentStatsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF7609A22A3FB98004B0EF1 /* TournamentStatsTests.swift */; }; 4DF7609B22A3FB98004B0EF1 /* TournamentStatsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF7609A22A3FB98004B0EF1 /* TournamentStatsTests.swift */; };
4DF760A722A3FD12004B0EF1 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF760A622A3FD12004B0EF1 /* Model.swift */; }; 4DF760A722A3FD12004B0EF1 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF760A622A3FD12004B0EF1 /* Model.swift */; };
4DF760AB22A3FDED004B0EF1 /* RealmSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DF760A922A3FDED004B0EF1 /* RealmSwift.framework */; };
4DF760AC22A3FDED004B0EF1 /* Realm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DF760AA22A3FDED004B0EF1 /* Realm.framework */; };
4DF760B022A47C74004B0EF1 /* RowImporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF760AF22A47C74004B0EF1 /* RowImporter.swift */; }; 4DF760B022A47C74004B0EF1 /* RowImporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF760AF22A47C74004B0EF1 /* RowImporter.swift */; };
4DF760B322A47CAE004B0EF1 /* Realm+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF760B222A47CAE004B0EF1 /* Realm+Extensions.swift */; }; 4DF760B322A47CAE004B0EF1 /* Realm+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF760B222A47CAE004B0EF1 /* Realm+Extensions.swift */; };
4DF760B522A47F6D004B0EF1 /* event2 in Resources */ = {isa = PBXBuildFile; fileRef = 4DF760B422A47F6D004B0EF1 /* event2 */; }; 4DF760B522A47F6D004B0EF1 /* event2 in Resources */ = {isa = PBXBuildFile; fileRef = 4DF760B422A47F6D004B0EF1 /* event2 */; };
@ -196,8 +198,9 @@
4D39B6F622F8573900625E31 /* StackTableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StackTableCell.swift; sourceTree = "<group>"; }; 4D39B6F622F8573900625E31 /* StackTableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StackTableCell.swift; sourceTree = "<group>"; };
4D39B6F922F85C3400625E31 /* UIView+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Extensions.swift"; sourceTree = "<group>"; }; 4D39B6F922F85C3400625E31 /* UIView+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Extensions.swift"; sourceTree = "<group>"; };
4D39B6FB22F8686300625E31 /* CumulatedWins.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CumulatedWins.swift; sourceTree = "<group>"; }; 4D39B6FB22F8686300625E31 /* CumulatedWins.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CumulatedWins.swift; sourceTree = "<group>"; };
4D39B6FD22F87C3700625E31 /* Charts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Charts.framework; path = Carthage/Build/iOS/Charts.framework; sourceTree = "<group>"; };
4D5425C923190EA900B16ECF /* TableSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableSize.swift; sourceTree = "<group>"; }; 4D5425C923190EA900B16ECF /* TableSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableSize.swift; sourceTree = "<group>"; };
4D96B69C2708484500804F9A /* Downloader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Downloader.swift; sourceTree = "<group>"; };
4D96B69E27084B9700804F9A /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; };
4DA5CA1D22AD078A00AC628E /* CountryCounter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountryCounter.swift; sourceTree = "<group>"; }; 4DA5CA1D22AD078A00AC628E /* CountryCounter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountryCounter.swift; sourceTree = "<group>"; };
4DB113D62305480600D0C671 /* InfographyView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InfographyView.xib; sourceTree = "<group>"; }; 4DB113D62305480600D0C671 /* InfographyView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InfographyView.xib; sourceTree = "<group>"; };
4DB113D823054A4100D0C671 /* InfographyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfographyView.swift; sourceTree = "<group>"; }; 4DB113D823054A4100D0C671 /* InfographyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfographyView.swift; sourceTree = "<group>"; };
@ -217,8 +220,6 @@
4DF7609A22A3FB98004B0EF1 /* TournamentStatsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TournamentStatsTests.swift; sourceTree = "<group>"; }; 4DF7609A22A3FB98004B0EF1 /* TournamentStatsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TournamentStatsTests.swift; sourceTree = "<group>"; };
4DF7609C22A3FB98004B0EF1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 4DF7609C22A3FB98004B0EF1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4DF760A622A3FD12004B0EF1 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = "<group>"; }; 4DF760A622A3FD12004B0EF1 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = "<group>"; };
4DF760A922A3FDED004B0EF1 /* RealmSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RealmSwift.framework; path = Carthage/Build/iOS/RealmSwift.framework; sourceTree = "<group>"; };
4DF760AA22A3FDED004B0EF1 /* Realm.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Realm.framework; path = Carthage/Build/iOS/Realm.framework; sourceTree = "<group>"; };
4DF760AF22A47C74004B0EF1 /* RowImporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RowImporter.swift; sourceTree = "<group>"; }; 4DF760AF22A47C74004B0EF1 /* RowImporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RowImporter.swift; sourceTree = "<group>"; };
4DF760B222A47CAE004B0EF1 /* Realm+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Realm+Extensions.swift"; sourceTree = "<group>"; }; 4DF760B222A47CAE004B0EF1 /* Realm+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Realm+Extensions.swift"; sourceTree = "<group>"; };
4DF760B422A47F6D004B0EF1 /* event2 */ = {isa = PBXFileReference; lastKnownFileType = text; path = event2; sourceTree = "<group>"; }; 4DF760B422A47F6D004B0EF1 /* event2 */ = {isa = PBXFileReference; lastKnownFileType = text; path = event2; sourceTree = "<group>"; };
@ -307,9 +308,9 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
4DF760AB22A3FDED004B0EF1 /* RealmSwift.framework in Frameworks */, 4D96B6902707C71B00804F9A /* Realm in Frameworks */,
4DF760AC22A3FDED004B0EF1 /* Realm.framework in Frameworks */, 4D96B69A2707CBD600804F9A /* Charts in Frameworks */,
4D39B6FE22F87C3700625E31 /* Charts.framework in Frameworks */, 4D96B6922707C71B00804F9A /* RealmSwift in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -323,6 +324,14 @@
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
4D96B69B2708482C00804F9A /* scrapper */ = {
isa = PBXGroup;
children = (
4D96B69C2708484500804F9A /* Downloader.swift */,
);
path = scrapper;
sourceTree = "<group>";
};
4D97941222F827A5004A2D7F /* reports */ = { 4D97941222F827A5004A2D7F /* reports */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -357,11 +366,12 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
4DF7608322A3FB96004B0EF1 /* AppDelegate.swift */, 4DF7608322A3FB96004B0EF1 /* AppDelegate.swift */,
4DF760B622A47F72004B0EF1 /* Events */, 4DF760B622A47F72004B0EF1 /* 2019 */,
4DF760B122A47C9E004B0EF1 /* core */, 4DF760B122A47C9E004B0EF1 /* core */,
4DF760A522A3FCF7004B0EF1 /* realm */, 4DF760A522A3FCF7004B0EF1 /* realm */,
4DF760C322A56207004B0EF1 /* utils */, 4DF760C322A56207004B0EF1 /* utils */,
4DF7614422A593FC004B0EF1 /* report */, 4DF7614422A593FC004B0EF1 /* report */,
4D96B69B2708482C00804F9A /* scrapper */,
4DF760AF22A47C74004B0EF1 /* RowImporter.swift */, 4DF760AF22A47C74004B0EF1 /* RowImporter.swift */,
4D0F103822C4C1C4005F797A /* ChipCountParser.swift */, 4D0F103822C4C1C4005F797A /* ChipCountParser.swift */,
4DF760C822A56497004B0EF1 /* Seed.swift */, 4DF760C822A56497004B0EF1 /* Seed.swift */,
@ -395,9 +405,6 @@
4DF760A822A3FDED004B0EF1 /* Frameworks */ = { 4DF760A822A3FDED004B0EF1 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
4D39B6FD22F87C3700625E31 /* Charts.framework */,
4DF760AA22A3FDED004B0EF1 /* Realm.framework */,
4DF760A922A3FDED004B0EF1 /* RealmSwift.framework */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -407,11 +414,12 @@
children = ( children = (
4DF760B222A47CAE004B0EF1 /* Realm+Extensions.swift */, 4DF760B222A47CAE004B0EF1 /* Realm+Extensions.swift */,
4DF760B922A524F4004B0EF1 /* Formatters.swift */, 4DF760B922A524F4004B0EF1 /* Formatters.swift */,
4D96B69E27084B9700804F9A /* String+Extension.swift */,
); );
path = core; path = core;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
4DF760B622A47F72004B0EF1 /* Events */ = { 4DF760B622A47F72004B0EF1 /* 2019 */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
4DF760C422A56451004B0EF1 /* event1 */, 4DF760C422A56451004B0EF1 /* event1 */,
@ -505,7 +513,7 @@
4D2F1C3222CC92CF007C639E /* event89 */, 4D2F1C3222CC92CF007C639E /* event89 */,
4D2F1C3422CC92CF007C639E /* event90 */, 4D2F1C3422CC92CF007C639E /* event90 */,
); );
path = Events; path = 2019;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
4DF760C022A561A8004B0EF1 /* UI */ = { 4DF760C022A561A8004B0EF1 /* UI */ = {
@ -585,13 +593,17 @@
4DF7607C22A3FB96004B0EF1 /* Sources */, 4DF7607C22A3FB96004B0EF1 /* Sources */,
4DF7607D22A3FB96004B0EF1 /* Frameworks */, 4DF7607D22A3FB96004B0EF1 /* Frameworks */,
4DF7607E22A3FB96004B0EF1 /* Resources */, 4DF7607E22A3FB96004B0EF1 /* Resources */,
4DF760AD22A3FE04004B0EF1 /* ShellScript */,
); );
buildRules = ( buildRules = (
); );
dependencies = ( dependencies = (
); );
name = TournamentStats; name = TournamentStats;
packageProductDependencies = (
4D96B68F2707C71B00804F9A /* Realm */,
4D96B6912707C71B00804F9A /* RealmSwift */,
4D96B6992707CBD600804F9A /* Charts */,
);
productName = TournamentStats; productName = TournamentStats;
productReference = 4DF7608022A3FB96004B0EF1 /* TournamentStats.app */; productReference = 4DF7608022A3FB96004B0EF1 /* TournamentStats.app */;
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
@ -621,7 +633,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 1020; LastSwiftUpdateCheck = 1020;
LastUpgradeCheck = 1020; LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "Stax River"; ORGANIZATIONNAME = "Stax River";
TargetAttributes = { TargetAttributes = {
4DF7607F22A3FB96004B0EF1 = { 4DF7607F22A3FB96004B0EF1 = {
@ -642,6 +654,10 @@
Base, Base,
); );
mainGroup = 4DF7607722A3FB96004B0EF1; mainGroup = 4DF7607722A3FB96004B0EF1;
packageReferences = (
4D96B68E2707C71B00804F9A /* XCRemoteSwiftPackageReference "realm-cocoa" */,
4D96B6982707CBD600804F9A /* XCRemoteSwiftPackageReference "Charts" */,
);
productRefGroup = 4DF7608122A3FB96004B0EF1 /* Products */; productRefGroup = 4DF7608122A3FB96004B0EF1 /* Products */;
projectDirPath = ""; projectDirPath = "";
projectRoot = ""; projectRoot = "";
@ -765,29 +781,6 @@
}; };
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
4DF760AD22A3FE04004B0EF1 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/iOS/Realm.framework",
"$(SRCROOT)/Carthage/Build/iOS/RealmSwift.framework",
"$(SRCROOT)/Carthage/Build/iOS/Charts.framework",
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks\n";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
4DF7607C22A3FB96004B0EF1 /* Sources */ = { 4DF7607C22A3FB96004B0EF1 /* Sources */ = {
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
@ -801,6 +794,8 @@
4DF760B022A47C74004B0EF1 /* RowImporter.swift in Sources */, 4DF760B022A47C74004B0EF1 /* RowImporter.swift in Sources */,
4DF7614A22A66675004B0EF1 /* TournamentWinner.swift in Sources */, 4DF7614A22A66675004B0EF1 /* TournamentWinner.swift in Sources */,
4D0F103722C4C08F005F797A /* ChipCount.swift in Sources */, 4D0F103722C4C08F005F797A /* ChipCount.swift in Sources */,
4D96B69F27084B9700804F9A /* String+Extension.swift in Sources */,
4D96B69D2708484500804F9A /* Downloader.swift in Sources */,
4DF760B322A47CAE004B0EF1 /* Realm+Extensions.swift in Sources */, 4DF760B322A47CAE004B0EF1 /* Realm+Extensions.swift in Sources */,
4DF7608822A3FB96004B0EF1 /* DetailViewController.swift in Sources */, 4DF7608822A3FB96004B0EF1 /* DetailViewController.swift in Sources */,
4D26A95423156F6F001C98D2 /* Game.swift in Sources */, 4D26A95423156F6F001C98D2 /* Game.swift in Sources */,
@ -898,6 +893,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -923,13 +919,13 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.2; IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VALIDATE_WORKSPACE = YES;
}; };
name = Debug; name = Debug;
}; };
@ -959,6 +955,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -978,13 +975,14 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.2; IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule; SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES; VALIDATE_PRODUCT = YES;
VALIDATE_WORKSPACE = YES;
}; };
name = Release; name = Release;
}; };
@ -992,19 +990,19 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 526E96RFNP; DEVELOPMENT_TEAM = 526E96RFNP;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = TournamentStats/Info.plist; INFOPLIST_FILE = TournamentStats/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = net.pokeranalytics.TournamentStats; PRODUCT_BUNDLE_IDENTIFIER = net.pokeranalytics.TournamentStats;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
}; };
@ -1014,19 +1012,19 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 526E96RFNP; DEVELOPMENT_TEAM = 526E96RFNP;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = TournamentStats/Info.plist; INFOPLIST_FILE = TournamentStats/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = net.pokeranalytics.TournamentStats; PRODUCT_BUNDLE_IDENTIFIER = net.pokeranalytics.TournamentStats;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
}; };
@ -1105,6 +1103,43 @@
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
/* End XCConfigurationList section */ /* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
4D96B68E2707C71B00804F9A /* XCRemoteSwiftPackageReference "realm-cocoa" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/realm/realm-cocoa.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 5.0.0;
};
};
4D96B6982707CBD600804F9A /* XCRemoteSwiftPackageReference "Charts" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/danielgindi/Charts.git";
requirement = {
branch = master;
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
4D96B68F2707C71B00804F9A /* Realm */ = {
isa = XCSwiftPackageProductDependency;
package = 4D96B68E2707C71B00804F9A /* XCRemoteSwiftPackageReference "realm-cocoa" */;
productName = Realm;
};
4D96B6912707C71B00804F9A /* RealmSwift */ = {
isa = XCSwiftPackageProductDependency;
package = 4D96B68E2707C71B00804F9A /* XCRemoteSwiftPackageReference "realm-cocoa" */;
productName = RealmSwift;
};
4D96B6992707CBD600804F9A /* Charts */ = {
isa = XCSwiftPackageProductDependency;
package = 4D96B6982707CBD600804F9A /* XCRemoteSwiftPackageReference "Charts" */;
productName = Charts;
};
/* End XCSwiftPackageProductDependency section */
}; };
rootObject = 4DF7607822A3FB96004B0EF1 /* Project object */; rootObject = 4DF7607822A3FB96004B0EF1 /* Project object */;
} }

@ -2,6 +2,6 @@
<Workspace <Workspace
version = "1.0"> version = "1.0">
<FileRef <FileRef
location = "self:TournamentStats.xcodeproj"> location = "self:">
</FileRef> </FileRef>
</Workspace> </Workspace>

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Bucket <Bucket
uuid = "1504355E-5C6A-4661-B8C8-D3E53DFCCF72"
type = "1" type = "1"
version = "2.0"> version = "2.0">
<Breakpoints> <Breakpoints>
<BreakpointProxy <BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SwiftErrorBreakpoint"> BreakpointExtensionID = "Xcode.Breakpoint.SwiftErrorBreakpoint">
<BreakpointContent <BreakpointContent
uuid = "3D88382A-6B29-47FD-B0A9-2E02E048A5C9"
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No"> continueAfterRunningActions = "No">
@ -14,6 +16,7 @@
<BreakpointProxy <BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent <BreakpointContent
uuid = "05A1580E-F8CE-46C5-B316-B1A794FA8901"
shouldBeEnabled = "No" shouldBeEnabled = "No"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
@ -21,8 +24,120 @@
timestampString = "588847576.95691" timestampString = "588847576.95691"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "83" startingLineNumber = "87"
endingLineNumber = "83" endingLineNumber = "87"
landmarkName = "generateReports()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "91393E94-F99E-454E-870D-3607BD52A526"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TournamentStats/scrapper/Downloader.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "152"
endingLineNumber = "152"
landmarkName = "downloadWSOPResults(tournamentId:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "8EAA1801-927A-4D42-AAC7-96B223EC35EA"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TournamentStats/scrapper/Downloader.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "126"
endingLineNumber = "126"
landmarkName = "downloadWSOPResults(tournamentId:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "37B18729-0E73-446F-A4A0-78BD0889E540"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TournamentStats/scrapper/Downloader.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "102"
endingLineNumber = "102"
landmarkName = "downloadWSOPResults(tournamentId:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "F8D95672-5E0A-410C-A88C-D3E78718B0D2"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TournamentStats/scrapper/Downloader.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "95"
endingLineNumber = "95"
landmarkName = "downloadWSOPResults(tournamentId:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "255628B7-E5D2-4291-9802-95B2C5A94551"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TournamentStats/scrapper/Downloader.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "103"
endingLineNumber = "103"
landmarkName = "downloadWSOPResults(tournamentId:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "40BBE6DB-045D-441E-8010-658F20BFBC7B"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TournamentStats/scrapper/Downloader.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "118"
endingLineNumber = "118"
landmarkName = "downloadWSOPResults(tournamentId:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "69130FF4-CCC1-42A0-8126-67995ED22414"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TournamentStats/report/ReportGenerator.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "114"
endingLineNumber = "114"
landmarkName = "generateReports()" landmarkName = "generateReports()"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>

@ -4,11 +4,87 @@
<dict> <dict>
<key>SchemeUserState</key> <key>SchemeUserState</key>
<dict> <dict>
<key>TournamentStats.xcscheme_^#shared#^_</key> <key>GettingStarted (Playground) 1.xcscheme</key>
<dict> <dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>GettingStarted (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>GettingStarted (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key> <key>orderHint</key>
<integer>0</integer> <integer>0</integer>
</dict> </dict>
<key>PlaygroundChart (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>5</integer>
</dict>
<key>PlaygroundChart (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>6</integer>
</dict>
<key>PlaygroundChart (Playground) 3.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>7</integer>
</dict>
<key>PlaygroundChart (Playground) 4.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>8</integer>
</dict>
<key>PlaygroundChart (Playground) 5.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>9</integer>
</dict>
<key>PlaygroundChart (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>4</integer>
</dict>
<key>TournamentStats.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>4DF7607F22A3FB96004B0EF1</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>4DF7609522A3FB98004B0EF1</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict> </dict>
</dict> </dict>
</plist> </plist>

@ -41,6 +41,22 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
config.deleteRealmIfMigrationNeeded = true config.deleteRealmIfMigrationNeeded = true
Realm.Configuration.defaultConfiguration = config Realm.Configuration.defaultConfiguration = config
// launchReports()
let realm = try! Realm()
try! realm.write {
realm.deleteAll()
}
Downloader.downloadWSOPResults()
let generator = ReportGenerator()
generator.generate()
return true
}
func launchReports() {
print("start report generation...") print("start report generation...")
let s = Date() let s = Date()
let generator = ReportGenerator() let generator = ReportGenerator()
@ -54,7 +70,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
if let imageData = infographyView.toImage()?.pngData() { if let imageData = infographyView.toImage()?.pngData() {
guard let directory = try? FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false) as NSURL else { guard let directory = try? FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false) as NSURL else {
return false return
} }
do { do {
@ -66,28 +82,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
} }
} }
// if let ivc = UIStoryboard(name: "Main", bundle: Bundle.main).instantiateViewController(withIdentifier: "container") as? InfographyViewController {
// ivc.generator = generator
// ivc.view.frame = CGRect(x: 0, y: 0, width: 1500, height: 1500)
//
// if let imageData = ivc.view.toImage()?.pngData() {
//
// guard let directory = try? FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false) as NSURL else {
// return false
// }
//
// do {
// try imageData.write(to: directory.appendingPathComponent("infography.png")!)
// } catch {
// print(error.localizedDescription)
// }
//
// }
//
// }
return true
} }
func applicationWillResignActive(_ application: UIApplication) { func applicationWillResignActive(_ application: UIApplication) {

@ -43,7 +43,6 @@ class ChipCountParser {
print("could not find path for chipcount") print("could not find path for chipcount")
} }
} }
return ccm return ccm
} }

@ -7,6 +7,7 @@
// //
import Foundation import Foundation
import UIKit
import Charts import Charts
class PieChart : PieChartView { class PieChart : PieChartView {

@ -0,0 +1,22 @@
//
// String+Extension.swift
// TournamentStats
//
// Created by Laurent Morvillier on 02/10/2021.
// Copyright © 2021 Stax River. All rights reserved.
//
import Foundation
extension String {
func slice(from: String, to: String) -> String? {
return (range(of: from)?.upperBound).flatMap { substringFrom in
(range(of: to, range: substringFrom..<endIndex)?.lowerBound).map { substringTo in
String(self[substringFrom..<substringTo])
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save