This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-01-10 18:20:47 -05:00
commit 7097dc26e3

View File

@ -236,11 +236,21 @@ TiddlyWiki >> tiddlersJSONUrl [
] ]
{ #category : #accessing } { #category : #accessing }
TiddlyWiki >> withoutImages [ TiddlyWiki >> withoutApplicationType: application [
| filteredTiddlers tempWiki | | filteredTiddlers tempWiki |
filteredTiddlers := self tiddlers reject: [:tiddler | tiddler type isNotNil and: [tiddler type beginsWith: 'image/'] ]. filteredTiddlers := self tiddlers reject: [:tiddler | tiddler type isNotNil and: [tiddler type beginsWith: application] ].
tempWiki := self copy tempWiki := self copy
tiddlers: filteredTiddlers. tiddlers: filteredTiddlers.
tempWiki tiddlers do: [:tiddler | tiddler wiki: tempWiki ]. tempWiki tiddlers do: [:tiddler | tiddler wiki: tempWiki ].
^ tempWiki ^ tempWiki
] ]
{ #category : #accessing }
TiddlyWiki >> withoutImages [
^ self withoutApplicationType: 'image/'
]
{ #category : #accessing }
TiddlyWiki >> withoutPDFs [
^ self withoutApplicationType: 'application/pdf'
]