Refactoring binary data cleaning.
This commit is contained in:
parent
438bff833c
commit
a541301d0e
@ -226,11 +226,21 @@ TiddlyWiki >> tiddlersJSONUrl [
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> withoutImages [
|
||||
TiddlyWiki >> withoutApplicationType: application [
|
||||
| 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
|
||||
tiddlers: filteredTiddlers.
|
||||
tempWiki tiddlers do: [:tiddler | tiddler wiki: tempWiki ].
|
||||
^ tempWiki
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> withoutImages [
|
||||
^ self withoutApplicationType: 'image/'
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> withoutPDFs [
|
||||
^ self withoutApplicationType: 'application/pdf'
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user