~protesilaos/denote

3 2

Denote statistics

Details
Message ID
<e9e5d6ae85984b51067b47f4d8e134fa@prevos.net>
DKIM signature
missing
Download raw message
Dear fellow denoters,

I was playing around and wondering how many notes I have for each 
keyword and found the geeky built-in chart.el.

This code creates a text buffer with a bar chart for the top ten 
keywords.

   (require 'dash)
   (require 'chart)
   (setq keywords (apply #'append
                         (mapcar #'denote--extract-keywords-from-path
                                 (denote--directory-files)))
         keyword-table (sort (-frequencies keywords)
                             (lambda (a b) (> (cdr a) (cdr b)))))

   (chart-bar-quickie
    'vertical
    "Denote Keywords"
    (mapcar #'car keyword-table) "Keyword"
    (mapcar #'cdr keyword-table) "Frequency" 10)


Oh, and this beauty visualises which extensions you use: 
(chart-file-count denote-directory).

Regards


P:)

-- 
Dr Peter Prevos
  ---------------
peterprevos.com
Details
Message ID
<87zggm6kl3.fsf@protesilaos.com>
In-Reply-To
<e9e5d6ae85984b51067b47f4d8e134fa@prevos.net> (view parent)
DKIM signature
missing
Download raw message
> From: Peter Prevos <peter@prevos.net>
> Date: Wed, 03 Aug 2022 13:12:54 +1000
>
> Dear fellow denoters,

Hello Peter,

> I was playing around and wondering how many notes I have for each 
> keyword and found the geeky built-in chart.el.
>
> This code creates a text buffer with a bar chart for the top ten 
> keywords.
>
>    (require 'dash)
>    (require 'chart)
>    (setq keywords (apply #'append
>                          (mapcar #'denote--extract-keywords-from-path
>                                  (denote--directory-files)))
>          keyword-table (sort (-frequencies keywords)
>                              (lambda (a b) (> (cdr a) (cdr b)))))
>
>    (chart-bar-quickie
>     'vertical
>     "Denote Keywords"
>     (mapcar #'car keyword-table) "Keyword"
>     (mapcar #'cdr keyword-table) "Frequency" 10)
>
>
> Oh, and this beauty visualises which extensions you use: 
> (chart-file-count denote-directory).

Wonderful!  Thanks for sharing!

I checked my feeds and did not yet see an update on your site.  Will you
post it later?  Can we include this (or a variant thereof) in the Denote
manual?

All the best,
Prot

-- 
Protesilaos Stavrou
https://protesilaos.com
Details
Message ID
<076b9339d1f697330316a9ea88faa003@prevos.net>
In-Reply-To
<87zggm6kl3.fsf@protesilaos.com> (view parent)
DKIM signature
missing
Download raw message
Hi Prot,

I have not published this on my blog. Feel free to use this code any way 
you choose.

I am working on a comprehensive article on using Denote with enhanced 
functions (including a package to link to bibliographies), but it will 
take me a few weeks.

One thought I had was a denote-dashboard package to show note 
statistics, with code like the one below. Perhaps leveraging GNUPlot.

Prot, you certainly got me infected with the elips virus.


Regards



---
Dr Peter Prevos
  ---------------
peterprevos.com

On 03-08-2022 14:02, Protesilaos Stavrou wrote:
>> From: Peter Prevos <peter@prevos.net>
>> Date: Wed, 03 Aug 2022 13:12:54 +1000
>> 
>> Dear fellow denoters,
> 
> Hello Peter,
> 
>> I was playing around and wondering how many notes I have for each
>> keyword and found the geeky built-in chart.el.
>> 
>> This code creates a text buffer with a bar chart for the top ten
>> keywords.
>> 
>>    (require 'dash)
>>    (require 'chart)
>>    (setq keywords (apply #'append
>>                          (mapcar #'denote--extract-keywords-from-path
>>                                  (denote--directory-files)))
>>          keyword-table (sort (-frequencies keywords)
>>                              (lambda (a b) (> (cdr a) (cdr b)))))
>> 
>>    (chart-bar-quickie
>>     'vertical
>>     "Denote Keywords"
>>     (mapcar #'car keyword-table) "Keyword"
>>     (mapcar #'cdr keyword-table) "Frequency" 10)
>> 
>> 
>> Oh, and this beauty visualises which extensions you use:
>> (chart-file-count denote-directory).
> 
> Wonderful!  Thanks for sharing!
> 
> I checked my feeds and did not yet see an update on your site.  Will 
> you
> post it later?  Can we include this (or a variant thereof) in the 
> Denote
> manual?
> 
> All the best,
> Prot
Details
Message ID
<877d3p1r72.fsf@protesilaos.com>
In-Reply-To
<076b9339d1f697330316a9ea88faa003@prevos.net> (view parent)
DKIM signature
missing
Download raw message
> From: Peter Prevos <peter@prevos.net>
> Date: Wed, 03 Aug 2022 14:26:23 +1000
>
> Hi Prot,

Hello Peter,

> I have not published this on my blog. Feel free to use this code any way 
> you choose.
>
> I am working on a comprehensive article on using Denote with enhanced 
> functions (including a package to link to bibliographies), but it will 
> take me a few weeks.

In that case, I suggest we wait for the fully fledged implementation.
We are in no hurry, anyway.

> One thought I had was a denote-dashboard package to show note 
> statistics, with code like the one below. Perhaps leveraging GNUPlot.

Sounds like a plan!

> Prot, you certainly got me infected with the elips virus.

I think this is a benign infection.  Haha!

All the best,
Prot

-- 
Protesilaos Stavrou
https://protesilaos.com
Reply to thread Export thread (mbox)