Coder Social home page Coder Social logo

emanote-kak's Introduction

emanote-kak

This repository contains useful commands for interacting with an emanote repository.

Requirements

The following utilities are used, so make sure you have them installed and in PATH:

  • date
  • rg (support for other similar tools currently not planned, but PRs are welcome)
  • sed
  • wc
  • Any dmenu-like utility (I recommend rofi or bemenu, which I'm currently using). It needs to be able to do the following:
    • take input from stdin
    • print the selected option to stdout
    • print nothing if the selection was aborted

Note that there's no dependency on the emanote binary itself, so you can use this plugin in other contexts as well (say, neuron or any other kind of directory with Markdown files). Just note that supporting emanote will be a priority for possible further development.

Installing and configuring

The recommended approach is to use plug.kak for installing this plugin.

The snippet below shows how to install the plugin and also contains the recommended configuration (AKA how I personally use it).

plug "MilanVasko/emanote-kak" config %{
	# the following is a recommended configuration

	declare-user-mode emanote
	# you need to specify a menu program to filter the notes
	set-option global emanote_popup_selector_program "bemenu"
	map global emanote n -docstring "create new note with random ID"   ": emanote-new<ret>"
	map global emanote N -docstring "create new note"                  ": emanote-new "
	map global emanote s -docstring "search titles and open note"      ": emanote-search-and-open<ret>"
	map global emanote S -docstring "search all and open note"         ": emanote-search-all-and-open<ret>"
	map global emanote i -docstring "search titles and insert note ID" ": emanote-search-and-insert [[ ]]<ret>"
	map global emanote I -docstring "search all and insert note ID"    ": emanote-search-all-and-insert [[ ]]<ret>"
	map global emanote g -docstring "follow the link"                  ": emanote-follow-link<ret>"
}

Functionality

The following commands are provided:

  • emanote-new - creates a new note
  • emanote-search-and-open and emanote-search-all-and-open - searches for notes interactively
  • emanote-search-and-insert and emanote-search-all-and-insert - inserts the note ID of found note into the document
  • emanote-follow-link - follows the link under main selection

More commands may come in the future if I get ideas for new ones - all of the existing ones have their origins in my personal need. For now, these should be enough to make the most common tasks easier.

Contributing

If you'd like to contribute, please do! There are no hard rules to follow, just create an issue or a pull request and I'll try to get back to you.

emanote-kak's People

Contributors

milanvasko avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.