mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 18:12:47 +03:00
publish: don't reset post dates on notebook import
This commit is contained in:
parent
8616bf06bf
commit
8cd6160c55
@ -635,7 +635,7 @@
|
|||||||
=/ rif=riff:clay [q.byk.bol `[%next %x [%da now.bol] pax]]
|
=/ rif=riff:clay [q.byk.bol `[%next %x [%da now.bol] pax]]
|
||||||
:_ (~(put by notes) note-name new-note)
|
:_ (~(put by notes) note-name new-note)
|
||||||
;: weld
|
;: weld
|
||||||
[%pass (welp /read/comment pax) %arvo %c %warp our.bol rif]~
|
[%pass (welp /read/note pax) %arvo %c %warp our.bol rif]~
|
||||||
comment-cards
|
comment-cards
|
||||||
cards
|
cards
|
||||||
==
|
==
|
||||||
@ -667,13 +667,11 @@
|
|||||||
++ form-note
|
++ form-note
|
||||||
|= [note-name=@tas udon=@t]
|
|= [note-name=@tas udon=@t]
|
||||||
^- note
|
^- note
|
||||||
=/ body=tape (slag (add 3 (need (find ";>" (trip udon)))) (trip udon))
|
=/ front-idx (add 3 (need (find ";>" (trip udon))))
|
||||||
=/ snippet=@t (of-wain:format (scag 1 (to-wain:format (crip body))))
|
=/ front-matter
|
||||||
:: =/ build=(each manx tang)
|
(cat 3 (end 3 front-idx udon) 'dummy text\0a')
|
||||||
:: %- mule |.
|
=/ body (cut 3 [front-idx (met 3 udon)] udon)
|
||||||
:: ^- manx
|
=/ snippet=@t (of-wain:format (scag 1 (to-wain:format body)))
|
||||||
:: elm:(static:cram (ream udon))
|
|
||||||
::
|
|
||||||
=/ meta=(each (map term knot) tang)
|
=/ meta=(each (map term knot) tang)
|
||||||
%- mule |.
|
%- mule |.
|
||||||
%- ~(run by inf:(static:cram (ream udon)))
|
%- ~(run by inf:(static:cram (ream udon)))
|
||||||
@ -692,12 +690,24 @@
|
|||||||
=? title ?=(%.y -.meta)
|
=? title ?=(%.y -.meta)
|
||||||
(fall (~(get by p.meta) %title) note-name)
|
(fall (~(get by p.meta) %title) note-name)
|
||||||
::
|
::
|
||||||
|
=/ date-created=@da now.bol
|
||||||
|
=? date-created ?=(%.y -.meta)
|
||||||
|
%+ fall
|
||||||
|
(biff (~(get by p.meta) %date-created) (slat %da))
|
||||||
|
now.bol
|
||||||
|
::
|
||||||
|
=/ last-modified=@da now.bol
|
||||||
|
=? last-modified ?=(%.y -.meta)
|
||||||
|
%+ fall
|
||||||
|
(biff (~(get by p.meta) %last-modified) (slat %da))
|
||||||
|
now.bol
|
||||||
|
::
|
||||||
:* author
|
:* author
|
||||||
title
|
title
|
||||||
note-name
|
note-name
|
||||||
now.bol
|
date-created
|
||||||
now.bol
|
last-modified
|
||||||
%.n
|
%.y
|
||||||
udon
|
udon
|
||||||
snippet
|
snippet
|
||||||
~
|
~
|
||||||
@ -1030,6 +1040,8 @@
|
|||||||
%- my
|
%- my
|
||||||
:~ title+title.act
|
:~ title+title.act
|
||||||
author+(scot %p src.bol)
|
author+(scot %p src.bol)
|
||||||
|
date-created+(scot %da now.bol)
|
||||||
|
last-modified+(scot %da now.bol)
|
||||||
==
|
==
|
||||||
=. body.act (cat 3 body.act '\0a')
|
=. body.act (cat 3 body.act '\0a')
|
||||||
=/ file=@t (add-front-matter front body.act)
|
=/ file=@t (add-front-matter front body.act)
|
||||||
@ -1104,6 +1116,8 @@
|
|||||||
%- my
|
%- my
|
||||||
:~ title+title.act
|
:~ title+title.act
|
||||||
author+(scot %p src.bol)
|
author+(scot %p src.bol)
|
||||||
|
date-created+(scot %da date-created.u.note)
|
||||||
|
last-modified+(scot %da now.bol)
|
||||||
==
|
==
|
||||||
=. body.act (cat 3 body.act '\0a')
|
=. body.act (cat 3 body.act '\0a')
|
||||||
=/ file=@t (add-front-matter front body.act)
|
=/ file=@t (add-front-matter front body.act)
|
||||||
|
Loading…
Reference in New Issue
Block a user