Git Product home page Git Product logo

platform-bible-extension-verse-image-generator's Introduction

platform-bible-extension-verse-image-generator

Platform.Bible Extension - Generates images based on current verse or other prompt. For OCE Learn-a-thon Spring 24

Presentation Links

Summary

The general file structure is as follows:

  • package.json contains information about this extension's npm package. It is required for Platform.Bible to use the extension properly. It is copied into the build folder
  • manifest.json is the manifest file that defines the extension and important properties for Platform.Bible. It is copied into the build folder
  • src/ contains the source code for the extension
    • src/main.ts is the main entry file for the extension
    • src/types/verse-image-generator.d.ts is this extension's types file that defines how other extensions can use this extension through the papi. It is copied into the build folder
    • *.web-view.tsx files will be treated as React WebViews
    • *.web-view.html files are a conventional way to provide HTML WebViews (no special functionality)
  • assets/ contains asset files the extension and its WebViews can retrieve using the papi-extension: protocol. It is copied into the build folder
  • contributions/ contains JSON files the platform uses to extend data structures for things like menus and settings. The JSON files are referenced from the manifest
  • public/ contains other static files that are copied into the build folder
  • dist/ is a generated folder containing the built extension files
  • release/ is a generated folder containing a zip of the built extension files

To install

Install dependencies:

  1. Follow the instructions to install paranext-core.
  2. In this repo, run npm install to install local and published dependencies

Configure paths to paranext-core repo

In order to interact with paranext-core, you must point package.json to your installed paranext-core repository:

  1. Follow the instructions to install paranext-core. We recommend you clone paranext-core in the same parent directory in which you cloned this repository so you do not have to reconfigure paths to paranext-core.
  2. If you cloned paranext-core anywhere other than in the same parent directory in which you cloned this repository, update the paths to paranext-core in this repository's package.json to point to the correct paranext-core directory.

To run

Running Platform.Bible with this extension

To run Platform.Bible with this extension:

npm start

Note: The built extension will be in the dist folder. In order for Platform.Bible to run this extension, you must provide the directory to this built extension to Platform.Bible via a command-line argument. This command-line argument is already provided in this package.json's start script. If you want to start Platform.Bible and use this extension any other way, you must provide this command-line argument or put the dist folder into Platform.Bible's extensions folder.

Building this extension independently

To watch extension files (in src) for changes:

npm run watch

To build the extension once:

npm run build

To package for distribution

To package this extension into a zip file for distribution:

npm run package

To update this extension from the template

This extension project is forked from paranext-extension-template, which is updated periodically and will sometimes receive updates that help with breaking changes on paranext-core. We recommend you periodically update your extension by merging the latest template updates into your extension.

To set up this extension to be updated from the template, run the following command once after cloning this repo:

git remote add template https://github.com/paranext/paranext-extension-template

To update this extension from the template, make sure your repo has no working changes. Then run the following commands:

git fetch template
git merge template/main --allow-unrelated-histories

For more information, read the instructions on the wiki.

Note: The merge/squash commits created when updating this repo from the template are important; Git uses them to compare the files for future updates. If you edit this repo's Git history, please preserve these commits (do not squash them, for example) to avoid duplicated merge conflicts in the future.

Special features in this project

This project has special features and specific configuration to make building an extension for Platform.Bible easier. See Special features of paranext-multi-extension-template for information on these special features.

platform-bible-extension-verse-image-generator's People

Contributors

tjcouch-sil avatar rolfheij-sil avatar lyonsil avatar irahopkinson avatar dependabot[bot] avatar foolrunning avatar jolierabideau 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.