Skip to content

Commit

Permalink
Merge pull request #17 from TheInfiniteKind/master
Browse files Browse the repository at this point in the history
grab fixes for newer md changes
  • Loading branch information
stant authored May 23, 2024
2 parents 54a0e95 + 1c7297b commit 2ea84da
Show file tree
Hide file tree
Showing 42 changed files with 807 additions and 680 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
hs_err_pid*
/build/
nbproject/private/private.xml
user.properties
3 changes: 3 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<property name="privatekey" value="private.key"/>
<property name="publickey" value="public.key"/>
<property name="privatekeyid" value="99"/>
<property name="keypass" value=""/>
</target>

<target name="-post-jar">
Expand All @@ -92,6 +93,7 @@
<java newenvironment="true"
classpath="externals/moneydance/extadmin.jar:externals/moneydance/moneydance.jar"
classname="com.moneydance.admin.KeyAdmin">
<sysproperty key="moneydance_key_pass" value="${keypass}"/>
<arg value="signextjar"/>
<arg value="${privatekey}"/>
<arg value="${privatekeyid}"/>
Expand All @@ -111,6 +113,7 @@

<target name="genkeys" depends="init">
<java
fork="true"
classpath="externals/moneydance/extadmin.jar"
classname="com.moneydance.admin.KeyAdmin">
<arg value="genkey"/>
Expand Down
4 changes: 2 additions & 2 deletions build/built-jar.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Sun, 20 Mar 2016 22:38:40 -0400
#Thu, 20 Apr 2023 16:33:27 +0100


F\:\\github\\mdcsvimporter2015=
/Users/stu/Documents/Moneydance/mdcsvimporter2015=
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class OtherActionsDialog extends javax.swing.JDialog {
//java.util.Calendar today = new java.util.Calendar(
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Calendar cal = Calendar.getInstance();
System.out.println(dateFormat.format(cal.getTime()));
Util.logTerminal(dateFormat.format(cal.getTime()));
RootAccount rootAccount = main.getRootAccount();
ReminderSet reminderSet = rootAccount.getReminderSet();
Vector remindersOverdueVec = reminderSet.getOverdueItems( cal );
Expand All @@ -90,13 +90,13 @@ public class OtherActionsDialog extends javax.swing.JDialog {
Iterator itr = remindersOverdueVec.iterator();

//use hasNext() and next() methods of Iterator to iterate through the elements
System.out.println("Iterating through Vector elements...");
Util.logTerminal("Iterating through Vector elements...");
while(itr.hasNext())
{
DateReminderPair rem = (DateReminderPair) itr.next();
//reminderSet.removeReminder( rem );

System.out.println( "rem.desc =" + rem. + "=" );
Util.logTerminal( "rem.desc =" + rem. + "=" );
}
}//GEN-LAST:event_jButton1ActionPerformed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import com.moneydance.modules.features.mdcsvimporter.CSVData;
import com.moneydance.modules.features.mdcsvimporter.DateGuesser;
import com.moneydance.modules.features.mdcsvimporter.TransactionReader;
import com.moneydance.util.CustomDateFormat;
import com.moneydance.util.StringUtils;
import com.infinitekind.util.StringUtils;
import java.io.IOException;

/**
Expand All @@ -46,7 +46,7 @@ public class BbvaCompassBankReader

@Override
public boolean canParse(CSVData data) {
// System.out.println("enter BbvaCompassBankReader.canParse");
// Util.logTerminal("enter BbvaCompassBankReader.canParse");
try {
data.parseIntoLines(0);
} catch (IOException ex) {
Expand All @@ -60,7 +60,7 @@ public class BbvaCompassBankReader
continue;
}
//this next statement raises an exception - don't use it
//System.out.println("BbvaReader:skip: " + data.printCurrentLine());
//Util.logTerminal("BbvaReader:skip: " + data.printCurrentLine());
}

boolean retVal = data.nextLine()
Expand All @@ -86,8 +86,8 @@ public class BbvaCompassBankReader
setDateFormat(guesser.getBestFormat());
}
}
System.out.println("BbvaCompassBankReader.dateFormat = " + getDateFormat());
System.out.println("BbvaCompassBankReader.canParse = " + String.valueOf(retVal));
Util.logTerminal("BbvaCompassBankReader.dateFormat = " + getDateFormat());
Util.logTerminal("BbvaCompassBankReader.canParse = " + String.valueOf(retVal));
return retVal;
}

Expand All @@ -98,7 +98,7 @@ public class BbvaCompassBankReader

@Override
protected boolean parseNext() throws IOException {
System.out.println("enter BbvaCompassBankReader parseNext");
Util.logTerminal("enter BbvaCompassBankReader parseNext");
csvData.nextField();
dateString = csvData.getField();
if (dateString == null || dateString.length() == 0) { // empty line
Expand All @@ -118,32 +118,32 @@ public class BbvaCompassBankReader
credit = csvData.getField();

if (credit == null && debit == null) {
System.out.println("BbvaCompassBankReader Invalid line-debit and credit are null.");
Util.logTerminal("BbvaCompassBankReader Invalid line-debit and credit are null.");
throwException("Invalid line");
}

if (credit.length() == 0 && debit.length() == 0) {
System.out.println("BbvaCompassBankReader Invalid line-debit and credit are empty.");
Util.logTerminal("BbvaCompassBankReader Invalid line-debit and credit are empty.");
throwException("Credit and debit fields are both empty.");
}
System.out.println("exit BbvaCompassBankReader parseNext");
Util.logTerminal("exit BbvaCompassBankReader parseNext");
return true;
}

@Override
protected boolean assignDataToTxn(OnlineTxn txn) throws IOException {
System.out.println("enter BbvaCompassBankReader assignDataToTxn");
Util.logTerminal("enter BbvaCompassBankReader assignDataToTxn");
long amount = 0;
try {
double amountDouble;
if (credit.length() > 0) {
System.out.println("credit = " + String.valueOf(credit));
Util.logTerminal("credit = " + String.valueOf(credit));
amountDouble = StringUtils.parseDoubleWithException(credit, '.');
} else {
System.out.println("credit.length() <= 0");
Util.logTerminal("credit.length() <= 0");
amountDouble = -StringUtils.parseDoubleWithException(debit, '.');
}
System.out.println("amountDouble = " + String.valueOf(amountDouble));
Util.logTerminal("amountDouble = " + String.valueOf(amountDouble));
amount = currency.getLongValue(amountDouble);
} catch (Exception x) {
throwException("Invalid amount.");
Expand All @@ -163,7 +163,7 @@ public class BbvaCompassBankReader
txn.setDatePostedInt(date);
txn.setDateInitiatedInt(date);
txn.setDateAvailableInt(date);
System.out.println("exit BbvaCompassBankReader assignDataToTxn");
Util.logTerminal("exit BbvaCompassBankReader assignDataToTxn");
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import com.moneydance.modules.features.mdcsvimporter.TransactionReader;
import com.moneydance.apps.md.model.OnlineTxn;
import com.moneydance.modules.features.mdcsvimporter.CSVData;
import com.moneydance.util.CustomDateFormat;
import com.moneydance.util.StringUtils;
import com.infinitekind.util.StringUtils;
import java.io.IOException;

public class CitiBankCanadaReader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import com.moneydance.modules.features.mdcsvimporter.TransactionReader;
import com.moneydance.apps.md.model.OnlineTxn;
import com.moneydance.modules.features.mdcsvimporter.CSVData;
import com.moneydance.util.CustomDateFormat;
import com.moneydance.util.StringUtils;
import com.infinitekind.util.StringUtils;
import java.io.IOException;

public class INGNetherlandsReader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import com.moneydance.modules.features.mdcsvimporter.CSVData;
import com.moneydance.modules.features.mdcsvimporter.DateGuesser;
import com.moneydance.modules.features.mdcsvimporter.TransactionReader;
import com.moneydance.util.CustomDateFormat;
import com.moneydance.util.StringUtils;
import com.infinitekind.util.StringUtils;
import java.io.IOException;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import com.moneydance.apps.md.model.OnlineTxn;
import com.moneydance.modules.features.mdcsvimporter.CSVData;
import com.moneydance.modules.features.mdcsvimporter.TransactionReader;
import com.moneydance.util.CustomDateFormat;
import com.moneydance.util.StringUtils;
import com.infinitekind.util.StringUtils;
import java.io.IOException;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import com.moneydance.apps.md.model.OnlineTxn;
import com.moneydance.modules.features.mdcsvimporter.CSVData;
import com.moneydance.modules.features.mdcsvimporter.TransactionReader;
import com.moneydance.util.CustomDateFormat;
import com.moneydance.util.StringUtils;
import com.infinitekind.util.StringUtils;
import java.io.IOException;

/*
Expand Down Expand Up @@ -94,7 +94,7 @@ public class YodleeReader
&& data.nextField() && ACCOUNT.equals(data.getField().toLowerCase())
&& !data.nextField();

System.out.println( "can parse Yodlee format =" + String.valueOf(retVal) + "=" );
Util.logTerminal( "can parse Yodlee format =" + String.valueOf(retVal) + "=" );
return retVal;
}

Expand Down Expand Up @@ -123,67 +123,67 @@ public class YodleeReader

csvData.nextField();
status = csvData.getField();
// System.out.println("status: " + status);
// Util.logTerminal("status: " + status);

// System.out.println("getting Yodlee dateString...");
// Util.logTerminal("getting Yodlee dateString...");
csvData.nextField();
String dateString = csvData.getField();
if (dateString == null || dateString.isEmpty()) {
// skip lines without valid dates (or empty)
return false;
}
// System.out.println("dateString: " + dateString);
// Util.logTerminal("dateString: " + dateString);

csvData.nextField();
description = csvData.getField();
// System.out.println("description: " + description);
// Util.logTerminal("description: " + description);

csvData.nextField();
splitType = csvData.getField();
// System.out.println("splitType: " + splitType);
// Util.logTerminal("splitType: " + splitType);

csvData.nextField();
category = csvData.getField();//NOTE: don't set in Txn object!
// System.out.println("category: " + category);
// Util.logTerminal("category: " + category);

csvData.nextField();
currencyString = csvData.getField();//NOTE: not used
// System.out.println("currencyString: " + currencyString);
// Util.logTerminal("currencyString: " + currencyString);

csvData.nextField();
amountString = csvData.getField().trim();
// System.out.println("amountString: " + amountString);
// Util.logTerminal("amountString: " + amountString);

csvData.nextField();
userDescription = csvData.getField();
// System.out.println("userDescription: " + userDescription);
// Util.logTerminal("userDescription: " + userDescription);

csvData.nextField();
memo = csvData.getField();
// System.out.println("memo: " + memo);
// Util.logTerminal("memo: " + memo);

csvData.nextField();
classification = csvData.getField();
// System.out.println("classification: " + classification);
// Util.logTerminal("classification: " + classification);

csvData.nextField();
this.accountNameFromCSV = csvData.getField();
// System.out.println("accountNameFromCSV: " + accountNameFromCSV);
// Util.logTerminal("accountNameFromCSV: " + accountNameFromCSV);

// System.out.println( "parsing Yodlee amount...");
// Util.logTerminal( "parsing Yodlee amount...");
// amount = 0;
// try {
// double amountDouble;
// amountDouble = StringUtils.parseDoubleWithException(amountString, '.');
// System.out.println( "after parseDoubleWithException...");
// Util.logTerminal( "after parseDoubleWithException...");
// amount = currency.getLongValue(amountDouble);
// } catch (Exception x) {
// throwException("Invalid amount.");
// }
// System.out.println( "parsing Yodlee date...");
// Util.logTerminal( "parsing Yodlee date...");
date = dateFormat.parseInt(dateString);

// System.out.println( "parsed Yodlee txn on " + dateString + " for " + accountNameFromCSV);
// Util.logTerminal( "parsed Yodlee txn on " + dateString + " for " + accountNameFromCSV);
return true;
}

Expand All @@ -208,7 +208,7 @@ public class YodleeReader
try {
double amountDouble;
amountDouble = StringUtils.parseDoubleWithException(amountString, '.');
System.out.println( "after parseDoubleWithException...");
Util.logTerminal( "after parseDoubleWithException...");
amount = currency.getLongValue(amountDouble);
} catch (Exception x) {
throwException("Invalid amount.");
Expand Down Expand Up @@ -237,7 +237,7 @@ public class YodleeReader
}

public void createSupportedDateFormats(String dateFormatArg) {
System.err.println("\n--------- entered createSupportedDateFormats() dateFormatArg =" + dateFormatArg + "= -------------");
Util.logConsole("\n--------- entered createSupportedDateFormats() dateFormatArg =" + dateFormatArg + "= -------------");
String[] tmp = new String[1];
tmp[0] = dateFormatArg;
SUPPORTED_DATE_FORMATS = tmp;
Expand All @@ -261,7 +261,7 @@ public class YodleeReader
return;
}

System.err.println("setDateFormat() format =" + format + "= dateFormatString =" + dateFormatString + "=");
Util.logConsole("setDateFormat() format =" + format + "= dateFormatString =" + dateFormatString + "=");
if (!format.equals(dateFormatStringSelected)) {
dateFormat = new CustomDateFormat(format);
dateFormatStringSelected = format;
Expand Down
Binary file removed dist/lib/extadmin.jar
Binary file not shown.
Binary file modified dist/mdcsvimporter.mxt
Binary file not shown.
Binary file modified dist/mdcsvimporter.zip
Binary file not shown.
Binary file modified externals/moneydance/extadmin.jar
Binary file not shown.
1 change: 1 addition & 0 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ javac.processorpath=\
${javac.classpath}
javac.source=11
javac.target=11
javac.fork=true
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
Expand Down
13 changes: 0 additions & 13 deletions private.key

This file was deleted.

8 changes: 0 additions & 8 deletions public.key

This file was deleted.

Loading

0 comments on commit 2ea84da

Please sign in to comment.