Improving exporting tiddlers files.
This commit is contained in:
parent
b0ca67d17f
commit
fe40b438d0
@ -46,7 +46,7 @@ TiddlyWiki >> changesAfter: aDateString [
|
|||||||
|
|
||||||
| recent created modified wiki aDate |
|
| recent created modified wiki aDate |
|
||||||
aDate := aDateString asZTimestamp.
|
aDate := aDateString asZTimestamp.
|
||||||
wiki := self withoutImages withoutPDFs contentTiddlers.
|
wiki := self contentTiddlersWithoutLargeTiddlers.
|
||||||
created := wiki select: [ :tiddler | tiddler created > aDate ].
|
created := wiki select: [ :tiddler | tiddler created > aDate ].
|
||||||
modified := wiki select: [ :tiddler | tiddler modified isNotNil
|
modified := wiki select: [ :tiddler | tiddler modified isNotNil
|
||||||
and: [ tiddler modified > aDate ] ].
|
and: [ tiddler modified > aDate ] ].
|
||||||
@ -81,17 +81,31 @@ TiddlyWiki >> contentTiddlers [
|
|||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
TiddlyWiki >> exportContentTiddlers [
|
TiddlyWiki >> contentTiddlersWithoutLargeTiddlers [
|
||||||
|
|
||||||
| content |
|
| content |
|
||||||
content := OrderedCollection new.
|
content := OrderedCollection new.
|
||||||
content
|
content
|
||||||
addAll: (self contentTiddlers
|
addAll: (self contentTiddlers
|
||||||
select: [ :each | each isTW5Type or: [ each isNilType ]]);
|
select: [ :each | each isTW5Type or: [ each isNilType ]]);
|
||||||
addAll: (self contentTiddlers select: [ :each | each isJavascript ]);
|
addAll: (self contentTiddlers select: [ :each | each isJavascript ]);
|
||||||
addAll: (self contentTiddlers select: [ :each | each isXTiddlerDictionary ]);
|
addAll: (self contentTiddlers select: [ :each | each isXTiddlerDictionary ]);
|
||||||
addAll: (self contentTiddlers select: [ :each | each isTextPlain ]);
|
addAll: (self contentTiddlers select: [ :each | each isTextPlain ]);
|
||||||
addAll: (self contentTiddlers select: [ :each | each isMarkdown ]).
|
addAll: (self contentTiddlers select: [ :each | each isMarkdown ]).
|
||||||
|
^ content.
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
TiddlyWiki >> exportContentShadowAndLargeTiddlersSTONFiles [
|
||||||
|
|
||||||
|
self exportSTONFiles; exportLargeTiddlers
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
TiddlyWiki >> exportContentTiddlers [
|
||||||
|
|
||||||
|
| content |
|
||||||
|
content := self contentTiddlersWithoutLargeTiddlers.
|
||||||
^ content do: [ :each |
|
^ content do: [ :each |
|
||||||
each exportSTONFileInto: 'tiddlers' ].
|
each exportSTONFileInto: 'tiddlers' ].
|
||||||
]
|
]
|
||||||
@ -152,12 +166,12 @@ TiddlyWiki >> exportSTONFiles [
|
|||||||
'No JSON Tiddlers file found. If you have one, please provide its location'.
|
'No JSON Tiddlers file found. If you have one, please provide its location'.
|
||||||
stonFile := FileLocator temp / 'tiddlers.ston' ]
|
stonFile := FileLocator temp / 'tiddlers.ston' ]
|
||||||
ifNotNil: [
|
ifNotNil: [
|
||||||
stonFile := self tiddlersJSONFile withoutExtension , 'ston' ].
|
stonFile := self tiddlersJSONFile withoutExtension , 'ston' ].
|
||||||
shadowFile := self largeTiddlersFolder / '_shadow.ston'.
|
shadowFile := self largeTiddlersFolder / '_shadow.ston'.
|
||||||
wikiTemp := self copy.
|
wikiTemp := self copy.
|
||||||
wikiTemp tiddlers: self contentTiddlers.
|
wikiTemp tiddlers: self contentTiddlersWithoutLargeTiddlers.
|
||||||
wikiTemp := wikiTemp withoutImages.
|
"wikiTemp := wikiTemp withoutImages.
|
||||||
wikiTemp := wikiTemp withoutPDFs.
|
wikiTemp := wikiTemp withoutPDFs."
|
||||||
GrafoscopioUtils exportAsSton: self shadow on: shadowFile.
|
GrafoscopioUtils exportAsSton: self shadow on: shadowFile.
|
||||||
^ GrafoscopioUtils exportAsSton: wikiTemp on: stonFile
|
^ GrafoscopioUtils exportAsSton: wikiTemp on: stonFile
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user