Git Product home page Git Product logo

dar-to-oar's Introduction

DAR to OAR Converter(GUI & CLI)

convert-page-with-javascript

Features

  • DAR to OAR conversion(CLI & GUI applications)
  • Implemented sub commands (Remove OAR dir, Unhide DAR files)
  • Mapping table complements OAR's readability on GUI
  • Localization system(Could be customized)
  • Could edit JavaScript & CSS

Getting Started for User

1.Download latest version from the following link.

Licenses

DAR to OAR(This application): MIT OR Apache-2.0 Copyright (c) 2023 SARDONYX

DAR to OAR Converter v1.0.8(C# Original Application): MIT License Copyright (c) 2023 Allison Payne

dar-to-oar's People

Contributors

dependabot[bot] avatar sardonyx-sard avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

elbadcode

dar-to-oar's Issues

[Bug](Core): Err skipping is unsafe.

Version

0.1.5

Unexpected behavior here

It does not return an error even if it never performs a conversion.

Err(_) => continue, // NOTE: The first search is skipped because it does not yet lead to the DAR file.

Expected behavior

Returns an error if the conversion was never performed.
But I don't know how to construct that flag (should I just use an AtomicBool?).

static IS_CONVERTE_EXECUTED_ONCE: AtomicBool = AtomicBool(false);

if !IS_CONVERTE_EXECUTED_ONCE.load(Ordering::Acquire) {
    bail!("DynamicAnimationReplacer dir was never found")
}

Relevant log output

No response

[Bug]: When the output destination of OAR is specified other than charactor, charactor is included.

Version

0.6.0

Unexpected behavior here

This code is not really designed with anything but the charactor in mind.

Other creatures should be supported. (It can work side-effectively if you don't specify the output destination of OAR.)
https://github.com/SARDONYX-sard/dar-to-oar/blob/main/dar2oar_core/src/fs/converter/common.rs#L56

Expected behavior

If you present the output destination of the OAR, you should easily be able to get it with the index element of the next array in the actors.

But if this inference fails, we will have no choice but to error.

Relevant log output

No response

[Feature]: asyncClosure field in ConvertOptions

Expected behavior

I wanted to put the conversion option progress report function in a field, but I couldn't.

  • async_closure.rs
use core::future::Future;
use core::marker::PhantomData;

#[derive(Default, Debug)]
pub struct AsyncClosure<I, F, Fut, T>
where
    F: FnMut(I) -> Fut,
    Fut: Future<Output = T> + Send + 'static,
    T: Send + 'static,
{
    async_fn: Option<F>,
    _p: PhantomData<fn(I) -> Fut>,
}

impl<I, F, Fut, T> AsyncClosure<I, F, Fut, T>
where
    F: FnMut(I) -> Fut,
    Fut: Future<Output = T> + Send + 'static,
    T: Send + 'static,
{
    pub const fn new(async_fn: F) -> Self {
        Self {
            async_fn: Some(async_fn),
            _p: std::marker::PhantomData,
        }
    }

    pub fn apply(&mut self, x: I) -> Fut {
        match self.async_fn.as_mut() {
            Some(f) => f(x),
            None => async {},
        }
    }
}
  • mod.rs
use std::future::Future;
use std::path::{Path, PathBuf};
use tokio::fs;
use tokio::io::{self, AsyncReadExt, AsyncWriteExt};
use tokio_stream::StreamExt;
use tracing::trace;

pub use mapping_table::read_mapping_table;
pub use sequential::convert_dar_to_oar;

#[derive(Debug, Default)]
pub struct ConvertOptions<'a, P: AsRef<Path>, I, F, Fut, T>
where
    F: FnMut(I) -> Fut,
    Fut: Future<Output = T> + Send + 'static,
    T: Send + 'static,
{
    /// DAR source dir path
    pub dar_dir: P,
    /// OAR destination dir path(If not, it is inferred from src)
    pub oar_dir: Option<PathBuf>,
    /// mod name in config.json & directory name(If not, it is inferred from src)
    pub mod_name: Option<&'a str>,
    /// mod author in config.json
    pub author: Option<&'a str>,
    /// path to section name table
    pub section_table: Option<HashMap<String, String>>,
    /// path to section name table(For _1st_person)
    pub section_1person_table: Option<HashMap<String, String>>,
    /// After converting to OAR, add mohidden to the DAR directory before conversion to treat it as a hidden directory. (for MO2 users)
    pub hide_dar: bool,
    pub async_fn: AsyncClosure< I, F, Fut, T>,
}

other

No response

[Feature]: Add CSP

Expected behavior

I'd like to set up a CSP but couldn't do it as I wanted.

  • tauri.conf.json
    "security": {
      "dangerousDisableAssetCspModification": ["style-src"],
      "csp": "default-src 'self';script-src 'self' 'strict-dynamic' 'unsafe-inline';worker-src 'self' 'strict-dynamic' 'blob:https://tauri.localhost/*';style-src 'self' 'unsafe-inline'; img-src 'self' https: asset: data:"
    }

Set CSP and restrict content.

other

No response

[Bug]: Wrong download link

Version

0.1.6

Unexpected behavior here

For some reason, cargo dist uses the repository name as URL with the same name as the binary name, and the resulting URL causes a not found.

Now the URL is dar2oar which is the same as the binary name.

Wrong
https://github.com/SARDONYX-sard/dar2oar/releases/download/0.2.2/dar2oar_cli-aarch64-apple-darwin.tar.xz

Expected behavior

Currect
https://github.com/SARDONYX-sard/dar-to-oar/releases/download/0.2.2/dar2oar_cli-aarch64-apple-darwin.tar.xz

The correct repository name is dar-to-oar.

If you can specify the URL yourself, this problem will be solved.
See: axodotdev/cargo-dist#236

Relevant log output

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.