Skip to content

BytecodeBrewer/notion-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notion Sync (Electron)

Kleine Desktop-App, die Inhalte aus Modul-DBs in eine zentrale "All Tasks" Notion-DB spiegelt – mit Status-GUI, Tray-Mode und persistenter Mapping-Datei.

Voraussetzungen

  • Node.js 20+ (wird mit Electron 38 ausgeliefert)
  • Windows 10/11
  • npm

Installation (Dev)

npm install

.env im Projektroot anlegen:

NOTION_TOKEN=secret_xxx
ALL_TASKS_DB_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
MODULE_DB_IDS=aaa,bbb,ccc      # Komma-getrennt


Start (Dev):

npm run start

Build (Windows)

Build ist unsigniert (bewusst), und liefert dist\win-unpacked\Notion Sync.exe:

npm run build:win


Erster Start im Build erzeugt eine schreibbare Nutzerdatei:

%APPDATA%\Notion Sync\mapping.json (wird vom Programm gelesen/geschrieben)

%APPDATA%\Notion Sync\deleted.json

Die Vorlage sync-files/mapping.json bleibt nur als Template im Paket.

Nützliche Befehle
# Prozesse killen (falls Build-Locks auftreten)
Get-Process "Notion Sync","electron","node" -ErrorAction SilentlyContinue | Stop-Process -Force

# Dist säubern
Remove-Item -Recurse -Force dist

# User-Datenordner öffnen
explorer "$env:APPDATA\Notion Sync"


Typische Stolpersteine & Fixes

ENOENT auf app.asar\sync-files\mapping.json
Ursache: falscher Pfad in Code. Produktiv immer %APPDATA%\Notion Sync\mapping.json nutzen.
Der Main-Prozess setzt process.env.MAPPING_JSON und poller.js verwendet nur diesen Pfad. 

main

Build-Fehler wegen Windows-Signieren
Signieren ist deaktiviert (keine Zertifikate nötig). Falls aktiviert wird, fehlt ein Zertifikat → Build bricht ab.

File in use beim Bauen
App/Tray läuft noch → Prozesse killen (siehe Befehle oben), dann erneut bauen.

Desktop-Icon
Icon kommt aus electron-builder (nicht BrowserWindow({icon})).
Bei falsch angezeigtem Icon Shortcut löschen/neu anlegen oder Icon-Cache von Windows aktualisieren.

Dev/Build Verhalten

Dev: schreibt/liest direkt sync-files/mapping.json.

Build: kopiert Template einmalig nach %APPDATA%\Notion Sync\mapping.json und arbeitet nur dort.

About

Notion Sync merges multiple databases into a single database. It was originally developed for task schedules from different modules/topics, which are combined into a single database where all tasks are displayed in a calendar.

Topics

Resources

Stars

Watchers

Forks

Contributors