2021-11-18 08:27:28 +00:00
|
|
|
package script
|
|
|
|
|
|
|
|
|
|
import "os"
|
|
|
|
|
|
|
|
|
|
func GetServerLedgerConfigFilePath() string {
|
|
|
|
|
return GetServerConfig().DataPath + "/ledger_config.json"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func GetExampleLedgerConfigDirPath() string {
|
|
|
|
|
currentPath, err := os.Getwd()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
return currentPath + "/example"
|
|
|
|
|
}
|
2021-11-22 10:05:12 +00:00
|
|
|
|
|
|
|
|
func GetLedgerTransactionsTemplateFilePath(dataPath string) string {
|
|
|
|
|
return dataPath + "/.beancount-ns/transaction_template.json"
|
|
|
|
|
}
|
2021-11-23 06:58:37 +00:00
|
|
|
|
|
|
|
|
func GetLedgerAccountTypeFilePath(dataPath string) string {
|
|
|
|
|
return dataPath + "/.beancount-ns/account_type.json"
|
|
|
|
|
}
|
2021-11-28 12:19:40 +00:00
|
|
|
|
|
|
|
|
func GetLedgerPriceFilePath(dataPath string) string {
|
|
|
|
|
return dataPath + "/price/prices.bean"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func GetLedgerMonthsFilePath(dataPath string) string {
|
|
|
|
|
return dataPath + "/month/months.bean"
|
|
|
|
|
}
|