rename ENV variables to drop "IMPORTER" from the names and be more consistent

This commit is contained in:
Robert Dyer
2024-08-10 18:16:38 -05:00
parent 7e8cb82437
commit a6cd5dee0d
6 changed files with 23 additions and 11 deletions
+17 -4
View File
@@ -36,7 +36,14 @@ ACTUAL_FILE_PASSWORD="<file password>"
ACTUAL_CACHE_DIR="./cache"
# optional, name of the payee for added interest transactions
IMPORTER_INTEREST_PAYEE_NAME="Loan Interest"
INTEREST_PAYEE_NAME="Loan Interest"
# optional, name of the payee for added interest transactions
INVESTMENT_PAYEE_NAME="Investment"
# optional, name of the cateogry group for added investment tracking transactions
INTEREST_CATEGORY_GROUP_NAME="Income"
# optional, name of the category for added investment tracking transactions
INTEREST_CATEGORY_NAME="Investment"
```
## Installation
@@ -81,7 +88,7 @@ interest transaction on the 28th of the month, set the account note to
`interestRate:0.045 interestDay:28`.
You can optionally change the payee used for the interest transactions by
setting `IMPORTER_INTEREST_PAYEE_NAME` in the `.env` file.
setting `INTEREST_PAYEE_NAME` in the `.env` file.
To run:
@@ -111,7 +118,7 @@ adding an `ownership:0.0X` tag to the account note. For example, if you own
then use that percentage to track the home's value.
You can optionally change the payee used for the transactions by setting
`IMPORTER_ZESTIMATE_PAYEE_NAME` in the `.env` file.
`ZESTIMATE_PAYEE_NAME` in the `.env` file.
To run:
@@ -149,7 +156,7 @@ on the values in the URL.
- `kbbOptions:XXX,XXX,XXX,...`
You can optionally change the payee used for the transactions by setting
`IMPORTER_KBB_PAYEE_NAME` in the `.env` file.
`KBB_PAYEE_NAME` in the `.env` file.
To run:
@@ -199,6 +206,12 @@ modified. This function lists transactions whose note contains certain
strings that are targeted when using `zeroSmall` and `dropPayments`. You may
need to update this to add additional notes to look for.
You can optionally change the payee used for the transactions by setting
`INVESTMENT_PAYEE_NAME` in the `.env` file.
You can optionally change the category used for the transactions by setting
`INVESTMENT_CATEGORY_NAME` in the `.env` file.
To run:
```console
+1 -1
View File
@@ -5,7 +5,7 @@ require("dotenv").config();
(async () => {
await openBudget();
const payeeId = await ensurePayee(process.env.IMPORTER_INTEREST_PAYEE_NAME || 'Loan Interest');
const payeeId = await ensurePayee(process.env.INTEREST_PAYEE_NAME || 'Loan Interest');
const accounts = await api.getAccounts();
for (const account of accounts) {
+1 -1
View File
@@ -25,7 +25,7 @@ async function getKBB(URL) {
(async function() {
await openBudget();
const payeeId = await ensurePayee(process.env.IMPORTER_KBB_PAYEE_NAME || 'KBB');
const payeeId = await ensurePayee(process.env.KBB_PAYEE_NAME || 'KBB');
const accounts = await api.getAccounts();
for (const account of accounts) {
+2 -3
View File
@@ -70,9 +70,8 @@ const zeroTransaction = async (payment) => {
(async () => {
await openBudget();
const payeeId = await ensurePayee(process.env.IMPORTER_INVESTMENT_PAYEE_NAME || 'Investment');
const categoryId = await ensureCategory(process.env.IMPORTER_INVESTMENT_CATEGORY_NAME || 'Investment');
const payeeId = await ensurePayee(process.env.INVESTMENT_PAYEE_NAME || 'Investment');
const categoryId = await ensureCategory(process.env.INVESTMENT_CATEGORY_NAME || 'Investment');
const simplefinBalances = await getSimplefinBalances();
if (simplefinBalances) {
+1 -1
View File
@@ -12,7 +12,7 @@ const Utils = {
const password = process.env.ACTUAL_SERVER_PASSWORD || '';
const file_password = process.env.ACTUAL_FILE_PASSWORD || '';
const sync_id = process.env.ACTUAL_SYNC_ID || '';
const cache = process.env.IMPORTER_CACHE_DIR || './cache';
const cache = process.env.ACTUAL_CACHE_DIR || './cache';
if (!url || !password || !sync_id) {
console.error('Required settings for Actual not provided.');
+1 -1
View File
@@ -37,7 +37,7 @@ async function getZestimate(URL) {
(async function() {
await openBudget();
const payeeId = await ensurePayee(process.env.IMPORTER_ZESTIMATE_PAYEE_NAME || 'Zestimate');
const payeeId = await ensurePayee(process.env.ZESTIMATE_PAYEE_NAME || 'Zestimate');
const accounts = await api.getAccounts();
for (const account of accounts) {