splid-js-googlesheet-updater/constants.js
martinshoob 3a439285aa Refactors constants for spreadsheet data
Updates constants to reflect changes in the Google Sheet structure.

Removes hardcoded name aliases and introduces a new sheet to manage them.
Updates sheet ranges and column indices to align with the updated structure.

This change centralizes alias management, improving maintainability and data integrity.
2025-05-31 14:35:16 +02:00

38 lines
838 B
JavaScript

export let NAME_ALIASES = {
'default': 'Ostatní'
};
export const ALIAS_TO_EMOJI = {};
export const SPREADSHEET_ID = '1RxeQTnirJILgqXDuvI2RQt9vljn1Jz_JFCzVDRQviIg';
// Google Sheets configuration
export const SHEETS_CONFIG = {
keyFile: 'application-key.json',
scopes: ['https://www.googleapis.com/auth/spreadsheets'],
};
// Sheet ranges
export const SHEET_RANGES = {
SPLID_CODES: 'Splidy!D2:D',
SPLID_NAMES: 'Splidy!B2:B',
USER_TAGS: 'Splidy!F1:N1',
DATA_RESET: 'Splidy!F2:N',
DATA_ROW: (rowIndex) => `Splidy!F${rowIndex + 2}:N${rowIndex + 2}`,
ALIASES: 'Přezdívky!A:H',
RAW: 'raw'
};
// Other constants
export const TABLE_RESET_ROW_COUNT = 100;
export const TABLE_COLUMN_COUNT = 9; // Columns E through M
export const COLUMN_INDICES = {
B: 2,
E: 4,
F: 5,
M: 12,
N: 13
};
export const SHEET_ID = 0;