mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Move Emacs, Obsidian plugin code out from under src/khoj directory
- What - The Emacs and Obsidian interfaces stay in their original directories under src/ - src/khoj now only contains code meant for pypi packaging - Benefits - This avoids having to update khoj MELPA, Obsidian plugin config as the Emacs, Obsidian code is under their original directories - It separates the code in src/khoj meant for python packaging from code for external interfaces like Emacs and Obsidian
This commit is contained in:
parent
f83cf4ebc6
commit
bc7477ea3e
28 changed files with 39 additions and 39 deletions
6
.github/workflows/build_khoj_el.yml
vendored
6
.github/workflows/build_khoj_el.yml
vendored
|
@ -7,13 +7,13 @@ on:
|
|||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- src/khoj/interface/emacs/*.el
|
||||
- src/interface/emacs/*.el
|
||||
- .github/workflows/build_khoj_el.yml
|
||||
pull_request:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- src/khoj/interface/emacs/*.el
|
||||
- src/interface/emacs/*.el
|
||||
- .github/workflows/build_khoj_el.yml
|
||||
|
||||
jobs:
|
||||
|
@ -33,7 +33,7 @@ jobs:
|
|||
- name: Run
|
||||
env:
|
||||
# Khoj recipe from https://github.com/melpa/melpa/pull/8321/files
|
||||
RECIPE: (khoj :fetcher github :repo "debanjum/khoj" :files ("src/khoj/interface/emacs/*.el"))
|
||||
RECIPE: (khoj :fetcher github :repo "debanjum/khoj" :files ("src/interface/emacs/*.el"))
|
||||
EXIST_OK: true
|
||||
LOCAL_REPO: ${{ github.workspace }}
|
||||
run: echo $GITHUB_REF && make -C ~/melpazoid
|
||||
|
|
12
.github/workflows/test_khoj_el.yml
vendored
12
.github/workflows/test_khoj_el.yml
vendored
|
@ -5,15 +5,15 @@ on:
|
|||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- src/khoj/interface/emacs/*.el
|
||||
- src/khoj/interface/emacs/tests/*.el
|
||||
- src/interface/emacs/*.el
|
||||
- src/interface/emacs/tests/*.el
|
||||
- .github/workflows/test_khoj_el.yml
|
||||
pull_request:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- src/khoj/interface/emacs/*.el
|
||||
- src/khoj/interface/emacs/tests/*.el
|
||||
- src/interface/emacs/*.el
|
||||
- src/interface/emacs/tests/*.el
|
||||
- .github/workflows/test_khoj_el.yml
|
||||
|
||||
jobs:
|
||||
|
@ -44,6 +44,6 @@ jobs:
|
|||
(unless package-archive-contents (package-refresh-contents)) \
|
||||
(unless (package-installed-p 'transient) (package-install 'transient)))" \
|
||||
-l ert \
|
||||
-l ./src/khoj/interface/emacs/khoj.el \
|
||||
-l ./src/khoj/interface/emacs/tests/khoj-tests.el \
|
||||
-l ./src/interface/emacs/khoj.el \
|
||||
-l ./src/interface/emacs/tests/khoj-tests.el \
|
||||
-f ert-run-tests-batch-and-exit
|
||||
|
|
|
@ -2,6 +2,6 @@ include README.md
|
|||
graft src/khoj/interface/*
|
||||
prune src/khoj/interface/web/images*
|
||||
prune docs*
|
||||
prune src/khoj/interface/obsidian*
|
||||
prune src/khoj/interface/emacs*
|
||||
prune src/interface/obsidian*
|
||||
prune src/interface/emacs*
|
||||
global-exclude .DS_Store *.py[cod]
|
22
README.md
22
README.md
|
@ -7,8 +7,8 @@
|
|||
|
||||
**Supported Plugins**
|
||||
|
||||
[![Khoj on Obsidian](https://img.shields.io/badge/Obsidian-%23483699.svg?style=for-the-badge&logo=obsidian&logoColor=white)](https://github.com/debanjum/khoj/tree/master/src/khoj/interface/obsidian#readme)
|
||||
[![Khoj on Emacs](https://img.shields.io/badge/Emacs-%237F5AB6.svg?&style=for-the-badge&logo=gnu-emacs&logoColor=white)](https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#readme)
|
||||
[![Khoj on Obsidian](https://img.shields.io/badge/Obsidian-%23483699.svg?style=for-the-badge&logo=obsidian&logoColor=white)](https://github.com/debanjum/khoj/tree/master/src/interface/obsidian#readme)
|
||||
[![Khoj on Emacs](https://img.shields.io/badge/Emacs-%237F5AB6.svg?&style=for-the-badge&logo=gnu-emacs&logoColor=white)](https://github.com/debanjum/khoj/tree/master/src/interface/emacs#readme)
|
||||
|
||||
## Table of Contents
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
|||
- **Incremental**: Incremental search for a fast, search-as-you-type experience
|
||||
- **Pluggable**: Modular architecture makes it easy to plug in new data sources, frontends and ML models
|
||||
- **Multiple Sources**: Search your Org-mode and Markdown notes, Beancount transactions and Photos
|
||||
- **Multiple Interfaces**: Search using a [Web Browser](./src/khoj/interface/web/index.html), [Emacs](./src/khoj/interface/emacs/khoj.el) or the [API](http://localhost:8000/docs)
|
||||
- **Multiple Interfaces**: Search using a [Web Browser](./src/khoj/interface/web/index.html), [Emacs](./src/interface/emacs/khoj.el) or the [API](http://localhost:8000/docs)
|
||||
|
||||
## Demos
|
||||
### Khoj in Obsidian
|
||||
|
@ -83,9 +83,9 @@ https://user-images.githubusercontent.com/6413477/184735169-92c78bf1-d827-4663-9
|
|||
|
||||
- Install Khoj via pip
|
||||
- Start Khoj app
|
||||
- Add this readme and [khoj.el readme](https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs) as org-mode for Khoj to index
|
||||
- Add this readme and [khoj.el readme](https://github.com/debanjum/khoj/tree/master/src/interface/emacs) as org-mode for Khoj to index
|
||||
- Search \"*Setup editor*\" on the Web and Emacs. Re-rank the results for better accuracy
|
||||
- Top result is what we are looking for, the [section to Install Khoj.el on Emacs](https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#2-Install-Khojel)
|
||||
- Top result is what we are looking for, the [section to Install Khoj.el on Emacs](https://github.com/debanjum/khoj/tree/master/src/interface/emacs#2-Install-Khojel)
|
||||
</details>
|
||||
|
||||
<details><summary>Analysis</summary>
|
||||
|
@ -107,8 +107,8 @@ https://user-images.githubusercontent.com/6413477/184735169-92c78bf1-d827-4663-9
|
|||
## Setup
|
||||
These are the general setup instructions for Khoj.
|
||||
|
||||
- Check the [Khoj.el Readme](https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#Setup) to setup Khoj with Emacs
|
||||
- Check the [Khoj Obsidian Readme](https://github.com/debanjum/khoj/tree/master/src/khoj/interface/obsidian#Setup) to setup Khoj with Obsidian<br />
|
||||
- Check the [Khoj.el Readme](https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Setup) to setup Khoj with Emacs
|
||||
- Check the [Khoj Obsidian Readme](https://github.com/debanjum/khoj/tree/master/src/interface/obsidian#Setup) to setup Khoj with Obsidian<br />
|
||||
Its simpler as it can skip the configure step below.
|
||||
|
||||
### 1. Install
|
||||
|
@ -132,10 +132,10 @@ khoj
|
|||
### Interfaces
|
||||
|
||||
- **Khoj via Obsidian**
|
||||
- [Install](https://github.com/debanjum/khoj/tree/master/src/khoj/interface/obsidian#2-Setup-Plugin) the Khoj Obsidian plugin
|
||||
- [Install](https://github.com/debanjum/khoj/tree/master/src/interface/obsidian#2-Setup-Plugin) the Khoj Obsidian plugin
|
||||
- Click the *Khoj search* icon 🔎 on the [Ribbon](https://help.obsidian.md/User+interface/Workspace/Ribbon) or Search for *Khoj: Search* in the [Command Palette](https://help.obsidian.md/Plugins/Command+palette)
|
||||
- **Khoj via Emacs**
|
||||
- [Install](https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#installation) [khoj.el](./src/khoj/interface/emacs/khoj.el)
|
||||
- [Install](https://github.com/debanjum/khoj/tree/master/src/interface/emacs#installation) [khoj.el](./src/interface/emacs/khoj.el)
|
||||
- Run `M-x khoj <user-query>`
|
||||
- **Khoj via Web**
|
||||
- Open <http://localhost:8000/> via desktop interface or directly
|
||||
|
@ -169,11 +169,11 @@ pip install --upgrade khoj-assistant
|
|||
|
||||
### Upgrade Khoj on Emacs
|
||||
- Use your Emacs Package Manager to Upgrade
|
||||
- See [khoj.el readme](https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#Upgrade) for details
|
||||
- See [khoj.el readme](https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Upgrade) for details
|
||||
|
||||
### Upgrade Khoj on Obsidian
|
||||
- Upgrade via the Community plugins tab on the settings pane in the Obsidian app
|
||||
- See the [khoj plugin readme](https://github.com/debanjum/khoj/tree/master/src/khoj/interface/obsidian#2-Setup-Plugin) for details
|
||||
- See the [khoj plugin readme](https://github.com/debanjum/khoj/tree/master/src/interface/obsidian#2-Setup-Plugin) for details
|
||||
|
||||
## Uninstall Khoj
|
||||
1. (Optional) Hit `Ctrl-C` in the terminal running the khoj server to stop it
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
/Natural, Incremental Search for your Second Brain/
|
||||
|
||||
** Table of Contents
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#features][Features]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#Interface][Interface]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#Setup][Setup]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#1-Setup-Backend][Setup Backend]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#2-Install-Khojel][Install Khoj.el]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#Use][Use]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#Search][Search]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#Find-similar-entries][Find Similar Entries]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#Advanced-usage][Advanced Usage]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#Khoj-menu][Khoj Menu]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#Upgrade][Upgrade]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#Upgrade-Khoj-Backend][Upgrade Backend]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs#Upgrade-Khojel][Upgrade Khoj.el]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#features][Features]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Interface][Interface]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Setup][Setup]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#1-Setup-Backend][Setup Backend]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#2-Install-Khojel][Install Khoj.el]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Use][Use]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Search][Search]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Find-similar-entries][Find Similar Entries]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Advanced-usage][Advanced Usage]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Khoj-menu][Khoj Menu]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Upgrade][Upgrade]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Upgrade-Khoj-Backend][Upgrade Backend]]
|
||||
- [[https://github.com/debanjum/khoj/tree/master/src/interface/emacs#Upgrade-Khojel][Upgrade Khoj.el]]
|
||||
|
||||
** Features
|
||||
- *Natural*: Advanced natural language understanding using Transformer based ML Models
|
||||
|
@ -58,7 +58,7 @@
|
|||
;; Install Khoj Package using Straight.el
|
||||
(use-package khoj
|
||||
:after org
|
||||
:straight (khoj :type git :host github :repo "debanjum/khoj" :files (:defaults "src/khoj/interface/emacs/khoj.el"))
|
||||
:straight (khoj :type git :host github :repo "debanjum/khoj" :files (:defaults "src/interface/emacs/khoj.el"))
|
||||
:bind ("C-c s" . 'khoj))
|
||||
#+end_src
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
;; Keywords: search, org-mode, outlines, markdown, beancount, ledger, image
|
||||
;; Version: 0.3.0
|
||||
;; Package-Requires: ((emacs "27.1") (transient "0.3.0"))
|
||||
;; URL: https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs
|
||||
;; URL: https://github.com/debanjum/khoj/tree/master/src/interface/emacs
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Debanjum Singh Solanky <debanjum@gmail.com>
|
||||
;; Version: 0.0.0
|
||||
;; Package-Requires: ((emacs "27.1") (transient "0.3.0"))
|
||||
;; URL: https://github.com/debanjum/khoj/tree/master/src/khoj/interface/emacs
|
||||
;; URL: https://github.com/debanjum/khoj/tree/master/src/interface/emacs
|
||||
|
||||
;;; License:
|
||||
|
Before Width: | Height: | Size: 333 KiB After Width: | Height: | Size: 333 KiB |
Before Width: | Height: | Size: 378 KiB After Width: | Height: | Size: 378 KiB |
|
@ -28,7 +28,7 @@
|
|||
;; Khoj Package for Semantic Search
|
||||
(use-package khoj
|
||||
:after org
|
||||
:straight (khoj :type git :host github :repo "debanjum/khoj" :files (:defaults "src/khoj/interface/emacs/khoj.el"))
|
||||
:straight (khoj :type git :host github :repo "debanjum/khoj" :files (:defaults "src/interface/emacs/khoj.el"))
|
||||
:bind ("C-c s" . 'khoj))
|
||||
```
|
||||
- With [Quelpa](https://github.com/quelpa/quelpa#installation)
|
||||
|
|
Loading…
Reference in a new issue