[Library] SilverInk: handwriting input (+ external OCR)

Check it out here: ppsblib/Repositories/ppenguin.md at silverink · ppenguin/ppsblib · GitHub
and let me know what you think.

Objective is to make use with a tablet and pen (i.e. predominantly without keyboard) useful for taking notes and (probably) post-process later with minimal effort.

I added a small QuickAccess plug so you can quickly access functions without mouse or keyboard.

In SilverInk, handwriting is done on a large canvas that records and remembers all strokes, which you can then insert as a standard inline SVG (or generate in-place Markdown via OCR) in your page. The original data is linked via generated comments, so subsequent edits (or deletions) are possible.

It also sports AI powered OCR (for now tested with local Ollama gemma3:4b) which works reasonably well, even for bad handwriting :wink:

Cheers,
ppenguin

I can imagine some quality of life features, but it is great!

Thank you!

Thanks, been enjoying your Silverware a lot btw! I'm interested in your QoL suggestions, especially because you've been a prolific contrib in SB and SilverInk really is not much more than a rough PoC for now. By all means shoot, or directly modify/PR/fork if you like :wink:
(I'll probably not get around to serious hacks in the next weeks, too many other priorities now)

Thanks, glad you're enjoying Silverware! Here are the QoL ideas I had in mind, roughly grouped:

Drawing

  • Stroke colors (a small palette, maybe with a custom color picker)
  • Stroke width
  • Pen pressure sensitivity (variable stroke width based on pressure)
  • Optional shape recognition: line, rectangle, triangle, circle, ellipse (as a toggle, so freehand stays freehand when you want it)

Editing

  • A select tool to pick strokes and move them around, or delete the selection

S Pen / stylus button

  • The S Pen button integration is unfortunately quite limited, but the button press itself can be detected during the hover phase. It could be used to toggle a tool (e.g. eraser), or you could hold the button and hover over strokes (without touching the screen) to select them.

UI / UX

  • Automatically use the dark theme based on SB's current theme
  • On mobile, the toolbar icons take up a lot of unnecessary space; the layout could use some rethinking (collapsible toolbar, overflow menu, etc.)

SilverBullet integration

  • Option to embed a preview directly in the Markdown page: a thumbnail that opens the sketch for editing when clicked. The goal is a seamless workflow:
    1. Type /ink and the plugin inserts a custom code block (with the sketch metadata) and creates the ink page at the same time.
    2. The embedded block has a small menu with an "Edit drawing" option that opens the sketch.
    3. When you close the sketch, you're taken back to the Markdown page with the preview already updated.
  • Save sketches under the active page where they're created, so it's immediately clear which page they belong to

No rush at all, these are just ideas for whenever you get back to it. I might take a look at some of them myself later on, but right now I'm focused on a big new feature for Silverware.