@@ -43,7 +43,7 @@
|
||||
"dexie": "^3.2.2",
|
||||
"lodash-es": "4.17.21",
|
||||
"minisearch": "github:scambier/minisearch#callback_desync",
|
||||
"obsidian-text-extract": "1.0.2",
|
||||
"obsidian-text-extract": "1.0.3",
|
||||
"pure-md5": "^0.1.14"
|
||||
},
|
||||
"pnpm": {
|
||||
|
||||
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@@ -22,7 +22,7 @@ specifiers:
|
||||
lodash-es: 4.17.21
|
||||
minisearch: github:scambier/minisearch#callback_desync
|
||||
obsidian: latest
|
||||
obsidian-text-extract: 1.0.2
|
||||
obsidian-text-extract: 1.0.3
|
||||
prettier: ^2.7.1
|
||||
prettier-plugin-svelte: ^2.8.0
|
||||
pure-md5: ^0.1.14
|
||||
@@ -38,7 +38,7 @@ dependencies:
|
||||
dexie: 3.2.2
|
||||
lodash-es: 4.17.21
|
||||
minisearch: github.com/scambier/minisearch/adf11cab46d851220a41c9ad95ed986b630f0f3c
|
||||
obsidian-text-extract: 1.0.2
|
||||
obsidian-text-extract: 1.0.3
|
||||
pure-md5: 0.1.14
|
||||
|
||||
devDependencies:
|
||||
@@ -4131,8 +4131,8 @@ packages:
|
||||
object-keys: 1.1.1
|
||||
dev: true
|
||||
|
||||
/obsidian-text-extract/1.0.2:
|
||||
resolution: {integrity: sha512-OOnV1B0kTED46vxPRLOHdHeev6CqcXs6A39DE3IJaEV9PNZKPF3/f6d3t7/zFLgOVMNiVD9Uj+YziAhXeKt4lw==}
|
||||
/obsidian-text-extract/1.0.3:
|
||||
resolution: {integrity: sha512-nqIfKfAV3vCn5jFl77iJQOqM9fTik3cESroeMENbr3q/1R6hj0ancJISw6/fIMRwWb50zVra51cWqL+rPZCDMQ==}
|
||||
dependencies:
|
||||
dexie: 3.2.2
|
||||
p-limit: 4.0.0
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
Notice,
|
||||
Platform,
|
||||
Plugin,
|
||||
PluginSettingTab,
|
||||
Setting,
|
||||
@@ -82,9 +83,10 @@ export class SettingsTab extends PluginSettingTab {
|
||||
new Setting(containerEl).setName('Indexing').setHeading()
|
||||
|
||||
// PDF Indexing
|
||||
const indexPDFsDesc = new DocumentFragment()
|
||||
indexPDFsDesc.createSpan({}, span => {
|
||||
span.innerHTML = `Omnisearch will include PDFs in search results.
|
||||
if (!Platform.isMobileApp) {
|
||||
const indexPDFsDesc = new DocumentFragment()
|
||||
indexPDFsDesc.createSpan({}, span => {
|
||||
span.innerHTML = `Omnisearch will include PDFs in search results.
|
||||
<ul>
|
||||
<li>⚠️ Each PDF can take anywhere from a few seconds to 2 minutes to be processed.</li>
|
||||
<li>⚠️ Texts extracted from PDFs may contain errors such as missing spaces, or spaces in the middle of words.</li>
|
||||
@@ -92,37 +94,39 @@ export class SettingsTab extends PluginSettingTab {
|
||||
<li>This feature is currently a work-in-progress, please report issues that you might experience.</li>
|
||||
</ul>
|
||||
<strong style="color: var(--text-accent)">Needs a restart to fully take effect.</strong>`
|
||||
})
|
||||
new Setting(containerEl)
|
||||
.setName('PDF Indexing')
|
||||
.setDesc(indexPDFsDesc)
|
||||
.addToggle(toggle =>
|
||||
toggle.setValue(settings.PDFIndexing).onChange(async v => {
|
||||
settings.PDFIndexing = v
|
||||
await saveSettings(this.plugin)
|
||||
})
|
||||
)
|
||||
})
|
||||
new Setting(containerEl)
|
||||
.setName('PDF Indexing')
|
||||
.setDesc(indexPDFsDesc)
|
||||
.addToggle(toggle =>
|
||||
toggle.setValue(settings.PDFIndexing).onChange(async v => {
|
||||
settings.PDFIndexing = v
|
||||
await saveSettings(this.plugin)
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
// Images Indexing
|
||||
const indexImagesDesc = new DocumentFragment()
|
||||
indexImagesDesc.createSpan({}, span => {
|
||||
span.innerHTML = `Omnisearch will use <a href="https://en.wikipedia.org/wiki/Tesseract_(software)">Tesseract</a> to index images from their text.
|
||||
if (!Platform.isMobileApp) {
|
||||
const indexImagesDesc = new DocumentFragment()
|
||||
indexImagesDesc.createSpan({}, span => {
|
||||
span.innerHTML = `Omnisearch will use <a href="https://en.wikipedia.org/wiki/Tesseract_(software)">Tesseract</a> to index images from their text.
|
||||
<ul>
|
||||
<li>Only English is supported at the moment.</li>
|
||||
<li>Not all images can be correctly read by the OCR, this feature works best with scanned documents.</li>
|
||||
</ul>
|
||||
<strong style="color: var(--text-accent)">Needs a restart to fully take effect.</strong>`
|
||||
})
|
||||
new Setting(containerEl)
|
||||
.setName('BETA - Images Indexing')
|
||||
.setDesc(indexImagesDesc)
|
||||
.addToggle(toggle =>
|
||||
toggle.setValue(settings.imagesIndexing).onChange(async v => {
|
||||
settings.imagesIndexing = v
|
||||
await saveSettings(this.plugin)
|
||||
})
|
||||
)
|
||||
|
||||
})
|
||||
new Setting(containerEl)
|
||||
.setName('BETA - Images Indexing')
|
||||
.setDesc(indexImagesDesc)
|
||||
.addToggle(toggle =>
|
||||
toggle.setValue(settings.imagesIndexing).onChange(async v => {
|
||||
settings.imagesIndexing = v
|
||||
await saveSettings(this.plugin)
|
||||
})
|
||||
)
|
||||
}
|
||||
// Additional files to index
|
||||
const indexedFileTypesDesc = new DocumentFragment()
|
||||
indexedFileTypesDesc.createSpan({}, span => {
|
||||
@@ -370,6 +374,11 @@ export let settings = Object.assign({}, DEFAULT_SETTINGS) as OmnisearchSettings
|
||||
export async function loadSettings(plugin: Plugin): Promise<void> {
|
||||
settings = Object.assign({}, DEFAULT_SETTINGS, await plugin.loadData())
|
||||
|
||||
if (Platform.isMobileApp) {
|
||||
settings.PDFIndexing = false
|
||||
settings.imagesIndexing = false
|
||||
}
|
||||
|
||||
showExcerpt.set(settings.showExcerpt)
|
||||
}
|
||||
|
||||
|
||||
@@ -76,5 +76,6 @@
|
||||
"1.8.0-beta.5": "1.0.0",
|
||||
"1.8.0-beta.6": "1.0.0",
|
||||
"1.8.0-beta.7": "1.0.0",
|
||||
"1.8.0": "1.0.0"
|
||||
"1.8.0": "1.0.0",
|
||||
"1.8.1": "1.0.0"
|
||||
}
|
||||
Reference in New Issue
Block a user