mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-16 10:15:22 -06:00
First version of a gnucash-cli man page
This commit is contained in:
parent
cee52d4f91
commit
769196fec6
@ -6,7 +6,7 @@ set(doc_DATA
|
|||||||
|
|
||||||
set(doc_noinst_DATA
|
set(doc_noinst_DATA
|
||||||
CMakeLists.txt gnc-fq-dump.1 gnc-fq-helper.1 gnucash.1.in
|
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})
|
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
|
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/tip_of_the_day.list
|
||||||
DESTINATION ${DATADIR_BUILD}/gnucash)
|
DESTINATION ${DATADIR_BUILD}/gnucash)
|
||||||
|
|
||||||
add_custom_command(OUTPUT gnucash.1
|
foreach (manpage gnucash gnucash-cli)
|
||||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gnucash.1.in ${VCS_INFO_FILE}
|
add_custom_command(OUTPUT ${manpage}.1
|
||||||
COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/gnucash.1.in
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${manpage}.1.in ${VCS_INFO_FILE}
|
||||||
-D DST=gnucash.1
|
COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/${manpage}.1.in
|
||||||
-D VCS_INFO_FILE=${VCS_INFO_FILE}
|
-D DST=${manpage}.1
|
||||||
-D DATADIR_BUILD=${DATADIR_BUILD}
|
-D VCS_INFO_FILE=${VCS_INFO_FILE}
|
||||||
-D SRC_DIR=${CMAKE_SOURCE_DIR}
|
-D DATADIR_BUILD=${DATADIR_BUILD}
|
||||||
-P ${CMAKE_SOURCE_DIR}/cmake/configure-manpage.cmake
|
-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)
|
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)
|
||||||
|
103
doc/gnucash-cli.1.in
Normal file
103
doc/gnucash-cli.1.in
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
.\" Written by Robert Merkel (rgmerk@mira.net)
|
||||||
|
.\" Process this file with
|
||||||
|
.\" groff -man -Tascii foo.1
|
||||||
|
.\"
|
||||||
|
.TH GNUCASH 1 "@GNC_VCS_REV_DATE@" "Version @GNC_VCS_REV@" "GnuCash Manual Pages"
|
||||||
|
.SH NAME
|
||||||
|
gnucash-cli \- command line tool to go with GnuCash
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B gnucash-cli [options] [
|
||||||
|
.I accounts.gnc
|
||||||
|
.B ]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.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.
|
||||||
|
|
||||||
|
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
|
||||||
|
version
|
||||||
|
.IP --help
|
||||||
|
Show this help message
|
||||||
|
.IP --debug
|
||||||
|
Enable debugging mode: increasing logging to provide deep detail.
|
||||||
|
.IP --extra
|
||||||
|
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".
|
||||||
|
.SH FILES
|
||||||
|
.I ~/.gnucash/config.auto
|
||||||
|
.RS
|
||||||
|
Automatically generated per-user configuration file. DO NOT EDIT
|
||||||
|
MANUALLY!
|
||||||
|
.SH ENVIRONMENT
|
||||||
|
.IP GNC_DEBUG
|
||||||
|
Enable debugging output. This allows you to turn on the debugging
|
||||||
|
earlier in the startup process than you can with
|
||||||
|
.B --debug.
|
||||||
|
.IP GUILE_LOAD_PATH
|
||||||
|
An override for the
|
||||||
|
.B GnuCash
|
||||||
|
scheme load path. You shouldn't need to alter this. For more
|
||||||
|
information see the README file.
|
||||||
|
.IP GNC_MODULE_PATH
|
||||||
|
An override for the
|
||||||
|
.B GnuCash
|
||||||
|
scheme load path for
|
||||||
|
.B Gnucash
|
||||||
|
modules. You shouldn't need to alter this. For more
|
||||||
|
information see the README file.
|
||||||
|
.SH BUGS
|
||||||
|
.B Please report any bugs using the bug reporting form on the
|
||||||
|
.B GnuCash
|
||||||
|
web site.
|
||||||
|
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.B GnuCash
|
||||||
|
has extensive on-line help available from the "help" menu.
|
||||||
|
|
||||||
|
Additional information and the latest version is available
|
||||||
|
at the web site:
|
||||||
|
.B https://www.gnucash.org
|
||||||
|
|
||||||
|
.SH AUTHOR
|
||||||
|
Robert Merkel <rgmerk@mira.net> wrote this manpage.
|
||||||
|
|
||||||
|
.B GnuCash
|
||||||
|
was written by Robin Clark, Linas Vepstas, and a cast of thousands.
|
@ -31,14 +31,19 @@ Enable debugging mode: increasing logging to provide deep detail.
|
|||||||
Enable extra/development/debugging features.
|
Enable extra/development/debugging features.
|
||||||
.IP --log
|
.IP --log
|
||||||
Log level overrides, of the form "log.ger.path={debug,info,warn,crit,error}"
|
Log level overrides, of the form "log.ger.path={debug,info,warn,crit,error}"
|
||||||
|
This option can be specified multiple times.
|
||||||
.IP --logto
|
.IP --logto
|
||||||
File to log into; defaults to "/tmp/gnucash.trace"; can be "stderr" or "stdout".
|
File to log into; defaults to "/tmp/gnucash.trace"; can be "stderr" or "stdout".
|
||||||
.IP --nofile
|
.IP --nofile
|
||||||
Do not load the last file opened
|
Do not load the last file opened
|
||||||
.IP "--add-price-quotes FILE"
|
.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
|
.IP --namespace=REGEXP
|
||||||
Regular expression determining which namespace commodities will be retrieved.
|
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
|
.SH FILES
|
||||||
.I ~/.gnucash/config.auto
|
.I ~/.gnucash/config.auto
|
||||||
.RS
|
.RS
|
||||||
|
@ -53,7 +53,7 @@ add_executable (gnucash
|
|||||||
${gnucash_noinst_HEADERS}
|
${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\")
|
target_compile_definitions(gnucash PRIVATE -DG_LOG_DOMAIN=\"gnc.bin\")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user