mirror of
https://github.com/scotttomaszewski/obsidian-disciples-journal.git
synced 2026-07-22 05:42:13 +00:00
Cleaning out overly verbose console logs
This commit is contained in:
parent
9c14d4c964
commit
89d2c084b5
3 changed files with 3 additions and 20 deletions
|
|
@ -97,12 +97,9 @@ export default class DisciplesJournalPlugin extends Plugin {
|
|||
this.registerEvent(
|
||||
this.app.workspace.on('active-leaf-change', this.handleActiveLeafChange.bind(this))
|
||||
);
|
||||
|
||||
console.log('Disciples Journal plugin loaded');
|
||||
}
|
||||
|
||||
onunload() {
|
||||
console.log('Unloading Disciples Journal plugin');
|
||||
this.bibleStyles.removeStyles();
|
||||
}
|
||||
|
||||
|
|
@ -131,7 +128,6 @@ export default class DisciplesJournalPlugin extends Plugin {
|
|||
async loadBibleData() {
|
||||
try {
|
||||
await this.bibleContentService.loadBible(null);
|
||||
console.log('Bible data loaded successfully');
|
||||
} catch (error) {
|
||||
console.error('Failed to load Bible data:', error);
|
||||
}
|
||||
|
|
@ -327,7 +323,6 @@ export default class DisciplesJournalPlugin extends Plugin {
|
|||
const exists = await this.app.vault.adapter.exists(chapterPath);
|
||||
if (!exists) {
|
||||
await this.app.vault.create(chapterPath, content);
|
||||
console.log(`Created chapter note: ${chapterPath}`);
|
||||
}
|
||||
|
||||
return chapterPath;
|
||||
|
|
|
|||
|
|
@ -70,26 +70,19 @@ export class BibleContentService {
|
|||
public loadBible(bibleData: any): void {
|
||||
// Process the raw data into our expected format
|
||||
if (!bibleData) {
|
||||
console.log("No Bible data provided, skipping load");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
console.log("Loading Bible data...");
|
||||
|
||||
// Check if the data is already in our expected format
|
||||
if (this.isStructuredBibleFormat(bibleData)) {
|
||||
console.log("Data is in structured Bible format");
|
||||
this.bible = bibleData;
|
||||
} else if (this.isESVApiFormat(bibleData)) {
|
||||
console.log("Data is in ESV API format");
|
||||
// Convert the ESV API format to our structured format
|
||||
this.loadESVApiData(bibleData);
|
||||
} else {
|
||||
console.error("Unsupported Bible data format");
|
||||
}
|
||||
|
||||
console.log("Bible data loaded successfully");
|
||||
} catch (error) {
|
||||
console.error("Error loading Bible data:", error);
|
||||
}
|
||||
|
|
@ -177,14 +170,14 @@ export class BibleContentService {
|
|||
*/
|
||||
public getVerse(book: string, chapter: number, verse: number): BibleVerse | null {
|
||||
if (!this.bible) {
|
||||
console.log("Bible data not loaded");
|
||||
console.error("Bible data not loaded");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Standardize the book name
|
||||
const standardBook = this.bookNameService.standardizeBookName(book);
|
||||
if (!standardBook) {
|
||||
console.log(`Invalid book name: ${book}`);
|
||||
console.error(`Invalid book name: ${book}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -330,7 +323,7 @@ export class BibleContentService {
|
|||
// Parse the reference string to get the structured reference
|
||||
const reference = this.bibleReferenceParser.parse(referenceString);
|
||||
if (!reference) {
|
||||
console.log(`Could not parse reference: ${referenceString}`);
|
||||
console.error(`Could not parse reference: ${referenceString}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,8 +96,6 @@ export class ESVApiService {
|
|||
canonical,
|
||||
htmlContent
|
||||
};
|
||||
|
||||
console.log(`Loaded HTML content for ${canonical}`);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
@ -184,8 +182,6 @@ export class ESVApiService {
|
|||
// Save the raw API response as JSON
|
||||
const jsonPath = `${bookPath}/${data.canonical}.json`;
|
||||
await this.app.vault.adapter.write(jsonPath, JSON.stringify(data));
|
||||
|
||||
console.log(`Saved ESV API response to ${jsonPath}`);
|
||||
} catch (error) {
|
||||
console.error('Error saving ESV API response:', error);
|
||||
}
|
||||
|
|
@ -202,7 +198,6 @@ export class ESVApiService {
|
|||
currentPath += (currentPath ? '/' : '') + part;
|
||||
if (!(await this.app.vault.adapter.exists(currentPath))) {
|
||||
await this.app.vault.adapter.mkdir(currentPath);
|
||||
console.log(`Created directory: ${currentPath}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue