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

日记模板调用bug #808

Closed
itsYunfei opened this issue Aug 11, 2021 · 0 comments
Closed

日记模板调用bug #808

itsYunfei opened this issue Aug 11, 2021 · 0 comments
Assignees
Labels
Milestone

Comments

@itsYunfei
Copy link

日记模板调用出错

日记模板内容

.action{$after := (div ((toDate "2006-01-02" "2021-08-31").Sub now).Hours 24)}

.action{$dayleft := (div ((toDate "2006-01-02" "2022-01-01").Sub now).Hours 24)}

.action{$week := add (mod (div ((toDate "2006-01-02" "2050-03-13").Sub now).Hours 24) 7) 1}


> 🕐 创建时间:.action{now | date "2006-01-02 15:04"} .action{last (slice (list "星期六" "星期五" "星期四" "星期三" "星期二" "星期一" "星期天") 0 $week )}, 距离 `2021-08-31` 还剩 `.action{$after}` 天,今年还剩 `.action{$dayleft}` 天

## 📋Daily Plan-.action{now | date "2006-01/02"}

{{SELECT * FROM blocks WHERE (id in (select parent_id from blocks where type !='l' ) and type='i' and subtype = 't' and markdown like '%[ ]%')  order by created DESC limit 15}}
{: id="20210113192134-ghsdpep" memo="提示:by created limit 15表示按创建时间默认展示15个条目"}

## 🔆((20210714005305-h2kgdr5 "Daily Highlights"))-.action{now | date "2006-01/02"}

## 🧱((20210630230518-9pxh7fx "Daily Log"))-.action{now | date "2006-01/02"}

自动调用日记模板的结果

image

bug

bug
期间按了几次alt+5

log

I 2021/08/11 10:16:31 working.go:95: 
      ___                                   ___           ___           ___
     /  /\        ___           ___        /__/\         /  /\         /__/\
    /  /:/_      /  /\         /__/|       \  \:\       /  /::\        \  \:\
   /  /:/ /\    /  /:/        |  |:|        \  \:\     /  /:/\:\        \  \:\
  /  /:/ /::\  /__/::\        |  |:|    ___  \  \:\   /  /:/~/::\   _____\__\:\
 /__/:/ /:/\:\ \__\/\:\__   __|__|:|   /__/\  \__\:\ /__/:/ /:/\:\ /__/::::::::\
 \  \:\/:/~/:/    \  \:\/\ /__/::::\   \  \:\ /  /:/ \  \:\/:/__\/ \  \:\~~\~~\/
  \  \::/ /:/      \__\::/    ~\~~\:\   \  \:\  /:/   \  \::/       \  \:\  ~~~
   \__\/ /:/       /__/:/       \  \:\   \  \:\/:/     \  \:\        \  \:\
     /__/:/        \__\/         \__\/    \  \::/       \  \:\        \  \:\
     \__\/                                 \__\/         \__\/         \__\/
I 2021/08/11 10:16:32 runtime.go:32: kernel is booting:
    * ver [1.2.5-alpha2]
    * arch [amd64]
    * runtime mode [prod]
    * working directory [C:\Users\Yunfei\AppData\Local\Programs\SiYuan\resources]
    * read only [false]
    * container [std]
    * database [ver=20210804]
    * workspace directory [D:\Documents\SiYuan]
    * rsync [version 3.2.3  protocol version 31]
I 2021/08/11 10:16:32 conf.go:229: local serve path [http://10.0.0.1:6806]
I 2021/08/11 10:16:32 database.go:119: initialized database tables
I 2021/08/11 10:16:32 database.go:79: reinitialized database [D:\Documents\SiYuan\temp\siyuan.db]
I 2021/08/11 10:16:32 sync.go:64: sync before boot
I 2021/08/11 10:16:32 serve.go:66: kernel HTTP server is booting [http://127.0.0.1:6806]
I 2021/08/11 10:16:33 sync.go:111: sync [cloud=6556, local=6563] uploading...
I 2021/08/11 10:16:34 sync.go:137: sync [cloud=6556, local=6563] uploaded
I 2021/08/11 10:16:34 conf.go:346: pre-init database size [29 kB]
I 2021/08/11 10:16:35 box.go:576: rebuilding database of box [MySpace]
I 2021/08/11 10:16:35 box.go:580: rebuilt database of box [MySpace]
I 2021/08/11 10:16:35 conf.go:358: post-init database size [7.8 MB]
I 2021/08/11 10:16:36 working.go:109: kernel booted
E 2021/08/11 10:17:05 transaction.go:334: not found previous block [id=20210811101657-itir3mu]
E 2021/08/11 10:17:05 transaction.go:64: [map[doOperations:[map[action:update data:<div data-node-id="20210811101649-5a5zipy" data-type="NodeParagraph" class="p"><div contenteditable="true" spellcheck="false" data-tip="键入文字或 '/' 选择"></div><div class="protyle-attr"></div></div> id:20210811101649-5a5zipy] map[action:insert data:<div data-node-id="20210811101654-fxs9bjo" data-type="NodeParagraph" class="p"><div contenteditable="true" spellcheck="false"><wbr></div><div class="protyle-attr"></div></div> id:20210811101654-fxs9bjo previousID:20210811101649-5a5zipy]]]]
E 2021/08/11 10:17:05 transaction.go:64: [map[doOperations:[map[action:delete id:20210811101654-fxs9bjo] map[action:update data:<div data-node-id="20210811101649-5a5zipy" data-type="NodeParagraph" class="p"><div contenteditable="true" spellcheck="false" data-tip="键入文字或 '/' 选择"><wbr></div><div class="protyle-attr"></div></div> id:20210811101649-5a5zipy]]]]
E 2021/08/11 10:17:05 transaction.go:64: [map[doOperations:[map[action:delete id:20210811101649-5a5zipy] map[action:update data:<div data-node-id="20210811101640-713ul46" data-node-index="1" data-type="NodeParagraph" class="p" updated="20210811101642"><div contenteditable="true" spellcheck="false">111<wbr></div><div class="protyle-attr" contenteditable="false"></div></div> id:20210811101640-713ul46]]]]
E 2021/08/11 10:17:05 transaction.go:64: [map[doOperations:[map[action:update data:<div data-node-id="20210811101640-713ul46" data-node-index="1" data-type="NodeParagraph" class="p" updated="20210811101642"><div contenteditable="true" spellcheck="false">111</div><div class="protyle-attr" contenteditable="false"></div></div> id:20210811101640-713ul46] map[action:insert data:<div data-node-id="20210811101657-itir3mu" data-type="NodeParagraph" class="p"><div contenteditable="true" spellcheck="false"><wbr></div><div class="protyle-attr"></div></div> id:20210811101657-itir3mu previousID:20210811101640-713ul46]]]]
E 2021/08/11 10:17:05 transaction.go:64: [map[doOperations:[map[action:update data:<div data-node-id="20210811101657-itir3mu" data-type="NodeParagraph" class="p"><div contenteditable="true" spellcheck="false" data-tip="键入文字或 '/' 选择"></div><div class="protyle-attr"></div></div> id:20210811101657-itir3mu] map[action:insert data:<div data-node-id="20210811101705-jztynut" data-type="NodeParagraph" class="p"><div contenteditable="true" spellcheck="false"><wbr></div><div class="protyle-attr"></div></div> id:20210811101705-jztynut previousID:20210811101657-itir3mu]]]]
F 2021/08/11 10:17:05 transaction.go:66: transaction failed: not found previous block [id=20210811101657-itir3mu]
I 2021/08/11 10:22:09 working.go:95: 
      ___                                   ___           ___           ___
     /  /\        ___           ___        /__/\         /  /\         /__/\
    /  /:/_      /  /\         /__/|       \  \:\       /  /::\        \  \:\
   /  /:/ /\    /  /:/        |  |:|        \  \:\     /  /:/\:\        \  \:\
  /  /:/ /::\  /__/::\        |  |:|    ___  \  \:\   /  /:/~/::\   _____\__\:\
 /__/:/ /:/\:\ \__\/\:\__   __|__|:|   /__/\  \__\:\ /__/:/ /:/\:\ /__/::::::::\
 \  \:\/:/~/:/    \  \:\/\ /__/::::\   \  \:\ /  /:/ \  \:\/:/__\/ \  \:\~~\~~\/
  \  \::/ /:/      \__\::/    ~\~~\:\   \  \:\  /:/   \  \::/       \  \:\  ~~~
   \__\/ /:/       /__/:/       \  \:\   \  \:\/:/     \  \:\        \  \:\
     /__/:/        \__\/         \__\/    \  \::/       \  \:\        \  \:\
     \__\/                                 \__\/         \__\/         \__\/
I 2021/08/11 10:22:09 runtime.go:32: kernel is booting:
    * ver [1.2.5-alpha2]
    * arch [amd64]
    * runtime mode [prod]
    * working directory [C:\Users\Yunfei\AppData\Local\Programs\SiYuan\resources]
    * read only [false]
    * container [std]
    * database [ver=20210804]
    * workspace directory [D:\Documents\SiYuan]
    * rsync [version 3.2.3  protocol version 31]
I 2021/08/11 10:22:09 conf.go:229: local serve path [http://10.0.0.1:6806]
I 2021/08/11 10:22:09 database.go:119: initialized database tables
I 2021/08/11 10:22:09 database.go:79: reinitialized database [D:\Documents\SiYuan\temp\siyuan.db]
I 2021/08/11 10:22:09 sync.go:64: sync before boot
I 2021/08/11 10:22:09 serve.go:66: kernel HTTP server is booting [http://127.0.0.1:6806]
I 2021/08/11 10:22:10 sync.go:111: sync [cloud=6563, local=6575] uploading...
I 2021/08/11 10:22:12 sync.go:137: sync [cloud=6563, local=6575] uploaded
I 2021/08/11 10:22:12 conf.go:346: pre-init database size [29 kB]
I 2021/08/11 10:22:12 box.go:576: rebuilding database of box [MySpace]
I 2021/08/11 10:22:12 box.go:580: rebuilt database of box [MySpace]
I 2021/08/11 10:22:12 conf.go:358: post-init database size [7.8 MB]
I 2021/08/11 10:22:13 working.go:109: kernel booted
I 2021/08/11 10:23:13 sync.go:111: sync [cloud=6575, local=6580] uploading...
I 2021/08/11 10:23:14 sync.go:137: sync [cloud=6575, local=6580] uploaded
I 2021/08/11 10:27:18 sync.go:111: sync [cloud=6580, local=6585] uploading...
I 2021/08/11 10:27:19 sync.go:137: sync [cloud=6580, local=6585] uploaded
E 2021/08/11 10:31:12 transaction.go:64: [map[doOperations:[map[action:delete id:20210811102639-thq988q] map[action:delete id:20210811102647-r5ix00a] map[action:delete id:20210811102647-0m8bk5r] map[action:delete id:20210811102647-jatn35j] map[action:delete id:20210811102647-kmfubrj] map[action:delete id:20210811102647-mim0fb3]]]]
E 2021/08/11 10:31:12 transaction.go:64: [map[doOperations:[map[action:update data:<div data-node-id="20210811103049-aelu4mj" data-node-index="1" data-type="NodeParagraph" class="p" updated="20210811103052"><div contenteditable="true" spellcheck="false">111<wbr></div><div class="protyle-attr" contenteditable="false"></div></div> id:20210811103049-aelu4mj]]]]
E 2021/08/11 10:31:12 transaction.go:64: [map[doOperations:[map[action:update data:<div data-node-id="20210811103049-aelu4mj" data-node-index="1" data-type="NodeParagraph" class="p" updated="20210811103057"><div contenteditable="true" spellcheck="false">11<wbr></div><div class="protyle-attr" contenteditable="false"></div></div> id:20210811103049-aelu4mj]]]]
E 2021/08/11 10:31:12 transaction.go:64: [map[doOperations:[map[action:update data:<div data-node-id="20210811103049-aelu4mj" data-node-index="1" data-type="NodeParagraph" class="p" updated="20210811103057"><div contenteditable="true" spellcheck="false">11</div><div class="protyle-attr" contenteditable="false"></div></div> id:20210811103049-aelu4mj] map[action:insert data:<div data-node-id="20210811103058-r5t61bo" data-type="NodeParagraph" class="p"><div contenteditable="true" spellcheck="false"><wbr></div><div class="protyle-attr"></div></div> id:20210811103058-r5t61bo previousID:20210811103049-aelu4mj]]]]
E 2021/08/11 10:31:12 transaction.go:64: [map[doOperations:[map[action:update data:<div data-node-id="20210811103049-aelu4mj" data-node-index="1" data-type="NodeParagraph" class="p" updated="20210811103112"><div contenteditable="true" spellcheck="false">1111<wbr></div><div class="protyle-attr" contenteditable="false"></div></div> id:20210811103049-aelu4mj]]]]
F 2021/08/11 10:31:12 transaction.go:66: transaction failed: block not found
I 2021/08/11 10:37:14 working.go:95: 
      ___                                   ___           ___           ___
     /  /\        ___           ___        /__/\         /  /\         /__/\
    /  /:/_      /  /\         /__/|       \  \:\       /  /::\        \  \:\
   /  /:/ /\    /  /:/        |  |:|        \  \:\     /  /:/\:\        \  \:\
  /  /:/ /::\  /__/::\        |  |:|    ___  \  \:\   /  /:/~/::\   _____\__\:\
 /__/:/ /:/\:\ \__\/\:\__   __|__|:|   /__/\  \__\:\ /__/:/ /:/\:\ /__/::::::::\
 \  \:\/:/~/:/    \  \:\/\ /__/::::\   \  \:\ /  /:/ \  \:\/:/__\/ \  \:\~~\~~\/
  \  \::/ /:/      \__\::/    ~\~~\:\   \  \:\  /:/   \  \::/       \  \:\  ~~~
   \__\/ /:/       /__/:/       \  \:\   \  \:\/:/     \  \:\        \  \:\
     /__/:/        \__\/         \__\/    \  \::/       \  \:\        \  \:\
     \__\/                                 \__\/         \__\/         \__\/
I 2021/08/11 10:37:14 runtime.go:32: kernel is booting:
    * ver [1.2.5-alpha2]
    * arch [amd64]
    * runtime mode [prod]
    * working directory [C:\Users\Yunfei\AppData\Local\Programs\SiYuan\resources]
    * read only [false]
    * container [std]
    * database [ver=20210804]
    * workspace directory [D:\Documents\SiYuan]
    * rsync [version 3.2.3  protocol version 31]
I 2021/08/11 10:37:14 conf.go:229: local serve path [http://10.0.0.1:6806]
I 2021/08/11 10:37:14 database.go:119: initialized database tables
I 2021/08/11 10:37:14 database.go:79: reinitialized database [D:\Documents\SiYuan\temp\siyuan.db]
I 2021/08/11 10:37:14 sync.go:64: sync before boot
I 2021/08/11 10:37:14 serve.go:66: kernel HTTP server is booting [http://127.0.0.1:6806]
I 2021/08/11 10:37:15 sync.go:143: sync [cloud=6600, local=6592] downloading...
I 2021/08/11 10:37:17 sync.go:160: sync [cloud=6600, local=6592] downloaded
I 2021/08/11 10:37:17 conf.go:346: pre-init database size [29 kB]
I 2021/08/11 10:37:17 box.go:576: rebuilding database of box [MySpace]
I 2021/08/11 10:37:18 box.go:580: rebuilt database of box [MySpace]
I 2021/08/11 10:37:18 conf.go:358: post-init database size [7.8 MB]
I 2021/08/11 10:37:19 working.go:109: kernel booted
E 2021/08/11 10:38:16 transaction.go:64: [map[doOperations:[map[action:delete id:20210811103405-3v9u1rn] map[action:delete id:20210811103412-1p6h1ou] map[action:delete id:20210811103413-2p08a5i] map[action:delete id:20210811103340-wt42vcn] map[action:delete id:20210811103408-ozmea0q] map[action:delete id:20210811103415-aog9gyh] map[action:delete id:20210811103420-43w31ml] map[action:delete id:20210811103426-gfmc0aa] map[action:delete id:20210811103423-j7ppn8n]]]]
E 2021/08/11 10:38:16 transaction.go:64: [map[doOperations:[map[action:insert data:<div data-node-id="20210811103739-5v25pm3" data-type="NodeParagraph" class="p"><div contenteditable="true" spellcheck="false"></div><div class="protyle-attr"></div></div> id:20210811103739-5v25pm3 parentID:20210811103737-ubqwuhe previousID:20210811103737-yei9gsp]]]]
E 2021/08/11 10:38:16 transaction.go:64: [map[doOperations:[map[action:update data:<div data-node-id="20210811103739-5v25pm3" data-node-index="1" data-type="NodeParagraph" class="p" updated="20210811103808"><div contenteditable="true" spellcheck="false">111<wbr></div><div class="protyle-attr" contenteditable="false"></div></div> id:20210811103739-5v25pm3]]]]
E 2021/08/11 10:38:16 transaction.go:64: [map[doOperations:[map[action:update data:<div data-node-id="20210811103739-5v25pm3" data-node-index="1" data-type="NodeParagraph" class="p" updated="20210811103808"><div contenteditable="true" spellcheck="false">111</div><div class="protyle-attr" contenteditable="false"></div></div> id:20210811103739-5v25pm3] map[action:insert data:<div data-node-id="20210811103813-q7too02" data-type="NodeParagraph" class="p"><div contenteditable="true" spellcheck="false"><wbr></div><div class="protyle-attr"></div></div> id:20210811103813-q7too02 previousID:20210811103739-5v25pm3]]]]
E 2021/08/11 10:38:16 transaction.go:64: [map[doOperations:[map[action:delete id:20210811103813-q7too02] map[action:update data:<div data-node-id="20210811103739-5v25pm3" data-node-index="1" data-type="NodeParagraph" class="p" updated="20210811103808"><div contenteditable="true" spellcheck="false">111<wbr></div><div class="protyle-attr" contenteditable="false"></div></div> id:20210811103739-5v25pm3]]]]
F 2021/08/11 10:38:16 transaction.go:66: transaction failed: block not found
@88250 88250 self-assigned this Aug 11, 2021
@88250 88250 added the Bug label Aug 11, 2021
@88250 88250 added this to the 1.2.5-alpha3 milestone Aug 11, 2021
@88250 88250 closed this as completed Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants