Marginalia

pending

by Open Open

A lightweight status bar plugin to display random quotes from Hitokoto or custom lists.

β˜… 3 starsUpdated 3mo agoMITDiscovered via Obsidian Unofficial Plugins
View on GitHub

Marginalia

GitHub release (latest by date) GitHub license Downloads

πŸ‡¨πŸ‡³ δΈ­ζ–‡θ―΄ζ˜Ž (Chinese Documentation)

Utilizing the marginal space of your screen to provide unexpected inspiration for writers.

Marginalia is a lightweight, immersive status bar plugin for Obsidian. It utilizes the status bar space at the bottom of the screen to display quotes, aphorisms, or fragments of inspiration from the "Hitokoto" API, the "Quotable" API (with ZenQuotes fallback), or a custom quote library.

Table of Contents

✨ Features

  • πŸ“ Multiple Data Sources: Supports "Hitokoto" API, "Quotable" API (with ZenQuotes fallback), and local custom lists.
  • πŸ”„ Auto Refresh: Configurable auto-refresh interval (1-60 minutes) to keep inspiration flowing.
  • πŸ”€ Category Selection: Supports filtering for specific types of sentences such as Anime, Literature, Philosophy, Poetry, etc.
  • πŸ“‹ Private Library: Supports adding and managing your own collection of excerpts.
  • πŸ–±οΈ Minimalist Interaction: Hover to view the source, click to refresh immediately, and right-click to copy.
  • πŸ“± Cross-Platform: Perfectly adapted for both Desktop and Mobile UIs.

Feature Demo

  • Local Custom List Mode

local_mode_demo

  • "Hitokoto" API Mode

online_mode_demo

  • Right-click to Copy

copy_demo

πŸ“₯ Installation

Method 1: Install using BRAT Plugin (Recommended for testing)

Before approval in the official store, it is recommended to use the BRAT plugin for installation:

  1. Search for and install BRAT in the Obsidian Community Plugins market.
  2. Open BRAT settings and click Add Beta plugin.
  3. Enter the repository URL: https://github.com/OpeNopEn2007/obsidian-marginalia
  4. Click Add Plugin.

Method 2: Install from Obsidian Community Plugins

Note: The plugin is currently under official review. Once approved, you can search for and install it directly.

  1. Open Obsidian Settings -> Community Plugins.
  2. Turn off "Restricted mode".
  3. Click "Browse" and search for Marginalia.
  4. Click Install and Enable.

Method 3: Manual Installation

  1. Download the latest main.js, manifest.json, and styles.css from the GitHub Releases page.
  2. Place the files into the .obsidian/plugins/marginalia/ folder.
  3. Restart Obsidian and enable the plugin.

πŸ”’ Privacy & Network

Network Access Statement

  • When using Hitokoto API as the data source, the plugin periodically accesses https://v1.hitokoto.cn/ to fetch random quotes.
  • When using Quotable API as the data source, the plugin accesses https://api.quotable.io/random (and falls back to https://zenquotes.io/api/random from ZenQuotes if needed).
  • When using Local Custom List, the plugin does not generate any network requests.

Privacy Commitment

  • No User Data Collection: The plugin does not collect, store, or transmit any personal information or usage data.
  • No User Tracking: The plugin does not track any user actions or preferences.
  • Transparent Data Usage: All network requests are solely for fetching public quote content and do not contain any user identification information.

Offline Support

Even in a completely offline environment, the plugin works normally; simply switch the data source to "Local Custom List".

βš™οΈ Configuration

1. Data Source Settings

  • "Hitokoto" API: Fetches random quotes via the internet.
  • "Quotable" API: Fetches random quotes via the internet (with ZenQuotes fallback).
  • Local Custom List: Displays locally configured content only, available offline.

2. "Hitokoto" Category Reference

CodeCategoryCodeCategoryCodeCategory
aAnimeeOriginaliPoetry
bMangafInternetjNetease Cloud
cGamegOtherkPhilosophy
dLiteraturehFilm & TVlClever/Witty

3. Custom Quote Format

Supports plain text or text with a source, one per line:

Here is the quote content
Here is the quote content | Here is the author/source

πŸ› οΈ Development

If you are a developer or want to modify the source code yourself, please refer to the following process.

Environment Requirements

  • Node.js 16+
  • npm or yarn

Quick Start

  1. Clone the repository and install dependencies:
git clone https://github.com/OpeNopEn2007/obsidian-marginalia.git
cd obsidian-marginalia
npm install
  1. Configure Auto-Deployment Environment (Optional): This project supports automatically syncing the built plugin to your Obsidian test vault during development.
  • Copy the .env.example file in the root directory and rename it to .env.
  • Modify OBSIDIAN_VAULT_PATH in the .env file to the absolute path of your local Obsidian plugins directory.
# .env Example
OBSIDIAN_VAULT_PATH=D:\Vault\MyTestVault\.obsidian\plugins\marginalia
  • Note: The .env file is ignored by git, so your path privacy will not be uploaded.
  1. Start Development Mode:
npm run dev

At this point, modifying the code will automatically trigger a recompile (and sync to your test vault). You can see the effect in Obsidian by running the command Reload app without saving.

  1. Build Production Version:
npm run build

The build artifacts will be output to the ./marginalia directory.

Project Structure

Marginalia/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ services/           # Quote services and local quote manager
β”‚   β”‚   β”œβ”€β”€ hitokoto.ts     # Hitokoto API (with category support)
β”‚   β”‚   β”œβ”€β”€ quotable.ts     # Quotable API (with ZenQuotes fallback)
β”‚   β”‚   └── quoteManager.ts # Local custom quote parsing + randomization
β”‚   β”œβ”€β”€ ui/
β”‚   β”‚   └── statusBar.ts    # Status bar UI component
β”‚   β”œβ”€β”€ main.ts             # Plugin entry point
β”‚   └── settings.ts         # Settings panel logic
β”œβ”€β”€ esbuild.config.mjs      # Build configuration (includes auto-deployment logic)
β”œβ”€β”€ .env.example            # Environment variable example
└── manifest.json           # Plugin manifest file

πŸ“œ License

MIT License. Copyright (c) 2025 Open Open.

🀝 Contribution & Contact

Issues for bug reports and Pull Requests for code contributions are welcome!

πŸ“… Changelog

v1.1.0

  • ✨ New Feature: Added "Quotable" API as a new data source (with ZenQuotes fallback).
  • βš™οΈ Settings: Added data source selection (Hitokoto / Quotable / Local Custom List).
  • 🌐 Locale: Improved default data source selection based on UI language (Chinese β†’ Hitokoto, others β†’ Quotable).
  • πŸ“ Docs: Updated README network statement and project structure.

v1.0.0.5

  • πŸ› Fix: Fixed the main field in the manifest file.

v1.0.0.4

  • ✨ New Feature: Implemented a brand new floating Tooltip with smooth fade-in/out animations.
  • 🎨 UI Optimization: Replaced status bar Emojis with Obsidian native Lucide icons for a more unified visual style.
  • πŸ› Fix: Fixed Hitokoto API request parameter format errors.
  • ⚑ Performance: Added Debounce processing to input boxes in the settings panel to avoid frequent refreshing.

v1.0.0.3

  • πŸ”§ Engineering: Refactored build scripts to support automatic file distribution to specified directories.
  • 🌐 Network: Optimized URL parameter construction logic to comply with RESTful specifications.

v1.0.0.2

  • ⚑ Algorithm Optimization: Fixed random repetition logic to ensure the same quote is not returned twice in a row.
  • πŸ›‘οΈ Protection Mechanism: Added extra protection for the API; automatically retries if content is repeated.
  • 🎨 UI Purification: Removed Emojis from prompt messages, returning to a pure text minimalist style.

v1.0.0.1

  • πŸ’„ UI Refinement: Optimized status bar hover tooltip logic to only display the source attribute.

v1.0.0.0

  • πŸ”¨ Build Optimization: Modified build scripts to implement automated folder distribution build flow.
  • πŸ“ Documentation: Updated author information, officially signed as Open Open.

v1.0.0

  • πŸŽ‰ Initial Release.
  • Supports Hitokoto API and local custom lists.
  • Supports auto-refresh (1-60 minutes) and manual click refresh.
  • Supports right-click to copy.
  • Supports multiple Hitokoto category selections.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.