Giter Site home page Giter Site logo

roam2obsidian's Introduction

Roam JSON To Obsidian Converter

Fixes w.r.t. repository AnweshGangula/Roam2Obsidian:

  • Handles broken Roam block references
  • Change to the formatting of multi-line blocks
  • Fix code-blocks references: they don't seem to work with Obsidian's embed syntax

This is a forked repository from renerocksai/rj2obs with few more additional features:

  • Convert code-blocks into proper markdown code-blocks
  • enclose any html tags in backtics so that they are not rendered by obsidian - eg: `<br>`
  • replace any underscore(_) in the UID of a block with hyphen(-) as obsidian doesn't support "_" in UID
  • Preview Block-Refs by default
    • I have a custom CSS snippet for my Obsidian vault, that style the block-refs to look similar to Roam Research

Converts Roam JSON export to Obsidian Markdown files.

I wrote this to convert my own roam export into an Obsidian friendly format.

Output has the following directory structure:

  • md/ : contains all normal Markdown files
  • md/daily/: contains all daily notes

Features:

  • Daily note format is changed to YYYY-MM-DD
  • roam's block IDs are appended (only) to blocks actually referenced
    • e.g. * this block gets referenced ^someroamid
  • Blockrefs, block mentions, block embeds are replaced by their content with an appended Obsidian blockref link
    • e.g. this block gets referenced [[orignote#^someblockid]]
  • All notes are prefixed with a yaml header containing title and creation date:
---
title:   
created: YYYY-MM-DD
---
  • Top level roam blocks that don't contain children are not formatted as list
  • Roam blocks containing linebreaks are broken down into multiple bullets
    • roam:
        * line 1
          line 2
        * next block
    • becomes:
        * line 1
        * line 2

        * next block

Note: Please run Obsidian's Markdown importer after this conversion. It will fix #tag links and formattings (todo syntax, highlights, etc).

I might make it more user friendly and less hardcoded later. It did the job, though.

Install

No need to install. But you need python3. Google is your friend.

To install the required python packages:

pip install -r requirements.txt

Usage:

python r2o.py my-roam-export.json

roam2obsidian's People

Contributors

anweshgangula avatar renerocksai avatar edoardob90 avatar

Watchers

James Cloos avatar

Forkers

yatharth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.