diff --git a/repository/Grafoscopio-Utils/HedgeDoc.class.st b/repository/Grafoscopio-Utils/HedgeDoc.class.st index 341cd2b..3ed9ede 100644 --- a/repository/Grafoscopio-Utils/HedgeDoc.class.st +++ b/repository/Grafoscopio-Utils/HedgeDoc.class.st @@ -23,6 +23,16 @@ HedgeDoc class >> newDefault [ defaultServer. ] +{ #category : #accessing } +HedgeDoc >> asTiddler [ + self url ifNil: [ ^ self ]. + ^ Tiddler new + title: self url segments first; + text: (self contents ifNil: [ self retrieveContents]); + type: 'text/x-markdown'; + created: DateAndTime now asString. +] + { #category : #accessing } HedgeDoc >> contents [ ^ contents @@ -61,10 +71,11 @@ HedgeDoc >> pad: anObject [ pad := anObject ] -{ #category : #'as yet unclassified' } +{ #category : #accessing } HedgeDoc >> retrieveContents [ self url ifNil: [ ^ self ]. - ^ (self url addPathSegment: 'download') retrieveContents + self contents: (self url addPathSegment: 'download') retrieveContents. + ^ self contents. ] { #category : #'as yet unclassified' }