Obsidian plugin
This commit is contained in:
43
obsidian-plugin/README.md
Normal file
43
obsidian-plugin/README.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Dragonroll Sync for Obsidian
|
||||
|
||||
An Obsidian community plugin that imports notes from a Dragonroll campaign and pushes the active
|
||||
Markdown note back to Dragonroll.
|
||||
|
||||
## Install from this repository
|
||||
|
||||
Copy `main.js` and `manifest.json` into:
|
||||
|
||||
```text
|
||||
<vault>/.obsidian/plugins/dragonroll-sync/
|
||||
```
|
||||
|
||||
Then enable **Dragonroll Sync** in Obsidian's Community Plugins settings. The plugin is plain
|
||||
JavaScript and does not need a build step.
|
||||
|
||||
## Connect your account
|
||||
|
||||
Open **Settings → Community plugins → Dragonroll Sync**, enter the Dragonroll API URL and sign in
|
||||
with your Dragonroll username/email and password. The default API URL is
|
||||
`https://dragonroll.aranroig.com/api`; a local server can use `http://localhost:5000/api`.
|
||||
Choose a campaign after signing in. The plugin saves the Dragonroll session token in this vault;
|
||||
Dragonroll sessions expire after 48 hours. The password is not saved.
|
||||
|
||||
## Commands
|
||||
|
||||
- **Import or refresh campaign notes** fetches all campaign notes, including notes inside nested
|
||||
Dragonroll folders, into `Dragonroll/<Campaign>/`. Imported notes keep their folder hierarchy.
|
||||
- **Push active note to Dragonroll** creates the active Markdown note as a root campaign note, or
|
||||
updates its linked Dragonroll note. A note linked to a different campaign cannot be pushed while
|
||||
another campaign is selected.
|
||||
|
||||
The import command adds `dragonrollId`, `dragonrollCampaign`, and `dragonrollTitle` properties to
|
||||
each imported note's frontmatter. These properties link the local file to its remote record and are
|
||||
omitted from the Markdown content sent back to Dragonroll. Pushing a new local note adds those
|
||||
properties as well.
|
||||
|
||||
Import protects local edits. It updates a linked note only when the local copy still matches the
|
||||
last imported/pushed version. If the local copy changed, or both copies changed since the last sync,
|
||||
the plugin keeps the local file and reports it for review. Push is explicit and updates Dragonroll
|
||||
with the active note's current title and content.
|
||||
|
||||
This is an explicit import/push workflow; it does not sync in the background or delete notes.
|
||||
Reference in New Issue
Block a user