npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mephisto-review

v3.0.0

Published

Template to quickly start up and utilize a review UI for mephisto review.

Downloads

9

Readme

Mephisto Review App

A template for an app that can quickly create a review UI for utilization with the mephisto review command

Table of Contents

  1. Usage
  2. Notes
  3. Customization

Usage

  1. Create a sample data.csv:

    This is good text, row1
    This is bad text, row2
  2. Use create-react-app to quickly create a Review UI with this template

    npx create-react-app my-review --template mephisto-review

  3. Build your react app

Change to the directory of your react app:

cd my-review

Build your app

npm run build
  1. Run mephisto review in your Mephisto directory

Change directory to the location of your Mephisto installation

cd ~/path/to/your/Mephisto/installation

Make note of the paths to your data file and react app relative to the location of your Mephisto installation

$ cat ~/path/to/your/data.csv | mephisto review ~/path/to/your/my-review/build -o results.csv --all
  1. Open the react app hosted at the port specified by the ouput from the above command

If Mephisto review ran correctly you should see output similar to the following on your terminal:

Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Open http://127.0.0.1:5000/ or the given URL on an internet browser

  1. Review your sample data with the UI prompts

  2. Press Ctrl-C in your terminal to shut down Mephisto review if it has not shut down automatically

  3. View your review results in the generated results.csv

Notes

  • The ID property of review items represents their 0-indexed position within the given list of review items for Mephisto review.
  • If you wish to review jsonl type data, remember to add the --json flag to your Mephisto review command for proper data parsing.
  • If you wish to review all items in an unordered fashion include the --all flag in your Mephisto review command
  • If you wish to review all items once in an ordered fashion do not include the --all flag in your Mephisto review command

Customization

To customize the App, make modifications to the index.js file You can customize the way review items are displayed for both of the two routes in the App:

  1. Customize the layout of all data:

    • Modify the properties of the <AllItemView/> tag under the / route on line 35.

    • If you do not wish to use pagination, set the pagination property to false (default is true, must be a boolean value)

    • Adjust the number of results that appear per page of review by setting the resultsPerPage property (must be an integer)

    • Add custom renderers for rendering the layout of all items by passing a itemListRenderer property to AllItemView:

      • The itemListRenderer property must be a react component.
      • The itemListRenderer component will be passed down a property of data, which represents an array of all review items.
      • The itemListRenderer component will also be passed down a property of itemRenderer which can itemListRenderer the data of a single item.
      • The itemRenderer can be placed in each of the individual item views of your itemListRenderer
      • By default the item itemListRenderer will be a header displaying the item id as well as a pre element containing the stringified JSON data of the item
    • Customize the layout of individual items in either the default itemListRenderer or your custom itemListRenderer by passing an itemRenderer property to AllItemView:

      • The itemRenderer must be a react component.
      • The itemRenderer will be passed down a property of item
      • The item property will contain the propertys of data representing the JSON data of the review item as well as an id representing the 0 indexed position of the item in the review data
  2. Customize the layout of individual item views:

    • Modify the properties of the <ItemView/> tag under the / route on line 24.

    • Add custom renderers for items by passing an itemRenderer property to ItemView:

      • The itemRenderer property must be a react component.
      • The itemRenderer component will be passed down a property of item
      • The item property will contain the properties of data representing the JSON data of the review item as well as an id representing the 0 indexed position of the item in the review data