Improving tiddlers exportation.
This commit is contained in:
parent
c7fca28305
commit
46565aa522
@ -214,7 +214,10 @@ Tiddler >> exportSTONFile [
|
|||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
Tiddler >> exportSTONFileInto: subfolder [
|
Tiddler >> exportSTONFileInto: subfolder [
|
||||||
|
|
||||||
| stonFile |
|
| stonFile tiddlersSubfolder |
|
||||||
|
tiddlersSubfolder := self wiki folder / subfolder.
|
||||||
|
tiddlersSubfolder exists
|
||||||
|
ifFalse: [ tiddlersSubfolder ensureCreateDirectory ].
|
||||||
stonFile := self wiki folder / subfolder / self fileName.
|
stonFile := self wiki folder / subfolder / self fileName.
|
||||||
^ MarkupFile exportAsFileOn: stonFile containing: self asStonStringPretty
|
^ MarkupFile exportAsFileOn: stonFile containing: self asStonStringPretty
|
||||||
]
|
]
|
||||||
@ -537,6 +540,16 @@ Tiddler >> tagsAsString [
|
|||||||
^ response contents
|
^ response contents
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
Tiddler >> tagsReformating [
|
||||||
|
| response |
|
||||||
|
self tags class ~= ByteString ifTrue: [ ^ self ].
|
||||||
|
response := Set new.
|
||||||
|
response add: self tags.
|
||||||
|
self tags: response.
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
Tiddler >> text [
|
Tiddler >> text [
|
||||||
|
|
||||||
|
@ -493,6 +493,18 @@ TiddlyWiki >> importJSONLink [
|
|||||||
^ self fromString: self remoteTiddlersContentsString
|
^ self fromString: self remoteTiddlersContentsString
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
TiddlyWiki >> importSTONFilesFrom: aFolder [
|
||||||
|
| tiddlerFiles |
|
||||||
|
self folder: aFolder parent.
|
||||||
|
tiddlerFiles := aFolder children
|
||||||
|
select: [ :localFile | localFile basename endsWith: '.ston' ].
|
||||||
|
self tiddlers: (tiddlerFiles collect: [ :each | | tempTiddler|
|
||||||
|
tempTiddler := STON fromString: each contents.
|
||||||
|
tempTiddler wiki: self.
|
||||||
|
tempTiddler])
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
TiddlyWiki >> installJsonExporter [
|
TiddlyWiki >> installJsonExporter [
|
||||||
|
|
||||||
@ -718,9 +730,11 @@ TiddlyWiki >> oldestCreatedTiddler [
|
|||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
TiddlyWiki >> printOn: aStream [
|
TiddlyWiki >> printOn: aStream [
|
||||||
|
| printName |
|
||||||
|
printName := self name ifNil: ['unamed'].
|
||||||
super printOn: aStream.
|
super printOn: aStream.
|
||||||
aStream
|
aStream
|
||||||
nextPutAll: '( ', self name ,' )'
|
nextPutAll: '( ', printName ,' )'
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
|
Loading…
Reference in New Issue
Block a user