Any better ideas for file sharing?
"Yaron Y. goland" <[email protected]> Sun, 25 Mar 2012 22:07:54 -0700
| Newsgroups | gmane.comp.finance.moneydance.general |
|---|---|
| Message-ID | <[email protected]> |
We run our finances off Moneydance on my main machine. My wife wants to
be able to run reports and generally nose around our finances but that
requires going to the main machine which for various reasons is
inconvenient for her. She wanted me to put a copy of our Moneydance file
on her laptop for read only purposes but this really freaked me out
because that file is one stop shopping for stealing everything we own.
So the compromise I came up with is the jython script below. It goes
through and deletes all online service info, strips account numbers and
routing numbers from all accounts, deletes all reminders and the address
book. The workflow is:
1) Make a copy of the master file
2) Run the script below via the Jython extension
3) Save the copy and give to my wife
A few questions:
1) Any other data I can safely nuke from the master file that will make
stealing the copy less useful while still leaving all the core data so
my wife can run reports, investigate expenses, etc.?
2) I hate the workflow. I wanted to automatically create a copy, clean
up the copy, save it and then re-load the master. But while there is a
method to point the Moneydance file at a new location I couldn't find an
API to force Moneydance to save to the new location nor could I find an
API to make Moneydance re-load from the old location. Any ideas there?
Thanks,
Yaron
from com.moneydance.apps.md.model import Account
# Thanks to
http://help.infinitekind.com/discussions/financial-institution-direct-connection-support-requests/382-vanguard-download-http-error400
for this function
def deleteAllOnlineInfo(root):
onlineInfo = root.getOnlineInfo()
while onlineInfo.getServiceCount()>0:
onlineInfo.removeService(0)
def cleanAccount(acct):
acct.setOFXAccountKey("0")
acct.setOFXAccountNumber("0")
acct.setOFXAccountType("0")
acct.setOFXBankID("0")
acct.setOFXBranchID("0")
acct.setOFXBrokerID("0")
def cleanBankAccount(acct):
acct.setBankAccountNumber("0")
def cleanCreditCard(acct):
acct.setAnnualFee(0)
acct.setAPRPercent(0)
acct.setCardExpirationMonth(1)
acct.setCardExpirationYear(2000)
acct.setCardNumber("0")
acct.setCreditLimit(0)
acct.setOFXAccountNumber("0")
def cleanInvestment(acct):
acct.setInvestAccountNumber("0")
acct.setOFXBrokerID("0")
def cleanSecurity(acct):
acct.setBrokerPhone("0")
def doNothing(acct):
pass
def cleanAllAccounts(root):
for id in range(root.getHighestAccountNum() + 1):
acct = root.getAccountById(id)
if (acct != None):
cleanAccount(acct)
pass # Moneydance Jython won't seem to let me define a dictionary
on multiple lines
{ Account.ACCOUNT_TYPE_BANK : cleanBankAccount,
Account.ACCOUNT_TYPE_CREDIT_CARD : cleanCreditCard,
Account.ACCOUNT_TYPE_INVESTMENT : cleanInvestment,
Account.ACCOUNT_TYPE_SECURITY :
cleanSecurity}.get(acct.getAccountType(),doNothing)(acct)
def deleteReminders(root):
reminderSet = root.getReminderSet()
reminderCount = reminderSet.getReminderCount()
if (reminderCount > 0):
for id in range(reminderSet.getReminderCount() + 1):
reminderSet.removeReminder(reminderSet.getReminder(id))
def deleteAddresses(root):
addressBook = root.getAddressBook()
while addressBook.getSize() > 0:
addressBook.removeEntry(addressBook.getEntry(0))
def cleanEntireFile(theFileToNeverRunThisProgramOn):
root = moneydance.getRootAccount()
if (root.getDataFile().getName() == theFileToNeverRunThisProgramOn):
print "You idiot! You tried to run this data destroyer on your
primary file!!!!"
return
print "Starting to nuke things"
deleteAllOnlineInfo(root)
cleanAllAccounts(root)
deleteReminders(root)
deleteAddresses(root)
print "Nuking is complete, have a nice day"
theFileToNeverRunThisProgramOn = "Moneydance.md"
cleanEntireFile(theFileToNeverRunThisProgramOn)
_______________________________________________
For Moneydance customer support, please visit http://help.infinitekind.com
[email protected]
http://moneydance.com/mailman/listinfo/moneydance-info