Skip to content

Update hymnals is the service that ensures changes made to the All Hymnals Sheets having the hymnals data is updated to the Hymnals Data repo where it is picked by the Study Hymnal.

Notifications You must be signed in to change notification settings

GospelSounders/updatehymnals

Repository files navigation

Update Hymnals

Components

Update Hymnals works together with these other components:

Update hymnals is the service that ensures changes made to the All Hymnals Sheets having the hymnals data is updated to the Hymnals Data repo where it is picked by the Study Hymnal.

Table of Contents

Installation

Requirements

  • nodejs v>=6
  • yarn /npm

Installing Prerequisites

Installing UpdateHymnals

We will presume that you have git installed. If not then grab it!

cd /var/www/html/updatehymnals/
git clone https://github.com/GospelSounders/updatehymnals.git
cd updatehymnals/
yarn install
cd install
cp -r lib/ /
cd ../hymnals-data
git clone https://github.com/GospelSounders/hymnals-data.git .

Change also localhost to the url of your server in the google scripts. The default port(defined in .env.example) is 3002

cd /var/www/html/updatehymnals/resources

./changeurl.sh  http://localhost:3002 your-url:your_port

Then use the import All Hymnals.xlsx from resources to google sheets and create a script with the contents from script.gs

Usage

Enable the service after installation

systemctl daemon-reload
systemctl enable updatehymnals.service
systemctl start updatehymnals.service
  • Goto All Hymnals.xlsx
  • Open the tab of the hymnal to update
  • Click on Update hymnals menu and wait until a msgbox appears
  • Copy link from message box and paste into bin/resources/csvuploads/{HYMNALNAME}.enc
  • remove the part of the url that is equal to https://www.gospelsounders.org/updatehymnals/hymnals/SDAH/
  • sync with server by running (from /path/to/updatehymnals/)
rsync -a bin/csvuploads/ root@gospelsounders.org:/var/www/html/updatehymnals/bin/csvuploads/
  • Open your browser to https://www.gospelsounders.org/updatehymnals/hymnalsv1/{hymnalname}
  • Go back to sheets and open AllHymnalsSheet and increment fixed for that hymnal and change updated to 1
  • Go to github and merge changes to master

Then just peek in to see if things work fine

journalctl -f -u updatehymnals

Features

  • Automatic updates

Todo

  • Create forms
  • Update from sheets hourly

About

Update hymnals is the service that ensures changes made to the All Hymnals Sheets having the hymnals data is updated to the Hymnals Data repo where it is picked by the Study Hymnal.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages