Skip to main content
Projects
Maintained

Memos to Journiv Import

A custom Python migration script designed to parse, transform, and import markdown-based micro-journal entries from self-hosted UseMemos into Journiv via its REST API.

The Problem

When self-hosting note-taking and journaling applications, lock-in is always the enemy. After using UseMemos for quick, fleeting micro-journaling and daily logs, I decided to transition my journaling workflow over to Journiv.

While both platforms embrace clean markdown and simple structures, there was no native import pipeline between them. Memos exports data into structured JSON with distinct time-stamping and asset associations, while Journiv expects payloads formatted specifically for its API schema. Rather than manually copying months of logs or letting historical context die in a database dump, I wrote an automated migration script to bridge the two.

What It Does

The script acts as a lightweight extract-transform-load (ETL) pipeline tailored for self-hosted note data:

  • JSON & Markdown Parsing: Traverses the exported UseMemos archive, parsing timestamps, tags, and content blocks.
  • Payload Normalization: Maps Memos metadata (creation dates, visibility, and tags) to the corresponding payload structure expected by Journiv's REST API.
  • Batch Ingestion: Handles authenticated API requests against the target Journiv instance, pacing calls to avoid server-side timeouts or rate limits.
  • Data Integrity: Ensures original entry dates are preserved accurately in the destination timeline rather than overwriting them with the migration timestamp.

Implementation Details

The utility is structured as a single-run, portable CLI script:

  • Configurable Targets: Simple environment or CLI variables for API endpoint URLs, bearer tokens, and export directory paths.
  • Error Handling & Logging: Logs successes and API failure responses per memo ID, allowing for straightforward re-runs if an individual request fails.
  • Zero Bloat: Relies on standard Python libraries alongside requests for clean, predictable execution.

Homelab Takeaway

Building custom migration scripts is a classic rite of passage in self-hosting, especially in the age of LLM tools. Platforms come and go, but as long as a tool gives you access to your data and an open API, you're never truly stuck. This project reinforced the value of choosing self-hosted software with robust, accessible REST endpoints.