Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: import from Roam #918

Merged
merged 3 commits into from
Apr 7, 2021
Merged

Conversation

tangjeff0
Copy link
Collaborator

@tangjeff0 tangjeff0 commented Apr 7, 2021

close #561

(/ 3736 3842) 97% clean
(-> (- 1056 2)
    (+ (- 3088 406))))
 1056 pages, 2 shared
 3088 pages, 406 shared
 3736 math, 3842 actual count

When importing a Roam DB that has 3842 pages, 3736 are created in an Athens DB. This could be an error on either Athens's (lossy import) or Roam's side (orphan pages). It's not necessarily lossy.

Import is done by analyzing each :block/string for [[links]] and #tags, rather than using datascript values directly. This is because datascript references such as :block/refs point to entity ids, which may collide with Athens entity ids.

By looking at plain :block/string, it should be easy to reuse the code for markdown import.

src/cljc/athens/patterns.cljc Outdated Show resolved Hide resolved
src/cljs/athens/events.cljs Outdated Show resolved Hide resolved
src/cljs/athens/views/filesystem.cljs Outdated Show resolved Hide resolved
@tangjeff0 tangjeff0 merged commit 1a3ee32 into athensresearch:master Apr 7, 2021
@tangjeff0 tangjeff0 deleted the merge-roam-2 branch April 7, 2021 22:04
korlaism pushed a commit to korlaism/athens that referenced this pull request Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant