From fc6f892a351013e9c0684ef3e3b5879f00e65269 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Tue, 15 Aug 2023 16:14:02 +0200 Subject: [PATCH] some first code for new CLI in Rust --- .gitignore | 4 +++- Cargo.lock | 7 +++++++ Cargo.toml | 12 ++++++++++++ README.md | 3 +++ bin/__pycache__/handler.cpython-311.pyc | Bin 11185 -> 11185 bytes src/handler/mod.rs | 3 +++ src/lib.rs | 7 +++++++ src/main.rs | 22 ++++++++++++++++++++++ 8 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 src/handler/mod.rs create mode 100644 src/lib.rs create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore index a255e18..fd99892 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,6 @@ node_modules # ignore build & dist folders build -dist \ No newline at end of file +dist + +target \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..9886a9c --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "simple_media_upscale_lite_cli" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..ee21fb9 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "simple_media_upscale_lite_cli" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lib] +name = "lib" +path = "src/lib.rs" + +[dependencies] diff --git a/README.md b/README.md index fb99c5e..ea7cc1f 100755 --- a/README.md +++ b/README.md @@ -24,6 +24,9 @@ smuL (pronounced like "small") is an Electron App with Python CLI to upscale images and videos using multiple different upscaling engines. +# Ongoing change: New CLI +smuL's CLI is currently getting a complete overhaul and is being rewritten in Rust. Don't expect any more updates to the Python CLI. + # Functionality This app allows you to upscale a single file or (in the future) a full on folder with one of many different engines that can be added as plugins. - Choose an input & output file from a GUI filemanager. diff --git a/bin/__pycache__/handler.cpython-311.pyc b/bin/__pycache__/handler.cpython-311.pyc index 62915c61a6b5a0646efcca4ce2ec9915a1c7303d..5c8fd31996ee692a92b256fa9696ad9c427832cc 100644 GIT binary patch delta 18 YcmdlOzA>D0IWI340}z;OD0IWI340}!xm You are running CLI Version 2.0.0-alpha1 + "); + + // Parse cli arguments + let args: Vec = env::args().collect(); + let length = args.len(); + println!("{length}"); + let query = &args[ 1 ]; + println!("{query}"); + lib::test(); +}