Skip to content

Commit

Permalink
Added Entire Quran, Renamed Quran Folder to Quran Related, Added Defi…
Browse files Browse the repository at this point in the history
…nitions
  • Loading branch information
OdyAsh committed Mar 30, 2024
1 parent a6e86d6 commit c5a46b3
Show file tree
Hide file tree
Showing 6,284 changed files with 44,076 additions and 59 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 2 additions & 1 deletion .obsidian/community-plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@
"obsidian-quiet-outline",
"consistent-attachments-and-links",
"global-search-and-replace",
"obsidian-dictionary-plugin"
"obsidian-dictionary-plugin",
"hot-reload"
]
Empty file.
110 changes: 110 additions & 0 deletions .obsidian/plugins/hot-reload/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
const {Plugin, Notice, debounce} = require("obsidian");
const fs = require("fs");

const watchNeeded = window.process.platform !== "darwin" && window.process.platform !== "win32";

module.exports = class HotReload extends Plugin {

statCache = new Map(); // path -> Stat
queue = Promise.resolve();

run(val, err) {
return this.queue = this.queue.then(val, err);
}

reindexPlugins = debounce(() => this.run(() => this.getPluginNames()), 500, true);
requestScan = debounce(() => this.run(() => this.checkVersions()), 250, true);

onload() {
app.workspace.onLayoutReady(async ()=> {
this.pluginReloaders = {};
this.inProgress = null;
await this.getPluginNames();
this.registerEvent( this.app.vault.on("raw", this.requestScan));
this.watch(this.app.plugins.getPluginFolder());
this.requestScan();
this.addCommand({
id: "scan-for-changes",
name: "Check plugins for changes and reload them",
callback: () => this.requestScan()
})
});
}

watch(path) {
if (this.app.vault.adapter.watchers.hasOwnProperty(path)) return;
const realPath = [this.app.vault.adapter.basePath, path].join("/");
const lstat = fs.lstatSync(realPath, {throwIfNoEntry: false});
if (lstat && (watchNeeded || lstat.isSymbolicLink()) && fs.statSync(realPath).isDirectory()) {
this.app.vault.adapter.startWatchPath(path, false);
}
}

async checkVersions() {
const base = this.app.plugins.getPluginFolder();
for (const dir of Object.keys(this.pluginNames)) {
for (const file of ["manifest.json", "main.js", "styles.css", ".hotreload"]) {
const path = `${base}/${dir}/${file}`;
const stat = await app.vault.adapter.stat(path);
if (stat) {
if (this.statCache.has(path) && stat.mtime !== this.statCache.get(path).mtime) {
this.onFileChange(path);
}
this.statCache.set(path, stat);
}
}
}
}

async getPluginNames() {
const plugins = {}, enabled = new Set();
for (const {id, dir} of Object.values(app.plugins.manifests)) {
this.watch(dir);
plugins[dir.split("/").pop()] = id;
if (
await this.app.vault.exists(dir+"/.git") ||
await this.app.vault.exists(dir+"/.hotreload")
) enabled.add(id);
}
this.pluginNames = plugins;
this.enabledPlugins = enabled;
}

onFileChange(filename) {
if (!filename.startsWith(this.app.plugins.getPluginFolder()+"/")) return;
const path = filename.split("/");
const base = path.pop(), dir = path.pop();
if (path.length === 1 && dir === "plugins") return this.watch(filename);
if (path.length != 2) return;
const plugin = dir && this.pluginNames[dir];
if (base === "manifest.json" || base === ".hotreload" || base === ".git" || !plugin) return this.reindexPlugins();
if (base !== "main.js" && base !== "styles.css") return;
if (!this.enabledPlugins.has(plugin)) return;
const reloader = this.pluginReloaders[plugin] || (
this.pluginReloaders[plugin] = debounce(() => this.run(() => this.reload(plugin), console.error), 750, true)
);
reloader();
}

async reload(plugin) {
const plugins = app.plugins;

// Don't reload disabled plugins
if (!plugins.enabledPlugins.has(plugin)) return;

await plugins.disablePlugin(plugin);
console.debug("disabled", plugin);

// Ensure sourcemaps are loaded (Obsidian 14+)
const oldDebug = localStorage.getItem("debug-plugin");
localStorage.setItem("debug-plugin", "1");
try {
await plugins.enablePlugin(plugin);
} finally {
// Restore previous setting
if (oldDebug === null) localStorage.removeItem("debug-plugin"); else localStorage.setItem("debug-plugin", oldDebug);
}
console.debug("enabled", plugin);
new Notice(`Plugin "${plugin}" has been reloaded`);
}
}
10 changes: 10 additions & 0 deletions .obsidian/plugins/hot-reload/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"id": "hot-reload",
"name": "Hot Reload",
"author": "PJ Eby",
"authorUrl": "https://github.com/pjeby",
"version": "0.1.11",
"minAppVersion": "0.15.9",
"description": "Automatically reload in-development plugins when their files are changed",
"isDesktopOnly": true
}
112 changes: 112 additions & 0 deletions .obsidian/plugins/obsidian-arabic-search/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/

var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// main.ts
var main_exports = {};
__export(main_exports, {
default: () => MyPlugin
});
module.exports = __toCommonJS(main_exports);
var import_obsidian = require("obsidian");
var DEFAULT_SETTINGS = {
mySetting: "default"
};
var MyPlugin = class extends import_obsidian.Plugin {
async onload() {
await this.loadSettings();
const ribbonIconEl = this.addRibbonIcon("dice", "Sample Plugin", (evt) => {
new import_obsidian.Notice("This is a notice!");
});
ribbonIconEl.addClass("my-plugin-ribbon-class");
const statusBarItemEl = this.addStatusBarItem();
statusBarItemEl.setText("Status Bar Text");
this.addCommand({
id: "open-sample-modal-simple",
name: "Open sample modal (simple)",
callback: () => {
new SampleModal(this.app).open();
}
});
this.addCommand({
id: "sample-editor-command",
name: "Sample editor command",
editorCallback: (editor, view) => {
console.log(editor.getSelection());
editor.replaceSelection("Sample Editor Command");
}
});
this.addCommand({
id: "open-sample-modal-complex",
name: "Open sample modal (complex)",
checkCallback: (checking) => {
const markdownView = this.app.workspace.getActiveViewOfType(import_obsidian.MarkdownView);
if (markdownView) {
if (!checking) {
new SampleModal(this.app).open();
}
return true;
}
}
});
this.addSettingTab(new SampleSettingTab(this.app, this));
this.registerDomEvent(document, "click", (evt) => {
console.log("click", evt);
});
this.registerInterval(window.setInterval(() => console.log("setInterval"), 5 * 60 * 1e3));
}
onunload() {
}
async loadSettings() {
this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData());
}
async saveSettings() {
await this.saveData(this.settings);
}
};
var SampleModal = class extends import_obsidian.Modal {
constructor(app) {
super(app);
}
onOpen() {
const { contentEl } = this;
contentEl.setText("Woah!");
}
onClose() {
const { contentEl } = this;
contentEl.empty();
}
};
var SampleSettingTab = class extends import_obsidian.PluginSettingTab {
constructor(app, plugin) {
super(app, plugin);
this.plugin = plugin;
}
display() {
const { containerEl } = this;
containerEl.empty();
new import_obsidian.Setting(containerEl).setName("Setting #1").setDesc("It's a secret").addText((text) => text.setPlaceholder("Enter your secret").setValue(this.plugin.settings.mySetting).onChange(async (value) => {
this.plugin.settings.mySetting = value;
await this.plugin.saveSettings();
}));
}
};
11 changes: 11 additions & 0 deletions .obsidian/plugins/obsidian-arabic-search/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"id": "arabic-search",
"name": "Arabic Search",
"version": "1.0.0",
"minAppVersion": "0.15.0",
"description": "Provides miscellaneous search support for Arabic in Obsidian.",
"author": "OdyAsh",
"authorUrl": "https://github.com/OdyAsh",
"fundingUrl": "https://obsidian.md/pricing",
"isDesktopOnly": false
}
8 changes: 8 additions & 0 deletions .obsidian/plugins/obsidian-arabic-search/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
This CSS file will be included with your plugin, and
available in the app when your plugin is enabled.
If your plugin does not need CSS, delete this file.
*/
4 changes: 2 additions & 2 deletions .obsidian/plugins/omnisearch/data.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"useCache": true,
"hideExcluded": false,
"ignoreDiacritics": true,
"ignoreDiacritics": false,
"indexedFileTypes": [],
"PDFIndexing": false,
"officeIndexing": false,
Expand All @@ -17,7 +17,7 @@
"highlight": true,
"showPreviousQueryResults": true,
"simpleSearch": false,
"fuzziness": "1",
"fuzziness": "2",
"weightBasename": 2,
"weightDirectory": 2,
"weightH1": 1.5,
Expand Down
Loading

0 comments on commit c5a46b3

Please sign in to comment.