gnucash master: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Fri Jun 5 14:32:23 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/153ee887 (commit)
via https://github.com/Gnucash/gnucash/commit/769196fe (commit)
from https://github.com/Gnucash/gnucash/commit/cee52d4f (commit)
commit 153ee8871a0c1e5332a2f8b5c2d8eaa430af2835
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Jun 5 20:32:14 2020 +0200
Add first version of gnucash-cli manpage
Note manpages for both gnucash and gnucash-cli need revision.
They refer to outdated files and environment variables, and
some more recent command line options are missing.
diff --git a/cmake/configure-manpage.cmake b/cmake/configure-manpage.cmake
index 4dd414498..9e1a21c51 100644
--- a/cmake/configure-manpage.cmake
+++ b/cmake/configure-manpage.cmake
@@ -7,10 +7,10 @@
# by the calling code:
# - SRC_DIR (top level source code directory)
# - SRC (full path to gnc-vcs-info.h.in)
-# - DST (full path to destination for gnc-vcs-info.h)
+# - DST (name of the manpage to generate)
# - VCS_INFO_FILE (full path to gnc-vcs-info.h - can be in source tree (release builds) or build tree (git builds))
include (${SRC_DIR}/cmake/version-info2env.cmake)
versioninfo2env (${VCS_INFO_FILE})
configure_file(${SRC} ${DST} )
-configure_file(gnucash.1 ${DATADIR_BUILD}/gnucash/gnucash.1 COPYONLY)
+configure_file(${DST} ${DATADIR_BUILD}/gnucash/${DST} COPYONLY)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 3756f6f10..b7e83f123 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -53,6 +53,6 @@ foreach (manpage gnucash gnucash-cli)
)
add_custom_target(${manpage}-manpage DEPENDS ${manpage}.1)
dist_add_generated (${BUILDING_FROM_VCS} ${manpage}.1)
-endforeach()
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gnucash.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gnucash.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+endforeach()
commit 769196fec675799c55fb34ccc3e394729fefbe32
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Jun 5 20:13:34 2020 +0200
First version of a gnucash-cli man page
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index b992045ee..3756f6f10 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -6,7 +6,7 @@ set(doc_DATA
set(doc_noinst_DATA
CMakeLists.txt gnc-fq-dump.1 gnc-fq-helper.1 gnucash.1.in
- tip_of_the_day.list.c README.txt)
+ gnucash-cli.1.in tip_of_the_day.list.c README.txt)
install(FILES ${doc_DATA} DESTINATION ${CMAKE_INSTALL_DOCDIR})
@@ -41,16 +41,18 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tip_of_the_day.list DESTINATION ${CMA
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/tip_of_the_day.list
DESTINATION ${DATADIR_BUILD}/gnucash)
-add_custom_command(OUTPUT gnucash.1
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gnucash.1.in ${VCS_INFO_FILE}
- COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/gnucash.1.in
- -D DST=gnucash.1
- -D VCS_INFO_FILE=${VCS_INFO_FILE}
- -D DATADIR_BUILD=${DATADIR_BUILD}
- -D SRC_DIR=${CMAKE_SOURCE_DIR}
- -P ${CMAKE_SOURCE_DIR}/cmake/configure-manpage.cmake
- )
-add_custom_target(gnucash-manpage DEPENDS gnucash.1)
-dist_add_generated (${BUILDING_FROM_VCS} gnucash.1)
+foreach (manpage gnucash gnucash-cli)
+ add_custom_command(OUTPUT ${manpage}.1
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${manpage}.1.in ${VCS_INFO_FILE}
+ COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/${manpage}.1.in
+ -D DST=${manpage}.1
+ -D VCS_INFO_FILE=${VCS_INFO_FILE}
+ -D DATADIR_BUILD=${DATADIR_BUILD}
+ -D SRC_DIR=${CMAKE_SOURCE_DIR}
+ -P ${CMAKE_SOURCE_DIR}/cmake/configure-manpage.cmake
+ )
+ add_custom_target(${manpage}-manpage DEPENDS ${manpage}.1)
+ dist_add_generated (${BUILDING_FROM_VCS} ${manpage}.1)
+endforeach()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gnucash.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
diff --git a/doc/gnucash.1.in b/doc/gnucash-cli.1.in
similarity index 64%
copy from doc/gnucash.1.in
copy to doc/gnucash-cli.1.in
index 505f85e5c..c0e929753 100644
--- a/doc/gnucash.1.in
+++ b/doc/gnucash-cli.1.in
@@ -4,21 +4,48 @@
.\"
.TH GNUCASH 1 "@GNC_VCS_REV_DATE@" "Version @GNC_VCS_REV@" "GnuCash Manual Pages"
.SH NAME
-gnucash \- personal finance manager
+gnucash-cli \- command line tool to go with GnuCash
.SH SYNOPSIS
-.B gnucash [options] [
+.B gnucash-cli [options] [
.I accounts.gnc
.B ]
.SH DESCRIPTION
-.B GnuCash
-is a personal accounting package that allows you to record
-and track income, expenses, assets, and investments. It supports
-reconciliation, has substantial reporting capabilities, and is
-extensible using guile. It can import QIF data from Quicken(TM) and
-many other commercial accounting packages. It uses GTK+ and GNOME to
-provide an attractive user interface, and has extensive online help.
+.B gnucash-cli
+enables certain intraction with a gnucash datafile directly from
+the command line.
+
+It has two modes:
+.B quotes
+mode and
+.B report
+mode.
+
+.SH Quotes Mode (activated with --quotes <cmd>)
+This mode has options to get online quotes for foreign currencies and stocks
+in the given data file. It supports the following command:
+.IP get
+Retrieves online quotes. Note this requires Finance::Quote to be properly
+configured for your system.
+
+The
+.B get
+command takes the following options:
+.IP --namespace=REGEXP
+Regular expression determining which namespace commodities will be retrieved.
+.SH Report Mode (activated with --report <cmd>)
+This mode has options to work with reports in the given data file.
+It supports the following command:
+.IP run
+Runs a report on the given data file.
-.SH OPTIONS
+The
+.B run
+command takes the following options:
+.IP --name=REPORT_NAME
+Name of the report to run
+.IP --export-type=TYPE
+Specify export type
+.SH General Options
.IP --version
Show
.B GnuCash
@@ -31,14 +58,9 @@ Enable debugging mode: increasing logging to provide deep detail.
Enable extra/development/debugging features.
.IP --log
Log level overrides, of the form "log.ger.path={debug,info,warn,crit,error}"
+This option can be specified multiple times.
.IP --logto
File to log into; defaults to "/tmp/gnucash.trace"; can be "stderr" or "stdout".
-.IP --nofile
-Do not load the last file opened
-.IP "--add-price-quotes FILE"
-Add price quotes to the given data file
-.IP --namespace=REGEXP
-Regular expression determining which namespace commodities will be retrieved.
.SH FILES
.I ~/.gnucash/config.auto
.RS
diff --git a/doc/gnucash.1.in b/doc/gnucash.1.in
index 505f85e5c..c6aca6c1d 100644
--- a/doc/gnucash.1.in
+++ b/doc/gnucash.1.in
@@ -31,14 +31,19 @@ Enable debugging mode: increasing logging to provide deep detail.
Enable extra/development/debugging features.
.IP --log
Log level overrides, of the form "log.ger.path={debug,info,warn,crit,error}"
+This option can be specified multiple times.
.IP --logto
File to log into; defaults to "/tmp/gnucash.trace"; can be "stderr" or "stdout".
.IP --nofile
Do not load the last file opened
.IP "--add-price-quotes FILE"
-Add price quotes to the given data file
+Add price quotes to the given data file. Note this option has been deprecated
+and will be removed in GnuCash 5.0. Instead use 'gnucash-cli --quotes get'.
.IP --namespace=REGEXP
Regular expression determining which namespace commodities will be retrieved.
+This is only relevant for the --add-price-quotes option. And as with that option
+it is deprecated and will be removed in GnuCash 5.0. The same option can be
+passed to 'gnucash-cli --quotes get' to achieve the same result.
.SH FILES
.I ~/.gnucash/config.auto
.RS
diff --git a/gnucash/CMakeLists.txt b/gnucash/CMakeLists.txt
index 3c6c212f7..703cacfdb 100644
--- a/gnucash/CMakeLists.txt
+++ b/gnucash/CMakeLists.txt
@@ -53,7 +53,7 @@ add_executable (gnucash
${gnucash_noinst_HEADERS}
)
-add_dependencies (gnucash gnucash-manpage)
+add_dependencies (gnucash gnucash-manpage gnucash-cli-manpage)
target_compile_definitions(gnucash PRIVATE -DG_LOG_DOMAIN=\"gnc.bin\")
Summary of changes:
cmake/configure-manpage.cmake | 4 +--
doc/CMakeLists.txt | 30 ++++++++++---------
doc/{gnucash.1.in => gnucash-cli.1.in} | 54 ++++++++++++++++++++++++----------
doc/gnucash.1.in | 7 ++++-
gnucash/CMakeLists.txt | 2 +-
5 files changed, 63 insertions(+), 34 deletions(-)
copy doc/{gnucash.1.in => gnucash-cli.1.in} (64%)
More information about the gnucash-changes
mailing list