[READ-ONLY] Mirror of https://github.com/probablykasper/time-machine-inspector. Time Machine backup size inspector app
backup macos tauri time-machine
0

Configure Feed

Select the types of activity you want to include in your feed.

Use tauri-provided regex export

Kasper (Feb 13, 2022, 1:03 AM +0100) 191aaffc aa6eb953

+4 -8
-1
src-tauri/Cargo.lock
··· 3153 3153 version = "1.1.2" 3154 3154 dependencies = [ 3155 3155 "plist", 3156 - "regex", 3157 3156 "serde", 3158 3157 "serde_json", 3159 3158 "tauri",
-1
src-tauri/Cargo.toml
··· 17 17 tauri = { version = "1.0.0-rc.1", features = ["dialog-message", "shell-open"] } 18 18 tauri-plugin-vibrancy = { git = "https://github.com/tauri-apps/tauri-plugin-vibrancy", features = ["tauri-impl"] } 19 19 plist = { version = "1.3.1", features = ["serde"] } 20 - regex = "1.5" 21 20 22 21 [features] 23 22 default = [ "custom-protocol" ]
+2 -3
src-tauri/src/cmd.rs
··· 1 1 use crate::dir_map::DirMap; 2 2 use crate::{compare, listbackups, throw}; 3 - use regex::Regex; 4 3 use serde::Serialize; 5 4 use std::collections::HashMap; 6 5 use std::fs::File; 7 6 use std::process::ExitStatus; 8 7 use std::sync::{Mutex, MutexGuard}; 9 8 use tauri::api::{dialog, shell}; 10 - use tauri::{command, scope, State, Window}; 9 + use tauri::{command, regex, scope, State, Window}; 11 10 12 11 pub fn parse_output(bytes: Vec<u8>) -> Result<String, String> { 13 12 match String::from_utf8(bytes) { ··· 49 48 50 49 let link = "x-apple.systempreferences:com.apple.preference.security?Privacy_AllFiles"; 51 50 let shell_scope = scope::ShellScope::new(scope::ShellScopeConfig { 52 - open: Some(Regex::new("^x-apple.systempreferences:").unwrap()), 51 + open: Some(regex::Regex::new("^x-apple.systempreferences:").unwrap()), 53 52 scopes: HashMap::new(), 54 53 }); 55 54 shell::open(&shell_scope, link.to_string(), None).unwrap();
+2 -3
src-tauri/src/main.rs
··· 3 3 windows_subsystem = "windows" 4 4 )] 5 5 6 - use regex::Regex; 7 6 use std::collections::HashMap; 8 7 use std::thread; 9 8 use std::time::Instant; 10 9 use tauri::api::{dialog, shell}; 11 10 use tauri::{ 12 - command, scope, CustomMenuItem, Manager, Menu, MenuEntry, MenuItem, Submenu, Window, 11 + command, regex, scope, CustomMenuItem, Manager, Menu, MenuEntry, MenuItem, Submenu, Window, 13 12 WindowBuilder, WindowUrl, 14 13 }; 15 14 ··· 125 124 match event_name { 126 125 "Learn More" => { 127 126 let shell_scope = scope::ShellScope::new(scope::ShellScopeConfig { 128 - open: Some(Regex::new("^https?://").unwrap()), 127 + open: Some(regex::Regex::new("^https?://").unwrap()), 129 128 scopes: HashMap::new(), 130 129 }); 131 130 let link = "https://github.com/probablykasper/time-machine-inspector".to_string();