feat: add search filter, refactor params
This commit is contained in:
parent
44e14a4ae0
commit
25de7d678a
24 changed files with 374 additions and 72 deletions
|
|
@ -6,7 +6,7 @@ use fancy_regex::Regex;
|
|||
use futures::{stream, StreamExt};
|
||||
use once_cell::sync::Lazy;
|
||||
use reqwest::{header, Client};
|
||||
use rustypipe::model::{locale::LANGUAGES, Language};
|
||||
use rustypipe::param::{locale::LANGUAGES, Language};
|
||||
use serde::Deserialize;
|
||||
use serde_with::serde_as;
|
||||
use serde_with::VecSkipError;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use std::{
|
|||
use futures::{stream, StreamExt};
|
||||
use rustypipe::{
|
||||
client::RustyPipe,
|
||||
model::{locale::LANGUAGES, Language},
|
||||
param::{locale::LANGUAGES, Language},
|
||||
timeago::{self, TimeAgo},
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ pub fn generate_dictionary(project_root: &Path) {
|
|||
let code_head = r#"// This file is automatically generated. DO NOT EDIT.
|
||||
// See codegen/gen_dictionary.rs for the generation code.
|
||||
use crate::{
|
||||
model::Language,
|
||||
param::Language,
|
||||
timeago::{DateCmp, TaToken, TimeUnit},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ pub enum Country {
|
|||
);
|
||||
|
||||
let mut target_path = project_root.to_path_buf();
|
||||
target_path.push("src/model/locale.rs");
|
||||
target_path.push("src/param/locale.rs");
|
||||
std::fs::write(target_path, code).unwrap();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std::{collections::BTreeMap, fs::File, io::BufReader, path::Path, str::FromStr};
|
||||
|
||||
use rustypipe::model::Language;
|
||||
use rustypipe::param::Language;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
const DICT_PATH: &str = "testfiles/dict/dictionary.json";
|
||||
|
|
|
|||
Reference in a new issue