Crates.io | bread-scan |
lib.rs | bread-scan |
version | 0.0.7 |
source | src |
created_at | 2022-12-02 15:48:21.39126 |
updated_at | 2023-03-01 14:41:35.166495 |
description | Find things to donate to on |
homepage | |
repository | https://github.com/andrewbaxter/bread-scan |
max_upload_size | |
id | 728461 |
size | 128,655 |
This is a command line tool for Bread for finding relevant projects. You can use it to update personal donations or to generate a .bread.yml
file for a project.
Supported dependency files:
package.json
(requires a populated node_modules
directory for metadata)pyproject.toml
(Poetry only)go.mod
Cargo.toml
pom.xml
Supported operating systems for scanning:
bread-scan
is written in Rust, and you can install bread-scan
using the Rust package manager https://doc.rust-lang.org/cargo/:
cargo install bread-scan
You'll need to set up a token at https://bre.ad/tokens with config read and write permission, and put it in an environment variable named BREAD_TOKEN
.
bread-scan -s os=debian -d donate
This scans your system for manually installed packages and tries to figure out the corresponding repository, then updates your donation configuration with them.
The results will be merged with your existing donation targets, keeping existing weights. If you want to remove software you're no longer using, use --remove
.
If you're generating a yaml file for your project, you can use the following invocation.
bread-scan -s project=. -d project_yaml=.
bread-scan
will look for dependencies in the project at the current directory using common dependency management systems (npm
, cargo
, etc).
This will merge with an existing yaml file if it exists, preserving existing weights. It will keep projects even if it didn't find them during a scan. You can use --remove
to have it remove them (or similarly, --remove-accounts
for accounts).
Commit and push this file and your project is ready to accept (and redistribute) donations!
The file=
source/dest arguments can be used for storing results locally for manual editing, local management, etc. It is in a JSON format only used by bread-scan
.
Run with DEBUG=1
for more log messages.
Various lookups are cached to make updating configs faster. The configs are stored in your system's user cache bread-scan
directory. On linux, with XDG paths, this would be /home/USER/.cache/bread-scan
. You may delete the directory, remote resources will need to be re-queried on the next run.