Renamed to Postsack

pull/1/head
Benedikt Terhechte 3 years ago
parent bb20d3d41d
commit dc9495392b

72
Cargo.lock generated

@ -898,42 +898,6 @@ dependencies = [
"gl_generator",
]
[[package]]
name = "gmaildb"
version = "0.1.0"
dependencies = [
"chrono",
"cocoa",
"crossbeam-channel",
"eframe",
"email-parser",
"emlx",
"eyre",
"flate2",
"image",
"lazy_static",
"lru",
"mbox-reader",
"num-format",
"objc",
"rand",
"rayon",
"regex",
"rfd",
"rsql_builder",
"rusqlite",
"serde",
"serde_json",
"shellexpand",
"strum",
"strum_macros",
"thiserror",
"tracing",
"tracing-subscriber",
"treemap",
"walkdir",
]
[[package]]
name = "gobject-sys"
version = "0.14.0"
@ -1668,6 +1632,42 @@ dependencies = [
"miniz_oxide 0.3.7",
]
[[package]]
name = "postsack"
version = "0.2.0"
dependencies = [
"chrono",
"cocoa",
"crossbeam-channel",
"eframe",
"email-parser",
"emlx",
"eyre",
"flate2",
"image",
"lazy_static",
"lru",
"mbox-reader",
"num-format",
"objc",
"rand",
"rayon",
"regex",
"rfd",
"rsql_builder",
"rusqlite",
"serde",
"serde_json",
"shellexpand",
"strum",
"strum_macros",
"thiserror",
"tracing",
"tracing-subscriber",
"treemap",
"walkdir",
]
[[package]]
name = "ppv-lite86"
version = "0.2.10"

@ -1,26 +1,23 @@
[package]
name = "gmaildb"
version = "0.1.0"
name = "postsack"
version = "0.2.0"
edition = "2018"
description = "Bam"
description = "Provides a high level visual overview of swaths of email"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[package.metadata.bundle.bin.gui]
name = "ExampleApplication"
identifier = "com.doe.exampleapplication"
name = "Postsack"
identifier = "com.stylemac.Postsack"
#icon = ["128x128@2x.png"]
version = "1.0.0"
#resources = ["assets", "images/**/*.png", "secrets/public_key.txt"]
copyright = "Copyright (c) Jane Doe 2016. All rights reserved."
copyright = "Copyright (c) Benedikt Terhechte (2021). All rights reserved."
category = "Developer Tool"
short_description = "An example application."
short_description = "Provides a high level visual overview of swaths of email"
long_description = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.
Provides a high level visual overview of swaths of email
"""
[dependencies]

@ -6,33 +6,33 @@ use std::{
time::Duration,
};
use gmaildb::{
use postsack::{
self,
importer::{Adapter, State},
types::FormatType,
};
fn main() -> Result<()> {
gmaildb::setup_tracing();
postsack::setup_tracing();
let config = gmaildb::make_config();
let config = postsack::make_config();
let adapter = gmaildb::importer::Adapter::new();
let adapter = postsack::importer::Adapter::new();
// Could not figure out how to build this properly
// with dynamic dispatch. (to abstract away the match)
// Will try again when I'm online.
let handle = match config.format {
FormatType::AppleMail => {
let importer = gmaildb::importer::applemail_importer(config);
let importer = postsack::importer::applemail_importer(config);
adapter.process(importer)?
}
FormatType::GmailVault => {
let importer = gmaildb::importer::gmail_importer(config);
let importer = postsack::importer::gmail_importer(config);
adapter.process(importer)?
}
FormatType::Mbox => {
let importer = gmaildb::importer::mbox_importer(config);
let importer = postsack::importer::mbox_importer(config);
adapter.process(importer)?
}
};

@ -1,7 +1,7 @@
#[cfg(feature = "gui")]
fn main() {
gmaildb::setup_tracing();
gmaildb::gui::run_gui();
postsack::setup_tracing();
postsack::gui::run_gui();
}
#[cfg(not(feature = "gui"))]

@ -6,17 +6,17 @@ use eframe::{
use super::app_state::StateUI;
use super::textures::Textures;
pub struct GmailDBApp {
pub struct PostsackApp {
state: StateUI,
platform_custom_setup: bool,
textures: Option<Textures>,
}
impl GmailDBApp {
impl PostsackApp {
pub fn new() -> Self {
let state = StateUI::new();
GmailDBApp {
PostsackApp {
state,
platform_custom_setup: false,
textures: None,
@ -24,9 +24,9 @@ impl GmailDBApp {
}
}
impl App for GmailDBApp {
impl App for PostsackApp {
fn name(&self) -> &str {
"Gmail DB"
"Postsack"
}
fn setup(&mut self, ctx: &egui::CtxRef, frame: &mut Frame<'_>, _storage: Option<&dyn Storage>) {

@ -9,5 +9,5 @@ pub(crate) mod widgets;
pub fn run_gui() {
let options = eframe::NativeOptions::default();
eframe::run_native(Box::new(app::GmailDBApp::new()), options);
eframe::run_native(Box::new(app::PostsackApp::new()), options);
}

@ -2,7 +2,7 @@
//! use jetsci for efficient searching:
//! https://github.com/shepmaster/jetscii
//! (or aho corasick)
//! Here's the ref: file:///Users/terhechte/Development/Rust/gmaildb/target/doc/src/mbox_reader/lib.rs.html#65-67
//! Here's the ref: file:///Users/terhechte/Development/Rust/postsack/target/doc/src/mbox_reader/lib.rs.html#65-67
//! Make it so that I can hold the mbox in the struct below
use eyre::bail;

@ -152,7 +152,7 @@ impl Config {
Some(n) => n.as_ref().to_path_buf(),
None => {
let number: u32 = rand::thread_rng().gen();
let folder = "gmaildb";
let folder = "postsack";
let filename = format!("{}.sqlite", number);
let mut temp_dir = std::env::temp_dir();
temp_dir.push(folder);

Loading…
Cancel
Save