From b67df075b1c157c7d733b472d637b7aae5e11d1b Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sun, 29 Jan 2023 09:33:37 -0500 Subject: [PATCH] Grafoscopio notebooks exported as Lepiter pages in temporal directory. --- src/MiniDocs/GrafoscopioNode.class.st | 10 ++++++---- src/MiniDocs/LeNullDatabase.extension.st | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 src/MiniDocs/LeNullDatabase.extension.st diff --git a/src/MiniDocs/GrafoscopioNode.class.st b/src/MiniDocs/GrafoscopioNode.class.st index 574e269..c224cfe 100644 --- a/src/MiniDocs/GrafoscopioNode.class.st +++ b/src/MiniDocs/GrafoscopioNode.class.st @@ -39,8 +39,8 @@ GrafoscopioNode >> asLePage [ page := LePage new initializeTitle: 'Grafoscopio Notebook (imported)'. self nodesInPreorder allButFirst do: [:node | - page addSnippet: node asSnippet . - ]. + page addSnippet: node asSnippet ]. + page editTime: self root latestEditionDate. ^ page. ] @@ -49,7 +49,8 @@ GrafoscopioNode >> asSnippet [ | snippet child | snippet := LeTextSnippet new string: self header; - createTime: self created; + createTime: (LeTime new + time: self created); uid: LeUID new. (self tags includes: 'código') ifFalse: [ @@ -59,7 +60,8 @@ GrafoscopioNode >> asSnippet [ child := LePharoSnippet new; code: self body ]. child - createTime: self created; + createTime: (LeTime new + time: self created); uid: LeUID new. snippet addFirstSnippet: child. snippet optionAt: 'tags' put: self tags. diff --git a/src/MiniDocs/LeNullDatabase.extension.st b/src/MiniDocs/LeNullDatabase.extension.st new file mode 100644 index 0000000..5f2537a --- /dev/null +++ b/src/MiniDocs/LeNullDatabase.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #LeNullDatabase } + +{ #category : #'*MiniDocs' } +LeNullDatabase >> attachmentsDirectory [ + ^ (FileLocator temp / 'lepiter' / 'attachments') ensureCreateDirectory. +]