1.0.1 • Published 2 years ago

leet.md v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Project license

Pull Requests welcome code with love by jdmauthe


Features

  • Create markdown files of coding problems descriptions
  • Support of different online coding problem platforms:
  • Support of transformers to modify the markdown before being written
    • Add source link to bottom of the file
    • Upload images to Cloudinary
  • Customization through config.json

Getting Started

Prerequisites

  • Node.js 12.0.0+
  • npm

Installation

Leet.md can be installed globally via npm:

npm install leet.md -g

Usage

To create markdown files of coding problems, use the leetmd command:

leetmd [options] <url>

Options

The leetmd command supports the following options:

OptionsDescription
-V, --versionoutput the version number
-f, --file \<name>name for the file being written
--overwriteallow existing file to be overwritten
--no-overwritedo not allow existing file to be overwritten
-hdisplay the help for command

These options will override corresponding settings in config.json

Configuration

You can configure Leet.md by creating a config.json file in the root of the project. You can customize different settings to tailor to your needs. Any setting omitted from the config.json will fallback to their default values.

Quick Start

To create a config.json file with the default setting, you can copy the default.json file.

Linux (bash)

cp default.json config.json

Windows (cmd)

copy default.json config.json

Default Config

The default settings can be found in default.json

{
  "overwrite": false,
  "file": "README.md",
  "platforms": {
    "leetcode": {}
  },
  "transformers": {}
}

Example Config

{
  "overwrite": true,
  "file": "Problem.md",
  "transformers": {
    "source": {}
  }
}

Settings

SettingDescriptionTypeDefault
overwriteoverwrite file if it already existsbooleanfalse
filename for the file being writtenstringREADME.md
platformslist of platforms to enable and their configurationsobject{ leetcode: {} }
transformerslist of transformers to apply to markdown before writingobject{}

Support

Reach out to the maintainer at one of the following places:

Security

Leet.md follows good practices of security, but 100% security cannot be assured. Leet.md is provided "as is" without any warranty. Use at your own risk.

For more information and to report security issues, please refer to our security documentation.

License

This project is licensed under the MIT license.

See LICENSE for more information.