Skip to content

Commit

Permalink
Merge pull request #44 from wwsalmon/main
Browse files Browse the repository at this point in the history
0.2.0
  • Loading branch information
wwsalmon authored Jan 1, 2024
2 parents e93999f + 63bac31 commit 0eda2e4
Show file tree
Hide file tree
Showing 18 changed files with 526 additions and 602 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Interview manager

A desktop app for journalists to manage their transcripts and notes from sources.
Transcribe interviews in one click. Made for journalists, by journalists

All data stored locally, works offline (except for uploading files for transcription, checking transcription status, fetching website meta data for obvious reasons).
At the moment IM uses [Rev.ai](https://www.rev.ai/) for transcription -- you can think of it as a user-friendly UI wrapper with a few extra features. You will need to bring your own Rev.ai access token to use the app. The app will guide you through this once you download and run it.

There are plans to switch to [Deepgram](https://deepgram.com/), which should be faster, cheaper and more accurate. The long-shot goal is to figure out a purely on-device transcription model so there is no cost and the app will work completely offline.

## Dev instructions

Setup:
- Install Rust on your computer
- Install packages with `npm i`
- Run dev mode with `npm run tauri dev`

Troubleshooting:
- There are problems with node 20.6.0 related to [this Vite issue](https://github.com/vitejs/vite/issues/14299). 20.7.0 and above should be fine. Run `node --version` to check your node version. Use `nvm` to install the correct version.
109 changes: 63 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "interview-manager",
"private": true,
"version": "0.1.3",
"version": "0.2.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -10,7 +10,7 @@
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^1.3.0",
"@tauri-apps/api": "^1.5.3",
"autoprefixer": "^10.4.14",
"axios": "^1.4.0",
"classnames": "^2.3.2",
Expand All @@ -26,7 +26,7 @@
"tailwindcss": "^3.3.2"
},
"devDependencies": {
"@tauri-apps/cli": "^1.3.1",
"@tauri-apps/cli": "^1.5.8",
"@types/html-escaper": "^3.0.0",
"@types/node": "^18.7.10",
"@types/react": "^18.0.15",
Expand Down
31 changes: 1 addition & 30 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
extern crate reqwest;
extern crate json;

use std::time::Duration;
use std::path::Path;

use reqwest::header::{AUTHORIZATION, ACCEPT};
Expand All @@ -14,30 +13,6 @@ use tokio::fs::File;
use tokio_util::codec::{BytesCodec, FramedRead};
use mime_guess::from_path;

// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
#[tauri::command]
async fn get_meta_from_url(url: &str) -> Result<String, String> {
println!("{:?}", url);

let client = reqwest::Client::builder().timeout(Duration::new(5, 0)).build().map_err(|e| e.to_string())?;

let res = client.get(url).send().await;

let ret = match res {
Ok(body) => {
let res2 = body.text().await.map_err(|e| e.to_string()).into();
let ret2 = match res2 {
Ok(body) => Ok(body.into()),
Err(error) => Err(error.into())
};
return ret2;
},
Err(error) => Err(error.to_string())
};

ret
}

#[tauri::command]
async fn upload_rev(path: &str, key: &str) -> Result<String, String> {
println!("{} {}", path, key);
Expand Down Expand Up @@ -153,7 +128,6 @@ async fn transcript_rev(id: &str, key: &str) -> Result<String, String> {
fn main() {
let firstmenu = Submenu::new("App", Menu::new()
.add_native_item(MenuItem::Quit)
.add_item(CustomMenuItem::new("settings", "Settings").accelerator("cmdOrControl+,"))
);

let filemenu = Submenu::new("File", Menu::new()
Expand Down Expand Up @@ -183,7 +157,7 @@ fn main() {
.add_submenu(windowmenu);

tauri::Builder::default()
.invoke_handler(tauri::generate_handler![get_meta_from_url, upload_rev, check_rev, transcript_rev])
.invoke_handler(tauri::generate_handler![upload_rev, check_rev, transcript_rev])
.menu(menu)
.on_menu_event(|event| match event.menu_item_id() {
"open" => {
Expand All @@ -195,9 +169,6 @@ fn main() {
"save" => {
let _ = event.window().emit("menu-event", "save-event");
}
"settings" => {
let _ = event.window().emit("menu-event", "settings-event");
}
_ => {}
})
.run(tauri::generate_context!())
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "Interview Manager",
"version": "0.1.3"
"version": "0.2.0"
},
"tauri": {
"allowlist": {
Expand Down
Loading

0 comments on commit 0eda2e4

Please sign in to comment.