Bug #323
geschlossenaqbanking-cli: No command line option to query the configuration directory
Von rhabacker vor 23 Tagen hinzugefügt. Vor 5 Tagen aktualisiert.
Beschreibung
In a ticket reported for the kmymoney application, a user did not know where to find the configuration directory for aqbanking. Since there is currently no command line option for this in aqbanking-cli, this commit adds a corresponding option --listconfdir.
This commit is preceded by a cleanup of the management of arguments in command line tools to avoid additional code duplication.
Dateien
| 0001-Fix-building-with-mingw.patch (1,1 KB) 0001-Fix-building-with-mingw.patch | rhabacker, 04.12.2025 15:13 | ||
| 0003-aqbanking-cli-Add-command-listconfdir-to-show-the-pa.patch (3,73 KB) 0003-aqbanking-cli-Add-command-listconfdir-to-show-the-pa.patch | rhabacker, 04.12.2025 15:16 |
Von rhabacker vor 12 Tagen aktualisiert
This request is related to ticket https://bugs.kde.org/show_bug.cgi?id=512032 in the KMyMoney bug tracker.
Von martin vor 11 Tagen aktualisiert
- Status wurde von New zu Feedback geändert
Two thoughts:
- why would a user need to use a command line tool to find the settings folder?`It's always "$HOME/.aqbanking"?
- I would rather not add the args code to the library (that would make it part of the API which I don't find appropriate since these functions are only used inside the aqbanking tools). Maybe a conveniance lib should be build for that to be linked against by the aqbanking tools?
Von rhabacker vor 11 Tagen aktualisiert
- Datei 0001-In-command-line-tools-merge-common-stuff-for-argumen.patch wurde hinzugefügt
- Datei 0002-aqbanking-cli-Add-command-listconfdir-to-show-the-pa.patch wurde hinzugefügt
Maybe a conveniance lib should be build for that to be linked against by the aqbanking tools?
- This was added with the name libaqcli.
- Updated patches
Note: Let's take a look at the new function
int listConfDir(AB_BANKING *ab, GWEN_DB_NODE *dbArgs, int argc, char **argv)
{
const GWEN_ARGS args[]= {
{
GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */
GWEN_ArgsType_Int, /* type */
“help”, /* name */
0, /* minnum */
0, /* maxnum */
“h”, /* short option */
“help”, /* long option */
“Show this help screen”, /* short description */
“Show this help screen” /* long description */
}
};
There is another possible improvement, namely to move this entry, which is contained in every command, to a macro, for example AB_CMD_HELP_ENTRY, and use this:
const GWEN_ARGS args[]= {
AB_CMD_HELP_ENTRY
};Von martin vor 10 Tagen aktualisiert
Hi, thanks for the change.
I know it's outrageous of me to ask, but: Could the first patch be divided into one that adds the library and another which makes use of it?
The reason is that I'm using gwenbuild in my daily workflow with aqbanking and there are no changes in your patch for the 0BUILD files.
I can't apply the first patch directly because then I wouldn't be able to continue to work with gwenbuild unless I immediately created and adapted the 0BUILD files myself (and ATM I'd like to continue working in the workflow which works best for me, busy times now with CAMT, VOP and stuff).
Splitting that patch would allow me to first add the lib and then create and adapt the 0BUILD files later myself.
Regards
Martin
Von martin vor 10 Tagen aktualisiert
rhabacker schrieb (#note-4):
[...]
There is another possible improvement, namely to move this entry, which is contained in every command, to a macro, for example AB_CMD_HELP_ENTRY, and use this:
const GWEN_ARGS args[]= {
AB_CMD_HELP_ENTRY
};
[...]
Please don't move this just yet, as I started changing the way those arrays are created (see https://www.aquamaniac.de/rdm/projects/aqbanking/repository/aqbanking/revisions/master/entry/src/libs/plugins/backends/aqhbci/control/getaccsepa.c). That's how I define those arrays in one of my other larger projects and it makes them quite readable and short.
Regards
Martin
Von rhabacker vor 9 Tagen aktualisiert
- Datei 0001-Add-convenience-library-for-command-line-tools-named.patch wurde hinzugefügt
- Datei 0002-In-command-line-tools-use-functions-from-libaqcli-to.patch wurde hinzugefügt
- Datei 0003-aqbanking-cli-Add-command-listconfdir-to-show-the-pa.patch wurde hinzugefügt
- Datei
0001-In-command-line-tools-merge-common-stuff-for-argumen.patchwurde gelöscht - Datei
0002-aqbanking-cli-Add-command-listconfdir-to-show-the-pa.patchwurde gelöscht - Datei
0001-In-command-line-tools-merge-common-stuff-for-argumen.patchwurde gelöscht - Datei
0002-aqbanking-cli-Add-command-listconfdir-to-show-the-pa.patchwurde gelöscht
- Split patches to add libaqcli first
Von rhabacker vor 8 Tagen aktualisiert
martin schrieb (#note-5):
The reason is that I'm using gwenbuild in my daily workflow with aqbanking and there are no changes in your patch for the 0BUILD files.
Here is an attempt to add such a file:
<?xml?>
<gwbuild>
<target type="ConvenienceLibrary" name="aqcli" >
<includes type="c" >
$(gwenhywfar_cflags)
-I$(topsrcdir)/src/libs
</includes>
<includes type="tm2" >
</includes>
<define name="BUILDING_AQBANKING" />
<define name="AQBANKING_SYSCONF_DIR" value="$(aqbanking_cfg_searchdir)" quoted="TRUE" />
<setVar name="local/cflags">$(visibility_cflags)</setVar>
<setVar name="tm2flags" >
</setVar>
<setVar name="local/typefiles" >
</setVar>
<setVar name="local/built_sources" >
</setVar>
<setVar name="local/built_headers_pub">
</setVar>
<setVar name="local/built_headers_priv" >
</setVar>
<headers dist="true" >
$(local/built_headers_pub)
cli.h
</headers>
<sources>
$(local/typefiles)
cli.c
</sources>
<useTargets>
</useTargets>
<subdirs>
</subdirs>
<extradist>
</extradist>
</target>
but unfortunally with or without that file gwbuild was not able to build aqbanking, see https://www.aquamaniac.de/rdm/issues/326.
Von rhabacker vor 7 Tagen aktualisiert
It appears that https://www.aquamaniac.de/rdm/attachments/615 has not been applied.
$ cd ~/src/aqbanking $ grep -rn listConfDir src/tools/aqbanking-cli/globals.h:146:int listConfDir(AB_BANKING *ab, GWEN_DB_NODE *dbArgs, int argc, char **argv);
Von rhabacker vor 6 Tagen aktualisiert
- Datei 0001-Fix-building-with-mingw.patch 0001-Fix-building-with-mingw.patch wurde hinzugefügt
ahruesing@gmx.de reported an issue when running
make distclean && make -f Makefile.cvs && ./configure --host=x86_64-w64-mingw32 --prefix=/mingw64 && make typedefs && make typefiles && make -j12 && make install && date
which is fixed by applying the appended patch
Von rhabacker vor 6 Tagen aktualisiert
- Datei 0003-aqbanking-cli-Add-command-listconfdir-to-show-the-pa.patch 0003-aqbanking-cli-Add-command-listconfdir-to-show-the-pa.patch wurde hinzugefügt
- Datei
0003-aqbanking-cli-Add-command-listconfdir-to-show-the-pa.patchwurde gelöscht
Rebased patch
Von martin vor 5 Tagen aktualisiert
rhabacker schrieb (#note-12):
It appears that https://www.aquamaniac.de/rdm/attachments/615 has not been applied.
[...]
You're right. The patch didn't apply cleanly, so I aborted it (I didn't have the time to work out what the problem was).
Regards
Martin