Skip to content

syohex/org-wiki

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

org-wiki

Org-wiki

Overview

Org-wiki is a org-mode extension that provides tools to manage and build a desktop wiki where each wiki page is a org-mode file.

It provides a custom protocol wiki:keyword which creates like. When clicked this links creates the wiki file in the wiki directory with name keyword.org.

Features:

  • A wiki system for Emacs.
  • Search wiki pages quickly.
  • Create new wiki pages fast.
  • Command to export all pages to html without block Emacs. M-x M-x org-wiki/export-html-async
  • Search wiki pages by its content. (grep)
  • org-mode protocol to create and open wiki pages.
  • org-mode protocol to open attachment/asset files with default system application.

Org-mode already has many features that makes it suitable to create a desktop wiki and store knowledge like:

  • Render Latex formulas.
  • Block codes (org-babel).
  • Fast navigation and editing
  • Support for tables
  • Ability to export to html and other formats.
  • Links to files, images, system commands and Elisp commands.

Note It is only possible to show the video demonstrations in html version.

Link formats

  • wiki:<pagename>

Example:

    wiki:Linux 
or 
    [[wiki:Linux]]
or
    [[wiki:Linux][Linux]]  
  • wiki-asset-sys:<pagename>/<asset file name>

Example:

     wiki-asset-sys:Linux;LearnLinux.pdf
or 
     [[wiki-asset-sys:Linux;LearnLinux.pdf]]
or
     [[wiki-asset-sys:Linux;LearnLinux.pdf][Book Learn Linux.pdf]]

It will open the file ~/wiki-directory/Linux/LearnLinux.pdf with the default system application.

Demos

  • (1) Browsing Index: M-x org-wiki/index

images/org-wiki-index.gif

  • (2) M-x org-wiki/helm - Select a wiki page by name.

images/org-wiki-helm.gif

  • (3) M-x org-wiki/insert Insert a link to wiki page at cursor position.

images/org-wiki-insert.gif

  • (4) - M-x org-wiki/asset-insert Insert a link to a asset file that when clicked opens it with default system application.

See video: M-x org-wiki/asset-insert

Screenshots

  • 1. Command M-x org-wiki/index Open the wiki index page (file index.org)

images/org-wiki-index.png

  • 2. Command M-x org-wiki/helm Open a helm menu to select the wiki page to be opened.

images/wiki-helm-command.png

  • 3. M-x org-wiki/ [tab] provides easy completion and discoverability to org-wiki commands.

images/autocompletion.png

  • 4. M-x org-wiki/dired Open the org-wiki directory showing only the wiki pages (*.org files).

images/wiki-dired.png

  • 5. M-x org/wiki-dired-all Open the org-wiki directory showing all files.

images/wiki-dired-all.png

  • 6. M-x org-wiki/search-pattern Search for all wiki page that contains a pattern. (string or regex pattern).

Example: The command M-x org-wiki/search-patern - System.Windows will search all files that contains “System.Windows string”.

images/wiki-search-pattern.png

Repository

Repositoryhttps://github.com/caiorss/org-wiki
Html documetnationhttps://caiorss.github.io/org-wiki/

Commands

Open the index page

  • M-x org-wiki/index - Open the index page. It opens the file index.org that is the first default page of the wiki. If the file doesn’t exist it will be created.
  • M-x org-wiki/index-frame - Open the wiki index page in a new frame.

Switch or open a page

  • M-x org-wiki/helm - Open a helm menu to switch or open a wiki page.
  • M-x org-wiki/helm-frame - Open a wiki page in a new frame.
  • M-x org-wiki/helm-read-only - Open a wiki page in read-only mode.
  • M-x org-wiki/make-page - Creates a new wiki page asking the user for the page name.

Close all wiki pages

  • M-x org-wiki/close - Close all wiki pages, kill all *.or buffers belonging to wiki directory.

Insertion

Set of commands to insert reference to attachment or page.

  • M-x org-wiki/insert - Inserts a org-mode link at current point to a Wiki page selected through a helm-menu.
  • M-x org-wiki/asset-insert - Insert a asset file at point providing a heml menu to select the file. It inserts a link of format wiki-asset-sys:CurrentPage;AssetFilename.pdf.

Asset files / Attachments

  • M-x org-wiki/assets-helm - Select a wiki page and open its assets directory.
  • M-x org-wiki/assets-open - Open asset directory of current page with system’s default file manager.
  • M-x org-wiki/asset-insert - Insert a link to asset file of current page at current cursor position. This link when clicked opens with default system application.

Example: Inserts a a link such as the code below. User is in the page Linux and with this command selects in the Helm menu the file Manual.pdf.

[[wiki-asset-sys:Linux;Manual.pdf][Manual.pdf]]
  • M-x org-wiki/asset-insert-file - Insert a link to asset file of current page at current cursor position. This is an ordinary org-mode link.

Example: Inserts a link such as:

file:Linux/Manual.pdf 

Commands to open wiki directory

  • M-x org-wiki/dired - Open the wiki directory in Emacs dired-mode showing only *.org files.
  • M-x org-wiki/dired-all - Open the wiki directory in Emacs showing all files.

Commands to search

  • M-x org-wiki/search - Search all wiki page that contains a pattern. (string or regex pattern).

Command to export all pages to html

  • M-x org-wiki/export-html-async - Exports all wiki pages to html asynchronously, it means withoyt block Emacs by starting a new Emacs process in background.

Help

  • M-x org-wiki/commands Show all package commands and its description.

Setup

  1. Copy the package to the desired location.
mkdir -p ~/.emacs.d/packages/ 

cd ~/.emacs.d/packages/ 

git clone  https://github.com/caiorss/org-wiki

mkdir -p ~/org/wiki    # Make wiki location. 
  1. Add to init file ~/.emacs.d/init.el or ~/.emacs
(add-to-list 'load-path "~/.emacs.d/packages/org-wiki")
(require 'org-wiki)
(setq org-wiki/location "~/org/wiki")

Suggestions

You might want shortcuts for frequent commands:

  • Command to switch or open a wiki page quickly. M-x w-h
(defalias 'w-h #'org-wiki/helm)
  • Go to the index page
(defalias 'w-i #'org-wiki/index)
  • Insert a link to a wiki page at point. It provides helm completion. M-x w-in
(defalias 'w-in #'org-wiki/insert)
  • Open the current wiki page assets directory: M-x w-ad
(defalias 'w-ad #'org-wiki/asset-dired)
  • Export current wiki page to html or any org-mode file. M-x og2h
(defalias 'og2h #'org-html-export-to-html)

About

Wiki for Emacs org-mode built on top of Emacs org-mode.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 50.5%
  • Emacs Lisp 40.5%
  • CSS 9.0%