عجفت الغور

org-roam

Tags: org-mode

Org-Download

Graphs

  • Groups - https://org-roam.discourse.group/t/analysing-the-semantic-network/56
  • Example:
    ## Fetch data
    library(DBI) # Sqlite
    con <- dbConnect(RSQLite::SQLite(), "org-roam.db")
    dbListTables(con)
    links <- dbSendQuery(con, "SELECT [from], [to] FROM links")
    links <- dbFetch(links)
    titles <- dbSendQuery(con, "SELECT * FROM titles")
    titles <- dbFetch(titles)
    dbDisconnect(con)
    
    ## Create edge list [from - to] with clean labels
    library(dplyr) # Transformation
    library(stringr) # String manipulation
    edges <- inner_join(links, titles, by = c("from" = "file")) %>%
      inner_join(titles, by = c("to" = "file")) %>%
      select(From = titles.x, To = titles.y) %>%
      mutate(From = str_sub(From, 3, -3), # Clean titles
             From = str_replace(From, '" "' ,"/"),
             To = str_sub(To, 3, -3),
             To = str_replace(To, '" "' ,"/"),
             )
    
    ## Visualise and save as png
    library(igraph) # Network analysis
    svg("./org-roam-graph.svg", width = 19200, height = 10800)
    par(mar = rep(0,4))
    g <- graph_from_edgelist(as.matrix(edges), directed = FALSE)
    g <- simplify(g)
    coms <- spinglass.community(g) # Community detection
    plot(coms, g, layout = layout_with_fr,
                vertex.size=degree(g))
    dev.off()
    

Org-roam-bibtex

https://github.com/zaeph/org-roam-bibtex

Org-roam-v2

Org-roam mobile with Plainorg

https://plainorg.com/

Sync on Dropbox, does it work better with task tracking?

Org-roam export

--eval "(run-hooks 'emacs-startup-hook)" --eval "(configuration-layer//load)"  --eval '(org-roam-db-autosync-mode)' --eval '(org-roam-export-all)' > /home/peixian/emacs-export.log 2>&1
(defun org-roam-export-all ()
  ""
  (interactive)
  (org-roam-db-sync)
  (dolist (fil (org-roam--list-files org-roam-directory))
    (if (and (not (string-match-p "private" fil)) (not (string-match-p "hugo_setup" fil)))
        (with-current-buffer (find-file-noselect fil)

          (org-hugo-export-wim-to-md)
          (kill-buffer))
      ))
  )