From 35bdddc173a6a92d3f669acd0b5800426b8fc802 Mon Sep 17 00:00:00 2001 From: Tony Klink Date: Thu, 6 Jun 2024 20:41:39 -0600 Subject: [PATCH] Update license --- Cargo.lock | 7 +++++++ Cargo.toml | 1 + LICENSE => LICENSE-AGPLv3+NIGGER | 0 LICENSE-COMMERCIAL | 3 +++ README.md | 2 ++ examples/listener.rs | 4 ++-- src/lib.rs | 3 +-- 7 files changed, 16 insertions(+), 4 deletions(-) rename LICENSE => LICENSE-AGPLv3+NIGGER (100%) create mode 100644 LICENSE-COMMERCIAL diff --git a/Cargo.lock b/Cargo.lock index ae67ef8..a7fda70 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,4 +13,11 @@ name = "live-link-face" version = "0.1.0" dependencies = [ "byteorder", + "log", ] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" diff --git a/Cargo.toml b/Cargo.toml index fdfb10a..1f0ced0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ edition = "2021" [dependencies] byteorder = "1.5.0" +log = "0.4.21" [profile.release] opt-level = 'z' # Optimize for size diff --git a/LICENSE b/LICENSE-AGPLv3+NIGGER similarity index 100% rename from LICENSE rename to LICENSE-AGPLv3+NIGGER diff --git a/LICENSE-COMMERCIAL b/LICENSE-COMMERCIAL new file mode 100644 index 0000000..978fab2 --- /dev/null +++ b/LICENSE-COMMERCIAL @@ -0,0 +1,3 @@ +Copyright (C) 2024 Klink + +You can buy this software to be excluded from AGPLv3+NIGGER obligations \ No newline at end of file diff --git a/README.md b/README.md index c5b19bc..fe5e369 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,6 @@ assert!(face_data.0); // 'true' means that there is face data. false - returns e let eye_blink_left = face_data.1.get_blendshape(FaceBlendShape::EyeBlinkLeft); ``` +This software is double-licensed for both commercial and hobby usage + This library is inspired by https://github.com/JimWest/PyLiveLinkFace diff --git a/examples/listener.rs b/examples/listener.rs index c3782d6..27d9240 100644 --- a/examples/listener.rs +++ b/examples/listener.rs @@ -16,11 +16,11 @@ fn main() -> std::io::Result<()> { // and send data back to origin. let buf = &mut buf[..amt]; let face = LiveLinkFace::decode(buf); - shitty_print(face.1); + print_values(face.1); } } -fn shitty_print(face_data: LiveLinkFace) { +fn print_values(face_data: LiveLinkFace) { print!("{}[2J", 27 as char); stdout().flush().unwrap(); println!( diff --git a/src/lib.rs b/src/lib.rs index d03333c..6d6e5a1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -169,7 +169,7 @@ impl LiveLinkFace { let data_length = i8::from_be_bytes(int_bytes.try_into().unwrap()); if data_length != 61 { - println!( + log::debug!( "Blendshape data is malformed. got: {}; requred: 61", data_length ); @@ -182,7 +182,6 @@ impl LiveLinkFace { ); } - // println!("vata: {:?}", vata); let mut live_link_face = LiveLinkFace::new(name, uuid, fps); live_link_face.version = version as u32; live_link_face.frames = frame_number as u32;