Skip to content

Commit

Permalink
chore: move sources list to data folder
Browse files Browse the repository at this point in the history
  • Loading branch information
sarabveer committed Jan 1, 2024
1 parent cec412c commit a4b218a
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/backport.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

require( './string-colors' )
const { GURMUKHI_SOURCES } = require( './utils' )
const GURMUKHI_SOURCES = require( '../data/sourcesList' )
const { resolve } = require( 'path' )
const { readFile, readdir, rename, unlink, writeFile } = require( 'fs/promises' )

Expand Down
1 change: 0 additions & 1 deletion lib/build-database.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@ const importBanis = async trx => {
const setGitRevision = async knex => {
console.log( '\nSetting git revision'.subheader )

console.log( JSON_PATH )
const commitSHA = require( 'child_process' )
.execSync( 'git rev-parse HEAD', { cwd: JSON_PATH } )
.toString()
Expand Down
2 changes: 1 addition & 1 deletion lib/build-gutka.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require( './string-colors' )
const { GURMUKHI_SOURCES } = require( './utils' )
const GURMUKHI_SOURCES = require( '../data/sourcesList' )
const build = require( './build-database' )
const { filename } = require( '..' )
const fs = require( 'fs' )
Expand Down
1 change: 1 addition & 0 deletions lib/build-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ const main = async () => {
await fsCopy( `${OUTPUT_DIR}/.git`, `${TMP_DIR}/.git` )
await fsCopy( `${OUTPUT_DIR}/.github`, `${TMP_DIR}/.github` )
await fsCopy( `${OUTPUT_DIR}/README.md`, `${TMP_DIR}/README.md` )
await fsCopy( `${OUTPUT_DIR}/sourcesList.js`, `${TMP_DIR}/sourcesList.js` )
await rimraf( OUTPUT_DIR )
renameSync( TMP_DIR, OUTPUT_DIR )

Expand Down
17 changes: 0 additions & 17 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,24 +82,7 @@ const larivaar = input => input
.replace( /\s+\u200B/ug, ' ' )
.replace( /\u200B\s+/ug, ' ' )

// Gurmukhi sources with fallback ordering
const GURMUKHI_SOURCES = {
Ardaas: [ 'SGPC' ],
'Ganj Nama Bhai Nand Lal Ji': [ 'Master Jaswant Singh', 'Dr. Ganda Singh' ],
'Ghazals Bhai Nand Lal Ji': [ 'Dr. Ganda Singh' ],
'Jot Bigas Bhai Nand Lal Ji': [ 'Dr. Ganda Singh' ],
'Kabit Savaiye Bhai Gurdas Ji': [ 'Seva Singh' ],
'Sarabloh Granth': [ 'Amrit Keertan' ],
'Sri Dasam Granth': [ 'GurbaniNow', 'Master Jaswant Singh', 'Bhai Joginder Singh Talwara', 'Bhai Kulbir Singh', 'SGPC', 'Piara Singh Padam', 'Dr. Rattan Singh Jaggi' ],
'Sri Guru Granth Sahib Ji': [ 'GurbaniNow', 'Bhai Sahib Randhir Singh', 'Master Jaswant Singh', 'Bhai Joginder Singh Talwara', 'Bhai Kulbir Singh', 'SGPC' ],
'Vaaran Bhai Gurdas Ji': [ 'Amrit Keertan', 'SGPC' ],
'Zindagi Nama Bhai Nand Lal Ji': [ 'Dr. Ganda Singh' ],
Rehitname: [],
Uggardanti: [],
}

module.exports = {
GURMUKHI_SOURCES,
writeJSON,
stripExtension,
createDir,
Expand Down

0 comments on commit a4b218a

Please sign in to comment.