Crates.io | invoice2storage |
lib.rs | invoice2storage |
version | 0.4.0 |
source | src |
created_at | 2023-02-09 21:46:25.058977 |
updated_at | 2023-02-09 21:46:25.058977 |
description | Extract email attachments and stores them in a different backends like webdav or folder |
homepage | https://github.com/b1-systems/invoice2storage |
repository | https://github.com/b1-systems/invoice2storage |
max_upload_size | |
id | 781156 |
size | 202,526 |
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.
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:
|/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:
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:
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.
"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,