Giter Site home page Giter Site logo

sardonyx-sard / dar-to-oar Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.6 MB

DAR to OAR Converter for SkyrimSE(dar2oar)

Home Page: https://www.nexusmods.com/skyrimspecialedition/mods/101822

License: Apache License 2.0

JavaScript 4.46% CSS 0.23% TypeScript 22.69% Rust 70.41% PowerShell 2.21%
converter dar oar skyrim-special-edition

dar-to-oar's Introduction

Code time of the week (updated every 19:00 UTC)

Code Time

๐Ÿฑ My GitHub Data

๐Ÿ“ฆ 225.3 kB Used in GitHub's Storage

๐Ÿšซ Not Opted to Hire

๐Ÿ“œ 37 Public Repositories

๐Ÿ”‘ 2 Private Repositories

I'm a Night ๐Ÿฆ‰

๐ŸŒž Morning                507 commits         โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   07.08 % 
๐ŸŒ† Daytime                2298 commits        โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   32.10 % 
๐ŸŒƒ Evening                1809 commits        โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   25.27 % 
๐ŸŒ™ Night                  2544 commits        โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   35.54 % 

๐Ÿ“… I'm Most Productive on Monday

Monday                   1300 commits        โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   18.16 % 
Tuesday                  884 commits         โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   12.35 % 
Wednesday                1028 commits        โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   14.36 % 
Thursday                 941 commits         โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   13.15 % 
Friday                   1154 commits        โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   16.12 % 
Saturday                 767 commits         โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   10.72 % 
Sunday                   1084 commits        โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   15.14 % 

๐Ÿ“Š This Week I Spent My Time On

๐Ÿ•‘๏ธŽ Time Zone: Asia/Tokyo

๐Ÿ’ฌ Programming Languages: 
Markdown                 9 hrs               โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   47.08 % 
Rust                     2 hrs 31 mins       โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   13.20 % 
JSON                     2 hrs 16 mins       โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   11.87 % 
Lua                      1 hr 7 mins         โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   05.85 % 
C                        1 hr 5 mins         โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   05.71 % 

๐Ÿ”ฅ Editors: 
VS Code                  19 hrs 7 mins       โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ   100.00 % 

๐Ÿ’ป Operating System: 
Windows                  19 hrs 7 mins       โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ   100.00 % 

Last Updated on 04/05/2024 19:12:52 UTC

dar-to-oar's People

Contributors

sardonyx-sard avatar

Stargazers

 avatar  avatar

Watchers

 avatar

dar-to-oar's Issues

[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

[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

[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

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.