2022-01-22 15:23:56 +00:00
|
|
|
Extension { #name : #LePage }
|
|
|
|
|
|
|
|
{ #category : #'*Grafoscopio-Utils-Core' }
|
|
|
|
LePage >> asMarkdeep [
|
|
|
|
| bodyStream |
|
|
|
|
bodyStream := '' writeStream.
|
|
|
|
self preorderTraversal do: [:snippet |
|
2022-01-24 01:38:07 +00:00
|
|
|
bodyStream nextPutAll: snippet asMarkdeep
|
2022-01-22 15:23:56 +00:00
|
|
|
].
|
|
|
|
^ Markdeep new
|
2022-01-24 01:38:07 +00:00
|
|
|
title: self title;
|
2022-01-22 15:23:56 +00:00
|
|
|
body: bodyStream contents
|
|
|
|
contents.
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #'*Grafoscopio-Utils-Core' }
|
|
|
|
LePage >> asMarkdeepInto: aFileLocator [
|
|
|
|
|
|
|
|
self preorderTraversal
|
|
|
|
]
|
2022-01-24 01:38:07 +00:00
|
|
|
|
|
|
|
{ #category : #'*Grafoscopio-Utils-Core' }
|
|
|
|
LePage >> fileName [
|
|
|
|
^ self title asDashedLowercase, '.', ((self uidString copyFrom: 1 to: 5 ) copyWithoutAll: '/'), '.md.html'
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #'*Grafoscopio-Utils-Core' }
|
|
|
|
LePage >> markdeepTemporalFile [
|
|
|
|
| fileName |
|
|
|
|
fileName := self title asDashedLowercase, '.',(self uidString copyFrom: 1 to: 5), '.md.html'.
|
|
|
|
^ FileLocator temp / fileName.
|
|
|
|
]
|