From 78ec41d5b4c3eac111b46279f1b0d5eafb1873d6 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 7 Aug 2021 17:14:57 -0500 Subject: [PATCH] Conversions to TiddlyWiki. --- repository/Grafoscopio-Utils/HedgeDoc.class.st | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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' }