Creating tiddler method for append prefix to text a remove tag.

This commit is contained in:
ruidajo 2022-12-09 12:49:51 -05:00
parent 60813a19b6
commit 8d02445163
2 changed files with 19 additions and 1 deletions

View File

@ -32,6 +32,15 @@ Tiddler class >> nowLocal [
format: (ZTimestamp fromString: Time nowLocal asDateAndTime asString)) copyFrom: 1 to: 17 format: (ZTimestamp fromString: Time nowLocal asDateAndTime asString)) copyFrom: 1 to: 17
] ]
{ #category : #accessing }
Tiddler >> appendPrefixToText: prefix [
| textPre |
textPre := self text.
self text: prefix, textPre.
^ self
]
{ #category : #accessing } { #category : #accessing }
Tiddler >> asDictionary [ Tiddler >> asDictionary [
| response | | response |
@ -470,6 +479,15 @@ Tiddler >> rawLinks [
^ (WikiTextGrammar new linkSea star parse: self text) asSet ^ (WikiTextGrammar new linkSea star parse: self text) asSet
] ]
{ #category : #accessing }
Tiddler >> removeTag: aTag [
| tagsPre |
tagsPre := self tags.
self tags: ('' join: (tagsPre splitOn: aTag)).
^ self
]
{ #category : #accessing } { #category : #accessing }
Tiddler >> revision [ Tiddler >> revision [
^ revision ^ revision

View File

@ -293,7 +293,7 @@ TiddlyWiki >> exportJSONSubtiddlers: subtiddlersCollection [
{ #category : #accessing } { #category : #accessing }
TiddlyWiki >> exportJSONSubtiddlers: subtiddlersCollection as: aName [ TiddlyWiki >> exportJSONSubtiddlers: subtiddlersCollection as: aName [
^ MarkupFile exportAsFileOn: self file parent / aName, 'json' containing: (self jsonSubtiddlers: subtiddlersCollection) ^ MarkupFile exportAsFileOn: self folder / aName, 'json' containing: (self jsonSubtiddlers: subtiddlersCollection)
] ]
{ #category : #'export - json' } { #category : #'export - json' }