mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-16 18:25:11 -06:00
bindings-python - drop references to gnucash-env
We no longer ship a gnucash-env script, directly use python(3) instead
This commit is contained in:
parent
0b11a073f0
commit
df1f033f41
@ -38,7 +38,7 @@ import csv
|
||||
from gnucash import Session, GncNumeric, Split
|
||||
|
||||
# Invoke this script like the following example
|
||||
# $ gnucash-env python account_analysis.py gnucash_file.gnucash \
|
||||
# $ python3 account_analysis.py gnucash_file.gnucash \
|
||||
# 2010 1 monthly 12 \
|
||||
# debits-show credits-show Assets 'Test Account'
|
||||
#
|
||||
@ -156,9 +156,9 @@ def main():
|
||||
print('usage: account_analysis.py {book url} {start year} {start month, numeric} {period type: monthly, quarterly, or yearly} {number of periods to show, from start year and month} {whether to show debits: debits-show for true, all other values false} {whether to show credits: credits-show for true, all other values false} {space separated account path, as many nested levels as desired} ')
|
||||
print('examples:\n')
|
||||
print("The following example analyzes 12 months of 'Assets:Test Account' from /home/username/test.gnucash, starting in January of 2010, and shows both credits and debits")
|
||||
print("gnucash-env python account_analysis.py '/home/username/test.gnucash' 2010 1 monthly 12 debits-show credits-show Assets 'Test Account'\n")
|
||||
print("python3 account_analysis.py '/home/username/test.gnucash' 2010 1 monthly 12 debits-show credits-show Assets 'Test Account'\n")
|
||||
print("The following example analyzes 2 quarters of 'Liabilities:First Level:Second Level' from /home/username/test.gnucash, starting March 2011, and shows credits but not debits")
|
||||
print("gnucash-env python account_analysis.py '/home/username/test.gnucash' 2011 3 quarterly 2 debits-noshow credits-show Liabilities 'First Level' 'Second Level")
|
||||
print("python3 account_analysis.py '/home/username/test.gnucash' 2011 3 quarterly 2 debits-noshow credits-show Liabilities 'First Level' 'Second Level")
|
||||
return
|
||||
|
||||
try:
|
||||
|
@ -51,11 +51,11 @@ from datetime import date
|
||||
# mutual, and trading, you'll have to put the opening balance in yourself
|
||||
#
|
||||
# Invocation examples:
|
||||
# gnucash-env python new_book_with_opening_balances.py \
|
||||
# python3 new_book_with_opening_balances.py \
|
||||
# '/home/mark/test.gnucash'
|
||||
# 'sqlite3:///home/mark/new_test.gnucash'
|
||||
#
|
||||
# gnucash-env python new_book_with_opening_balances.py \
|
||||
# python3 new_book_with_opening_balances.py \
|
||||
# '/home/mark/test.gnucash' \
|
||||
# 'xml:///crypthome/mark/parit-financial-system/new_test.gnucash'
|
||||
#
|
||||
@ -293,8 +293,8 @@ def main():
|
||||
print('not enough parameters')
|
||||
print('usage: new_book_with_opening_balances.py {source_book_url} {destination_book_url}')
|
||||
print('examples:')
|
||||
print("gnucash-env python new_book_with_opening_balances.py '/home/username/test.gnucash' 'sqlite3:///home/username/new_test.gnucash'")
|
||||
print("gnucash-env python new_book_with_opening_balances.py '/home/username/test.gnucash' 'xml:///crypthome/username/finances/new_test.gnucash'")
|
||||
print("python3 new_book_with_opening_balances.py '/home/username/test.gnucash' 'sqlite3:///home/username/new_test.gnucash'")
|
||||
print("python3 new_book_with_opening_balances.py '/home/username/test.gnucash' 'xml:///crypthome/username/finances/new_test.gnucash'")
|
||||
return
|
||||
|
||||
#have everything in a try block to unable us to release our hold on stuff to the extent possible
|
||||
|
@ -5,8 +5,9 @@
|
||||
# before running this.
|
||||
# Adding to a calling bash script would be better
|
||||
# Although calling it from here would be even better!
|
||||
# OR: export PYTHONPATH=$HOME/progs/lib/python2.6/site-packages
|
||||
# Then: gnucash-env ipython
|
||||
# OR: export PYTHONPATH=<path-to-gnucash-inst-dir>/lib/python3.7/site-packages:$PYTHONPATH
|
||||
# You may have to adjust the above path to your local system (lib->lib64, python3.7->...)
|
||||
# Then: ipython3
|
||||
# The account file is not saved but always use a disposable copy.
|
||||
# Change, FILE, CURRENCY and STOCK to those defined in your test account.
|
||||
|
||||
|
@ -5,8 +5,9 @@
|
||||
# before running this.
|
||||
# Adding to a calling bash script would be better
|
||||
# Although calling it from here would be even better!
|
||||
# OR: export PYTHONPATH=$HOME/progs/lib/python2.6/site-packages
|
||||
# Then: gnucash-env ipython
|
||||
# OR: export PYTHONPATH=<path-to-gnucash-inst-dir>/lib/python3.7/site-packages:$PYTHONPATH
|
||||
# You may have to adjust the above path to your local system (lib->lib64, python3.7->...)
|
||||
# Then: ipython3
|
||||
# The account file is not saved but always use a disposable copy.
|
||||
# Thanks for contributions by Christoph Holtermann and Mark Jenkins
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
# Creates a new book file (or *overwrites* an existing one) that has elements
|
||||
# in it for business use -- intended as a demonstration program.
|
||||
# Syntax:
|
||||
# gnucash-env python simple_business_create.py \
|
||||
# python3 simple_business_create.py \
|
||||
# sqlite3:///home/blah/blah.gnucash
|
||||
#
|
||||
# Specifically, this sets up a simple tree, creates a customer, job,
|
||||
@ -65,7 +65,7 @@ if len(argv) < 2:
|
||||
print('not enough parameters')
|
||||
print('usage: simple_business_create.py {new_book_url}')
|
||||
print('example:')
|
||||
print("gnucash-env python simple_business_create.py sqlite3:///home/blah/blah.gnucash")
|
||||
print("python3 simple_business_create.py sqlite3:///home/blah/blah.gnucash")
|
||||
exit()
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
# this to become an invoice importer for your own books
|
||||
#
|
||||
# Syntax:
|
||||
# gnucash-env python simple_invoice_insert.py \
|
||||
# python3 simple_invoice_insert.py \
|
||||
# /home/blah/blah.gnucash
|
||||
# dda2ec8e3e63c7715097f852851d6b22 1001 'The Goods' 201.43
|
||||
#
|
||||
|
@ -45,7 +45,7 @@ if len(argv) < 2:
|
||||
print('not enough parameters')
|
||||
print('usage: test_imbalance_transaction.py {book_url}')
|
||||
print('examples:')
|
||||
print("gnucash-env python test_imbalance_transaction.py '/home/username/test.gnucash'")
|
||||
print("python3 test_imbalance_transaction.py '/home/username/test.gnucash'")
|
||||
exit()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user