Git Product home page Git Product logo

codephoto's Introduction

CodePhoto ๐Ÿ’ป๐Ÿ“ธ

Create and share images of your source code.

Table of Contents

Installation

From NPM for use as a command line app:

npm install codephoto -g

From NPM for programmatic use:

npm install codephoto

Usage

Programatic:

import codephoto from 'codephoto'

const screenshotBuffer = await codephoto.takeScreenshot('<p>Hello World!</p>', 'html')
// Save the screenshot buffer to a file (e.g., 'screenshot.png')
// Example using the fs module
// fs.writeFileSync('screenshot.png', screenshotBuffer);

CLI:

codephoto [input file]

Example:

codephoto ./code-sample.html

All generated images will be saved in the same directory where command was executed.

Contributing

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature-name.
  3. Make your changes.
  4. Push your branch: git push origin feature-name.
  5. Create a pull request.

Roadmap

  1. Export in Different Formats:

    • Enhance the package to support exporting screenshots in various formats such as PNG, JPEG, and SVG.
    • Provide users with options to specify the desired output format according to their needs.
  2. Create Aesthetic Frames for Generated Images:

    • Introduce the capability to add aesthetic frames or borders to the generated images.
    • Allow users to customize and style the frames to enhance the visual appeal of the screenshots.

License

This project is licensed under the MIT License.

codephoto's People

Contributors

angelrodro avatar

Stargazers

Stanley-Orabueze avatar  avatar

Watchers

 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.