You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
1 year ago | |
|---|---|---|
| .gitignore | 5 years ago | |
| LICENSE | 5 years ago | |
| README.org | 1 year ago | |
| opengrok-restful.el | 2 years ago | |
| opengrok-restful.gif | 5 years ago | |
| opengrok-restful.png | 5 years ago | |
README.org
opengrok-restful
Setup opengrok (v1.3)
-
Start opengrok server and limit the cpu usage of opengrok indexer.
-
Period of automatic mirroring/reindexing (10min).
-
The volume mounted to ~/Projects should contain the projects you want to make searchable.
-
Open http://127.0.0.1:8080 to enjoy.
$ sudo docker run -d --cpus="1.0" \
--name opengrok \
-p 8080:8080/tcp \
-e REINDEX="10" \
-v ~/Projects:/opengrok/src/ \
opengrok/docker:1.3
-
You can avoid to sync source code from upstream.
$ sudo docker exec -it opengrok sed -i 's/opengrok-mirror/#opengrok-mirror/g' /scripts/index.sh
-
You can manually trigger an reindex using docker exec.
$ sudo docker exec -it opengrok /scripts/index.sh
Setup opengrok (v1.13)
$ docker run -d --name opengrok -p 8080:8080/tcp -e NOMIRROR=1 -e SYNC_PERIOD_MINUTES=0 -v /Users/bytedance/opengrok:/opengrok/src/ opengrok/docker:1.13 tail -f /dev/null
$ docker exec -it opengrok bash
> apt update && apt install -y vim
> vim /scripts/start.py # Comment out the -H parameter (appears twice) and the --noIndex parameter in the code
> source /venv/bin/activate
> nohup env INDEXER_OPT="-I *.cpp -I *.hpp -I *.h -I *.c" python /scripts/start.py &
Setup opengrok-restful
$ git clone https://github.com/RainMark/opengrok-restful.git ~/opengrok-restful
-
Emacs config.
;; opengrok-restful
(add-to-list 'load-path "~/opengrok-restful")
(require 'opengrok-restful)
(setq opengrok-restful-source-directory "~/Projects")
(global-set-key (kbd "M-d") 'opengrok-restful-lookup-def)
(global-set-key (kbd "M-f") 'opengrok-restful-lookup-full)
(global-set-key (kbd "M-s") 'opengrok-restful-lookup-symbol)
(global-set-key (kbd "M-p") 'opengrok-restful-lookup-path)
-
When you lookup symbol with opengrok-restful, Input nothing to lookup all projects that indexed, Input 'c' to lookup current project.

