For use in scripts it might be helpful to get a flat list of accounts from a given gnucash file. Fortunately gnucash has an extensive python binding. See the script gnucash_accounts.py for an example on how to use it:
Continue reading “Get a list of gnucash accounts in python”Category: code
Yet another gnucash import script
gnucash_import parses a CSV file and directly imports it into gnucash.
Example usage:
gnucash_import.py csv_file myfile.gnucash "Aktiva:Barvermögen:Girokonto"Continue reading “Yet another gnucash import script”
Find syncthing conflict files
Synthing is an encrypted open source file synchronization tool. It synchronizes pairs of folders between two or more computers.
In case of a conflict (a file changed on both sides since the last synchronization) the conflicting file is saved as <filename>.sync-conflict-<date>-<time>-<modifiedBy>.<ext>
.
Manually trigger a syncthing rescan
Synthing is an encrypted open source file synchronization tool. It synchronizes pairs of folders between two or more computers. The synchronization runs usually time triggered. From time to time there might be a need to start the synchronization manually.
Continue reading “Manually trigger a syncthing rescan”pylint und Argumente von callback-Funktionen
Benutzt man eine Library, die Callback-Funktionen verlangt, hat man nicht unbedingt die Kontrolle über Anzahl und Verwendung der Argumente. Hier wird sich beispielsweise pylint beschweren mit “Unused argument ‘attrs’ (unused-argument)”:
def mycallback(arg1, arg2): pass
Glücklichweise gibt es eine Möglichkeit mit dem Präfix “cb_” pylint den Umstand mitzuteilen, daß es sich dabei um eine Callbackfunction handelt:
def cb_mycallback(arg1, arg2): pass
Damit mahnt pylint die Stelle nicht mehr an und akzeptiert, wenn man nicht an sämtlichen Informationen des Aufrufers interesiert ist.