Grafoscopio notebooks exported as Lepiter pages in temporal directory.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-01-29 09:33:37 -05:00
parent ed211f2fb8
commit b67df075b1
2 changed files with 12 additions and 4 deletions

View File

@ -39,8 +39,8 @@ GrafoscopioNode >> asLePage [
page := LePage new page := LePage new
initializeTitle: 'Grafoscopio Notebook (imported)'. initializeTitle: 'Grafoscopio Notebook (imported)'.
self nodesInPreorder allButFirst do: [:node | self nodesInPreorder allButFirst do: [:node |
page addSnippet: node asSnippet . page addSnippet: node asSnippet ].
]. page editTime: self root latestEditionDate.
^ page. ^ page.
] ]
@ -49,7 +49,8 @@ GrafoscopioNode >> asSnippet [
| snippet child | | snippet child |
snippet := LeTextSnippet new snippet := LeTextSnippet new
string: self header; string: self header;
createTime: self created; createTime: (LeTime new
time: self created);
uid: LeUID new. uid: LeUID new.
(self tags includes: 'código') (self tags includes: 'código')
ifFalse: [ ifFalse: [
@ -59,7 +60,8 @@ GrafoscopioNode >> asSnippet [
child := LePharoSnippet new; child := LePharoSnippet new;
code: self body ]. code: self body ].
child child
createTime: self created; createTime: (LeTime new
time: self created);
uid: LeUID new. uid: LeUID new.
snippet addFirstSnippet: child. snippet addFirstSnippet: child.
snippet optionAt: 'tags' put: self tags. snippet optionAt: 'tags' put: self tags.

View File

@ -0,0 +1,6 @@
Extension { #name : #LeNullDatabase }
{ #category : #'*MiniDocs' }
LeNullDatabase >> attachmentsDirectory [
^ (FileLocator temp / 'lepiter' / 'attachments') ensureCreateDirectory.
]