Improving exporting tiddlers files.

This commit is contained in:
ruidajo 2022-03-03 14:53:00 -05:00
parent b0ca67d17f
commit fe40b438d0

View File

@ -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' ].
] ]
@ -155,9 +169,9 @@ TiddlyWiki >> exportSTONFiles [
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
] ]