mirror of
https://github.com/Dasemu/Synapse.git
synced 2026-11-26 15:26:17 +00:00
chore: rebrand remaining Logseq references to Synapse
Describe Synapse's own Markdown dialect, export format and editor behaviour as Synapse's, rename Logseq-named history test identifiers, and set the app label/window titles to Synapse. The importer keeps its Logseq naming. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c4e9b79fa6
commit
adbbc45a56
24 files changed
+31
-31
No files matched your search
@@ -1,7 +1,7 @@
|
||||
# Synapse
|
||||
|
||||
## Overview
|
||||
Native "second brain" notes app (Logseq-like outliner with linked pages and journals) for
|
||||
Native "second brain" notes app (outliner with linked pages and journals, in the vein of Logseq) for
|
||||
Android, Linux and Windows. Rust core shared by a Flutter client (via flutter_rust_bridge)
|
||||
and an optional self-hosted sync server. Local-only (standalone graph) or client-server
|
||||
(online graph). No webviews.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application
|
||||
android:label="synapse"
|
||||
android:label="Synapse"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
|
||||
@@ -96,7 +96,7 @@ final _uuid = RegExp(
|
||||
);
|
||||
final _property = RegExp(r'^([A-Za-z0-9_\-]+):: ?(.*)$');
|
||||
|
||||
/// Renders Logseq-flavoured Markdown of one block into a single [InlineSpan] tree.
|
||||
/// Renders Synapse outline Markdown of one block into a single [InlineSpan] tree.
|
||||
class BlockRenderer {
|
||||
BlockRenderer(this.ctx);
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ abstract class SynapseGraph implements RustOpaqueInterface {
|
||||
Future<PageData> openPage({required String title});
|
||||
|
||||
/// Shift-Tab: the block moves right after its parent, adopting its following siblings as
|
||||
/// children so it keeps its visual place (Logseq's default outdenting).
|
||||
/// children so it keeps its visual place (direct outdenting).
|
||||
Future<List<BlockDto>> outdentBlock({required String id});
|
||||
|
||||
/// Current outline of a page.
|
||||
|
||||
@@ -5341,7 +5341,7 @@ class SynapseGraphImpl extends RustOpaque implements SynapseGraph {
|
||||
.crateApiGraphSynapseGraphOpenPage(that: this, title: title);
|
||||
|
||||
/// Shift-Tab: the block moves right after its parent, adopting its following siblings as
|
||||
/// children so it keeps its visual place (Logseq's default outdenting).
|
||||
/// children so it keeps its visual place (direct outdenting).
|
||||
Future<List<BlockDto>> outdentBlock({required String id}) => RustLib
|
||||
.instance
|
||||
.api
|
||||
|
||||
@@ -45,11 +45,11 @@ static void my_application_activate(GApplication* application) {
|
||||
if (use_header_bar) {
|
||||
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
|
||||
gtk_widget_show(GTK_WIDGET(header_bar));
|
||||
gtk_header_bar_set_title(header_bar, "synapse");
|
||||
gtk_header_bar_set_title(header_bar, "Synapse");
|
||||
gtk_header_bar_set_show_close_button(header_bar, TRUE);
|
||||
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
|
||||
} else {
|
||||
gtk_window_set_title(window, "synapse");
|
||||
gtk_window_set_title(window, "Synapse");
|
||||
}
|
||||
|
||||
gtk_window_set_default_size(window, 1280, 720);
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
name: synapse
|
||||
description: "Synapse: a native, Logseq-like second brain."
|
||||
description: "Synapse: a native second brain: outliner notes with linked pages and journals."
|
||||
publish_to: 'none'
|
||||
version: 0.1.0+1
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ void main() {
|
||||
await tester.pump();
|
||||
expect(h.local, [(0, 'a'), (1, 'b'), (1, 'c')]);
|
||||
|
||||
// Outdenting `b` adopts `c` (Logseq's direct outdenting).
|
||||
// Outdenting `b` adopts `c` (direct outdenting).
|
||||
await edit(tester, h, 'b');
|
||||
await withShift(tester, LogicalKeyboardKey.tab);
|
||||
expect(h.local, [(0, 'a'), (0, 'b'), (1, 'c')]);
|
||||
|
||||
@@ -90,12 +90,12 @@ BEGIN
|
||||
BLOCK "040904e4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "dasemu" "\0"
|
||||
VALUE "FileDescription", "synapse" "\0"
|
||||
VALUE "FileDescription", "Synapse" "\0"
|
||||
VALUE "FileVersion", VERSION_AS_STRING "\0"
|
||||
VALUE "InternalName", "synapse" "\0"
|
||||
VALUE "InternalName", "Synapse" "\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2026 dasemu. All rights reserved." "\0"
|
||||
VALUE "OriginalFilename", "synapse.exe" "\0"
|
||||
VALUE "ProductName", "synapse" "\0"
|
||||
VALUE "ProductName", "Synapse" "\0"
|
||||
VALUE "ProductVersion", VERSION_AS_STRING "\0"
|
||||
END
|
||||
END
|
||||
|
||||
@@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
||||
FlutterWindow window(project);
|
||||
Win32Window::Point origin(10, 10);
|
||||
Win32Window::Size size(1280, 720);
|
||||
if (!window.Create(L"synapse", origin, size)) {
|
||||
if (!window.Create(L"Synapse", origin, size)) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
window.SetQuitOnClose(true);
|
||||
|
||||
@@ -366,7 +366,7 @@ pub struct TaskSuggestion {
|
||||
}
|
||||
|
||||
impl TaskSuggestion {
|
||||
/// Logseq block content: `TODO [#A] text` plus a `DEADLINE:` line when there is a due date.
|
||||
/// Synapse block content: `TODO [#A] text` plus a `DEADLINE:` line when there is a due date.
|
||||
pub fn to_block_content(&self) -> String {
|
||||
let mut s = String::from("TODO ");
|
||||
if let Some(p) = self.priority {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Logseq task syntax <-> VTODO fields.
|
||||
//! Synapse task syntax <-> VTODO fields.
|
||||
//!
|
||||
//! ```text
|
||||
//! TODO [#A] Pay rent
|
||||
|
||||
@@ -4,7 +4,7 @@ use uuid::Uuid;
|
||||
|
||||
pub type PageId = Uuid;
|
||||
pub type BlockId = Uuid;
|
||||
/// Free-form properties (`key:: value` in Logseq).
|
||||
/// Free-form properties (`key:: value` in block Markdown).
|
||||
pub type Properties = serde_json::Map<String, serde_json::Value>;
|
||||
|
||||
pub fn new_id() -> Uuid {
|
||||
@@ -97,7 +97,7 @@ pub struct Block {
|
||||
pub parent_id: Option<BlockId>,
|
||||
/// Fractional index among siblings (see [`crate::position`]).
|
||||
pub position: String,
|
||||
/// Logseq-flavoured Markdown (rich text source of truth).
|
||||
/// Synapse outline Markdown (rich text source of truth).
|
||||
pub content: String,
|
||||
pub properties: Properties,
|
||||
pub collapsed: bool,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Extracts references from Logseq-flavoured Markdown block content.
|
||||
//! Extracts references from Synapse outline Markdown block content.
|
||||
|
||||
use crate::model::RefKind;
|
||||
use uuid::Uuid;
|
||||
|
||||
@@ -67,7 +67,7 @@ impl SynapseGraph {
|
||||
}
|
||||
|
||||
/// Shift-Tab: the block moves right after its parent, adopting its following siblings as
|
||||
/// children so it keeps its visual place (Logseq's default outdenting).
|
||||
/// children so it keeps its visual place (direct outdenting).
|
||||
pub fn outdent_block(&self, id: String) -> Result<Vec<BlockDto>> {
|
||||
let g = self.lock();
|
||||
let b = get(&g, parse_id(&id)?)?;
|
||||
|
||||
@@ -45,7 +45,7 @@ fn indent_and_outdent_keep_visual_order() {
|
||||
assert_eq!(shape(&rows), vec![(0, "a"), (1, "b"), (1, "c"), (1, "d")]);
|
||||
assert!(rows[0].has_children);
|
||||
|
||||
// Outdenting `c` adopts `d` as its child (Logseq's direct outdenting).
|
||||
// Outdenting `c` adopts `d` as its child (direct outdenting).
|
||||
let rows = g.outdent_block(ids[2].clone()).unwrap();
|
||||
assert_eq!(shape(&rows), vec![(0, "a"), (1, "b"), (0, "c"), (1, "d")]);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Deterministic Logseq-compatible Markdown export of pages.
|
||||
//! Deterministic Markdown export of pages.
|
||||
//!
|
||||
//! Layout: `pages/<encoded title>.md`, `journals/YYYY_MM_DD.md`, `assets.json`.
|
||||
//! A page file starts with page properties (`key:: value`, aliases as `alias:: a, b`),
|
||||
@@ -26,7 +26,7 @@ pub const TAGS_PROP: &str = "synapse-tags";
|
||||
/// Page property with the type names (`synapse-types:: persona, lugar`).
|
||||
pub const TYPES_PROP: &str = "synapse-types";
|
||||
|
||||
/// Encodes a page title as a file name (Logseq "triple-lowbar" format: `/` becomes `___`,
|
||||
/// Encodes a page title as a file name ("triple-lowbar" format: `/` becomes `___`,
|
||||
/// characters illegal on Windows and `%` are percent-encoded).
|
||||
pub fn encode_title(title: &str) -> String {
|
||||
let mut out = String::with_capacity(title.len());
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Parser for the Markdown files produced by [`crate::export`] (and plain Logseq pages).
|
||||
//! Parser for the Markdown files produced by [`crate::export`] (and plain outline pages).
|
||||
|
||||
use crate::export::{DESCRIPTION_PROP, HUBS_PROP, KIND_PROP, TAGS_PROP, TYPES_PROP, parse_value};
|
||||
use serde_json::Value;
|
||||
@@ -224,7 +224,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn logseq_space_indent() {
|
||||
fn space_indent() {
|
||||
let p = parse_page("- a\n - b\n - c\n - d\n");
|
||||
let d: Vec<_> = p.blocks.iter().map(|b| b.depth).collect();
|
||||
assert_eq!(d, [0, 1, 2, 1]);
|
||||
|
||||
@@ -26,7 +26,7 @@ fn at(g: &Graph, ms: i64) {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn export_is_deterministic_and_logseq_shaped() {
|
||||
fn export_is_deterministic_and_outline_shaped() {
|
||||
let (_d, g, _h) = setup();
|
||||
let p = add(&g, "Project/Alpha", &["first", "second"]);
|
||||
let first = g.page_tree(p.id).unwrap()[0].1.clone();
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
- [plan.md](plan.md): product scope and roadmap.
|
||||
- [architecture.md](architecture.md): crates, data model, storage and sync design.
|
||||
- [app.md](app.md): Flutter app and FFI: build/run per platform, editor behaviour.
|
||||
- [import.md](import.md): Logseq importer.
|
||||
- [import.md](import.md): Logseq importer (import source).
|
||||
- [search.md](search.md): full-text, vector and hybrid search, auto-link suggestions.
|
||||
- [ai.md](ai.md): AI providers, keys, graph features.
|
||||
- [history.md](history.md): automatic git snapshots and restore.
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ Commit the regenerated `crates/synapse-ffi/src/frb_generated.rs` and `app/lib/sr
|
||||
## Editor
|
||||
- Blocks render Markdown when idle and become raw-Markdown text fields when focused.
|
||||
- Keys: Enter split (at start: new block above), Shift+Enter newline, Tab/Shift+Tab
|
||||
indent/outdent (Logseq's direct outdenting), Backspace at start merges into the previous
|
||||
indent/outdent (direct outdenting), Backspace at start merges into the previous
|
||||
block, Delete at end pulls the next one in, ↑/↓/←/→ cross block edges, Alt+Shift+↑/↓ move
|
||||
among siblings, Ctrl+↑/↓ collapse/expand, Ctrl+Enter cycles TODO/DONE, Esc leaves editing.
|
||||
- `[[`, `((` auto-pair; `[[`, `#` and `((` open autocomplete (↑/↓, Enter/Tab, Esc).
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ with `If-Match` (or `If-None-Match: *` for creation) and `DELETE` with `If-Match
|
||||
rustls with the bundled webpki roots (self-signed servers are not supported yet).
|
||||
|
||||
## Mapping
|
||||
| Logseq block | VTODO |
|
||||
| Synapse block | VTODO |
|
||||
|---|---|
|
||||
| `TODO`/`LATER` | `STATUS:NEEDS-ACTION` |
|
||||
| `DOING`/`NOW` | `IN-PROCESS` |
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
# History (`synapse-history`)
|
||||
|
||||
Automatic git-like backup of a graph. A bare git repository at `<graph>/history/` holds a
|
||||
deterministic, Logseq-compatible Markdown export; every snapshot is a commit. Plain `git`
|
||||
deterministic Markdown export; every snapshot is a commit. Plain `git`
|
||||
works on it (`git --git-dir=<graph>/history log`, `clone`, ...).
|
||||
|
||||
## Export format
|
||||
- `pages/<title>.md`: title encoded Logseq-style (`/` → `___`, `% < > : " \ | ? *` and control
|
||||
- `pages/<title>.md`: title encoded (`/` → `___`, `% < > : " \ | ? *` and control
|
||||
chars percent-encoded). `journals/YYYY_MM_DD.md` for journals.
|
||||
- File = page properties (`key:: value`, aliases as `alias:: a, b`), then one `- ` bullet per
|
||||
block, nested with tabs; extra content lines and block properties are indented under the
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
# Synapse plan
|
||||
|
||||
## Goals
|
||||
A Logseq-like outliner that fixes what Logseq/Obsidian lack: native performance on Android,
|
||||
An outliner for linked notes and journals that fixes what Logseq/Obsidian lack: native performance on Android,
|
||||
Linux and Windows, a real database instead of re-parsing Markdown on every start, heavy assets
|
||||
handled properly, built-in sync (self-hosted) and backup, semantic search and AI, and a
|
||||
"brain-like" model where connections have strength, memory is episodic (journals) and
|
||||
|
||||
Reference in new issue
Block a user