Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BRAND.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ A letter **E** drawn with one stroke width on a 96-unit grid, then cut on a slan

- The product is **EditsMaker**: one word, capital E, capital M. The command is **`edits`**, always in code type.
- In sentences: "EditsMaker cuts…", never "the EditsMaker", never "Edits Maker" or "EDITSMAKER".
- The line is **Link in. Edits out.** with two full stops. It is never translated inside the logo lockup.
- The line is **The AI video harness.** with one full stop. It is never translated inside the logo lockup.

## 3. Colour

Expand Down Expand Up @@ -126,7 +126,7 @@ Our comparisons have to survive someone checking them.

The first and the last things on a page are the ones people remember best (the serial position effect) [10]. So the page opens with what it is and how to get it, and closes with how to install it:

1. **Title**: the mark and the name, centred, "Link in. Edits out." Nothing above it.
1. **Title**: the mark and the name, centred, "The AI video harness." Nothing above it.
2. **Download** band, red, linking to Install.
3. **Badges**: up to six chips, one red.
4. **Made with it**: the videos; proof before claims.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "edits"
version = "0.32.0"
version = "0.33.0"
edition = "2021"
description = "One small download (under 15 MB, with its desktop app) that turns any YouTube link, channel or topic into viral TikTok, Reels and Shorts edits: Alight Motion and Premiere presets, trending songs, beat-synced cuts, captions, colour looks, MCP server for AI agents."
repository = "https://github.com/OnurByte/EditsMaker"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/readme/hero-dark.svg">
<img src="assets/readme/hero-light.svg" width="100%" alt="EditsMaker. Link in. Edits out.">
<img src="assets/readme/hero-light.svg" width="100%" alt="EditsMaker. The AI video harness.">
</picture>

<a href="#install">
Expand Down
1 change: 1 addition & 0 deletions assets/illustrations/schedule.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/readme/hero-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/readme/hero-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ echo "edits: installed $("$BIN/edits" --version) to $BIN/edits"
# the app (edits app) in the launcher: a .desktop entry on Linux, an app bundle on macOS (its notifications need one)
case "$(uname -s)" in
Linux)
A="${XDG_DATA_HOME:-$HOME/.local/share}/applications"; mkdir -p "$A"
printf '[Desktop Entry]\nType=Application\nName=EditsMaker\nComment=Link in. Edits out.\nExec=%s app\nIcon=video-x-generic\nCategories=AudioVideo;Video;\nStartupWMClass=edits\n' "$BIN/edits" > "$A/edits.desktop" ;;
# edits writes its own .desktop entry and icon (and mends them each time the app starts)
"$BIN/edits" app --launcher || true ;;
Darwin)
C="$HOME/Applications/EditsMaker.app/Contents"; mkdir -p "$C/MacOS"
# started by this name, edits opens its app
Expand Down
35 changes: 32 additions & 3 deletions src/app/chat_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,51 @@ impl Workspace {
}
}

/// t3code's TimelineMinimap: a short line for each item down the timeline's right edge, the one in view
/// highlighted; a click jumps to it, the chevrons step one up or down.
fn minimap(&self, n: usize, b: &Brand, cx: &mut Context<Self>) -> impl IntoElement {
let at = self.timeline_scroll.logical_scroll_top().0.min(n - 1);
let jump = |to: usize| move |this: &mut Self, _: &ClickEvent, _: &mut Window, cx: &mut Context<Self>| {
this.timeline_scroll.scroll_to_top_of_item(to);
cx.notify();
};
let (hover, gray, ink) = (b.card, b.gray, b.ink);
let chevron = |id: &'static str, i: Icon, to: usize, cx: &mut Context<Self>| div().id(id).size(px(20.)).flex().items_center().justify_center().rounded(px(4.)).cursor_pointer()
.hover(move |s| s.bg(hover)).child(icon(i, gray).size(px(12.))).on_click(cx.listener(jump(to)));
div().absolute().right(px(8.)).top_0().bottom_0().flex().flex_col().justify_center()
.child(div().py(px(6.)).px(px(4.)).flex().flex_col().items_end().gap(px(2.)).rounded(px(8.))
.child(chevron("mini-up", Icon::ChevronUp, at.saturating_sub(1), cx))
.children((0..n).map(|i| {
let on = i == at;
div().id(("mini", i)).w(px(20.)).h(px(10.)).flex().items_center().justify_end().cursor_pointer()
.child(div().h(px(2.)).w(px(if on { 16. } else { 10. })).rounded(px(1.)).bg(if on { ink } else { gray.opacity(0.6) }))
.on_click(cx.listener(jump(i)))
}))
.child(chevron("mini-down", Icon::ChevronDown, (at + 1).min(n - 1), cx)))
}

pub fn chat_view(&self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let b = brand(cx);
let composer = div().flex_none().px(px(24.)).pb(px(24.)).child(self.composer(window, cx));
if self.route == Route::New {
return div().size_full().flex().flex_col()
.child(div().flex_1().flex().flex_col().items_center().justify_center().gap(px(16.)).px(px(24.))
.child(crate::app::icons::mark(b.ink).size(px(48.)))
.child(text("Link in. Edits out.", 32., BOLD, b.ink))
.child(text("The AI video harness.", 32., BOLD, b.ink))
.child(text("A YouTube video or channel, a topic, or a video file: drop one anywhere here.", 15., LIGHT, b.gray).max_w(px(420.)).text_center()))
.child(composer);
}
let (subject, title, folder, items) = self.timeline(cx);
let n = items.len();
// each item its own child of the scroll, so the minimap can jump to it
let rows = items.into_iter().map(|it| div().w_full().max_w(theme::column()).mx_auto().px(px(24.)).pt(px(24.)).child(it));
div().size_full().flex().flex_col()
.child(self.header(&subject, title, folder, &b))
.child(div().id("timeline").flex_1().min_h_0().overflow_y_scroll()
.child(div().w_full().max_w(theme::column()).mx_auto().px(px(24.)).py(px(24.)).flex().flex_col().gap(px(24.)).children(items)))
.child(div().flex_1().min_h_0().relative()
.child(div().id("timeline").size_full().overflow_y_scroll().track_scroll(&self.timeline_scroll).pb(px(24.))
// the minimap follows what is in view
.on_scroll(cx.listener(|_, _, _, cx| cx.notify())).flex().flex_col().children(rows))
.when(n >= 2, |d| d.child(self.minimap(n, &b, cx))))
.child(composer)
}
}
2 changes: 1 addition & 1 deletion src/app/discord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn doing(what: String) {
pub fn activity(doing: &str, since: u64, nonce: u64) -> Value {
let mut a = json!({
"details": if doing.is_empty() { "Making edits" } else { doing },
"state": "Link in. Edits out.",
"state": "The AI video harness.",
"timestamps": {"start": since},
"assets": {"large_image": ICON, "large_text": "EditsMaker"},
"buttons": [{"label": "Download EditsMaker", "url": DOWNLOAD}],
Expand Down
14 changes: 8 additions & 6 deletions src/app/flows.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Flows, as in n8n but in one line each: a topic (the news on it, from a topic pack) or a channel, made into edits,
//! posted to accounts. Each is an `edits follow`; `edits watch` (or the background service) runs them.
use crate::app::icons::{icon, Icon};
use crate::app::icons::{icon, illustration, Icon};
use crate::app::runs::Flow;
use crate::app::theme::{Brand, BOLD, LIGHT};
use crate::app::ui::{card, pill, primary, text};
Expand Down Expand Up @@ -80,13 +80,15 @@ impl Workspace {
}))
}));
let source = self.picker_pill("flow-source", Icon::Workflow, self.flow_source.clone().unwrap_or_else(|| "Pick a topic".into()), Picker::FlowSource, b, cx);
let label = |s: &'static str| text(s, 13., BOLD, b.ink).w(px(96.)).flex_none();
// each step with its micro illustration: what it is about, how it is made, where it goes, how often
let label = |s: &'static str, art: &'static str| div().w(px(152.)).flex_none().flex().items_center().gap(px(8.))
.child(illustration(art).w(px(48.)).h(px(36.)).flex_none()).child(text(s, 13., BOLD, b.ink));
let new = card(b).gap(px(16.))
.child(div().flex().items_center().gap(px(16.)).child(label("About")).child(source))
.child(div().flex().items_center().gap(px(16.)).child(label("About", "topics")).child(source))
.when(self.picker == Some(Picker::FlowSource), |d| d.child(self.picker_list(Picker::FlowSource, b, cx)))
.child(div().flex().items_center().gap(px(16.)).child(label("Made with")).child(text(self.preset.clone().unwrap_or_else(|| "the composer's preset (none now)".into()), 13., FontWeight::NORMAL, b.gray)))
.child(div().flex().items_center().gap(px(16.)).child(label("Posted to")).child(post))
.child(div().flex().items_center().gap(px(16.)).child(label("Every")).child(every))
.child(div().flex().items_center().gap(px(16.)).child(label("Made with", "styles")).child(text(self.preset.clone().unwrap_or_else(|| "the composer's preset (none now)".into()), 13., FontWeight::NORMAL, b.gray)))
.child(div().flex().items_center().gap(px(16.)).child(label("Posted to", "accounts")).child(post))
.child(div().flex().items_center().gap(px(16.)).child(label("Every", "schedule")).child(every))
.child(div().flex().gap(px(8.))
.child(primary("make-flow", "Make the flow", b).on_click(cx.listener(|this, _, window, cx| {
let Some(src) = this.flow_source.clone() else { return };
Expand Down
10 changes: 8 additions & 2 deletions src/app/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use gpui_kit::{img, Hsla, Image, ImageFormat, Img, Rgba, Styled};
use std::sync::{Arc, LazyLock};

gpui_kit::assets::icon_assets!(pub Extra, [Trash, Rss, Film, Package, Download, Share2, Zap, Store, SquarePen, SlidersHorizontal, KeyRound, Brain, Library, PanelLeft,
Upload, FileDown, GitBranch, ExternalLink, Gauge, Box, ChevronDown, LockOpen, Lock, Check, RotateCcw, ChevronRight, Pause, Volume2, VolumeX]);
Upload, FileDown, GitBranch, ExternalLink, Gauge, Box, ChevronDown, LockOpen, Lock, Check, RotateCcw, ChevronRight, Pause, Volume2, VolumeX, ArrowLeft, ArrowRight, ChevronUp]);

#[derive(Clone, Copy, PartialEq, Eq, Hash)]
pub enum Icon {
Expand Down Expand Up @@ -55,6 +55,9 @@ pub enum Icon {
Pause,
Volume,
Mute,
Back,
Forward,
ChevronUp,
}

fn name(i: Icon) -> IconName {
Expand Down Expand Up @@ -103,6 +106,9 @@ fn name(i: Icon) -> IconName {
Icon::Pause => IconName::Pause,
Icon::Volume => IconName::Volume2,
Icon::Mute => IconName::VolumeX,
Icon::Back => IconName::ArrowLeft,
Icon::Forward => IconName::ArrowRight,
Icon::ChevronUp => IconName::ChevronUp,
}
}

Expand Down Expand Up @@ -190,7 +196,7 @@ pub fn illustration(name: &str) -> Img {
match name { $($f => include_str!(concat!("../../assets/illustrations/", $f, ".svg")),)* _ => include_str!("../../assets/illustrations/styles.svg") }
};
}
let src = art!("styles", "topics", "automations", "skills", "scene", "library", "search", "community", "hello", "brain", "agents", "accounts", "folder", "ready");
let src = art!("styles", "topics", "automations", "skills", "scene", "library", "search", "community", "hello", "brain", "agents", "accounts", "folder", "ready", "schedule");
// on a dark page the pale backdrop would turn muddy: it is drawn whole, as a sticker
let dark = ILLUSTRATIONS_DARK.load(std::sync::atomic::Ordering::Relaxed);
picture(&format!("art:{name}:{dark}"), || {
Expand Down
15 changes: 14 additions & 1 deletion src/app/marketplace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,21 @@ impl Workspace {
.child(div().flex().items_center().gap(px(8.)).child(text(if on { "On" } else { "Off" }, 13., BOLD, if on { b.ink } else { b.gray })).child(toggle)))
.child(text(p.description.clone(), 15., LIGHT, b.ink))
.when(!inside.is_empty(), |d| d.child(card(&b).bg(b.page).gap(px(4.))
.child(text(if !p.presets.is_empty() { "Its styles" } else if !p.topics.is_empty() { "Its topics" } else { "What it does" }, 13., BOLD, b.gray).pb(px(4.)))
.child(div().flex().items_center().gap(px(8.)).pb(px(4.))
.child(illustration(art(&p)).w(px(40.)).h(px(30.)))
.child(text(if !p.presets.is_empty() { "Its styles" } else if !p.topics.is_empty() { "Its topics" } else { "What it does" }, 13., BOLD, b.gray)))
.children(inside)))
// a pack that runs by itself: how it goes, each step with its illustration
.when(runs_something(&p.kinds) || p.is("feed"), |d| d.child(card(&b).bg(b.page).gap(px(12.))
.child(text("How it runs", 13., BOLD, b.gray))
.child(div().flex().items_center().gap(px(8.)).children([
("topics", if p.is("feed") { "A new story comes in" } else if p.is("source") { "It finds something new" } else { "An edit is ready" }),
("styles", "edits makes the video"),
("accounts", if p.is("automation") { "It goes up on your account" } else { "It is posted, if you say where" }),
].into_iter().enumerate().map(|(i, (a, said))| div().flex_1().flex().flex_col().items_center().gap(px(4.))
.child(illustration(a).w(px(72.)).h(px(54.)))
.child(text(format!("{}. {said}", i + 1), 12., FontWeight::NORMAL, b.ink).text_center()))))
.when(!on, |d| d.child(text("It starts off: turn it on above when you want it to run.", 12., LIGHT, b.gray)))))
.children(p.from.clone().map(|f| text(format!("From {f}"), 12., FontWeight::NORMAL, b.gray)))
.child(div().pt(px(8.)).border_t_1().border_color(b.hair).flex().flex_wrap().items_center().gap(px(8.)).children(actions)));
Some(div().absolute().inset_0().flex().items_center().justify_center().child(backdrop).child(body).into_any_element())
Expand Down
45 changes: 45 additions & 0 deletions src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use std::path::PathBuf;

actions!(edits, [Quit, ToggleSidebar, Search]);


/// gpui-kit's own icons, and the Lucide ones the app adds.
struct AppAssets;

Expand All @@ -50,7 +51,42 @@ extern "system" {
fn FreeConsole() -> i32;
}

/// The app in the Linux launcher: its icon in the user's icon theme and a .desktop entry naming it, written again when
/// they differ (an old install pointed at a stock icon that shows blank). Done each start, so `edits update` mends it.
pub fn launcher() -> std::io::Result<()> {
if !cfg!(target_os = "linux") {
return Ok(());
}
let data = std::env::var_os("XDG_DATA_HOME").map(PathBuf::from).unwrap_or_else(|| crate::util::home().join(".local/share"));
let exe = std::env::current_exe()?;
// a cargo build is someone working on edits: the launcher stays on the installed one
if exe.components().any(|c| c.as_os_str() == "target") {
return Ok(());
}
let files: [(PathBuf, Vec<u8>); 3] = [
(data.join("icons/hicolor/scalable/apps/edits.svg"), include_bytes!("../../assets/icon.svg").to_vec()),
(data.join("icons/hicolor/512x512/apps/edits.png"), include_bytes!("../../assets/icon.png").to_vec()),
(data.join("applications/edits.desktop"), desktop_entry(&exe).into_bytes()),
];
for (f, bytes) in files {
if std::fs::read(&f).ok().as_deref() != Some(&bytes[..]) {
std::fs::create_dir_all(f.parent().unwrap_or(std::path::Path::new(".")))?;
std::fs::write(&f, bytes)?;
}
}
Ok(())
}

pub fn desktop_entry(exe: &std::path::Path) -> String {
format!("[Desktop Entry]\nType=Application\nName=EditsMaker\nComment=The AI video harness.\nExec={} app\nIcon=edits\nCategories=AudioVideo;Video;\nStartupWMClass=edits\n", exe.display())
}

pub fn run(args: &[String]) {
let _ = launcher();
// the installer's step: the launcher written, nothing opened
if args.iter().any(|a| a == "--launcher") {
return;
}
// started from the Start menu, edits.exe has a console it does not need
#[cfg(windows)]
unsafe {
Expand Down Expand Up @@ -110,3 +146,12 @@ pub fn run(args: &[String]) {
cx.activate(true);
});
}

#[cfg(test)]
mod launcher_tests {
#[test]
fn the_launcher_names_its_own_icon() {
let d = super::desktop_entry(std::path::Path::new("/home/a/.local/bin/edits"));
assert!(d.contains("Icon=edits\n") && d.contains("Exec=/home/a/.local/bin/edits app\n") && !d.contains("video-x-generic"));
}
}
Loading
Loading