some first code for new CLI in Rust

This commit is contained in:
2023-08-15 16:14:02 +02:00
parent 135d026fa6
commit fc6f892a35
8 changed files with 57 additions and 1 deletions

4
.gitignore vendored
View File

@@ -15,4 +15,6 @@ node_modules
# ignore build & dist folders
build
dist
dist
target

7
Cargo.lock generated Normal file
View File

@@ -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"

12
Cargo.toml Normal file
View File

@@ -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]

View File

@@ -24,6 +24,9 @@
</div>
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.

3
src/handler/mod.rs Normal file
View File

@@ -0,0 +1,3 @@
pub fn test2 () {
println!("HELLO WORLD!!!")
}

7
src/lib.rs Normal file
View File

@@ -0,0 +1,7 @@
mod handler;
use crate::handler::test2;
pub fn test() {
println!("Test");
test2();
}

22
src/main.rs Normal file
View File

@@ -0,0 +1,22 @@
use std::env;
use lib;
fn main() {
println!(r"
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ▄▄▄ ██▄██ ▄▀▄ █▀▄▄▀█ ██ ▄▄██ ▄▀▄ █ ▄▄█ ▄▀██▄██ ▄▄▀██ ██ █▀▄▄▀█ ▄▄█▀▄▀█ ▄▄▀█ ██ ▄▄█ ▄▄▀██ █████▄██▄ ▄█ ▄▄
██▄▄▄▀▀██ ▄█ █▄█ █ ▀▀ █ ██ ▄▄██ █ █ █ ▄▄█ █ ██ ▄█ ▀▀ ██ ██ █ ▀▀ █▄▄▀█ █▀█ ▀▀ █ ██ ▄▄█ ▀▀▄██ █████ ▄██ ██ ▄▄
██ ▀▀▀ █▄▄▄█▄███▄█ ████▄▄█▄▄▄██ ███ █▄▄▄█▄▄██▄▄▄█▄██▄██▄▀▀▄█ ████▄▄▄██▄██▄██▄█▄▄█▄▄▄█▄█▄▄██ ▀▀ █▄▄▄██▄██▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
==> You are running CLI Version 2.0.0-alpha1
");
// Parse cli arguments
let args: Vec<String> = env::args().collect();
let length = args.len();
println!("{length}");
let query = &args[ 1 ];
println!("{query}");
lib::test();
}