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:
Geert Janssens 2019-11-30 13:20:08 +01:00
parent 0b11a073f0
commit df1f033f41
7 changed files with 17 additions and 15 deletions

View File

@ -38,7 +38,7 @@ import csv
from gnucash import Session, GncNumeric, Split from gnucash import Session, GncNumeric, Split
# Invoke this script like the following example # 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 \ # 2010 1 monthly 12 \
# debits-show credits-show Assets 'Test Account' # 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('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('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("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("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 return
try: try:

View File

@ -51,11 +51,11 @@ from datetime import date
# mutual, and trading, you'll have to put the opening balance in yourself # mutual, and trading, you'll have to put the opening balance in yourself
# #
# Invocation examples: # Invocation examples:
# gnucash-env python new_book_with_opening_balances.py \ # python3 new_book_with_opening_balances.py \
# '/home/mark/test.gnucash' # '/home/mark/test.gnucash'
# 'sqlite3:///home/mark/new_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' \ # '/home/mark/test.gnucash' \
# 'xml:///crypthome/mark/parit-financial-system/new_test.gnucash' # 'xml:///crypthome/mark/parit-financial-system/new_test.gnucash'
# #
@ -293,8 +293,8 @@ def main():
print('not enough parameters') print('not enough parameters')
print('usage: new_book_with_opening_balances.py {source_book_url} {destination_book_url}') print('usage: new_book_with_opening_balances.py {source_book_url} {destination_book_url}')
print('examples:') print('examples:')
print("gnucash-env python 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' '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' 'xml:///crypthome/username/finances/new_test.gnucash'")
return return
#have everything in a try block to unable us to release our hold on stuff to the extent possible #have everything in a try block to unable us to release our hold on stuff to the extent possible

View File

@ -5,8 +5,9 @@
# before running this. # before running this.
# Adding to a calling bash script would be better # Adding to a calling bash script would be better
# Although calling it from here would be even better! # Although calling it from here would be even better!
# OR: export PYTHONPATH=$HOME/progs/lib/python2.6/site-packages # OR: export PYTHONPATH=<path-to-gnucash-inst-dir>/lib/python3.7/site-packages:$PYTHONPATH
# Then: gnucash-env ipython # 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. # The account file is not saved but always use a disposable copy.
# Change, FILE, CURRENCY and STOCK to those defined in your test account. # Change, FILE, CURRENCY and STOCK to those defined in your test account.

View File

@ -5,8 +5,9 @@
# before running this. # before running this.
# Adding to a calling bash script would be better # Adding to a calling bash script would be better
# Although calling it from here would be even better! # Although calling it from here would be even better!
# OR: export PYTHONPATH=$HOME/progs/lib/python2.6/site-packages # OR: export PYTHONPATH=<path-to-gnucash-inst-dir>/lib/python3.7/site-packages:$PYTHONPATH
# Then: gnucash-env ipython # 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. # The account file is not saved but always use a disposable copy.
# Thanks for contributions by Christoph Holtermann and Mark Jenkins # Thanks for contributions by Christoph Holtermann and Mark Jenkins

View File

@ -24,7 +24,7 @@
# Creates a new book file (or *overwrites* an existing one) that has elements # Creates a new book file (or *overwrites* an existing one) that has elements
# in it for business use -- intended as a demonstration program. # in it for business use -- intended as a demonstration program.
# Syntax: # Syntax:
# gnucash-env python simple_business_create.py \ # python3 simple_business_create.py \
# sqlite3:///home/blah/blah.gnucash # sqlite3:///home/blah/blah.gnucash
# #
# Specifically, this sets up a simple tree, creates a customer, job, # Specifically, this sets up a simple tree, creates a customer, job,
@ -65,7 +65,7 @@ if len(argv) < 2:
print('not enough parameters') print('not enough parameters')
print('usage: simple_business_create.py {new_book_url}') print('usage: simple_business_create.py {new_book_url}')
print('example:') 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() exit()

View File

@ -30,7 +30,7 @@
# this to become an invoice importer for your own books # this to become an invoice importer for your own books
# #
# Syntax: # Syntax:
# gnucash-env python simple_invoice_insert.py \ # python3 simple_invoice_insert.py \
# /home/blah/blah.gnucash # /home/blah/blah.gnucash
# dda2ec8e3e63c7715097f852851d6b22 1001 'The Goods' 201.43 # dda2ec8e3e63c7715097f852851d6b22 1001 'The Goods' 201.43
# #

View File

@ -45,7 +45,7 @@ if len(argv) < 2:
print('not enough parameters') print('not enough parameters')
print('usage: test_imbalance_transaction.py {book_url}') print('usage: test_imbalance_transaction.py {book_url}')
print('examples:') 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() exit()