MoralCode / AdvancementURLFiller

A small utility webpage for assembling giving URLS for RIT Advancement
https://moralcode.github.io/AdvancementURLFiller/
MIT License
0 stars 0 forks source link

AdvancementURLFiller

This project is a simple webpage that fetches data from a Google Sheets document, displays the data in a dropdown menu, and generates a URL based on the selected dropdown value.

The site was built to help simplify the formerly-manual process for fundraising ambassadors to easily build links both to firect donors to give to specific groups, as well as to associate those gifts with their fundraising efforts.

Features

Note: Currently the code has a few things that are still hard-coded for one particular usecase. It may require some additional modifications to use for other purposes

Getting Started with development

To get started, follow the steps below to set up and run the project locally.

Prerequisites

Project Setup

  1. Clone the Repository

  2. Edit API key and base URL

    • Open main.mjs.
    • Replace the values on and around the line that starts with export function buildURL( with ones appropriate for your usecase. See the Sheets API documentation for more details.
      • the google sheet ID is the long random-looking value in the URL when you visit the google sheet
      • the range is the tab name and cell range
      • the key is your API key
  3. Run Locally:

    • To run the app locally with a simple HTTP server Using Python 3:
      python -m http.server 8000

      Then, navigate to http://localhost:8000 in your browser

Running Tests

This project uses Jasmine for unit testing.

To set up testing, run npm install

If your API key is restricted to a certain domain, you may need to create a new one for testing.

To run the tests, run: TEST_KEY="[YOUR TEST KEY]" npm test