wichtounet / budgetwarrior Goto Github PK
View Code? Open in Web Editor NEWPersonal finance manager, command-line interface, in C++
License: MIT License
Personal finance manager, command-line interface, in C++
License: MIT License
Would the current architecture easily allow the addition of more recurrence types such as quarterly, annual, biannual?
Hey, I followed the install instructions up to the make
and got this: fatal error: 'openssl/ssl.h' file not found
Full log
~/P/budgetwarrior> make
-e [release_debug] Compile src/accounts.cpp
src/accounts.cpp:464:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
return std::move(accounts);
^
src/accounts.cpp:464:12: note: remove std::move call here
return std::move(accounts);
^~~~~~~~~~ ~
1 warning generated.
-e [release_debug] Compile src/api.cpp
In file included from src/api.cpp:17:
In file included from include/http.hpp:12:
cpp-httplib/httplib.h:63:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
^~~~~~~~~~~~~~~
1 error generated.
make: *** [release_debug/src/api.cpp.o] Error 1
~/P/budgetwarrior>
Any idea what I need to change on my computer?
While navigating around the program without having added any data, monthly overview gives a segmentation fault. Other links with Seg faults are aggregate year, aggregate month, asset graph.
Hi,
There is an extra double at the end of line 4 of bash completion file, raising a syntax error.
The $ sudo make install
command is exiting with an error with install: /usr/bin/budget: Operation not permitted
.
Since macOS El Capitan
(bye bye OS X) we have System Integrity Protection (SIP) aka rootless. The relevant part of SIP here is:
System Integrity Protection protects system files and directories that are flagged for protection. This happens either by adding an extended file attribute to a file or directory, by adding the file or directory to /System/Library/Security/rootless.conf or both. Among the protected directories are: /System, /bin, /sbin, /usr (but not /usr/local).
If it is impossible to modify /usr
, but not /usr/local
, then the prefix should be set to /usr/local
?
This is the terminal output when running ./build_macos.sh:
(I added pastebin link because output was too long for github)
Hi!
My problem is that the seemingly correct recurrence value monthly
is not accepted. Consider the following session:
~$ budget account
Accounts
ID Name Amount Part
1 General 2000000.00 100,00%
Total 2000000.00
~$ budget recurring add
Account []: General
Name []: Test
Amount [0.00]: 100
Recurrence []: monthly
This value can only be one of these values [monthly, weekly]
Recurrence [monthly]:
I've compiled budgetwarrior (revision 15712d0) from source on Ubuntu 23.10. Is there anything I can do for debugging it further?
Hi @wichtounet !
First of all, Thankyou for the great tool.
I was trying to understand your code and how it is designed. It is little complicated to understand. I was just wondering if you have any block diagram / or any pointers to design patterns on which the design of this system is based.
Any help would be great. Thankyou once again.
https://github.com/sitmo/stdfin seems to provide this, is this a new dependency?
It would be great if your software can follow the XDG Base Directory specification for the configuration file location.
Thanks
I see that asset_share.shares
is an int64
. While this generally makes sense intuitively, this means that it becomes hard to use budgetwarrior for share vesting schemes.
In my case, my employer awards me for instance 20 shares of restricted stock, but after withholding taxes, my broker credits me 18.84 shares. So technically if I wanted to automatically track share awards, I would want to to log the acquisition of 18.84 shares, heh.
(And 40 becomes.... 37.681 ? for fascinating rounding reasons I suppose)
For curiosity, I wondered if there's an industry standard on what makes sense, but alas I'm not sure there is anything out there. Fascinating :-)
Hi @wichtounet !
I am compiling on MacOS as way you have suggested. I get this error:
-e [release_debug] Compile src/pages/accounts_pages.cpp
error: unable to open output file
'release_debug/src/pages/accounts_pages.cpp.o':
'No such file or directory'
1 error generated.
make: *** [release_debug/src/pages/accounts_pages.cpp.o] Error 1
Could you please help me with this?
Cloning into '/opt/budgetwarrior/fmt'...
error: cannot run ssh: No such file or directory
fatal: unable to fork
fatal: clone of '[email protected]:fmtlib/fmt.git' into submodule path '/opt/budgetwarrior/fmt' failed
Failed to clone 'fmt'. Retry scheduled
Cloning into '/opt/budgetwarrior/include/cpp_utils'...
remote: Enumerating objects: 741, done.
remote: Total 741 (delta 0), reused 0 (delta 0), pack-reused 741
Receiving objects: 100% (741/741), 122.54 KiB | 606.00 KiB/s, done.
Resolving deltas: 100% (484/484), done.
Cloning into '/opt/budgetwarrior/loguru'...
error: cannot run ssh: No such file or directory
fatal: unable to fork
fatal: clone of '[email protected]:emilk/loguru.git' into submodule path '/opt/budgetwarrior/loguru' failed
Failed to clone 'loguru'. Retry scheduled
Cloning into '/opt/budgetwarrior/make-utils'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 219 (delta 3), reused 7 (delta 2), pack-reused 210
Receiving objects: 100% (219/219), 30.11 KiB | 593.00 KiB/s, done.
Resolving deltas: 100% (125/125), done.
Cloning into '/opt/budgetwarrior/fmt'...
error: cannot run ssh: No such file or directory
fatal: unable to fork
fatal: clone of '[email protected]:fmtlib/fmt.git' into submodule path '/opt/budgetwarrior/fmt' failed
Failed to clone 'fmt' a second time, aborting
Then we try:
Makefile:81: make-utils/cpp-utils-finalize.mk: No such file or directory make: *** No rule to make target 'make-utils/cpp-utils-finalize.mk'. Stop.
make-utils folder is empty (only a .git folder inside)
About building from source instruction:
A modern compiler is necessary. I am working with GCC 9.3. You need to set the $CXX variable before executing make.
$CXX should be set by make
as it's a predefined variable but even after overriding the variable the error is in the make-utils folder.
I've installed pacman -S openssh
and got this:
Warning: Permanently added 'github.com,140.82.121.3' (RSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:fmtlib/fmt.git' into submodule path '/opt/budgetwarrior/fmt' failed
Failed to clone 'fmt'. Retry scheduled
Cloning into '/opt/budgetwarrior/include/cpp_utils'...
remote: Enumerating objects: 741, done.
remote: Total 741 (delta 0), reused 0 (delta 0), pack-reused 741
Receiving objects: 100% (741/741), 122.54 KiB | 603.00 KiB/s, done.
Resolving deltas: 100% (484/484), done.
Cloning into '/opt/budgetwarrior/loguru'...
Warning: Permanently added the RSA host key for IP address '140.82.121.4' to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:emilk/loguru.git' into submodule path '/opt/budgetwarrior/loguru' failed
Failed to clone 'loguru'. Retry scheduled
Cloning into '/opt/budgetwarrior/make-utils'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 219 (delta 3), reused 7 (delta 2), pack-reused 210
Receiving objects: 100% (219/219), 30.11 KiB | 550.00 KiB/s, done.
Resolving deltas: 100% (125/125), done.
Cloning into '/opt/budgetwarrior/fmt'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:fmtlib/fmt.git' into submodule path '/opt/budgetwarrior/fmt' failed
Failed to clone 'fmt' a second time, aborting
What am I missing? Before the docker I've tried it on my main machine (Manjaro) from source and it didn't work (same problem) but using AUR it does work perfectly.
Hi, I'm new to this and I installed the following:
libssl-dev
uuid-dev
uuid-runtime
Then performed make
apparently successfully, and I have the "budget" in the bin folder.
This is the code error:
Installation of budgetwarrior
=============================
install budget.man /usr/local/share/man/man3/budget.3
install: cannot create regular file '/usr/local/share/man/man3/budget.3': No such file or directory
make: *** [Makefile:41: install] Error 1
Thank you!
Hi there, are you planning on introducing XDG Base Directory compliance?
What I'm interested in is having budgetwarrior search for config also in ~/.config/ and for data in ~/.local/share/ as proposed by the Free Desktop standard.
Reading:
https://wiki.archlinux.org/index.php/XDG_Base_Directory
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
I'm really interested in exploring this software but I'm getting the below error on Manjaro 23.0.4
The folder "/.local/share/budget" does not exist. Would like to create it [yes/no] ? yes
[main thread ] budget.cpp:198 ERR| Unable to load the configuration
I get the same result for "yes", and yes/no also give the same results whether I install from the AUR or compile from source.
I noticed from the documentation that the program should be looking for .budget under my home folder. Is there something either in the code or what I'm doing that would cause it to be looking for the wrong folder?
Linux Mint 21 Cinnamon
Hi! I have installed Budgetwarrior. But through installation works command:
$ git clone --recursive https://github.com/wichtounet/budgetwarrior.git
It is instead of "$ git clone --recursive git://github.com/wichtounet/budgetwarrior.git".
When "make" I have needed to install:
build-essential, libssl-dev and uuid-dev.
For installation of man page I was needed to add some new directories at /usr/local/:
/usr/local/share/man/man3,
/usr/local/etc/bash_completion.d
/usr/local/share/zsh/site-functions.
When:
$ budget server
Unhandled command "server"
Then:
$ budget gc
Unhandled command "gc"
Also doesn't work:
budget versioning save
budget versioning sync
budget sync .
If budget server doesn't works, something goes wrong. So this needs to be corrected.
In correspondence with the author, he advised me to install the previous version of his program with git tag 1.0.1.
Why it was needed to write about this feature in the description to the program then? The terminal is pretty enough without budget server feature by the way. The description of this feature could be just removed if it doesn't work. But if there is a description, then I want everything to work.
So I followed the author's advice and tried to install another version of this program through git.
Then I did next steps. I entered at my unpacked Budgetwarior folder at first. Then to see git tags:
$ cd budgetwarrior
$ git tag
........
1.0.1
1.0.2
The version of the programm with tag 1.0.1 presents. Okay. Then to install the version for tag 1.0.1:
$ git checkout 1.0.1
Then I was needed to delete "doctest,fmt, loguru" directories at ".git/modules/" because they were "not empty" as was written at an error message after this command. Then:
$ make
make: *** No rule to make target 'include/logging.hpp', needed by 'release_debug/src/accounts.cpp.o'. Stop.
So, the version 1.0.1 of Budgetwarior for git tag 1.0.1 cannot be installed.
About my compiler for Budgetwarior. To see it I opened the binary file "budget" with "strings" command аnd redirected its output to a text file:
$ strings -a /usr/local/bin/budget > budget-bin.txt
Then I found there this line:
GCC: (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
About my $CXX variable. For what reasons and how I must to set it before installation of the program is unclear for me. But I can see the $CXX variable setted with my make-command:
$ make -p -f /dev/null | grep CXX
make: *** No targets. Stop.
LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
CXX = g++
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
When I use budget asset add
and hit Enter after typing the name of the new asset, I get the error message The distribution must account to 100%
infinitely printing until I Ctrl+C. Then I get the below messages:
Loguru caught a signal: SIGINT
Stack trace:
11 0x55c241007355 budget(+0x26355) [0x55c241007355]
10 0x7ffbb028fd8a __libc_start_main + 138
9 0x7ffbb028fcd0 /usr/lib/libc.so.6(+0x27cd0) [0x7ffbb028fcd0]
8 0x55c241006080 budget(+0x25080) [0x55c241006080]
7 0x55c241064913 budget(+0x83913) [0x55c241064913]
6 0x55c241053d3f budget(+0x72d3f) [0x55c241053d3f]
5 0x7ffbb06a6032 std::ostream::put(char) + 226
4 0x7ffbb02ec353 _IO_file_overflow + 259
3 0x7ffbb02ebe19 _IO_do_write + 25
2 0x7ffbb02eb014 /usr/lib/libc.so.6(+0x83014) [0x7ffbb02eb014]
1 0x7ffbb02ecd4d _IO_file_write + 45
0 0x7ffbb036c034 write + 20
2023-10-27 09:49:16.048 ( 2.649s) [main thread ] :0 FATL| Signal: SIGINT
I may be missing something required to correctly set up assets, but in either case perhaps the application could exit after printing the error once.
Hello,
i follow the step to compile the project and i have an error on the make step:
make
[release_debug] Compile src/accounts.cpp
[release_debug] Compile src/api.cpp
[release_debug] Compile src/args.cpp
[release_debug] Compile src/asset_classes.cpp
[release_debug] Compile src/assets.cpp
[release_debug] Compile src/asset_shares.cpp
[release_debug] Compile src/asset_values.cpp
[release_debug] Compile src/budget.cpp
[release_debug] Compile src/budget_exception.cpp
[release_debug] Compile src/compute.cpp
[release_debug] Compile src/config.cpp
[release_debug] Compile src/console.cpp
[release_debug] Compile src/console_writer.cpp
[release_debug] Compile src/currency.cpp
[release_debug] Compile src/data_cache.cpp
[release_debug] Compile src/data.cpp
[release_debug] Compile src/date.cpp
[release_debug] Compile src/debts.cpp
[release_debug] Compile src/earnings.cpp
[release_debug] Compile src/expenses.cpp
[release_debug] Compile src/fortune.cpp
[release_debug] Compile src/guid.cpp
src/guid.cpp:14:10: erreur fatale: uuid/uuid.h : Aucun fichier ou dossier de ce type
14 | #include <uuid/uuid.h>
| ^~~~~~~~~~~~~
compilation terminée.
make: *** [Makefile:25: release_debug/src/guid.cpp.o] Error 1
Have you already get this error ?
Howdy,
Just dropping this here, I imagine this is possibly low priority and I understand ;-)
views::as_rvalue
and fold
, both of which are not supported by Clang, budgetwarrior is currently gcc-only.use_cpp23
definitely does not work for clang, which expects -std=c++2b
for 23.For now I'm fine just not caring / using published Docker images.
Getting rid of folds is feasible with a bit more verbosity and I had a bit of fun with this already. I'm not sure what to do with as_rvalue
, I don't have familiarity with this idiom yet :-)
Cheers!
The bash
completion install directory does not exist on macOS at it's specified path /etc/bash_completion.d
. It lives in /usr/local/etc/bash_completion.d/
👉 The final install path should then be $(prefix)/etc/bash_completion.d/budget
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.