Improving HedgeDoc(s) convert/import as LePage(s).
This commit is contained in:
parent
4399531c8d
commit
72f3a633ae
@ -27,6 +27,18 @@ HedgeDoc class >> newDefault [
|
|||||||
defaultServer.
|
defaultServer.
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
HedgeDoc >> asLePage [
|
||||||
|
| newPage snippet |
|
||||||
|
snippet := LeTextSnippet new
|
||||||
|
string: self body.
|
||||||
|
newPage := LePage new
|
||||||
|
initializeTitle: self title;
|
||||||
|
addSnippet: snippet;
|
||||||
|
yourself.
|
||||||
|
^ newPage
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
HedgeDoc >> asMarkdeep [
|
HedgeDoc >> asMarkdeep [
|
||||||
^ Markdeep new
|
^ Markdeep new
|
||||||
|
@ -55,12 +55,9 @@ LeMiniDocsImport >> database: aLeDatabase [
|
|||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
LeMiniDocsImport >> importHedgedoc: aURL [
|
LeMiniDocsImport >> importHedgedoc: aURL [
|
||||||
| doc text page |
|
| doc |
|
||||||
doc := HedgeDoc fromLink: aURL asString.
|
doc := HedgeDoc fromLink: aURL asString.
|
||||||
text := doc retrieveContents; contents.
|
^ database addPage: doc asLePage
|
||||||
page := LePage named: (doc title).
|
|
||||||
page addSnippet: (LeTextSnippet string: text).
|
|
||||||
^ database addPage: page
|
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
|
Loading…
Reference in New Issue
Block a user