massCode Importer Link to heading

License GitHub Issues GitHub Pull Requests

massCode-Importer is a command-line tool designed to simplify the process of importing code snippets from your GitHub Gists into massCode, a lightweight and cross-platform code snippet manager.

This tool converts your Gists into massCode-compatible snippets and tags for easy organization and access.

Table of Contents Link to heading

Features Link to heading

  • Import code snippets from GitHub Gists into massCode.
  • Automatically create tags based on the hashtags in your Gist descriptions.
  • Convert Gist files into massCode snippet content.
  • Organize and manage your code snippets efficiently in massCode.

Getting Started Link to heading

Prerequisites Link to heading

Before you begin, make sure you have the following prerequisites installed on your system:

Installation Link to heading

  1. Clone the repository:
git clone https://github.com/pauloeli/massCode-Importer.git
  1. Change to the project’s directory:
cd massCode-Importer
  1. Install the required dependencies using npm or yarn:
npm install
# or
yarn install

Usage Link to heading

To use massCode-Importer, follow these steps:

  1. Make sure you have set up your GitHub Gists with the necessary code snippets and descriptions.

  2. Create a .env file in the project directory and add your GitHub token:

GITHUB_TOKEN=your_github_token_here
GITHUB_USERNAME=your_github_username_here

Replace your_github_token_here with your GitHub personal access token and your_github_username_here with your GitHub username. Fallow this link to create the Classic Token. Select the gist scope.

  1. Run the importer:
node --require ts-node/register src/app.ts

The importer will fetch your GitHub Gists, convert them into massCode-compatible format, and create JSON files for tags and snippets.

  1. Once the process is complete, you’ll find two JSON files generated in the project directory: tags.json and snippets.json.

  2. Open massCode and import these JSON files to organize and manage your code snippets.

Contributing Link to heading

Contributions are welcome! If you have any suggestions, find a bug, or want to add a feature, please open an issue or submit a pull request.

License Link to heading

This project is licensed under the MIT License.