Starting support for listed tiddlers.
This commit is contained in:
parent
aa998bfd50
commit
ddd6820255
@ -228,6 +228,17 @@ Tiddler >> list: anObject [
|
|||||||
list := anObject
|
list := anObject
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : 'accessing' }
|
||||||
|
Tiddler >> listedTiddlers [
|
||||||
|
"I only include the so called 'pureLinks' or manual links (see [1]) i.e. those which are enclosed in '[[' and ']]'
|
||||||
|
An improved future version of me should include all links with CamelCase
|
||||||
|
[1] https://tiddlywiki.com/static/Linking%2520in%2520WikiText.html"
|
||||||
|
| listedTiddlersTitles |
|
||||||
|
self list ifNil: [^ nil ].
|
||||||
|
listedTiddlersTitles := WikiTextGrammar new linkSea star parse: self list.
|
||||||
|
^ self wiki tiddlers select: [:tiddler | listedTiddlersTitles includes: tiddler title ]
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : 'utilities' }
|
{ #category : 'utilities' }
|
||||||
Tiddler >> markdownLinksAsWikiText [
|
Tiddler >> markdownLinksAsWikiText [
|
||||||
"I'm useful to convert _internal_ links between formats, as is a common pattern
|
"I'm useful to convert _internal_ links between formats, as is a common pattern
|
||||||
|
@ -44,6 +44,11 @@ TiddlyWiki >> configFile [
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : 'accessing' }
|
||||||
|
TiddlyWiki >> exportJSONSubtiddlers: subtiddlersCollection [
|
||||||
|
^ MarkupFile exportAsFileOn: self file parent / 'subtiddlers.json' containing: (self jsonSubtiddlers: subtiddlersCollection)
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : 'accessing' }
|
{ #category : 'accessing' }
|
||||||
TiddlyWiki >> exportSTONFile [
|
TiddlyWiki >> exportSTONFile [
|
||||||
| stonFile output |
|
| stonFile output |
|
||||||
@ -83,6 +88,13 @@ TiddlyWiki >> importJSONFile [
|
|||||||
])
|
])
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : 'accessing' }
|
||||||
|
TiddlyWiki >> jsonSubtiddlers: subtiddlersCollection [
|
||||||
|
| subtiddlersDict |
|
||||||
|
subtiddlersDict := subtiddlersCollection collect: [:tiddler | tiddler asDictionary ].
|
||||||
|
^ STONJSON toStringPretty: subtiddlersDict
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : 'accessing' }
|
{ #category : 'accessing' }
|
||||||
TiddlyWiki >> loadFromConfig: wikiname [
|
TiddlyWiki >> loadFromConfig: wikiname [
|
||||||
^ self configDictonary at: wikiname.
|
^ self configDictonary at: wikiname.
|
||||||
|
Loading…
Reference in New Issue
Block a user