Go to file
Nicola Belluti 07ef2a96bc
Some checks failed
Check, format and test / build (push) Failing after 50s
Updated the README.md and the tests
2024-07-31 13:13:07 +02:00
.gitea/workflows Removed Nix and the sample-main, added a CI/CD pipeline and updated the README.md 2024-07-31 12:00:34 +02:00
src Updated the README.md and the tests 2024-07-31 13:13:07 +02:00
.gitignore Added the Rust base 2024-05-05 16:45:55 +02:00
Cargo.lock Removed Nix and the sample-main, added a CI/CD pipeline and updated the README.md 2024-07-31 12:00:34 +02:00
Cargo.toml Removed Nix and the sample-main, added a CI/CD pipeline and updated the README.md 2024-07-31 12:00:34 +02:00
LICENSE Initial commit 2024-05-05 16:36:41 +02:00
README.md Updated the README.md and the tests 2024-07-31 13:13:07 +02:00

R701 🕰️

Rust Brain made GNU AGPLv3.0 License Buymeacoffee
CI Badge


A reverse-engineered library to communicate with the R701 by I.P.S. Informatica, written in Rust

If you want to read about this reverse engineering attempt, check out https://nicolabelluti.me/series/attendance-reader/.

Library Usage

  1. Add the library to you project:

    cargo add r701 --git https://git.nicolabelluti.me/nicolabelluti/r701.git
    
  2. Use the library in you project:

    use r701::R701;
    
    fn main() {
        let mut r701 = R701::connect("127.0.0.1:5005").unwrap();
    
        println!("No\tMchn\tEnNo\t\tName\t\tMode\tIOMd\tDateTime\t");
        r701.into_record_iter()
            .unwrap()
            .collect::<Vec<_>>()
            .iter()
            .rev()
            .enumerate()
            .for_each(|(id, record)| {
                let name = r701
                    .get_name(record.employee_id)
                    .unwrap()
                    .unwrap_or(format!("user #{}", record.employee_id));
    
                println!(
                    "{:0>6}\t{}\t{:0>9}\t{: <10}\t{}\t{}\t{}",
                    id + 1,
                    1,
                    record.employee_id,
                    name,
                    35,
                    record.clock as u8,
                    record.datetime.format("%Y/%m/%d  %H:%M:%S"),
                );
            });
    }