Git Product home page Git Product logo

gorde's Introduction

Quickstart

The Good Org Roam Development Environment (GORDE) provides a simple set of Org Roam templates & dir-locals.el configurations to create reproducible test environments for Org Roam development.

The goal of this repo is to provide a stable set of templates to generate realistic Org Roam instances that facilitate safer & more efficient development of Org Roam Extensions.

Generate Initial Configuration

Initialize & Reset the environment

Resetting the environment consists of removing any org files in this dir, then repopulating the base files by tangling this file.

To reset, remove the :noeval header arg, then execute the block.

find . -name "*.org" -not -iname "*readme*" | xargs -I {} rm {}

Then tangle this file to generate the core project files.

(org-babel-tangle)
(org-roam-db-sync)

General Local configuration via dir-locals.el

Configure Org Roam behavior within .dir-locals.el to behave relative to this project’s current directory.

A local variable project-root-path holds the base directory name desired for any environment-specific paths.

((nil . ((eval . (setq project-root-path
                       ;; Find out what dir we're in, and ensure we have
                       ;; it in string format.
                       (file-name-directory
                        (let ((curdir (dir-locals-find-file "./")))
                          (if (stringp curdir)
                              curdir
                            (car curdir))))))))
 ;; These two are important, if not set correctly your REAL org roam instance
 ;; may be modified.
 (org-mode . ((eval . (setq-local org-roam-directory project-root-path))
              (eval . (setq-local org-roam-db-location (concat project-root-path ".org-roam.db")))

              ;; We load in some extra languages for convenience
              (eval . (org-babel-do-load-languages 'org-babel-load-languages
                                                   '((sql . t)
                                                     (lisp . t)
                                                     (nix . t)
                                                     (bash . t)
                                                     (sh . t)
                                                     (sqlite . t)
                                                     (org . t)
                                                     (python . t)
                                                     (R . t)
                                                     (shell . t)
                                                     (emacs-lisp . t)))))))

Debugger.org

Work in progress.

To simplify the process of reading some common values sought during development, the Debugger.org file is regularly updated with stats about this development Org Roam instances.

Properties are human readable, and ephemeral. The file updates based on a file-watcher targeting the Gorde directory.

(defun update-debug-dashboard (&optional event debug-dash-file)
  "Update the DEBUG-DASH-FIlE file when EVENT received."
  (message "Type of Event:\t%S" (type-of event))
  (message "test for dupes.....")
  (message "Event:\t%S" event)
                                        ; Find org roam file
                                        ; For each debugging property
                                        ; find the appropriate heading
                                        ; insert new data
                                        ; save & close file
  )

(setq gorde-file-watch-descriptor (file-notify-add-watch
 project-root-path
 '(change attribute-change)
 'update-debug-dashboard))
(file-notify-rm-watch  gorde-file-watch-descriptor)

gorde's People

Contributors

cuttlefisch avatar

Watchers

 avatar

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.