Giter Site home page Giter Site logo

node-moneymoney's Introduction

MoneyMoney

An AppleScript-based API for working with MoneyMoney on macOS, written in TypeScript.

Installation

Install this package via NPM:

$ npm i --save moneymoney

Features

The whole code is fully typed, making it easy to work with return types and see which options need to be passed. Not all AppleScript features are currently implemented, but they will be shortly. See the table below for details

Feature AppleScript API Node.js API
Export Accounts
Export Categories
Export Transactions
Export Portfolio 🚧
Create Bank Transfer
Create Batch Transfer 🚧
Create Direct Debit 🚧
Create Batch Direct Debit 🚧
Add Transaction
Update Transaction
Check Unlock Status

Usage

All available functions are exported from the moneymoney package. The whole API is Promise-based, meaning you need to await the returned promises before being able to work with the results.

Warning

All methods interfacing with MoneyMoney require the application to be unlocked. If the application is locked, a DatabaseLockedError will be thrown. You need to handle this error in your application yourself.

Example:

import { DatabaseLockedError, getTransactions } from "moneymoney";

async function handleDatabaseLocked(err) {
    if (err instanceof DatabaseLockedError) {
        console.log("Please unlock MoneyMoney to count the transactions.");
        return null;
    } else {
        throw err;
    }
}

async function countTransactions() {
    const transactions = await getTransactions({
        from: new Date(),
    }).catch(handleDatabaseLocked);

    if (transactions !== null) {
        console.log(`There are ${transactions.length} transactions.`);
    }
}

countTransactions();

node-moneymoney's People

Contributors

nikxda avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.