Created and edited times management started.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-01-22 23:33:24 -05:00
parent ae7d315699
commit 2f9bef131f

View File

@ -23,10 +23,8 @@ GrafoscopioNode >> asLePage [
page := LePage new page := LePage new
title: 'Grafoscopio Notebook (imported)'. title: 'Grafoscopio Notebook (imported)'.
self nodesInPreorder allButFirst do: [:node | self nodesInPreorder allButFirst do: [:node |
page addSnippet: node asSnippet. page addSnippet: node asSnippet .
(node level = 1) ].
ifFalse: [ node asSnippet parent: node parent asSnippet ]
].
^ page. ^ page.
] ]
@ -35,7 +33,8 @@ GrafoscopioNode >> asSnippet [
| snippet child | | snippet child |
snippet := LeTextSnippet new snippet := LeTextSnippet new
string: self header; string: self header;
createTime: self created. createTime: self created;
uid: LeUID new.
(self tags includes: 'código') (self tags includes: 'código')
ifFalse: [ ifFalse: [
child := LeTextSnippet new; child := LeTextSnippet new;
@ -43,7 +42,9 @@ GrafoscopioNode >> asSnippet [
ifTrue: [ ifTrue: [
child := LePharoSnippet new; child := LePharoSnippet new;
code: self body ]. code: self body ].
child createTime: self created. child
createTime: self created;
uid: LeUID new.
snippet addFirstSnippet: child. snippet addFirstSnippet: child.
snippet optionAt: 'tags' put: self tags. snippet optionAt: 'tags' put: self tags.
^ snippet ^ snippet
@ -71,6 +72,7 @@ GrafoscopioNode >> children: anObject [
{ #category : #accessing } { #category : #accessing }
GrafoscopioNode >> created [ GrafoscopioNode >> created [
created ifNotNil: [^created asDateAndTime].
^ created ^ created
] ]
@ -81,7 +83,7 @@ GrafoscopioNode >> created: anObject [
{ #category : #accessing } { #category : #accessing }
GrafoscopioNode >> edited [ GrafoscopioNode >> edited [
^ edited ^ edited asDateAndTime
] ]
{ #category : #accessing } { #category : #accessing }