New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

twinejson-cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twinejson-cli

Exports Twine2 stories to json

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

twinejson-cli

CLI tool for exporting Twine 2 stories into json

npm install twinejson-cli

Basic Usage

Publish our archive your story to html then:

node <path_to>/twinejson-min.js <path_to>/<your_published_story>.html <path_to>/.json

Building

lein cljsbuild once min will build a minified file at twinejson-min.js

or

lein figwheel dev will open a REPL with hot reloading using figwheel

Output Sample

Output:

[  
   {  
      "tag":"tw-passagedata",
      "attributes":{  
         "pid":"1",
         "name":"Start",
         "tags":"tag1 tag-with-many-spaces",
         "position":"391,299.5"
      },
      "content":[  
         "WHAT\n\n[[b]]\n[[d]]\n[[e]]\n[[f->g]]"
      ],
      "links":[  
         "b",
         "d",
         "e",
         "g"
      ]
   },
   {  
      "tag":"tw-passagedata",
      "attributes":{  
         "pid":"2",
         "name":"b",
         "tags":"",
         "position":"636,330.5"
      },
      "content":[  
         "[[c]]"
      ],
      "links":[  
         "c"
      ]
   },
   {  
      "tag":"tw-passagedata",
      "attributes":{  
         "pid":"3",
         "name":"c",
         "tags":"",
         "position":"816,197.5"
      },
      "content":[  
         "[[ca]]\n[[cb]]\n[[cd]]\n\n[[c]]"
      ],
      "links":[  
         "ca",
         "cb",
         "cd",
         "c"
      ]
   },
   {  
      "tag":"tw-passagedata",
      "attributes":{  
         "pid":"4",
         "name":"d",
         "tags":"",
         "position":"605,503.5"
      },
      "content":[  
         "Yada yada blada blada\n\n[[Start]]"
      ],
      "links":[  
         "Start"
      ]
   },
   {  
      "tag":"tw-passagedata",
      "attributes":{  
         "pid":"5",
         "name":"e",
         "tags":"",
         "position":"530,147.5"
      },
      "content":[  
         "[[e->a->c->ea]]"
      ],
      "links":[  
         "ea"
      ]
   },
   {  
      "tag":"tw-passagedata",
      "attributes":{  
         "pid":"6",
         "name":"g",
         "tags":"",
         "position":"396,511.5"
      },
      "content":[  
         "[[g->h]]"
      ],
      "links":[  
         "h"
      ]
   },
   {  
      "tag":"tw-passagedata",
      "attributes":{  
         "pid":"7",
         "name":"h",
         "tags":"",
         "position":"210,507.5"
      },
      "content":[  
         "[[Start]]"
      ],
      "links":[  
         "Start"
      ]
   },
   {  
      "tag":"tw-passagedata",
      "attributes":{  
         "pid":"8",
         "name":"ca",
         "tags":"",
         "position":"1012,247.5"
      },
      "content":[  
         "Double-click this passage to edit it."
      ],
      "links":[  

      ]
   },
   {  
      "tag":"tw-passagedata",
      "attributes":{  
         "pid":"9",
         "name":"cb",
         "tags":"",
         "position":"802,450.5"
      },
      "content":[  
         "Double-click this passage to edit it."
      ],
      "links":[  

      ]
   },
   {  
      "tag":"tw-passagedata",
      "attributes":{  
         "pid":"10",
         "name":"cd",
         "tags":"",
         "position":"952,450.5"
      },
      "content":[  
         "Double-click this passage to edit it."
      ],
      "links":[  

      ]
   },
   {  
      "tag":"tw-passagedata",
      "attributes":{  
         "pid":"11",
         "name":"ea",
         "tags":"",
         "position":"659,31.5"
      },
      "content":[  
         "[[c<-ea]]"
      ],
      "links":[  
         "c"
      ]
   }
]

Keywords

FAQs

Package last updated on 07 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc