Compare commits
No commits in common. "2a4233e5d529c527ab7db0e6da23eb28b08a534f" and "4ca12723389e583da13ecef53e22ed3f26e0b26a" have entirely different histories.
2a4233e5d5
...
4ca1272338
4 changed files with 6 additions and 9 deletions
|
@ -17,7 +17,7 @@ env_logger = "0.10.0"
|
||||||
clap = { version = "4.0.29", features = ["derive"] }
|
clap = { version = "4.0.29", features = ["derive"] }
|
||||||
phf_codegen = "0.11.1"
|
phf_codegen = "0.11.1"
|
||||||
once_cell = "1.12.0"
|
once_cell = "1.12.0"
|
||||||
regex = "1.7.1"
|
fancy-regex = "0.10.0"
|
||||||
indicatif = "0.17.0"
|
indicatif = "0.17.0"
|
||||||
num_enum = "0.5.7"
|
num_enum = "0.5.7"
|
||||||
path_macro = "1.0.0"
|
path_macro = "1.0.0"
|
||||||
|
|
|
@ -2,10 +2,10 @@ use std::collections::{HashMap, HashSet};
|
||||||
use std::{collections::BTreeMap, fs::File, io::BufReader, path::Path};
|
use std::{collections::BTreeMap, fs::File, io::BufReader, path::Path};
|
||||||
|
|
||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
|
use fancy_regex::Regex;
|
||||||
use futures::{stream, StreamExt};
|
use futures::{stream, StreamExt};
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use path_macro::path;
|
use path_macro::path;
|
||||||
use regex::Regex;
|
|
||||||
use reqwest::{header, Client};
|
use reqwest::{header, Client};
|
||||||
use rustypipe::param::{locale::LANGUAGES, Language};
|
use rustypipe::param::{locale::LANGUAGES, Language};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
@ -139,6 +139,7 @@ pub fn write_samples_to_dict(project_root: &Path) {
|
||||||
.find_map(|(mag, (txt, _))| {
|
.find_map(|(mag, (txt, _))| {
|
||||||
let point = POINT_REGEX
|
let point = POINT_REGEX
|
||||||
.captures(txt)
|
.captures(txt)
|
||||||
|
.unwrap()
|
||||||
.map(|c| c.get(1).unwrap().as_str());
|
.map(|c| c.get(1).unwrap().as_str());
|
||||||
|
|
||||||
if let Some(point) = point {
|
if let Some(point) = point {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
use fancy_regex::Regex;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use regex::Regex;
|
|
||||||
use rustypipe::timeago::TimeUnit;
|
use rustypipe::timeago::TimeUnit;
|
||||||
|
|
||||||
use crate::util;
|
use crate::util;
|
||||||
|
@ -11,7 +11,7 @@ const TARGET_PATH: &str = "src/util/dictionary.rs";
|
||||||
|
|
||||||
fn parse_tu(tu: &str) -> (u8, Option<TimeUnit>) {
|
fn parse_tu(tu: &str) -> (u8, Option<TimeUnit>) {
|
||||||
static TU_PATTERN: Lazy<Regex> = Lazy::new(|| Regex::new(r"^(\d*)(\w?)$").unwrap());
|
static TU_PATTERN: Lazy<Regex> = Lazy::new(|| Regex::new(r"^(\d*)(\w?)$").unwrap());
|
||||||
match TU_PATTERN.captures(tu) {
|
match TU_PATTERN.captures(tu).unwrap() {
|
||||||
Some(cap) => (
|
Some(cap) => (
|
||||||
cap.get(1).unwrap().as_str().parse().unwrap_or(1),
|
cap.get(1).unwrap().as_str().parse().unwrap_or(1),
|
||||||
match cap.get(2).unwrap().as_str() {
|
match cap.get(2).unwrap().as_str() {
|
||||||
|
|
|
@ -88,11 +88,7 @@ impl RustyPipeQuery {
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
if !to_replace.is_empty() {
|
if !to_replace.is_empty() {
|
||||||
let mut playlist = self.music_playlist(playlist_id).await?;
|
let playlist = self.music_playlist(playlist_id).await?;
|
||||||
playlist
|
|
||||||
.tracks
|
|
||||||
.extend_limit(&self, album.tracks.len())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
for (i, title) in to_replace {
|
for (i, title) in to_replace {
|
||||||
let found_track = playlist.tracks.items.iter().find_map(|track| {
|
let found_track = playlist.tracks.items.iter().find_map(|track| {
|
||||||
|
|
Loading…
Reference in a new issue