Giter Site home page Giter Site logo

keg's Introduction

🌳 KEG Commands

GoDoc License

This keg Bonzai branch contains all KEG related commands, most of which are exported so they can be composed individually if preferred.

Install

You can just download from the releases page.

curl -L https://github.com/rwxrob/keg/releases/latest/download/keg-linux-amd64 -o ~/.local/bin/keg
curl -L https://github.com/rwxrob/keg/releases/latest/download/keg-darwin-amd64 -o ~/.local/bin/keg
curl -L https://github.com/rwxrob/keg/releases/latest/download/keg-darwin-arm64 -o ~/.local/bin/keg
curl -L https://github.com/rwxrob/keg/releases/latest/download/keg-windows-amd64 -o ~/.local/bin/keg

Or with go:

go install github.com/rwxrob/keg/cmd/keg@latest

You might want to create a small script to encapsulate KEG_CURRENT rather than changing into the directory all the time. Note that aliases and functions do not reliably work from within vim, only executables (which is 80% of the reason to use keg in the first place).

#!/bin/bash
KEG_CURRENT=zet keg "$@"

Composed

package z

import (
	Z "github.com/rwxrob/bonzai/z"
	"github.com/rwxrob/keg"
)

var Cmd = &Z.Cmd{
	Name:     `z`,
	Commands: []*Z.Cmd{help.Cmd, keg.Cmd},
}

Tab Completion

To activate bash completion just use the complete -C option from your .bashrc or command line. There is no messy sourcing required. All the completion is done by the program itself.

complete -C keg keg

If you don't have bash or tab completion check use the shortcut commands instead.

Embedded Documentation

All documentation (like manual pages) has been embedded into the source code of the application. See the source or run the program with help to access it.

Command Line Usage

keg help

Configuration

map - map of all local keg ids pointing to their directories (like PATH)

Variables

current - current keg from map

Build and Release Instructions

Building workflow uses the good Go helper tool (often composited into bonzai personal command trees (z go):

cd cmd/keg
good build
gh release create
gh release upload TAGVER build/*

keg's People

Contributors

rwxrob avatar

Stargazers

Ikem Krueger avatar Kim Petersen avatar Alexandre Naud avatar Thang Phan avatar Derek Nedveck avatar Ethan Davidson avatar Tony Hammack avatar John Monteiro avatar Otávio Carmo avatar Guilherme avatar Filipe Lima avatar Roland Siegbert avatar Dwight Spencer (denzuko@mastodon.social) avatar Tyler Starr avatar M.Emre Nefesli avatar Christoph Wanders avatar David Przybilla avatar Rusty avatar Mohamed Taoufik TEKAYA avatar Rodolfo Olivieri avatar TS avatar Jared Rickert avatar Suren Lockwood avatar Sam Blekhman avatar Otis Sutton avatar Daniel Michaels avatar Sébastien De Revière avatar Vladimir Sotskov avatar blw avatar  avatar  avatar Gabe Montalvo avatar Ege avatar Ryan Lindskog avatar Tim Armstrong avatar Hayden avatar

Watchers

 avatar  avatar

keg's Issues

Add separator back

When writing fiction having a separator within a given paragraph is a nice device for creating a pause. Also need to add include link rule S for including a node with a separator instead of a heading, lede, or omitting.

Add keg bot command

The bot command should monitor all the kegs for changes and automatically update their dex files and optionally push them to every publishing target.

Make multi-call with name inferring keg to use

Since the name is the only major argument to any commands with keg need to optionally set this detection so sym and hardlinks to the same binary simply make identical keg commands that operate on different keg directories (instead of keg set current FOO being required).

Update the update field in `keg` info file

It has become clear that the keg file is the source of all status truth that people following should check before looking at anything else. That will also prevent the requirement from all the tech required to create and maintain a dex for those who don't need it.

Add release binaries

Need to automate the publication of release binaries as much as possible using build and gh.

Add minimal `init` to get started

All that is needed to get started is a directory and an keg file, but this isn't obvious, so might as well add an init.

Eventually, should ask about different methods of publishing:

  • rsync
  • ssh
  • scp
  • sftp
  • git
  • gh

If gh is detected use it to prompt and create a GitHub repo as well.

Add list of defunct drafts

Need a command that lists all the defunct drafts in /tmp and allows picking up work on one of them. This allows failed parsing (for whatever reason) to be corrected.

Add KEG Web static site generation with Go templating

Need to create a assets directory with the following for KEG Web site generation:

  • css - style sheets used by every generated node index.html file
  • js - site-wide javascript
  • html - golang html templates resulting in index.html
  • img - images used in index.html

Allow different search methods based on semantics

For example, grep could use perlregx by default but maybe glob is wanted. Find should default to glob, etc.

  • glob
  • regexp
  • keyword
  • fts

Eventually a very human friendly FTS should be fully supported.

Update include links to have folding and target attributes

Use of query string should be used for telling include link includers what to do with headers and such. Plus, at the request and suggestion of moss_machines will add all three bullet types to include lists to distinguish between folding preference.

Reconsider importing on create

Creating a new /tmp node and then moving it in is nice when canceling a node in the middle of writing it, but makes it impossible to get the footnote reference because node doesn't have an ID yet. Better to actually commit to creating the node and then delete it if empty.

Renaming file: invalid cross-device link

When I finish a KEG create process, I receive the following error:

syntax=rename /tmp/keg-node-3356668510 /home/buddhilw/keg/2: invalid cross-device link

I navigated the internet and found that there is an error related to os.Rename, in Go. And, that it could be exchanged for copy and delete 1.

So, in case of error, it should then be tried the "copy-delete" technique, instead.

Footnotes

  1. https://github.com/andrewkroh/gvm/issues/1

Add `rand` to `edit` and `view`

One of the great benefits of a zettelkasten approach is that randomly going through all your notes provides new thoughts and tangents as well as realizations as to how things have changed. By adding rand to edit and view working with a keg becomes a gamified, creative, non-threatening process --- especially if you are someone who likes to write and think a lot.

Add keg.Sync call to MakeDex

Can call keg.Sync anytime the MakeDex is regenerated.

The keg.Sync should intelligently detect the type of KEG publishing being used and do the right thing.

For Git repos it should do a git add -A . && git commit -m "Add $title" && git push.

For everything else need to read local application configuration for other target destinations including rsync mirrors, sftp targets, etc.

For everything else it should just ignore being called.

"kegml." file in the kegml directory

In the kegml directory, I see a file called kegml. which just contains A as content, is this a required file? Seems a little out of place 😂

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.