Skip to content

Commit

Permalink
refactor: update module imports and file paths for monset integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Kremilly committed Jun 12, 2024
1 parent 7a03e4a commit 3822d14
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/cmd/checksum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::{
args_cli::Flags,
utils::file::FileMisc,
system::hashes::Hashes,
syntax::vars_block::VarsBlock,
monset::vars_block::VarsBlock,

ui::{
ui_base::UI,
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pub mod tasks;
pub mod checksum;
pub mod read_list;
pub mod monset;
8 changes: 4 additions & 4 deletions src/cmd/read_list.rs → src/cmd/monset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ use crate::{
args_cli::Flags,
utils::validation::Validate,
ui::errors_alerts::ErrorsAlerts,
syntax::downloads_block::DownloadsBlock,
monset::downloads_block::DownloadsBlock,
};

pub struct ReadList;
pub struct Monset;

impl ReadList {
impl Monset {

pub async fn read_dataset(run: &str, flags: &Flags) -> Result<(), Box<dyn Error>> {
pub async fn exec(run: &str, flags: &Flags) -> Result<(), Box<dyn Error>> {
let reader: BufReader<Box<dyn Read>>;

if run.starts_with("http") {
Expand Down
8 changes: 5 additions & 3 deletions src/cmd/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ use std::{

use crate::{
args_cli::Flags,
syntax::macros::Macros,
syntax::vars_block::VarsBlock,

monset::{
macros::Macros,
vars_block::VarsBlock,
},

ui::{
ui_base::UI,
Expand Down Expand Up @@ -63,7 +66,6 @@ impl Tasks {
for file in files {
let path = Path::new(file);
let name = path.strip_prefix(Path::new(&folder_path)).unwrap();

zip.start_file(name.to_str().unwrap(), options.clone())?;

let mut f = File::open(path)?;
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod regexp;
mod consts;
mod addons;
mod system;
mod syntax;
mod monset;
mod scibun;
mod configs;
mod args_cli;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
checksum::Checksum,
},

syntax::{
monset::{
macros::Macros,
vars_block::VarsBlock,
readme_block::ReadMeBlock,
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/syntax/readme_block.rs → src/monset/readme_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{
use crate::{
args_cli::Flags,
system::markdown::Markdown,
syntax::vars_block::VarsBlock,
monset::vars_block::VarsBlock,
prime_down::pd_core::PrimeDown,
ui::macros_alerts::MacrosAlerts,
regexp::regex_blocks::BlocksRegExp,
Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions src/scibun.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::error::Error;

use crate::{
args_cli::Flags,
cmd::read_list::ReadList,
syntax::readme_block::ReadMeBlock,
cmd::monset::Monset,
monset::readme_block::ReadMeBlock,

ui::{
ui_base::UI,
Expand Down Expand Up @@ -61,15 +61,14 @@ impl Scibun {

if !run.is_empty() {
if !Scimon::check_is_user(run) {
let _ = ReadList::read_dataset(run, &flags).await;
let _ = Monset::exec(run, &flags).await;
let _ = ReadMeBlock::render_block_and_save_file(run, &flags);
} else {
let _ = Scimon::get(run, &flags).await;
}
}

let _ = Scrape::get(&flags, url).await;

let _ = Self::options(options).await;
}

Expand Down
2 changes: 1 addition & 1 deletion src/system/reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use is_url::is_url;
use std::error::Error;

use crate::{
syntax::macros::Macros,
monset::macros::Macros,
utils::remote::FileRemote,
regexp::regex_core::CoreRegExp,
ui::errors_alerts::ErrorsAlerts,
Expand Down

0 comments on commit 3822d14

Please sign in to comment.