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