# mfs
Metadata fetcher (software)
This project aims to be a tool for fetching all kinds of scholarly metadata. It uses TSV-formatted
output which contains the raw data from the API-call.
Format:
```
type id result source data
```
Fields are separated by tabs (`\t`).
> Alpha quality software, use at your own risk!
> I'm using this project to learn Rust, don't expect fully idiomatic, high quality code. If you have any advice, please create an issue. Thanks!
## Installation
> I assume the binary works only under 64bit Linux right now. I have no Mac / Windows systems lying around and can't test it at the moment. No idea about cross-compilation either and I'm pretty sure the code is using some Unix-only bits at the moment to handle command line properly.
You can download a 64bit Linux binary, available here: https://codeberg.org/weirdfox/mfs/releases
You can install it from `crates.io` via `cargo` as well:
```sh
cargo install mfs
```
## Usage
Fetching metadata for a DOI in the source format:
```sh
mfs pub doi "10.1016/s0009-2614(02)00639-5" -s datacite -s crossref -o output.tsv
```
- `-s` can be specified multiple times, valid values are `crossref`, `openalex` and `datacite`. Sources will be checked in the order specified in the command and the first match will be used.
- `-o` can be used to redirect the output to a file with the specified path.
DOI can be provided via `stdin`:
```sh
Multiple DOIs can be provided via a text file, containing one DOI per line:
> `doi.txt`
>
> ```
> 10.1016/s0009-2614(02)00639-5
> 10.3132/43242413242143
> 10.14454/FXWS-0523
> ```
```sh
Right now only publication metadata, addressable via `doi` are available. This will be expanded in the future.