Blazingly fast Rust CLI app to sync data from a folder of excel workbooks into generated c# code for unity usage

Overview

img Rust Release

Extensions supported ( .xls, .xlsx, .xlsm, .xlsb, .xla, .xlam, .ods )

Speed Test

img

Image shows the results of 5000defs synced from 2 workbooks and 5 sheets. over 180,000 lines of c# generated

How To Use

Running it

  1. Run the release exe from command line.
  2. Pass in the required args 1(Sheets Folder) 2(Sheets Extension) 3(Output Folder)
  3. Example: datasyncer.exe Sheets .ods Output
    1. ./target/release/datasyncer.exe Sheets/ .xlsx Output/
  4. Verbose/Debugging output: pass in fourth arg of --verbose

Creating a Sheet

  1. Right now just use the TesterBook.xlsx for reference as to how it will need to be structured as well as all the functionalities that are supported

BUGS

  • DO NOT USE degree SYMBOLS IN YOUR PARSED .CS files .. it does not parse those well will break swapping of the blocks
  • PASSING IN PATHS WITH SPACES IN IT BREAKS CLI Args handling

Todo

  • handle primitives and enums
  • handle lists of primitives and enums
  • handle class's on defs
  • minor cleanup pass / refactor
  • Code Cleanup - Break out some functions, handle all the unwraps. those are ugly and not handled correctly
  • Create Data dump first C# file
  • Open up existing c# Output and slam over them with the new values
  • Support one excel workbook or a folder of them
  • add in --verbose if you want to see all the logs
  • Implement progress bars -> https://crates.io/crates/indicatif
  • Implement nicer CLI look -> https://docs.rs/console/0.10.0/console/
  • Show progress bar / stopwatch status how fast it exported
  • strip down the block start and ends (quicker)
  • add in generated getter function
  • global headers just a comment generated with a title and a space above
  • add in fix for varying lengths of lists on defs if nothing in the field don't add in another item
  • add in support for datetimes in defs and global
    • add in support for unix time,
    • add in support for utc/local
  • implement global enums not the creation the actual value
  • fix stripping out whitespace on the CONST and all over the var names, this causes confusion when trying to import.
  • Implement vec 2, 3, 4 2.4|5.4|234
  • Multithread this .. work on 4 cores. .. basically parse through a sheet per thread.
  • [NOT-POSSIBLE][x] Support Def Comments, Field Comments, Value Comments etc. insert these above values or above classes or to the side of a value
    • [NOT-POSSIBLE][x] Add in notes for the id .. after the id enum could have a comment note // Something about this id
  • fix the cur_list_index .. just redo this logic entirely very bad
  • Add in better handling of the incoming command line args ..
    • don't care about ordering and handle test paths with spaces in them
  • fix up the final strings for the data types
  • Add in arrays of classes ???
  • add in enabled def solution / getter function
  • Add in dev options at the top of the sheet next to the sync ..
  • make a bash script that after the build is successful copys the --release build over to brawlquest
  • ? Implement Passing in if you want an enum array built or just straight up global_fields named nicely
  • ? Implement Passing in if you want it static
  • Add in only importing the excel books that changed (need to generate some sort of last imported modification)
  • FIX - EMPTY DEF SHEET, right now if you go from an empty def sheet to adding in defs to it they wont fill.. you have to delete the file
  • HANDLE inserting \ before " automatically in strings
  • HANDLE inserting "\n" in the string where it would be a straight up next line
  • under the COUNT generated number have a FIRST {get{return defs[1]}} and LAST {get{return defs[COUNT]}}

Using It In Unity

public static class EditorUtils
{

    [MenuItem("Enable/Run Data-Sync %#d", priority = -10000)] // ctrl + shift + d
    static void RunDataSyncer()
    {
        string root = GetRootDirectory();

        string extension = ".xlsx"; // Extensions supported (.xls, .xlsx, .xlsm, .xlsb, .xla, .xlam, .ods)
        string appendixPath = root + "Design/";
        string outputPath = root + "Assets/DataSynced"; // c# in unity
        string args = appendixPath + " " + extension + " " + outputPath;//  + " --verbose";

        if(!Directory.Exists(outputPath))
        {
            Directory.CreateDirectory(outputPath);
        }

        string exe = root + "Assets/DataSyncer/datasyncer.exe";
        var process = Process.Start(exe, args);
    }
}

Benchmarking

    let start = Instant::now();
    println!("BENCH TEST ({}ms)", start.elapsed().as_millis());
You might also like...
App to collect ram/cpu usage from OS and show it in pretty graphs
App to collect ram/cpu usage from OS and show it in pretty graphs

System info collector This is simple app to collect data about system cpu and memory usage over time. After collecting results into csv file, html fil

A CLI tool to rename files to randomly generated strings.
A CLI tool to rename files to randomly generated strings.

rng-rename A CLI tool to rename files to randomly generated strings. Why? Suppose you downloaded a few hundred images to use as your desktop wallpaper

zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets you're watching easily into watchlists for easy access on your terminal.
zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets you're watching easily into watchlists for easy access on your terminal.

zigfi zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets

Turbine is a toy CLI app for converting Rails schema declarations into equivalent type declarations in other languages.

Turbine Turbine is a toy CLI app for converting Rails schema declarations into equivalent type declarations in other languages. It’s described as a to

A Rust-based shell script to create a folder structure to use for a single class every semester. Mostly an excuse to use Rust.

A Rust Course Folder Shell Script PROJECT IN PROGRESS (Spring 2022) When completed, script will create a folder structure of the following schema: [ro

A CLI tool which can help you automatically kill process of your choice. Useful for freeing up memory and CPU usage!
A CLI tool which can help you automatically kill process of your choice. Useful for freeing up memory and CPU usage!

Quickiller There are always programs such as chrome that keep eating up your resources even when closed! The only way to prevent this is to kill all o

Check a folder for dirty git repositories, forgotten branches and commits

dg - find dirty git repos Ever forgot to push a commit or lost your work because you assumed it was pushed to Github but it wasn't? dg finds local git

Automatically replace Discord CDN links with local file links, by downloading the images to the public folder
Automatically replace Discord CDN links with local file links, by downloading the images to the public folder

Auto Undiscord Did you hear that Discord will be blocking external websites from using images hosted on their servers? Did you host every image on you

A blazingly fast Insertion Sort and Quick Sort visualizer built with Rust and WASM.
A blazingly fast Insertion Sort and Quick Sort visualizer built with Rust and WASM.

sortysort A blazingly fast Insertion Sort and Quick Sort visualizer built with Rust and WASM. Try it in your browser from here Testing locally cargo r

Owner
null
Fast & Memory Efficient NodeJs Excel Writer using Rust Binding

FastExcel This project need Rust to be installed, check here for Rust installation instruction This project using Rust and Neon as a binding to Rust t

Aditya Kresna 2 Dec 15, 2022
dua (-> Disk Usage Analyzer) is a tool to conveniently learn about the usage of disk space of a given directory

dua (-> Disk Usage Analyzer) is a tool to conveniently learn about the usage of disk space of a given directory. It's parallel by default and will max

Sebastian Thiel 1.8k Jan 2, 2023
Microsoft Excel (XLSX) to Unicode Separated Values (USV) Rust crate

xlsx-to-usv Convert Microsoft Excel (XLSX) to Unicode Separated Values (USV). Built with the USV Rust crate. Syntax: stdin | xlsx-to-usv [options] | s

SixArm 3 Mar 31, 2024
rsv is a command line tool to deal with small and big CSV, TXT, EXCEL files (especially >10G)

csv, excel toolkit written in Rust rsv is a command line tool to deal with small and big CSV, TXT, EXCEL files (especially >10G). rsv has following fe

Zhuang Dai 39 Jan 30, 2023
'apk-yara-checker' is a little CLI tool written in Rust to check Yara rules against a folder of APK files.

apk-yara-checker 'apk-yara-checker' is a little CLI tool written in Rust to check Yara rules against a folder of APK files. You have to pass the folde

alberto__segura 15 Oct 5, 2022
A CLI calculator written in Rust that isn't blazingly fast.

Calcamabob A command line calculator Is written in Rust Is not blazing fast, and could be faster. Calcamabob can interpret operator precedence. For ex

Casey Kneale 4 Oct 24, 2022
Warp is a blazingly fast, Rust-based terminal that makes you and your team more productive at running, debugging, and deploying code and infrastructure.

Warp is a blazingly fast, Rust-based terminal that makes you and your team more productive at running, debugging, and deploying code and infrastructure.

Warp 10.4k Jan 4, 2023
⚡ A Blazing fast alternative to the stock windows folder delete function!

Turbo Delete A blazing fast alternative to the default Windows delete. Turbodelete is a blazing fast alternative to the default Windows delete functio

Tejas Ravishankar 165 Dec 4, 2022
A blazingly fast & lightweight Obsidian CLI ⚡️

obs - the Obsidian CLI ⚡️ Connecting your second brain to the termainl - blazing fast ⚡️ Note ?? obs is under active development and currently only su

null 5 Mar 4, 2023
Provide CRUD CLI for Moco Activities with Jira Cloud Sync Option for faster time tracking.

Moco CLI Provide CRUD CLI for Moco Activities with Jira Cloud Sync Option for faster time tracking. Available commands Login Jira Must be called befor

Emanuel Vollmer 7 Nov 18, 2022