Reading tiddlers now from the HTML directly! (after 5.2.x series)

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-01-10 18:19:17 -05:00
parent 438bff833c
commit 8678a915fa
1 changed files with 10 additions and 0 deletions

View File

@ -98,6 +98,16 @@ TiddlyWiki >> fromDictionary: tiddlersDict [
wiki: self ])
]
{ #category : #accessing }
TiddlyWiki >> fromUrl: anUrlString [
| docTree rawJsonTiddlers tiddlersDictionary |
self remote: anUrlString.
docTree := XMLHTMLParser parse: (self remote retrieveContents).
rawJsonTiddlers := (docTree xpath: '//script[@class="tiddlywiki-tiddler-store"]') stringValue.
tiddlersDictionary := STONJSON fromString: rawJsonTiddlers.
self fromDictionary: tiddlersDictionary
]
{ #category : #accessing }
TiddlyWiki >> importJSONFile [