GrafoscopioUtils/repository/Grafoscopio-Utils/LePage.extension.st

33 lines
819 B
Smalltalk
Raw Normal View History

Extension { #name : #LePage }
{ #category : #'*Grafoscopio-Utils-Core' }
LePage >> asMarkdeep [
| bodyStream |
bodyStream := '' writeStream.
self preorderTraversal do: [:snippet |
bodyStream nextPutAll: snippet asMarkdeep
].
^ Markdeep new
title: self title;
body: bodyStream contents
contents.
]
{ #category : #'*Grafoscopio-Utils-Core' }
LePage >> asMarkdeepInto: aFileLocator [
self preorderTraversal
]
{ #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.
]