From 889f0416fdc892f576024ff3477adf12589aa47c Mon Sep 17 00:00:00 2001 From: Benedikt Terhechte Date: Mon, 20 Dec 2021 10:40:39 +0100 Subject: [PATCH] Updated deployment github action and documentation --- .github/workflows/deploy.yml | 2 +- .vscode/launch.json | 159 ++++++++++++++++++++++++++++++ .vscode/tasks.json | 8 +- README.md | 35 +++++-- postsack-native/build_mac.sh | 5 +- postsack-native/build_windows.bat | 2 +- 6 files changed, 190 insertions(+), 21 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d6f3522..d217e40 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,7 +18,7 @@ jobs: cd postsack-native cargo install cargo-bundle ./build_linux.sh - binary: target/release/bundle/deb/postsack_1.0.0._amd64.deb + binary: target/release/bundle/deb/postsack_1.0.0_amd64.deb - os: macOS-latest command: | cd postsack-native diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..6539e3e --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,159 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'ps-core'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=ps-core" + ], + "filter": { + "name": "ps-core", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'ps-database'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=ps-database" + ], + "filter": { + "name": "ps-database", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'ps-importer'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=ps-importer" + ], + "filter": { + "name": "ps-importer", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'ps-gui'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=ps-gui" + ], + "filter": { + "name": "ps-gui", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'postsack'", + "cargo": { + "args": [ + "build", + "--bin=postsack", + "--package=postsack" + ], + "filter": { + "name": "postsack", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'postsack'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=postsack", + "--package=postsack" + ], + "filter": { + "name": "postsack", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'test_importer'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=test_importer", + "--package=postsack" + ], + "filter": { + "name": "test_importer", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'test_engine'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=test_engine", + "--package=postsack" + ], + "filter": { + "name": "test_engine", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index eb81cfd..e12b014 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,13 +7,7 @@ "problemMatcher": [ "$rustc" ], - "args": [ - "--bin", - "gui", - "--", - "/tmp/", - "/tmp/db2.sql" - ], + "args": [], "label": "rust: cargo run gui", "group": { "kind": "build", diff --git a/README.md b/README.md index 7ba2847..14939c0 100644 --- a/README.md +++ b/README.md @@ -5,21 +5,25 @@ [![license](https://shields.io/badge/license-MIT-green)](https://github.com/terhechte/postsack/blob/main/LICENSE.md) ![Rust CI](https://github.com/terhechte/postsack/actions/workflows/rust.yml/badge.svg) - # Postsack ## A high level visual overview of swaths of email [TLDR! A web demo that shows how Postsack clusters a set of 10.000 fake emails](https://terhech.de/postsack_demo) -Do you have a lot of mail? I have a lot of mail. There're inbox zero or archive zero people. I'm not one of them. I recently realized that my gmail account contains roughly 650.000 emails. I looked at that and I began +Do you have many emails? I have a lot of emails. I'm not a inbox zero person. I recently realized that my Gmail account contains roughly 650.000 emails. I looked at that and I began to wonder.. *Why?*.. Sure, I've been using Gmail since 2004 but still, that's 38.000 Emails per year which strikes me as a bit -on the crazy side of things. Curious as I am I wanted to figure out where all these mails came from. +on the crazy side of things. I wanted to know where these mails came from. + +Gmail did not offer an easy way of visualizing all my emails, I also couldn't find a tool for it. Hence I +build my own. It parses all your mails and shows configurable clusters of mails in a nice visualization. + +## It looks like this -Turns out that is a tricky problem because Gmail doesn't offer any tooling for such a use case. Hence I -build my own. This tool (lovingly named `Postsack` which is German for a bag full of mail) parses all your -emails and allows you to dig into them with a treemap (see screenshot below): +![Example](resources/animation.gif) + +## Features - Import all your local mails (currently, only MBox, Apple Mail and Gmail Backups are supported) - Build up clustered visualizations of your mails to see and understand what kind of emails you have @@ -31,10 +35,6 @@ emails and allows you to dig into them with a treemap (see screenshot below): - Cross platform (macOS, Windows, Linux and a [Web Demo](https://terhech.de/postsack_demo)) - The app is 13MB big and consumes ~150MB of memory on macOS -## It looks like this - -![Example](resources/animation.gif) - The look is similar on all platforms as it uses the [Rust egui](https://github.com/emilk/egui) GUI library. ## Videos @@ -94,3 +94,18 @@ Here's an overview of the different crates in the Postsack Workspace: - [ps-database](ps-database/src/lib.rs): Implemts the `ps-core::DatabaseLike` trait on top of SQLite - [postsack-native](postsack-native): Builds the native (macOS, Linux, Windows) versions of Postsack - [postsack-web](postsack-web): Builds [the web demo of Postsack](https://terhech.de/postsack_demo) + +## Why Egui? + +I had build an app in [Druid](https://github.com/linebender/druid) last year and I liked the experience. +This time I wanted to try out a different Rust gui library. Between [Iced](https://github.com/iced-rs/iced) +and [Egui](https://github.com/emilk/egui) I went with the latter because the terse code examples were +tempting. Also, I had heard good things about it. + +I might want to try to re-implement the postsack ui in another UI library. However something I really dig +about egui is how quickly it allows building a simple UI for a specific task (say you want to automate +a certain bash script). The main downside was that it is currently very limited in what it can do (e.g. available widgets, configuration, layout options, etc). + +## What does `Postsack` mean? + +[`Postsack` (or Postbeutel) is German](https://de.wikipedia.org/wiki/Postbeutel) for a bag full of mail \ No newline at end of file diff --git a/postsack-native/build_mac.sh b/postsack-native/build_mac.sh index 26f7fbb..d511891 100755 --- a/postsack-native/build_mac.sh +++ b/postsack-native/build_mac.sh @@ -21,12 +21,13 @@ cargo bundle --release rm ../target/release/bundle/osx/Postsack.app/Contents/MacOS/postsack -mv ./postsack ../target/release/bundle/osx/Postsack.app/Contents/MacOS/ +mv ./postsack ../target/release/bundle/osx/Postsack.app/Contents/MacOS/Postsack # Tell the Info.plist or binary is capitalized /usr/libexec/PlistBuddy -c "Set :CFBundleExecutable Postsack" "../target/release/bundle/osx/Postsack.app/Contents/Info.plist" # Create a zip file -/usr/bin/zip -5 -r ../target/postsack.zip ../target/release/bundle/osx/Postsack.app +cd ../target/release/bundle/osx/ +/usr/bin/zip -5 -r ../../../postsack.zip ./Postsack.app echo "Wrote zip file ../target/postsack.zip" diff --git a/postsack-native/build_windows.bat b/postsack-native/build_windows.bat index 7f1b114..60e19fc 100644 --- a/postsack-native/build_windows.bat +++ b/postsack-native/build_windows.bat @@ -1 +1 @@ -cargo build --release \ No newline at end of file +cargo build --release --verbose \ No newline at end of file