Projekt

Allgemein

Profil

Aktionen

Bug #323

geschlossen

aqbanking-cli: No command line option to query the configuration directory

Von rhabacker vor 23 Tagen hinzugefügt. Vor 5 Tagen aktualisiert.

Status:
Closed
Priorität:
Normal
Kategorie:
AqBanking
Beginn:
16.11.2025
Abgabedatum:
Betriebssystem:
FreeBSD, Linux, MacOSX, Windows
AqBanking-Version:
6.7.7.0
Anwendung:
aqbanking-cli
Version der Anwendung:
6.7.7

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

Aktionen #1

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.

Aktionen #2

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?

Aktionen #3

Von martin vor 11 Tagen aktualisiert

Hi,

martin schrieb (#note-2):

Two thoughts:
- why would a user need to use a command line tool to find the settings folder?`It's always "$HOME/.aqbanking"?

Ah, okay, I see now, it's Windows.

Aktionen #4

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
};
Aktionen #5

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

Aktionen #6

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

Aktionen #7

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.patch wurde gelöscht
  • Datei 0002-aqbanking-cli-Add-command-listconfdir-to-show-the-pa.patch wurde gelöscht
  • Datei 0001-In-command-line-tools-merge-common-stuff-for-argumen.patch wurde gelöscht
  • Datei 0002-aqbanking-cli-Add-command-listconfdir-to-show-the-pa.patch wurde gelöscht

- Split patches to add libaqcli first

Aktionen #8

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.

Aktionen #9

Von martin vor 8 Tagen aktualisiert

  • Status wurde von Feedback zu In Progress geändert

Okay, thanks, I will incorporate your patches this week.

Regards
Martin

Aktionen #10

Von martin vor 7 Tagen aktualisiert

  • Status wurde von In Progress zu Resolved geändert

Okay, applied to master branch (with minor changes and additions).

Thanks!!!

Martin

Aktionen #11

Von martin vor 7 Tagen aktualisiert

  • Status wurde von Resolved zu Closed geändert
Aktionen #12

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);
Aktionen #13

Von rhabacker vor 6 Tagen aktualisiert

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

Aktionen #14

Von rhabacker vor 6 Tagen aktualisiert

  • Datei 0001-Add-convenience-library-for-command-line-tools-named.patch wurde gelöscht
  • Datei 0002-In-command-line-tools-use-functions-from-libaqcli-to.patch wurde gelöscht
Aktionen #15

Von rhabacker vor 6 Tagen aktualisiert

Rebased patch

Aktionen #16

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

Aktionen #17

Von martin vor 5 Tagen aktualisiert

Okay, both remaining patches now applied to git. Thank you very much!

Regards,
Martin

Aktionen

Auch abrufbar als: Atom PDF