Code Monkey home page Code Monkey logo

pinecone's Introduction

pinecone

A very niche-use node tool for converting redwood TUTORIAL (pt1) from .com site format to "learn" site format

Install

yarn install

Use

cd ..
node pinecone <input-path> [output-dir]

Go one dir ABOVE pinecone so you can run it pretending it's a binary ๐Ÿ™ƒ.

For the input file, download the latest TUTORIAL.md to your local from here.

A second optional arg allows you to specifcy the output dir for the converted file and sections (defaults to ./TUORIAL_SECTIONS). Inside will be a fulll copy of the converted file 00_FULL.md, as well as a breakdown by section:

TUTORIAL_SECTIONS
โ”œโ”€โ”€ 00_FULL.md
โ”œโ”€โ”€ administration.md
โ”œโ”€โ”€ a-second-page-and-a-link.md
โ”œโ”€โ”€ authentication.md
โ”œโ”€โ”€ cells.md
โ”œโ”€โ”€ deployment.md
โ”œโ”€โ”€ everyones-favorite-thing-to-build-forms.md
โ”œโ”€โ”€ getting-dynamic.md
โ”œโ”€โ”€ installation-and-starting-development.md
โ”œโ”€โ”€ layouts.md
โ”œโ”€โ”€ our-first-page.md
โ”œโ”€โ”€ prerequisites.md
โ”œโ”€โ”€ redwood-file-structure.md
โ”œโ”€โ”€ routing-params.md
โ”œโ”€โ”€ saving-data.md
โ”œโ”€โ”€ side-quest-how-redwood-works-with-data.md
โ”œโ”€โ”€ welcome-to-redwood.md
โ””โ”€โ”€ wrapping-up.md

Processing rules

This is what changes in the output file

  1. close all <img> tags
  2. convert video container and iframe classes
  3. convert tutorial internal links to relative paths (https://redwoodjs.com/tutorial/getting-dynamic#creating-a-post-editor -> ./getting-dynamic#creating-a-post-editor )
  4. convert dotcom relative paths (/docs/..) to absolute paths
  5. convert code line highlight syntax (add space between lang and {})
  6. split into sections
  7. add frontmatter

pinecone's People

Contributors

clairefro avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.