https://github.com/aatmunbaxi/org-roam-pygraph
Python library to build graphs out of org-roam collections
https://github.com/aatmunbaxi/org-roam-pygraph
org-mode org-roam org-roam-ui personal-knowledge-management python
Last synced: 6 months ago
JSON representation
Python library to build graphs out of org-roam collections
- Host: GitHub
- URL: https://github.com/aatmunbaxi/org-roam-pygraph
- Owner: aatmunbaxi
- Created: 2023-05-06T16:23:58.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-27T03:41:33.000Z (almost 2 years ago)
- Last Synced: 2025-03-26T15:09:41.483Z (7 months ago)
- Topics: org-mode, org-roam, org-roam-ui, personal-knowledge-management, python
- Language: Python
- Homepage:
- Size: 716 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
#+title: Your Zettelkasten, usable in Python
#+author: aatmunbaxi
#+created: Sat May 06, 2023*Notice: This library is deprecated in favor of [[https://github.com/aatmunbaxi/orgroamtools][orgroamtools]], a more featureful and now-published library that accomplishes much of the same thing in as close to pure Python as I could make it.*
This repository is kept up for posterity.#+caption: My org-roam database visualized with =networkx=
[[file:images/COVER.svg]]* What is this?
Inspired by [[https://github.com/org-roam/org-roam-ui][org-roam-ui]], this repo provides a python library to convert org-roam collections into graphs workable in numerical python libraries like =numpy= and =pytorch=.See a demo [[file:demo.org][here]].
* Features
- Adjacency matrix of the org-roam network (directed or undirected)
- Adjacency matrix of network as =pandas= dataframe
- Adjacency list of network
- Distance matrix of network (directed or undirected)
- Filter network by tags--exact match or regex--inclusive or exclusive* Prerequisites
- A healthy =org-roam2= database
- Python 3.7+
- =scipy=
- =pandas=
- =numpy=* Getting Started
Clone this repository where you want to use it.
#+begin_src sh
git clone https://github.com/aatmunbaxi/org-roam-pygraph
#+end_srcIt is recommended to use a Python virtual environment.
If you opt to use one, initialize and enter it according to the [[https://docs.python.org/3/library/venv.html][documentation]].
In Unix-like operating systems, you can verify you are inside the virtual environment if the output of
#+begin_src shell
which python
#+end_src
points to virtual environment you created.Install the dependencies
#+begin_src sh
python -m pip install -r requirements.txt
#+end_srcYou can now create a file in the base of the git repo directory and start using the library by adding
#+begin_src python
from lib.RoamGraph import RoamGraph
#+end_src
to the imports (see [[file:example.py][example.py]]).Or you can copy/move the git repo directory to another Python virtual environment.
* Credits
- =org-roam-ui=