|
|
|
|
@ -9,149 +9,164 @@ class ProductCSVDescriptors { |
|
|
|
|
*/ |
|
|
|
|
val all: List<CSVDescriptor> = |
|
|
|
|
listOf( |
|
|
|
|
ProductCSVDescriptors.pokerIncomeCash, |
|
|
|
|
ProductCSVDescriptors.pokerBankrollTracker, |
|
|
|
|
ProductCSVDescriptors.runGoodCashGames, |
|
|
|
|
ProductCSVDescriptors.runGoodTournaments, |
|
|
|
|
ProductCSVDescriptors.iOSPokerAnalytics |
|
|
|
|
|
|
|
|
|
pokerIncomeCash, |
|
|
|
|
pokerBankrollTracker, |
|
|
|
|
runGoodCashGames, |
|
|
|
|
runGoodTournaments, |
|
|
|
|
iOSPokerAnalytics |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
val pokerIncomeCash: CSVDescriptor = SessionCSVDescriptor( |
|
|
|
|
DataSource.POKER_INCOME, |
|
|
|
|
false, |
|
|
|
|
SessionField.Start("Start Time"), |
|
|
|
|
SessionField.End("End Time"), |
|
|
|
|
SessionField.Buyin("Buy In"), |
|
|
|
|
SessionField.CashedOut("Cashed Out"), |
|
|
|
|
SessionField.Break("Break Minutes"), |
|
|
|
|
SessionField.LimitType("Limit Type"), |
|
|
|
|
SessionField.Game("Game"), |
|
|
|
|
SessionField.Bankroll("Bankroll"), |
|
|
|
|
SessionField.Location("Location"), |
|
|
|
|
SessionField.Location("Location Type"), |
|
|
|
|
SessionField.Comment("Note"), |
|
|
|
|
SessionField.Tips("Tips"), |
|
|
|
|
SessionField.Blind("Stake") |
|
|
|
|
) |
|
|
|
|
private val pokerIncomeCash: CSVDescriptor |
|
|
|
|
get() { |
|
|
|
|
return SessionCSVDescriptor( |
|
|
|
|
DataSource.POKER_INCOME, |
|
|
|
|
false, |
|
|
|
|
SessionField.Start("Start Time"), |
|
|
|
|
SessionField.End("End Time"), |
|
|
|
|
SessionField.Buyin("Buy In"), |
|
|
|
|
SessionField.CashedOut("Cashed Out"), |
|
|
|
|
SessionField.Break("Break Minutes"), |
|
|
|
|
SessionField.LimitType("Limit Type"), |
|
|
|
|
SessionField.Game("Game"), |
|
|
|
|
SessionField.Bankroll("Bankroll"), |
|
|
|
|
SessionField.Location("Location"), |
|
|
|
|
SessionField.Location("Location Type"), |
|
|
|
|
SessionField.Comment("Note"), |
|
|
|
|
SessionField.Tips("Tips"), |
|
|
|
|
SessionField.Blind("Stake") |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
val pokerBankrollTracker: CSVDescriptor = SessionCSVDescriptor( |
|
|
|
|
DataSource.POKER_BANKROLL_TRACKER, |
|
|
|
|
true, |
|
|
|
|
SessionField.Start("starttime", dateFormat = "MM/dd/yy HH:mm"), |
|
|
|
|
SessionField.End("endtime", dateFormat = "MM/dd/yy HH:mm"), |
|
|
|
|
SessionField.SessionType("variant"), |
|
|
|
|
SessionField.Buyin("buyin"), |
|
|
|
|
SessionField.CashedOut("cashout"), |
|
|
|
|
SessionField.Rebuy("rebuycosts"), |
|
|
|
|
SessionField.Addon("addoncosts"), |
|
|
|
|
SessionField.Break("breakminutes"), |
|
|
|
|
SessionField.LimitType("limit"), |
|
|
|
|
SessionField.Game("game"), |
|
|
|
|
SessionField.Bankroll("currency"), // same as currency code |
|
|
|
|
SessionField.Location("type"), |
|
|
|
|
SessionField.Comment("comment", true), |
|
|
|
|
SessionField.Tips("expensesfromstack"), |
|
|
|
|
SessionField.SmallBlind("smallblind"), |
|
|
|
|
SessionField.BigBlind("bigblind"), |
|
|
|
|
SessionField.TournamentNumberOfPlayers("player"), |
|
|
|
|
SessionField.TournamentPosition("place"), |
|
|
|
|
SessionField.TournamentName("mttname"), |
|
|
|
|
SessionField.CurrencyCode("currency"), |
|
|
|
|
SessionField.StackingIn("sharesincomings"), |
|
|
|
|
SessionField.StackingOut("sharesoutgoings"), |
|
|
|
|
SessionField.CurrencyRate("exchangerate"), |
|
|
|
|
SessionField.TableSize("tablesize") |
|
|
|
|
) |
|
|
|
|
private val pokerBankrollTracker: CSVDescriptor |
|
|
|
|
get() { |
|
|
|
|
return SessionCSVDescriptor( |
|
|
|
|
DataSource.POKER_BANKROLL_TRACKER, |
|
|
|
|
true, |
|
|
|
|
SessionField.Start("starttime", dateFormat = "MM/dd/yy HH:mm"), |
|
|
|
|
SessionField.End("endtime", dateFormat = "MM/dd/yy HH:mm"), |
|
|
|
|
SessionField.SessionType("variant"), |
|
|
|
|
SessionField.Buyin("buyin"), |
|
|
|
|
SessionField.CashedOut("cashout"), |
|
|
|
|
SessionField.Rebuy("rebuycosts"), |
|
|
|
|
SessionField.Addon("addoncosts"), |
|
|
|
|
SessionField.Break("breakminutes"), |
|
|
|
|
SessionField.LimitType("limit"), |
|
|
|
|
SessionField.Game("game"), |
|
|
|
|
SessionField.Bankroll("currency"), // same as currency code |
|
|
|
|
SessionField.Location("type"), |
|
|
|
|
SessionField.Comment("comment", true), |
|
|
|
|
SessionField.Tips("expensesfromstack"), |
|
|
|
|
SessionField.SmallBlind("smallblind"), |
|
|
|
|
SessionField.BigBlind("bigblind"), |
|
|
|
|
SessionField.TournamentNumberOfPlayers("player"), |
|
|
|
|
SessionField.TournamentPosition("place"), |
|
|
|
|
SessionField.TournamentName("mttname"), |
|
|
|
|
SessionField.CurrencyCode("currency"), |
|
|
|
|
SessionField.StackingIn("sharesincomings"), |
|
|
|
|
SessionField.StackingOut("sharesoutgoings"), |
|
|
|
|
SessionField.CurrencyRate("exchangerate"), |
|
|
|
|
SessionField.TableSize("tablesize") |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
val iOSPokerAnalytics: CSVDescriptor = SessionCSVDescriptor( |
|
|
|
|
DataSource.POKER_ANALYTICS, |
|
|
|
|
true, |
|
|
|
|
SessionField.Start("Start date", dateFormat = "MM/dd/yy HH:mm:ss"), |
|
|
|
|
SessionField.End("End date", dateFormat = "MM/dd/yy HH:mm:ss"), |
|
|
|
|
SessionField.Break("Break", callback = { string -> |
|
|
|
|
val number = NumberCSVField.defaultParse(string) |
|
|
|
|
return@Break number?.times(1000.0) |
|
|
|
|
}), |
|
|
|
|
SessionField.SessionType("Type"), |
|
|
|
|
SessionField.Live("Live"), |
|
|
|
|
SessionField.Buyin("Buy-in"), |
|
|
|
|
SessionField.CashedOut("Cashed Out"), |
|
|
|
|
SessionField.NetResult("Net Result"), |
|
|
|
|
SessionField.Tips("Tips"), |
|
|
|
|
SessionField.LimitType("Limit"), |
|
|
|
|
SessionField.Game("Game"), |
|
|
|
|
SessionField.TableSize("Table size"), |
|
|
|
|
SessionField.Location("Location"), |
|
|
|
|
SessionField.NumberOfTables("Tables"), |
|
|
|
|
SessionField.Bankroll("Bankroll"), |
|
|
|
|
SessionField.CurrencyCode("Currency Code"), |
|
|
|
|
SessionField.SmallBlind("Small Blind"), |
|
|
|
|
SessionField.BigBlind("Big Blind"), |
|
|
|
|
SessionField.TournamentType("Tournament Type"), |
|
|
|
|
SessionField.TournamentEntryFee("Entry fee"), |
|
|
|
|
SessionField.TournamentNumberOfPlayers("Number of players"), |
|
|
|
|
SessionField.TournamentPrizePool("Prize Pool"), |
|
|
|
|
SessionField.TournamentPosition("Position"), |
|
|
|
|
SessionField.Comment("Comment") |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
val runGoodTournaments: CSVDescriptor = SessionCSVDescriptor( |
|
|
|
|
DataSource.RUNGOOD, |
|
|
|
|
true, |
|
|
|
|
SessionField.Start("Start Date", dateFormat = "dd/MM/yyyy"), |
|
|
|
|
SessionField.StartTime("Start Time"), |
|
|
|
|
SessionField.End("End Date"), |
|
|
|
|
SessionField.EndTime("End Time"), |
|
|
|
|
SessionField.Buyin("Total Buy-In"), |
|
|
|
|
SessionField.CashedOut("Winnings"), |
|
|
|
|
SessionField.NetResult("Profit"), |
|
|
|
|
SessionField.Break("Break"), |
|
|
|
|
SessionField.LimitType("Limit Type"), |
|
|
|
|
SessionField.Game("Game"), |
|
|
|
|
SessionField.Bankroll("Bankroll"), |
|
|
|
|
SessionField.TableSize("Table Type"), |
|
|
|
|
SessionField.Location("Location"), |
|
|
|
|
SessionField.LocationType("Location Type"), |
|
|
|
|
SessionField.Comment("Notes"), |
|
|
|
|
SessionField.CurrencyCode("Currency"), |
|
|
|
|
SessionField.TournamentName("Event Name"), |
|
|
|
|
SessionField.TournamentNumberOfPlayers("Total Players"), |
|
|
|
|
SessionField.TournamentPosition("Finished Place"), |
|
|
|
|
SessionField.TournamentType("Single-Table/Multi-Table") |
|
|
|
|
private val iOSPokerAnalytics: CSVDescriptor |
|
|
|
|
get() { |
|
|
|
|
return SessionCSVDescriptor( |
|
|
|
|
DataSource.POKER_ANALYTICS, |
|
|
|
|
true, |
|
|
|
|
SessionField.Start("Start Date", dateFormat = "MM/dd/yy HH:mm:ss"), |
|
|
|
|
SessionField.End("End Date", dateFormat = "MM/dd/yy HH:mm:ss"), |
|
|
|
|
SessionField.Break("Break", callback = { string -> |
|
|
|
|
val number = NumberCSVField.defaultParse(string) |
|
|
|
|
return@Break number?.times(1000.0) |
|
|
|
|
}), |
|
|
|
|
SessionField.SessionType("Type"), |
|
|
|
|
SessionField.Live("Live"), |
|
|
|
|
SessionField.NumberOfTables("Tables"), |
|
|
|
|
SessionField.Buyin("Buyin"), |
|
|
|
|
SessionField.CashedOut("Cashed Out"), |
|
|
|
|
SessionField.NetResult("Online Net"), |
|
|
|
|
SessionField.Tips("Tips"), |
|
|
|
|
SessionField.LimitType("Limit"), |
|
|
|
|
SessionField.Game("Game"), |
|
|
|
|
SessionField.TableSize("Table Size"), |
|
|
|
|
SessionField.Location("Location"), |
|
|
|
|
SessionField.Bankroll("Bankroll"), |
|
|
|
|
SessionField.CurrencyCode("Currency Code"), |
|
|
|
|
SessionField.CurrencyRate("Currency Rate"), |
|
|
|
|
SessionField.SmallBlind("Small Blind"), |
|
|
|
|
SessionField.BigBlind("Big Blind"), |
|
|
|
|
SessionField.TournamentType("Tournament Type"), |
|
|
|
|
SessionField.TournamentEntryFee("Entry fee"), |
|
|
|
|
SessionField.TournamentNumberOfPlayers("Number of players"), |
|
|
|
|
SessionField.TournamentPrizePool("Prize Pool"), |
|
|
|
|
SessionField.TournamentPosition("Position"), |
|
|
|
|
SessionField.Comment("Comment") |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
) |
|
|
|
|
private val runGoodTournaments: CSVDescriptor |
|
|
|
|
get() { |
|
|
|
|
return SessionCSVDescriptor( |
|
|
|
|
DataSource.RUNGOOD, |
|
|
|
|
true, |
|
|
|
|
SessionField.Start("Start Date", dateFormat = "dd/MM/yyyy"), |
|
|
|
|
SessionField.StartTime("Start Time"), |
|
|
|
|
SessionField.End("End Date"), |
|
|
|
|
SessionField.EndTime("End Time"), |
|
|
|
|
SessionField.Buyin("Total Buy-In"), |
|
|
|
|
SessionField.CashedOut("Winnings"), |
|
|
|
|
SessionField.NetResult("Profit"), |
|
|
|
|
SessionField.Break("Break"), |
|
|
|
|
SessionField.LimitType("Limit Type"), |
|
|
|
|
SessionField.Game("Game"), |
|
|
|
|
SessionField.Bankroll("Bankroll"), |
|
|
|
|
SessionField.TableSize("Table Type"), |
|
|
|
|
SessionField.Location("Location"), |
|
|
|
|
SessionField.LocationType("Location Type"), |
|
|
|
|
SessionField.Comment("Notes"), |
|
|
|
|
SessionField.CurrencyCode("Currency"), |
|
|
|
|
SessionField.TournamentName("Event Name"), |
|
|
|
|
SessionField.TournamentNumberOfPlayers("Total Players"), |
|
|
|
|
SessionField.TournamentPosition("Finished Place"), |
|
|
|
|
SessionField.TournamentType("Single-Table/Multi-Table") |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
val runGoodCashGames: CSVDescriptor = SessionCSVDescriptor( |
|
|
|
|
DataSource.RUNGOOD, |
|
|
|
|
false, |
|
|
|
|
SessionField.Start("Start Date", dateFormat = "dd/MM/yyyy"), |
|
|
|
|
SessionField.StartTime("Start Time", dateFormat = "HH:mm"), |
|
|
|
|
SessionField.End("End Date", dateFormat = "dd/MM/yyyy"), |
|
|
|
|
SessionField.EndTime("End Time", dateFormat = "HH:mm"), |
|
|
|
|
SessionField.Buyin("Total Buy-In"), |
|
|
|
|
SessionField.CashedOut("Cashed Out"), |
|
|
|
|
SessionField.NetResult("Profit"), |
|
|
|
|
SessionField.Break("Break"), |
|
|
|
|
SessionField.LimitType("Limit Type"), |
|
|
|
|
SessionField.Game("Game"), |
|
|
|
|
SessionField.Bankroll("Bankroll"), |
|
|
|
|
SessionField.TableSize("Table Type"), |
|
|
|
|
SessionField.Location("Location"), |
|
|
|
|
SessionField.LocationType("Location Type"), |
|
|
|
|
SessionField.Comment("Notes"), |
|
|
|
|
SessionField.CurrencyCode("Currency"), |
|
|
|
|
SessionField.Blind("Stakes", callback = { value -> |
|
|
|
|
// $10/20 |
|
|
|
|
value.drop(1) |
|
|
|
|
val blinds = value.split("/") |
|
|
|
|
if (blinds.size == 2) { |
|
|
|
|
return@Blind Pair(blinds.first().toDouble(), blinds.last().toDouble()) |
|
|
|
|
} else { |
|
|
|
|
return@Blind null |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
) |
|
|
|
|
private val runGoodCashGames: CSVDescriptor |
|
|
|
|
get() { |
|
|
|
|
return SessionCSVDescriptor( |
|
|
|
|
DataSource.RUNGOOD, |
|
|
|
|
false, |
|
|
|
|
SessionField.Start("Start Date", dateFormat = "dd/MM/yyyy"), |
|
|
|
|
SessionField.StartTime("Start Time", dateFormat = "HH:mm"), |
|
|
|
|
SessionField.End("End Date", dateFormat = "dd/MM/yyyy"), |
|
|
|
|
SessionField.EndTime("End Time", dateFormat = "HH:mm"), |
|
|
|
|
SessionField.Buyin("Total Buy-In"), |
|
|
|
|
SessionField.CashedOut("Cashed Out"), |
|
|
|
|
SessionField.NetResult("Profit"), |
|
|
|
|
SessionField.Break("Break"), |
|
|
|
|
SessionField.LimitType("Limit Type"), |
|
|
|
|
SessionField.Game("Game"), |
|
|
|
|
SessionField.Bankroll("Bankroll"), |
|
|
|
|
SessionField.TableSize("Table Type"), |
|
|
|
|
SessionField.Location("Location"), |
|
|
|
|
SessionField.LocationType("Location Type"), |
|
|
|
|
SessionField.Comment("Notes"), |
|
|
|
|
SessionField.CurrencyCode("Currency"), |
|
|
|
|
SessionField.Blind("Stakes", callback = { value -> |
|
|
|
|
// $10/20 |
|
|
|
|
value.drop(1) |
|
|
|
|
val blinds = value.split("/") |
|
|
|
|
if (blinds.size == 2) { |
|
|
|
|
return@Blind Pair(blinds.first().toDouble(), blinds.last().toDouble()) |
|
|
|
|
} else { |
|
|
|
|
return@Blind null |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|