Easy handling for invoices in cooperate environments.
Workflow:
Each user gets a folder accessible for the office. Users can forward their invoices to a special email address like invoice+bob.allen@example.com
The office has one place where all invoices are collected.
This script is used a a email filter to process incoming invoice emails.
bash
cargo install invoice2storage
You can add this repository to your NixOS flake configuration.
All settings can be passed through command line arguments or put into a yaml file.
See --help
for a full list of options.
Most MTA support .forward
pipe support which allows you to configure invoice2storage like this:
~/.forward
contains:
sh
|/path/to/invoice2storage --arguments....
All dev tools use the nix package manager, which can be used on any linux distribution. This allows 100% reproducible and working dev environments.
Integration test is done with a NixOS VM that is created with:
```bash nixos-rebuild build-vm --flake .#testvm
QEMU_OPTS="-netdev bridge,id=hn0,br=intern -device e1000,netdev=hn0" ./result/bin/run-i2s-test-vm ```
The QEMU_OPTS depend on your system, in this example, the VM is attached to local bridge intern
.
The tests can be run with:
bash
env RUST_BACKTRACE=1 TARGET=10.0.42.158 /home/poelzi/b1/invoice2storage/scripts/nix-cargo test --package invoice2storage --bin invoice2storage -- --include-ignored
The environment variables TARGET
is the VM address.
json
"cSpell.customDictionaries": {
"custom-dictionary-workspace": {
"name": "custom-dictionary-workspace",
"path": "${workspaceFolder:invoice2storage}/.cspell/custom-dictionary-workspace.txt",
"addWords": true,
"scope": "workspace"
}
},
"rust-analyzer.runnables.command": "${workspaceFolder}/scripts/nix-cargo",
"cargo.automaticCheck": false,