From 2afec134bb210a1ca1e1b5ec8fa640057acd4e7e Mon Sep 17 00:00:00 2001 From: Oliver Spryn <2717340+oliverspryn@users.noreply.github.com> Date: Fri, 10 May 2019 20:28:00 -0400 Subject: [PATCH] Fixes #22 Build Project on Azure Pipelines --- README.md | 30 ++++++++++++++++++++++++++++++ azure-pipelines.yml | 25 +++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 README.md create mode 100644 azure-pipelines.yml diff --git a/README.md b/README.md new file mode 100644 index 0000000..bb9a59f --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# Indexer + +[![Build Status](https://dev.azure.com/branham-player/indexer/_apis/build/status/branham-player.indexer%20(1)?branchName=develop)](https://dev.azure.com/branham-player/indexer/_build/latest?definitionId=3&branchName=develop) + +A parser which indexes unstructured collections of data representing William Branham's complete sermon library and structures them for loading into a data ingester. + +This project is part of a three-part system which collectively stores, indexes, and then outputs a collection of sermons as JSON files: + +1. [Original Sources](https://github.com/branham-player/original-sources): Sermon metadata from various online data sources +1. **[Indexer](https://github.com/branham-player/indexer): This project, takes the information from the above source and processes it as output into the next source** +1. [Golden Dataset](https://github.com/branham-player/golden-dataset): JSON files which are generated by the indexer and manually uploaded to the repository + +## Run this Project + +To run this project and generate the intended output, you will need the latest version of [NodeJS](https://nodejs.org/en/download/). Once that is installed, run these commands: + +```bash +git clone https://github.com/branham-player/indexer.git +git clone https://github.com/branham-player/original-sources.git + +cd indexer +npm install +npm run all +``` + +The result of a successful execution is the presence of three new files in the root folder: + +- `full.json`: A complete dataset which contains all of the information the program could gather from the original sources +- `condensed.json`: A shortened version of the `full.json` file which contains the most essential pieces of information for the everyday user +- `months.json`: Counts the number of years and months which are present in `full.json` diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..5be2043 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,25 @@ +name: $(SourceBranchName) $(Rev:r) +pr: none + +pool: + vmImage: 'windows-2019' + +steps: +- script: | + npm install + displayName: 'Install package.json Dependencies' + +- script: | + git clone -q https://github.com/branham-player/original-sources.git + displayName: 'Pull Original Sources Repository' + +- script: | + md output + node --experimental-modules database.mjs ./original-sources/ ./output/full.json ./output/condensed.json + node --experimental-modules months.mjs ./output/full.json ./output/months.json + displayName: 'Build the Database' + +- task: PublishPipelineArtifact@0 + displayName: 'Save JSON Files' + inputs: + targetPath: 'output'