summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | gpgme: Remove obsoleted rewind wrapper functionAlexis Hildebrandt2023-04-181-6/+2
| | | | | | | | kudos to @spacefrogg
* | gpgme: Remove code handling versions prior to required versionAlexis Hildebrandt2023-04-181-10/+0
| |
* | Clean-up doxygen modulesAlexis Hildebrandt2023-04-167-7/+11
|/
* Refactor python related types into ledger::python namespaceAlexis Hildebrandt2023-04-1215-54/+65
|
* Refactor basic_flags_t to ledger::flags::basic_tAlexis Hildebrandt2023-04-1213-27/+32
|
* Refactor flag and pstream related types into ledger namespaceAlexis Hildebrandt2023-04-123-1/+8
|
* Merge branch 'master' into pragma-onceAlexis Hildebrandt2023-04-116-5/+62
|\
| * Merge pull request #2228 from afh/api-documentationAlexis Hildebrandt2023-04-116-4/+63
| |\ | | | | | | Fix generation of API documentation and prepare for publishing on ledger-cli.org
| | * Update api docsAlexis Hildebrandt2023-04-103-1/+41
| | |
| | * doc: Minor clean-upAlexis Hildebrandt2023-04-103-3/+22
| | |
| * | Fix typoAlexis Hildebrandt2023-04-111-1/+1
| |/
* / Use #pragma onceAlexis Hildebrandt2023-04-1057-228/+57
|/
* Bump required Boost version to 1.72Alexis Hildebrandt2023-03-244-25/+0
|
* Change a use of is_realzero to just is_zeroJohn Wiegley2023-03-231-1/+1
| | | | This is needed to avoid a possible divide by zero.
* Increase string size limit in src/unistring.h assertJohn Wiegley2023-03-081-1/+2
|
* Do not perform commodity reduction when parsing a format directiveJohn Wiegley2023-03-031-3/+5
|
* Enforce use of non-deprecated boost::filesystem APIAlexis Hildebrandt2023-02-201-0/+1
| | | | For details see https://www.boost.org/doc/libs/1_81_0/libs/filesystem/doc/deprecated.html
* Fix compiler warningsAlexis Hildebrandt2023-02-202-1/+5
| | | | minimizing use of deprecated API where possible.
* Remove unused server related codeAlexis Hildebrandt2023-02-202-44/+0
|
* Add info about compile features to --versionAlexis Hildebrandt2023-02-141-0/+9
|
* When a post has no date at all, default to the current dateJohn Wiegley2023-02-061-2/+4
|
* Update copyright yearAlexis Hildebrandt2023-02-02123-124/+124
| | | | [skip ci]
* Fix deprecation warningsAlexis Hildebrandt2023-02-011-14/+18
| | | | Code clean-up
* Remove support for Python 2.xAlexis Hildebrandt2023-02-017-353/+7
|
* If the amount-width has not been set, use the old default of 20John Wiegley2023-01-272-3/+10
|
* Use amount_width for balance reportVladimir Parfinenko2023-01-271-3/+3
|
* Fix python/c++ conversion for boost::optional<T>David Sklar2023-01-271-4/+5
| | | | | | | | | | | | | | Setters for types wrapped in boost::optional, such as item_t::note were broken, e.g. setting a note on a transaction resulted in garbled data that would cause Python to throw utf-8 errors when retrieving the note. (But setters that accessed strings directly, e.g. "payee" on a transaction worked fine.) This change alters the from-python conversion for optional-wrapped types based on the example at https://stackoverflow.com/questions/36485840/wrap-boostoptional-using-boostpython and a test case to verify the behavior.
* Fix IDENT format comment to match recent change 35713fe79Donald Lam2023-01-271-1/+1
|
* Disallow numbers in function namesJohn Wiegley2023-01-251-1/+1
|
* Rename quoted_rfc4180 to quoted_rfc, to avoid parser quirkDonald Lam2023-01-252-4/+4
| | | | | | | Ledger's expression parser considers quoted_rfc4180 to be an amount (quantity 4180 of commodity "quoted_rfc"). Fixes #2007.
* typo and column alignmentspaette2023-01-231-1/+1
|
* Initial fix for #2147WY2023-01-201-1/+1
|
* Python: Transaction.remove_post should call xact_base_t::remove_postDavid Sklar2023-01-101-1/+1
|
* Python: test cleanupsDavid Sklar2023-01-091-0/+5
| | | | | | | | 1. Remove references to modules (exceptions, StringIO) no longer needed for Pythn3 2. Use assertEqual instead of assertEquals 3. Clear journal files with a close_journal_files() function that uses the then-current underlying python_session pointer. Calling session.close_journal_files() sometimes leads to segfaults because python_session has changed after it was injected into the python module (as "session") on module startup.
* Add python support for error_contextAdam Wendt2022-11-131-0/+7
| | | | | | Added ledger.session.error_context() to py_session.cc to get the error context message when exceptions are thrown.
* Fix balancing commodity with smaller unit.Maria2022-10-111-1/+1
|
* xml: Include posting-specific payee in outputGwyneth Morgan2022-10-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In `ledger xml` export, include the `<posting>`-specific payee (from the `Payee:` tag) as `<payee>`. This data is already included under `<metadata>` as `<value key="Payee">`, but that is more specific to Ledger's implementation; if in the future there is another way to set the payee (or perhaps an option to have the Payee tag in one's own language), that field wouldn't be a reliable method of getting this info. Example: 2022-01-01 Transaction-level payee a 10 b ; Payee: Posting-level payee Relevant XML output: <transaction> <date>2022-01-01</date> <payee>Transaction-level payee</payee> <postings> <posting> <account ref="0000558defd6f260"> <name>a</name> </account> <post-amount> <amount> <quantity>10</quantity> </amount> </post-amount> <total> <amount> <quantity>10</quantity> </amount> </total> </posting> <posting> <payee>Posting-level payee</payee> <account ref="0000558defd6f960"> <name>b</name> </account> <post-amount> <amount> <quantity>-10</quantity> </amount> </post-amount> <note> Payee: Posting-level payee</note> <metadata> <value key="Payee"> <string>Posting-level payee</string> </value> </metadata> <total> <amount> <quantity>0</quantity> </amount> </total> </posting> </postings> </transaction>
* Handle return value of PyUnicode_READYAlexis Hildebrandt2022-10-021-1/+2
| | | | | | to ensure access macros are only called on "legacy" unicode string objects that are "ready". See https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_READY
* Fix handling of UCS-2 encoded stringsAlexis Hildebrandt2022-10-021-1/+1
| | | | | | Add test to python/demo.py Fixes #2132
* Fix handling of UCS-1 encoded stringsAlexis Hildebrandt2022-10-021-11/+12
| | | | Add test to python/demo.py
* Properly handle PyUnicode_1BYTE_DATAAlexis Hildebrandt2022-07-201-3/+1
|
* Fix use of deprecated Python legacy Unicode APIAlexis Hildebrandt2022-07-201-18/+52
| | | | | | | | replacing it with APIs introduced in Python 3.3 to ensure ledger's Python bindings continue to function when the legacy Unicode API is removed in Python 3.12. For details see https://docs.python.org/3.10/c-api/unicode.html
* Fix typos found by codespellAlexis Hildebrandt2022-07-194-6/+6
|
* Fix SIGABRT when python subcommand raises an exceptionAaron L. Zeng2022-07-131-2/+3
| | | | | | | | | | | | | Before, `ledger python -- -c 'raise RuntimeError'` would terminate messily via SIGABRT, printing the following: terminate called after throwing an instance of 'int' [1] 2151711 abort (core dumped) ledger python -c 'raise RuntimeError' This change makes the python subcommand throw a standard C++ exception rather than just a plain int, which is never caught and triggers the SIGABRT. Now, the process prints the uncaught Python exception as usual and then exits with exit code 1.
* Update copyright statement for 2022Alexis Hildebrandt2022-07-02124-125/+125
|
* Fix unrounding for equityOleg Bulatov2022-05-063-3/+6
|
* When calculating balance assignments, strip away lot annotationsJohn Wiegley2022-05-031-12/+15
|
* Remove some UTF-8 code that was having no effectkanreki2022-04-141-38/+5
| | | | Fixes #2061.
* Change header guard names to use `INCLUDED_` prefixPhil Newton2022-04-0659-177/+177
| | | | Fixes #2049
* Avoid making references to nullKunht Kun2022-03-171-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | In `compare_items` if `sort_order` is a top level expression, it has no context and `get_context()` method returns the null pointer. To see this, run $ ledger -f test/input/demo.ledger --sort display_amount reg --debug scope.symbols and there will be many lines like [DEBUG] Binding scope 0 with ... In such case making a reference to the context is an undefined behavior (honestly the dereferencing itself feels quite problematic, but many compilers just run without any complaints) and could potentially cause segfaults. Therefore, we change to use only the grandchild scope (`left` or `right`) for `find_sort_values` here. Note that it may seem to be more appropriate to use `report` here for the parent scope. However, in `find_sort_values` which is called right after, the `report` scope is always bound to this scope. So we only use grandchild scope to avoid unnecessary operations. Fixes #2069.