Extracting code from content, e.g loading a book that has computational notebook sections #69

Open
opened 2 years ago by utopiah · 1 comments
Owner

Example

fetch("https://fabien.benetou.fr/Analysis/BeyondTheCaseAgainstBooks?action=source")
.then( r => r.text() )
.then(data => { 
	let code = data.split("\n").filter( l => (l.slice(0,2) == "[@") )[0].slice(2).slice(0,-2);
    console.log(code) 
} )

As described in https://fabien.benetou.fr/Analysis/BeyondTheCaseAgainstBooks

Example ```javascript fetch("https://fabien.benetou.fr/Analysis/BeyondTheCaseAgainstBooks?action=source") .then( r => r.text() ) .then(data => { let code = data.split("\n").filter( l => (l.slice(0,2) == "[@") )[0].slice(2).slice(0,-2); console.log(code) } ) ``` As described in https://fabien.benetou.fr/Analysis/BeyondTheCaseAgainstBooks
Poster
Owner

Added as 9b2dd9284c

Added as https://git.benetou.fr/utopiah/text-code-xr-engine/commit/9b2dd9284cd7992cfe1c614ed4688731f08235a0
utopiah added the
import/export
label 2 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: utopiah/text-code-xr-engine#69
Loading…
There is no content yet.