Last active
October 5, 2023 01:18
-
-
Save tombarys/f1d5896cddfc655fa72b822de6ecbcbc to your computer and use it in GitHub Desktop.
Show children block count
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Instructions for including the Clojure script (this) into your Roam can be found in my article | |
;; here: https://lifehacky.net/how-to-list-namespaces-and-find-more-in-roam-research-5c25d9f24556 | |
;; Search for section "How to make it work in your Roam?" and think of "better-search" as of "children-block-count" | |
(ns reddit.8-7-2022-reagent | |
(:require [roam.datascript :as rd] | |
[reagent.core :as r] | |
[roam.datascript.reactive :as rdr])) | |
(defn show-num [uid] | |
(r/with-let [*kids (rdr/q '[:find (count ?b) . | |
:in $ ?uid | |
:where | |
[?a :block/uid ?uid] | |
[?b :block/parents ?a]] uid)] | |
[:span @*kids])) | |
(defn main [{:keys [block-uid]}] | |
(show-num block-uid)) |
That would be great! I'm in Thailand. It's 5:50 pm here now
…On Wed, Oct 4, 2023, 5:46 PM Tomáš Baránek ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
If you are ok with it, I can show you via short online meeting. What
timezone are you in? Me CET.
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/tombarys/f1d5896cddfc655fa72b822de6ecbcbc#gistcomment-4713322>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMEJWU6O5EV2D2SDB2MSV7LX5U5ALBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTCNZSGU2DONBUU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
For me in CET, time is -6 hours comparing to ICT. So generally 2pm to 2am your time is ok for me. But I have to find some window. Today I will be online again too late for you. Tommorow we can try around 15:30 your time? Send me your email pls.t
Tomorrow my time 15:30 is good for me.
My email address is ***@***.***
Thank you in advance for your time.
Cheers
Christian
…On Wed, Oct 4, 2023, 8:06 PM Tomáš Baránek ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
For me in CET, time is -6 hours comparing to ICT. So generally 2pm to 2am
your time is ok for me. But I have to find some window. Today I will be
online again too late for you. Tommorow we can try around 15:30 your time?
Send me your email pls.t
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/tombarys/f1d5896cddfc655fa72b822de6ecbcbc#gistcomment-4713444>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMEJWU5PMBMERHBN4AEXDY3X5VNMVBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTCNZSGU2DONBUU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
Sorry, Christian, your e-mail is hidden as of GitHub policy. Please write me through the https://barys.me form (remember to fill in the e-mail) at the bottom left. I will send you a Zoom link then at 15:30 ICT. :)
Done!
Thank you and see you soon.
Christian
…On Thu, Oct 5, 2023 at 1:54 AM Tomáš Baránek ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
Sorry, Christian, your e-mail is hidden as of GitHub policy. Please write
me through the https://barys.me form (remember to fill in the e-mail) at
the bottom left. I will send you a Zoom link then at 15:30 ICT. :)
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/tombarys/f1d5896cddfc655fa72b822de6ecbcbc#gistcomment-4713924>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMEJWU6YJPIGLDZSVAAKOUDX5WWFXBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTCNZSGU2DONBUU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are ok with it, I can show you via short online meeting. What timezone are you in? Me CET.