From 737d776b4077fd37e8b29367b0e78c96f0e934cd Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Wed, 26 Mar 2014 22:36:17 -0700 Subject: Update README to reference README.md This older doc/README file is pure text and provides incomplete information compared to the root's README.md markdown file. I copied over some introductory verbiage and added cross references to that file. --- doc/README | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/doc/README b/doc/README index 190436a2..6e1ee033 100644 --- a/doc/README +++ b/doc/README @@ -1,17 +1,20 @@ - Welcome to Ledger - the command-line accounting program + The Command-line Accounting Program Introduction ============ -Ledger is an accounting program which is invoked from the command-line using a -textual ledger file. To start using Ledger, you will need to create such a -file containing your financial postings. A sample has been provided in the -file "sample.dat". See the documentation (ledger.pdf, or ledger.info) for -full documentation on creating a ledger file and using Ledger to generate -reports. +Ledger is a powerful, double-entry accounting system that is accessed from the +UNIX command-line. This may put off some users, since there is no flashy UI, +but for those who want unparalleled reporting access to their data there are +few alternatives. + +To start using Ledger, you will need to create such a +file containing your financial transactions. A sample has been provided in the +file "test/input/sample.dat". See the Ledger 3 Manual (ledger.pdf, ledger.info, +or http://www.ledger-cli.org/3.0/doc/ledger3.pdf) for full documentation on creating +a ledger file and using Ledger to generate reports. Once you have such a file -- you might call it "ledger.dat" -- you can start looking at balances and account registers using commands like the following: @@ -23,6 +26,10 @@ This assumes, of course, that like the sample file you use account names such as "Assets:Checking" and "Expenses:Food". If you use other account names, you will need to vary the reporting commands you use accordingly. +You can find more information on getting starting, building from source, and +getting help from the ./README.md file in your ledger source repository or +online at https://github.com/ledger/ledger. + Building ======== @@ -33,8 +40,9 @@ work), and at least these two libraries installed: gmp GNU multi-precision library pcre Perl regular expression library -(On some GNU/Linux systems, the packages you need to install are called -"gmp-dev" and "pcre-dev"). +On some GNU/Linux systems, the packages you need to install are called +"gmp-dev" and "pcre-dev". See the ./README.md in the source repository for +a more complete list of dependencies. Once you have determined where the headers and libraries for the above packages are installed, run the script "configure", passing those paths. If -- cgit v1.2.3 From c9a6ad9b4899531ae1ed07579fd1a4a6add9cb65 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Wed, 26 Mar 2014 22:46:20 -0700 Subject: Update README.md; add google group link. Mention that ./acprep is a Python script for installing dependencies. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d9e7d3d7..ed0a5bfa 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,8 @@ much further with those. ## Dependencies If you wish to proceed in this venture, you'll need a few dependencies. The -easiest way to get them for your platform is to run: +easiest way to get them for your platform is to run this handy Python +script: ./acprep dependencies -- cgit v1.2.3 From e591326dc6b87a041f07f94e424f008e02e40cf1 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Thu, 27 Mar 2014 17:41:36 -0700 Subject: Update README.md; more introduction and documentation link Updated the introduction with the little information that was unique to doc/README. Also added a link to the documentation page. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index ed0a5bfa..5f861c00 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,14 @@ UNIX command-line. This may put off some users, since there is no flashy UI, but for those who want unparalleled reporting access to their data there are few alternatives. +Ledger uses text files for input. It reads the files and generates reports. +There is no other database or storing state. To use Ledger, you create a +file of your account names and transactions, run from the command line with +command lines options to specify a report, and get output. The output is +generally plain text, though one generate a graph or html instead. Ledger +is simple in concept, surprisingly rich in ability, and easy to use. + + ## For the Impatient I know, you just want to build and play. If you have all the dependencies @@ -145,6 +153,7 @@ You can run `make check` to confirm the result, and `make install` to install. Now that you're up and running, here are a few resources to keep in mind: - [Home page](http://ledger-cli.org) + - [Documentation](http://www.ledger-cli.org/docs.html) - [IRC channel](irc://irc.freenode.net/ledger) - [Mailing List / Forum](http://groups.google.com/group/ledger-cli) - [GitHub project page](http://github.com/ledger/ledger) -- cgit v1.2.3 From 5e51b98f8bf8f1a56221834e09722455320e16e5 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Thu, 27 Mar 2014 17:50:15 -0700 Subject: Remove doc/README Remove obsolete and incorrect README file. Correct information in README.md, one directory up. --- doc/README | 72 -------------------------------------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 doc/README diff --git a/doc/README b/doc/README deleted file mode 100644 index 6e1ee033..00000000 --- a/doc/README +++ /dev/null @@ -1,72 +0,0 @@ - Welcome to Ledger - - The Command-line Accounting Program - -Introduction -============ - -Ledger is a powerful, double-entry accounting system that is accessed from the -UNIX command-line. This may put off some users, since there is no flashy UI, -but for those who want unparalleled reporting access to their data there are -few alternatives. - -To start using Ledger, you will need to create such a -file containing your financial transactions. A sample has been provided in the -file "test/input/sample.dat". See the Ledger 3 Manual (ledger.pdf, ledger.info, -or http://www.ledger-cli.org/3.0/doc/ledger3.pdf) for full documentation on creating -a ledger file and using Ledger to generate reports. - -Once you have such a file -- you might call it "ledger.dat" -- you can start -looking at balances and account registers using commands like the following: - - ledger -f ledger.dat balance assets:checking - ledger -f ledger.dat register expenses:food - -This assumes, of course, that like the sample file you use account names such -as "Assets:Checking" and "Expenses:Food". If you use other account names, you -will need to vary the reporting commands you use accordingly. - -You can find more information on getting starting, building from source, and -getting help from the ./README.md file in your ledger source repository or -online at https://github.com/ledger/ledger. - - -Building -======== - -To build Ledger, you will need a fairly modern C++ compiler (gcc 2.95 will not -work), and at least these two libraries installed: - - gmp GNU multi-precision library - pcre Perl regular expression library - -On some GNU/Linux systems, the packages you need to install are called -"gmp-dev" and "pcre-dev". See the ./README.md in the source repository for -a more complete list of dependencies. - -Once you have determined where the headers and libraries for the above -packages are installed, run the script "configure", passing those paths. If -you installed everything under /usr/local, you can probably just type -"./configure". Otherwise, do this: - - ./configure CPPFLAGS=-I LDFLAGS=-L - -If you need to specify multiple include or library paths, then do this: - - ./configure CPPFLAGS="-I -I" LDFLAGS="-L -L" - -Once configure is done running, just type: - - make install - - -Mailing List and IRC -==================== - -If you need help on how to use Ledger, or run into problems, you can join the -Ledger mailing list at the following Web address: - - http://groups.google.com/group/ledger-cli - -You can also find help at the #ledger channel on the IRC server -irc.freenode.net. -- cgit v1.2.3 From 71535a4c07ed1158d97ad73d296f01a619102fcc Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Thu, 27 Mar 2014 17:53:44 -0700 Subject: Small typos.. --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5f861c00..89506c5b 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,13 @@ UNIX command-line. This may put off some users, since there is no flashy UI, but for those who want unparalleled reporting access to their data there are few alternatives. -Ledger uses text files for input. It reads the files and generates reports. -There is no other database or storing state. To use Ledger, you create a +Ledger uses text files for input. It reads the files and generates reports; +there is no other database or stored state. To use Ledger, you create a file of your account names and transactions, run from the command line with -command lines options to specify a report, and get output. The output is -generally plain text, though one generate a graph or html instead. Ledger -is simple in concept, surprisingly rich in ability, and easy to use. +some options to specify input and requested reports, and get output. +The output is generally plain text, though you could generate a graph or +html instead. Ledger is simple in concept, surprisingly rich in ability, +and easy to use. ## For the Impatient -- cgit v1.2.3 From 1f05abb52ad55270089a29ecc7185fca096a9b51 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Fri, 28 Mar 2014 11:21:39 -0700 Subject: Added Glossary Wrote a first pass at a glossary, adding only accounting terms to start. --- doc/GLOSSARY.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/GLOSSARY.md diff --git a/doc/GLOSSARY.md b/doc/GLOSSARY.md new file mode 100644 index 00000000..3e9fbc68 --- /dev/null +++ b/doc/GLOSSARY.md @@ -0,0 +1,14 @@ +ACCOUNTING GLOSSARY +--- + + Accounting and bookkeeping represent an entire field of human effort and has evolved its own specialized vocabulary. Accounting hopes to summarize and add understanding to where the money is going. + +**Account**: A category for grouping together amounts from similar transactions. Each account has a name, which is usually capitalized, and an account type. Accounts are often organized into a heirarchy when it helps understanding. For example, a coffee shop might have Coffee, Merchandise, and Equipment as accounts but arranged under an Inventory account because different decisions are made on the total inventory rather than just coffee. A heirarchy can be part of the account name in Ledger, e.g., "Assets:Inventory:Coffee". Note that the Ledger software usually creates the list of accounts on the fly: accounts are created when transactions use them. + +**Account Type**: Each account has a type of Asset, Liability, Equity, Income, or Expense. Assets represent something owned, e.g., Cash or Inventory. Liabilities represent sometime owed, e.g., a Loan or Mortgage. Equity, also called capital, is everything owned minus everything owed (Assets - Liabilities). It is the financial measure of how much you are ahead. Income is money earned somewhere, which puts you more ahead. Expenses is money spent somewhere, which puts you less ahead. The type of account determines if a debit represents an increase or decrease in an account. For example, Inventory is an asset so a transcation debiting Inventory would increase its value. Assets and Expenses increase with debits and decrease with credits; Liabilities, Equity, and Expenses increase with credits and decrease with debits. + +**Journal**: A record of all the financial transactions of a person or firm. This data of where money goes can be collated into reports. This used to be done with a physical book, called a ledger, where each account was on one page. Each debit or credit in the journal was transfered to the appropriate account page and the pages were totalled to produce reports. This process is now done with the Ledger software which creates reports from the journal. A journal is sometimes called a register. + +**Report**: A summary made from a journal of transactions. Each transaction affects accounts and those effects are collated and totaled. The two most common reports are the balance sheet, which shows what is owned and owed on a specific date, and the cash flow statement, which shows how money was earned and spent over a period. The cash flow statement is also called a profit and loss statement or an income statement. + +**Transaction**: Our financial lives are recorded as a series of transactions. Each transaction has a specific date, an equal total of debits and credits affecting accounts, and some sort of description. For example, "On January 1, pay $100 with check #243 from Checking to Utilities for my Verizon phone bill" is a transaction. A credit of $100 decreases my Checking asset, while a balancing debit of $100 increases my Utility expense. Transactions can be as complicated as humans can make finances. -- cgit v1.2.3 From 3c51df125d878eb9b7acf0384eca2fb8e733ade4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 28 Mar 2014 13:51:00 -0500 Subject: Fix a compiler warning --- src/token.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/token.cc b/src/token.cc index 6ca649bb..aa78cd5a 100644 --- a/src/token.cc +++ b/src/token.cc @@ -522,7 +522,8 @@ void expr_t::token_t::expected(const char wanted, char c) void expr_t::token_t::expected(const kind_t wanted) { try { - if (wanted == '\0' || wanted == -1) + if (wanted == expr_t::token_t::ERROR || + wanted == expr_t::token_t::UNKNOWN) throw_(parse_error, _f("Invalid token '%1%'") % *this); else throw_(parse_error, -- cgit v1.2.3 From 42e6f8b232b4838768d03663c97694c0284c911b Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Sat, 29 Mar 2014 18:51:44 -0700 Subject: Add more terms to glossary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cleared up meaning of ‘posting’. Added a few Ledger specific items. --- doc/GLOSSARY.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/GLOSSARY.md b/doc/GLOSSARY.md index 3e9fbc68..e15d602e 100644 --- a/doc/GLOSSARY.md +++ b/doc/GLOSSARY.md @@ -11,4 +11,18 @@ ACCOUNTING GLOSSARY **Report**: A summary made from a journal of transactions. Each transaction affects accounts and those effects are collated and totaled. The two most common reports are the balance sheet, which shows what is owned and owed on a specific date, and the cash flow statement, which shows how money was earned and spent over a period. The cash flow statement is also called a profit and loss statement or an income statement. -**Transaction**: Our financial lives are recorded as a series of transactions. Each transaction has a specific date, an equal total of debits and credits affecting accounts, and some sort of description. For example, "On January 1, pay $100 with check #243 from Checking to Utilities for my Verizon phone bill" is a transaction. A credit of $100 decreases my Checking asset, while a balancing debit of $100 increases my Utility expense. Transactions can be as complicated as humans can make finances. +**Transaction**: Our financial lives are recorded as a series of transactions. Each transaction has a specific date, an equal total of debits and credits affecting accounts, and some sort of description. For example, "On January 1, pay $100 with check #243 from Checking to Utilities for my Verizon phone bill" is a transaction. A credit of $100 decreases my Checking asset, while a balancing debit of $100 increases my Utility expense. A transaction needs at least two *postings*, meaning account debits or credits, but can be as complicated as humans can make finances. + +LEDGER GLOSSARY +--- + +The Ledger software also has its own terms. + +**Commodity**: any currency, stock, time or resource to be tracked numerically. While many people only track money in Ledger, Ledger can track different resources and manage rules to convert between them. The system is flexible enough for the needs of very different users. Some track billable time, converting minutes and hours into dollars. Others track multiple currencies. Still others track the purchase and sale of stocks. Each commodity is seperate unless a conversion rule is given. [§ Commodities and Currencies](http://www.ledger-cli.org/3.0/doc/ledger3.html#Commodities-and-Currencies); [§ Currencies and Commodities](http://www.ledger-cli.org/3.0/doc/ledger3.html#Currency-and-Commodities); [§ Accounts and Inventories](http://www.ledger-cli.org/3.0/doc/ledger3.html#Accounts-and-Inventories); [§ Posting Cost](http://www.ledger-cli.org/3.0/doc/ledger3.html#Posting-cost) *(and next ten sections)*; [§ Commodity Reporting](http://www.ledger-cli.org/3.0/doc/ledger3.html#Commodity-Reporting) + +**Transaction Metadata**: a term for comments and tags annotating a transaction. Comments indented with a transaction will be stored with each posting of a transaction. Tags are words in comments followed by colons. Tags can be used as filters in reports and certain tags, "Payee" or "Value", may affect fields of the transaction. [§ Metadata](http://www.ledger-cli.org/3.0/doc/ledger3.html#Metadata), [§ Applying Metadata to every matched posting](http://www.ledger-cli.org/3.0/doc/ledger3.html#Applying-metadata-to-every-matched-posting), [§ Applying Metadata to the generated posting](http://www.ledger-cli.org/3.0/doc/ledger3.html#Applying-metadata-to-the-generated-posting) + +**Transaction State**: a state of *cleared*, *pending*, or *uncleared* on each posting. The state is usually set for an entire transaction at once with a mark after the date. The marks are ***** (cleared), **!** (pending), or no mark (uncleared). The +interpretation of this state is up to the user, but is typically used in bank reconcilations or differentiating time worked versus billed. Ledger supports +reports and filters based on state. [§ Transaction State](http://www.ledger-cli.org/3.0/doc/ledger3.html#Transaction-state); [§ Cleared Report]( +http://www.ledger-cli.org/3.0/doc/ledger3.html#Cleared-Report) -- cgit v1.2.3 From 06ffa551af6b3ca2b19ff1846542ca1ecf4e8ce1 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Sun, 30 Mar 2014 11:22:40 -0700 Subject: More Glossary Terms Added Command Directive and Journal File. Word wrap touched a couple of entries. --- doc/GLOSSARY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/GLOSSARY.md b/doc/GLOSSARY.md index e15d602e..19e2fe21 100644 --- a/doc/GLOSSARY.md +++ b/doc/GLOSSARY.md @@ -25,4 +25,5 @@ The Ledger software also has its own terms. **Transaction State**: a state of *cleared*, *pending*, or *uncleared* on each posting. The state is usually set for an entire transaction at once with a mark after the date. The marks are ***** (cleared), **!** (pending), or no mark (uncleared). The interpretation of this state is up to the user, but is typically used in bank reconcilations or differentiating time worked versus billed. Ledger supports reports and filters based on state. [§ Transaction State](http://www.ledger-cli.org/3.0/doc/ledger3.html#Transaction-state); [§ Cleared Report]( +[§ Cleared Report]( http://www.ledger-cli.org/3.0/doc/ledger3.html#Cleared-Report) -- cgit v1.2.3 From ace991eb02b2c4bf84b85d00a5d3a89e74d5dc3f Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Sun, 30 Mar 2014 11:26:43 -0700 Subject: Word wrap; alphabetical order. trivial changes. --- doc/GLOSSARY.md | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 94 insertions(+), 11 deletions(-) diff --git a/doc/GLOSSARY.md b/doc/GLOSSARY.md index 19e2fe21..5d3be8ab 100644 --- a/doc/GLOSSARY.md +++ b/doc/GLOSSARY.md @@ -1,29 +1,112 @@ ACCOUNTING GLOSSARY --- - Accounting and bookkeeping represent an entire field of human effort and has evolved its own specialized vocabulary. Accounting hopes to summarize and add understanding to where the money is going. + Accounting and bookkeeping represent an entire field of human effort and + has evolved its own specialized vocabulary. Accounting hopes to + summarize and add understanding to where the money is going. -**Account**: A category for grouping together amounts from similar transactions. Each account has a name, which is usually capitalized, and an account type. Accounts are often organized into a heirarchy when it helps understanding. For example, a coffee shop might have Coffee, Merchandise, and Equipment as accounts but arranged under an Inventory account because different decisions are made on the total inventory rather than just coffee. A heirarchy can be part of the account name in Ledger, e.g., "Assets:Inventory:Coffee". Note that the Ledger software usually creates the list of accounts on the fly: accounts are created when transactions use them. +**Account**: A category for grouping together amounts from similar + transactions. Each account has a name, which is usually capitalized, and + an account type. Accounts are often organized into a heirarchy when it + helps understanding. For example, a coffee shop might have Coffee, + Merchandise, and Equipment as accounts but arranged under an Inventory + account because different decisions are made on the total inventory + rather than just coffee. A heirarchy can be part of the account name in + Ledger, e.g., "Assets:Inventory:Coffee". Note that the Ledger software + usually creates the list of accounts on the fly: accounts are created + when transactions use them. -**Account Type**: Each account has a type of Asset, Liability, Equity, Income, or Expense. Assets represent something owned, e.g., Cash or Inventory. Liabilities represent sometime owed, e.g., a Loan or Mortgage. Equity, also called capital, is everything owned minus everything owed (Assets - Liabilities). It is the financial measure of how much you are ahead. Income is money earned somewhere, which puts you more ahead. Expenses is money spent somewhere, which puts you less ahead. The type of account determines if a debit represents an increase or decrease in an account. For example, Inventory is an asset so a transcation debiting Inventory would increase its value. Assets and Expenses increase with debits and decrease with credits; Liabilities, Equity, and Expenses increase with credits and decrease with debits. +**Account Type**: Each account has a type of Asset, Liability, Equity, + Income, or Expense. Assets represent something owned, e.g., Cash or + Inventory. Liabilities represent sometime owed, e.g., a Loan or + Mortgage. Equity, also called capital, is everything owned minus + everything owed (Assets - Liabilities). It is the financial measure of + how much you are ahead. Income is money earned somewhere, which puts you + more ahead. Expenses is money spent somewhere, which puts you less + ahead. The type of account determines if a debit represents an increase + or decrease in an account. For example, Inventory is an asset so a + transcation debiting Inventory would increase its value. Assets and + Expenses increase with debits and decrease with credits; Liabilities, + Equity, and Expenses increase with credits and decrease with debits. -**Journal**: A record of all the financial transactions of a person or firm. This data of where money goes can be collated into reports. This used to be done with a physical book, called a ledger, where each account was on one page. Each debit or credit in the journal was transfered to the appropriate account page and the pages were totalled to produce reports. This process is now done with the Ledger software which creates reports from the journal. A journal is sometimes called a register. +**Journal**: A record of all the financial transactions of a person or + firm. This data of where money goes can be collated into reports. This + used to be done with a physical book, called a ledger, where each account + was on one page. Each debit or credit in the journal was transfered to + the appropriate account page and the pages were totalled to produce + reports. This process is now done with the Ledger software which creates + reports from the journal. A journal is sometimes called a register. -**Report**: A summary made from a journal of transactions. Each transaction affects accounts and those effects are collated and totaled. The two most common reports are the balance sheet, which shows what is owned and owed on a specific date, and the cash flow statement, which shows how money was earned and spent over a period. The cash flow statement is also called a profit and loss statement or an income statement. +**Report**: A summary made from a journal of transactions. Each + transaction affects accounts and those effects are collated and totaled. + The two most common reports are the balance sheet, which shows what is + owned and owed on a specific date, and the cash flow statement, which + shows how money was earned and spent over a period. The cash flow + statement is also called a profit and loss statement or an income + statement. -**Transaction**: Our financial lives are recorded as a series of transactions. Each transaction has a specific date, an equal total of debits and credits affecting accounts, and some sort of description. For example, "On January 1, pay $100 with check #243 from Checking to Utilities for my Verizon phone bill" is a transaction. A credit of $100 decreases my Checking asset, while a balancing debit of $100 increases my Utility expense. A transaction needs at least two *postings*, meaning account debits or credits, but can be as complicated as humans can make finances. +**Transaction**: Our financial lives are recorded as a series of + transactions. Each transaction has a specific date, an equal total of + debits and credits affecting accounts, and some sort of description. For + example, "On January 1, pay $100 with check #243 from Checking to + Utilities for my Verizon phone bill" is a transaction. A credit of $100 + decreases my Checking asset, while a balancing debit of $100 increases my + Utility expense. A transaction needs at least two *postings*, meaning + account debits or credits, but can be as complicated as humans can make + finances. LEDGER GLOSSARY --- The Ledger software also has its own terms. -**Commodity**: any currency, stock, time or resource to be tracked numerically. While many people only track money in Ledger, Ledger can track different resources and manage rules to convert between them. The system is flexible enough for the needs of very different users. Some track billable time, converting minutes and hours into dollars. Others track multiple currencies. Still others track the purchase and sale of stocks. Each commodity is seperate unless a conversion rule is given. [§ Commodities and Currencies](http://www.ledger-cli.org/3.0/doc/ledger3.html#Commodities-and-Currencies); [§ Currencies and Commodities](http://www.ledger-cli.org/3.0/doc/ledger3.html#Currency-and-Commodities); [§ Accounts and Inventories](http://www.ledger-cli.org/3.0/doc/ledger3.html#Accounts-and-Inventories); [§ Posting Cost](http://www.ledger-cli.org/3.0/doc/ledger3.html#Posting-cost) *(and next ten sections)*; [§ Commodity Reporting](http://www.ledger-cli.org/3.0/doc/ledger3.html#Commodity-Reporting) +**Command Directive**: a command in a journal file to change how subsequent +lines and transactions in a journal file are processed. Command directives +control processing, set default values for subsequent accounts and +transactions, or override parts of subsequent transactions. A directive +line begins with name of the directive and may have addidtional arguments +or additional indented lines. The single letters *AbCDhIiNOoY* are aliased +to other command directives, providing compatiblity with the ancient past. +[§ Command Directives](http://www.ledger-cli.org/3.0/doc/ledger3.html#Command-Directives) -**Transaction Metadata**: a term for comments and tags annotating a transaction. Comments indented with a transaction will be stored with each posting of a transaction. Tags are words in comments followed by colons. Tags can be used as filters in reports and certain tags, "Payee" or "Value", may affect fields of the transaction. [§ Metadata](http://www.ledger-cli.org/3.0/doc/ledger3.html#Metadata), [§ Applying Metadata to every matched posting](http://www.ledger-cli.org/3.0/doc/ledger3.html#Applying-metadata-to-every-matched-posting), [§ Applying Metadata to the generated posting](http://www.ledger-cli.org/3.0/doc/ledger3.html#Applying-metadata-to-the-generated-posting) +**Commodity**: any currency, stock, time or resource to be tracked + numerically. While many people only track money in Ledger, Ledger can + track different resources and manage rules to convert between them. The + system is flexible enough for the needs of very different users. Some + track billable time, converting minutes and hours into dollars. Others + track multiple currencies. Still others track the purchase and sale of + stocks. Each commodity is seperate unless a conversion rule is given. + [§ Commodities and Currencies](http://www.ledger-cli.org/3.0/doc/ledger3.html#Commodities-and-Currencies); + [§ Currencies and Commodities](http://www.ledger-cli.org/3.0/doc/ledger3.html#Currency-and-Commodities); + [§ Accounts and Inventories](http://www.ledger-cli.org/3.0/doc/ledger3.html#Accounts-and-Inventories); + [§ Posting Cost](http://www.ledger-cli.org/3.0/doc/ledger3.html#Posting-cost) + *(and next ten sections)*; + [§ Commodity Reporting](http://www.ledger-cli.org/3.0/doc/ledger3.html#Commodity-Reporting) -**Transaction State**: a state of *cleared*, *pending*, or *uncleared* on each posting. The state is usually set for an entire transaction at once with a mark after the date. The marks are ***** (cleared), **!** (pending), or no mark (uncleared). The -interpretation of this state is up to the user, but is typically used in bank reconcilations or differentiating time worked versus billed. Ledger supports -reports and filters based on state. [§ Transaction State](http://www.ledger-cli.org/3.0/doc/ledger3.html#Transaction-state); [§ Cleared Report]( +**Journal File**: the text input file for ledger, sometimes called a +register file. A journal file is a series of transactions, command +directives, and comments. Command directives start with the single word +name of the directive at the beginning of the line and include any +following indented lines. Transactions start with a date a the beginning +of the line and include any indented lines following. The journal file is +expected to be encoded as ASCII or utf-8 text. + +**Transaction Metadata**: a term for comments and tags annotating a +transaction. Comments indented with a transaction will be stored with each +posting of a transaction. Tags are words in comments followed by colons. +Tags can be used as filters in reports and certain tags, "Payee" or +"Value", may affect fields of the transaction. +[§ Metadata](http://www.ledger-cli.org/3.0/doc/ledger3.html#Metadata), +[§ Applying Metadata to every matched posting](http://www.ledger-cli.org/3.0/doc/ledger3.html#Applying-metadata-to-every-matched-posting), +[§ Applying Metadata to the generated posting](http://www.ledger-cli.org/3.0/doc/ledger3.html#Applying-metadata-to-the-generated-posting) + +**Transaction State**: a state of *cleared*, *pending*, or *uncleared* on +each posting. The state is usually set for an entire transaction at once +with a mark after the date. The marks are ***** (cleared), **!** +(pending), or no mark (uncleared). The interpretation of this state is up +to the user, but is typically used in bank reconcilations or +differentiating time worked versus billed. Ledger supports reports and +filters based on state. +[§ Transaction State](http://www.ledger-cli.org/3.0/doc/ledger3.html#Transaction-state); [§ Cleared Report]( http://www.ledger-cli.org/3.0/doc/ledger3.html#Cleared-Report) -- cgit v1.2.3 From 618d62550a769de7ed4ad0f974c3831b9442d056 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Mon, 31 Mar 2014 15:35:25 -0700 Subject: Two more Ledger terms Added automated transaction and periodic transaction, two items that horribly misnamed. --- doc/GLOSSARY.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/GLOSSARY.md b/doc/GLOSSARY.md index 5d3be8ab..579e839a 100644 --- a/doc/GLOSSARY.md +++ b/doc/GLOSSARY.md @@ -60,6 +60,14 @@ LEDGER GLOSSARY The Ledger software also has its own terms. +**Automated Transaction**: a command directive that modifies subsequent + transactions that match an expression. An automated transaction can add + additional postings to a transaction, add metadata, or change transaction + amounts. Reports can be filter postings modified or generated by an automated + transaction. + [§ Automated Transactions](http://www.ledger-cli.org/3.0/doc/ledger3.html#Automated-Transactions); + [§ Concrete Example of Automated Transactions](http://www.ledger-cli.org/3.0/doc/ledger3.html#Concrete-Example-of-Automated-Transactions) + **Command Directive**: a command in a journal file to change how subsequent lines and transactions in a journal file are processed. Command directives control processing, set default values for subsequent accounts and @@ -67,6 +75,8 @@ transactions, or override parts of subsequent transactions. A directive line begins with name of the directive and may have addidtional arguments or additional indented lines. The single letters *AbCDhIiNOoY* are aliased to other command directives, providing compatiblity with the ancient past. +The characters **'='** and **'-'** are command directives for a automatic +transactions and periodic transactions, respectively. [§ Command Directives](http://www.ledger-cli.org/3.0/doc/ledger3.html#Command-Directives) **Commodity**: any currency, stock, time or resource to be tracked @@ -91,6 +101,12 @@ following indented lines. Transactions start with a date a the beginning of the line and include any indented lines following. The journal file is expected to be encoded as ASCII or utf-8 text. +**Periodic Transaction**: the estimate of a transaction that would occur + periodically, e.g., a monthly expense. These estimates are only used in + budgeting and forecasting reports using the `--budget`, + `--forecast`, or `--unbudgeted` options. + [§ Budgeting and Forecasting](http://www.ledger-cli.org/3.0/doc/ledger3.html#Budgeting-and-Forecasting) + **Transaction Metadata**: a term for comments and tags annotating a transaction. Comments indented with a transaction will be stored with each posting of a transaction. Tags are words in comments followed by colons. -- cgit v1.2.3 From cf31a20966a5da8dded2784ea553c13153d5cc13 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Tue, 1 Apr 2014 13:06:00 -0700 Subject: Two more terms. Added posting and virtual posting. --- doc/GLOSSARY.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/GLOSSARY.md b/doc/GLOSSARY.md index 579e839a..9a3802d2 100644 --- a/doc/GLOSSARY.md +++ b/doc/GLOSSARY.md @@ -37,6 +37,12 @@ ACCOUNTING GLOSSARY reports. This process is now done with the Ledger software which creates reports from the journal. A journal is sometimes called a register. +**Posting**: A single debit or credit line of a transaction. A posting +comprises an account and the debit or credit amount. It also inherits the +shared description and date from the transaction. In the Ledger software, +a posting may also have metadata and an account state. + + **Report**: A summary made from a journal of transactions. Each transaction affects accounts and those effects are collated and totaled. The two most common reports are the balance sheet, which shows what is @@ -126,3 +132,10 @@ filters based on state. [§ Transaction State](http://www.ledger-cli.org/3.0/doc/ledger3.html#Transaction-state); [§ Cleared Report]( http://www.ledger-cli.org/3.0/doc/ledger3.html#Cleared-Report) + +**Virtual Posting**: an annotation posting in a transaction, similar in form as a regular posting but not required to balance debits and +credits. It is often used to support +[Fund Accounting](http://en.wikipedia.org/wiki/Fund_accounting) and various reports will collate and summarize virtual postings. Virtual postings should not be +confused with virtual posting costs. +[§ Virtual Postings](http://www.ledger-cli.org/3.0/doc/ledger3.html#Virtual-postings) +[§ Working with Multiple Funds and Accounts](http://www.ledger-cli.org/3.0/doc/ledger3.html#Working-with-multiple-funds-and-accounts) -- cgit v1.2.3 From 5653458af21105424e0bf51267124141c75a78d0 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Tue, 1 Apr 2014 13:59:15 -0700 Subject: Started DEVELOP.md with a glossary Started a development doc with a few glossary terms. --- doc/DEVELOP.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/DEVELOP.md diff --git a/doc/DEVELOP.md b/doc/DEVELOP.md new file mode 100644 index 00000000..a1d20ed7 --- /dev/null +++ b/doc/DEVELOP.md @@ -0,0 +1,16 @@ +GLOSSARY +---- + +Developing the Ledger software uses a number different tools, not all of which will be familiar to all developers. + +[**Boost**](http://www.boost.org): a standard set of C++ libraries. Most Boost libraries consist of inline functions and templates in header files. + +[**GCC**](http://gcc.gnu.org): GNU Compiler Collection, which includes gcc (the compiler) and gcov (coverage and line based performance) tools. + +[**GMP**](https://gmplib.org): Gnu Multiple Precision Arithmetic Library provides arbitrary precision math. + +[**Travis CI**](https://travis-ci.org): a hosted continuous integration service that + builds and runs tests each commit posted to GitHub. Each build creates + a [log](https://travis-ci.org/ledger/ledger), updates a [small graphic](https://travis-ci.org/ledger/ledger.png?branch=master) at the top left of + the main project's + [README.md](https://github.com/ledger/ledger/blob/master/README.md), and emails the author of the commit if any tests fail. -- cgit v1.2.3 From d20d6267b419cd646f8a96b74af3983182c96a72 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Wed, 2 Apr 2014 10:07:56 -0700 Subject: More developer terms Mention a few more tools used. Also word-wrap, which touched most lines. --- doc/DEVELOP.md | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/doc/DEVELOP.md b/doc/DEVELOP.md index a1d20ed7..d4e279d4 100644 --- a/doc/DEVELOP.md +++ b/doc/DEVELOP.md @@ -1,16 +1,36 @@ GLOSSARY ---- -Developing the Ledger software uses a number different tools, not all of which will be familiar to all developers. +Developing the Ledger software uses a number different tools, not all of +which will be familiar to all developers. -[**Boost**](http://www.boost.org): a standard set of C++ libraries. Most Boost libraries consist of inline functions and templates in header files. +[**Boost**](http://www.boost.org): a standard set of C++ libraries. Most +Boost libraries consist of inline functions and templates in header files. -[**GCC**](http://gcc.gnu.org): GNU Compiler Collection, which includes gcc (the compiler) and gcov (coverage and line based performance) tools. +[**CMake**](http://www.cmake.org): A cross platform system for building +from source code. It uses the *CMakeLists.txt* files. -[**GMP**](https://gmplib.org): Gnu Multiple Precision Arithmetic Library provides arbitrary precision math. +[**DOxygen**](http://doxygen.org): generates programming documentation from +source code files. Primarly used on C++ sources, but works on all. Uses +the *doc/Doxyfile.in* file. -[**Travis CI**](https://travis-ci.org): a hosted continuous integration service that - builds and runs tests each commit posted to GitHub. Each build creates - a [log](https://travis-ci.org/ledger/ledger), updates a [small graphic](https://travis-ci.org/ledger/ledger.png?branch=master) at the top left of - the main project's - [README.md](https://github.com/ledger/ledger/blob/master/README.md), and emails the author of the commit if any tests fail. +[**GCC**](http://gcc.gnu.org): Gnu Compiler Collection, which includes the +*gcc* compiler and *gcov* coverage/profiler tool. + +[**GMP**](https://gmplib.org): Gnu Multiple Precision Arithmetic Library +provides arbitrary precision math. + +[**Markdown**](https://daringfireball.net/projects/markdown/): A typesetter +format that produces *html* files from *\*.md* files. Note that GitHub automatically renders *.md* files. + +[**Texinfo**](http://www.gnu.org/software/texinfo/): Gnu documentation +typesetter that produces *html* and *pdf* files from the *doc/\*.texi* +files. + +[**Travis CI**](https://travis-ci.org): a hosted continuous integration + service that builds and runs tests each commit posted to GitHub. Each + build creates a [log](https://travis-ci.org/ledger/ledger), updates a + [small graphic](https://travis-ci.org/ledger/ledger.png?branch=master) at + the top left of the main project's + [README.md](https://github.com/ledger/ledger/blob/master/README.md), and + emails the author of the commit if any tests fail. -- cgit v1.2.3 From 0e2d07c801be8a35a424332115dbd33540a3a82b Mon Sep 17 00:00:00 2001 From: Matthias Lederhofer Date: Wed, 2 Apr 2014 23:10:03 +0100 Subject: use /bin/sh to run the pager This allows to specify options on the command-line of the pager, e.g. $ ledger --color --pager='less -R' ... --- src/stream.cc | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/stream.cc b/src/stream.cc index fcd030b6..e4eb7800 100644 --- a/src/stream.cc +++ b/src/stream.cc @@ -80,18 +80,10 @@ namespace { close(pfd[1]); close(pfd[0]); - // Find command name: its the substring starting right of the - // rightmost '/' character in the pager pathname. See manpage for - // strrchr. -#if BOOST_VERSION >= 103700 - path basename(pager_path.filename()); -#else - path basename(pager_path.leaf()); -#endif - execlp(pager_path.string().c_str(), basename.string().c_str(), NULL); + execlp("/bin/sh", "/bin/sh", "-c", pager_path.string().c_str(), NULL); // We should never, ever reach here - perror((std::string("execlp: ") + pager_path.string()).c_str()); + perror("execlp: /bin/sh"); exit(1); } else { // parent -- cgit v1.2.3 From 6a859d6036938a3daeeb4277d410afcce9584aa0 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Thu, 3 Apr 2014 23:22:21 -0700 Subject: Add CTestTestfile.cmake Ignore file generated by ./acprep. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 70740dfd..735b1c0f 100644 --- a/.gitignore +++ b/.gitignore @@ -91,6 +91,7 @@ CMakeCache.txt CPackConfig.cmake CPackSourceConfig.cmake CMakeFiles/ +CTestTestfile.cmake _CPack_Packages/ cmake_install.cmake install_manifest.txt -- cgit v1.2.3 From 09e09521cea8933622757aa44877a87fe44864c0 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Fri, 4 Apr 2014 00:23:59 -0700 Subject: Started an Orientation section Every project lays out directories in a unique manner. --- doc/DEVELOP.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/DEVELOP.md b/doc/DEVELOP.md index d4e279d4..d7ff7c3f 100644 --- a/doc/DEVELOP.md +++ b/doc/DEVELOP.md @@ -34,3 +34,23 @@ files. the top left of the main project's [README.md](https://github.com/ledger/ledger/blob/master/README.md), and emails the author of the commit if any tests fail. + + +Orientation +--- + +The source tree can be confusing to a new developer. Here is a selective +orientation: + +**./acprep**: a custom thousand-line script to install dependencies, grab + updates, and build. It also creates *\*.cmake*, + *./CmakeFiles/* and other CMake temporary files. Use *./acprep --help* + for more information. + +**./README.md**: user readme file in markdown format, also used as the project + discription on GitHub. + +**./contrib**: contributed scripts of random quality and completion. They usually require editing to run. + +**./doc**: documentation, licenses, and + tools for generating documents such as the *pdf* manual. -- cgit v1.2.3 From db916c9a69cd1e16382f4e5de958f03989936508 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Fri, 4 Apr 2014 09:54:28 -0700 Subject: More terms and orientation Added Cheetah, sha1, utfcpp and finished the orientation section. --- doc/DEVELOP.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/doc/DEVELOP.md b/doc/DEVELOP.md index d7ff7c3f..e3a479d7 100644 --- a/doc/DEVELOP.md +++ b/doc/DEVELOP.md @@ -7,6 +7,9 @@ which will be familiar to all developers. [**Boost**](http://www.boost.org): a standard set of C++ libraries. Most Boost libraries consist of inline functions and templates in header files. +[**Cheetah**](http://www.cheetahtemplate.org): a Python templating engine, +used by *./python/server.py*. + [**CMake**](http://www.cmake.org): A cross platform system for building from source code. It uses the *CMakeLists.txt* files. @@ -21,7 +24,11 @@ the *doc/Doxyfile.in* file. provides arbitrary precision math. [**Markdown**](https://daringfireball.net/projects/markdown/): A typesetter -format that produces *html* files from *\*.md* files. Note that GitHub automatically renders *.md* files. +format that produces *html* files from *.md* files. Note that GitHub +automatically renders *.md* files. + +[**sha1**](http://en.wikipedia.org/wiki/SHA-1): a marginally secure +cryptographic hash function, used only for signing the license file. [**Texinfo**](http://www.gnu.org/software/texinfo/): Gnu documentation typesetter that produces *html* and *pdf* files from the *doc/\*.texi* @@ -35,6 +42,9 @@ files. [README.md](https://github.com/ledger/ledger/blob/master/README.md), and emails the author of the commit if any tests fail. +[**utfcpp**](http://utfcpp.sourceforge.net): a library for handling utf-8 +in a variety of C++ versions. + Orientation --- @@ -50,7 +60,22 @@ orientation: **./README.md**: user readme file in markdown format, also used as the project discription on GitHub. -**./contrib**: contributed scripts of random quality and completion. They usually require editing to run. +**./contrib/**: contributed scripts of random quality and completion. They + usually require editing to run. -**./doc**: documentation, licenses, and +**./doc/**: documentation, licenses, and tools for generating documents such as the *pdf* manual. + +**./lib/**: a couple libraries used in development. + +**./lisp/**: the [Emacs](http://www.gnu.org/software/emacs/) + [ledger-mode](http://ledger-cli.org/3.0/doc/ledger-mode.html) lisp code, + under the [GPLv2](http://www.gnu.org/licenses/gpl-2.0.html) license. + +**./python/**: samples using the Python ledger module. + +**./src/**: the C++ header and source files in a flat directory. + +**./test/**: a testing harness with subdirectories full of tests + +**./tools/**: an accretion of tools, mostly small scripts, to aid development -- cgit v1.2.3 From 0c3a4ec57c64decd003217ddbb771d1ede590077 Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Sun, 6 Apr 2014 21:37:27 -0700 Subject: Add two more terms Added Effective Date and Transaction Code --- doc/GLOSSARY.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/GLOSSARY.md b/doc/GLOSSARY.md index 9a3802d2..5d3263d0 100644 --- a/doc/GLOSSARY.md +++ b/doc/GLOSSARY.md @@ -99,6 +99,13 @@ transactions and periodic transactions, respectively. *(and next ten sections)*; [§ Commodity Reporting](http://www.ledger-cli.org/3.0/doc/ledger3.html#Commodity-Reporting) +**Effective Date**: an optional, second date information item in for a +posting or transaction. Some use the effective date for when work is +billed or when a check has cleared. The `--effective-date` option causes +the effective date to override the transaction's initial date for that +report. +[§ Effective Dates](http://www.ledger-cli.org/3.0/doc/ledger3.html#Effective-Dates); + **Journal File**: the text input file for ledger, sometimes called a register file. A journal file is a series of transactions, command directives, and comments. Command directives start with the single word @@ -113,6 +120,12 @@ expected to be encoded as ASCII or utf-8 text. `--forecast`, or `--unbudgeted` options. [§ Budgeting and Forecasting](http://www.ledger-cli.org/3.0/doc/ledger3.html#Budgeting-and-Forecasting) +**Transaction Code**: an optional item in a transaction or posting often + used to record a check number or bank code. Certain custom reports can + report this code. + [§ Codes](http://www.ledger-cli.org/3.0/doc/ledger3.html#Codes); + [§ Format Expressions](http://www.ledger-cli.org/3.0/doc/ledger3.html#Format-Expressions) + **Transaction Metadata**: a term for comments and tags annotating a transaction. Comments indented with a transaction will be stored with each posting of a transaction. Tags are words in comments followed by colons. -- cgit v1.2.3