Eureka

提供: ArchWiki
2023年2月16日 (木) 04:59時点におけるKgx (トーク | 投稿記録)による版 (英語版から転載)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
ナビゲーションに移動 検索に移動

From Eureka's README:

Eureka is a CLI tool that allows you to quickly write down an idea using your preferred editor, and then have the idea committed and pushed to your idea git repository.
ノート: Eureka upstream repository has not had any activity for over a year, and attempts to contact the developer has failed. Most likely this package will never be updated, however it still builds and functions as expected.

Installation

Install eureka-notesAUR.

Configuration

Eureka does not currently support any sort of complex configuration. However generates its own configuration when you first execute eureka.

When you first execute eureka, it will ask you to enter the full path to the repository you would like to use, this is a git repository containing a README.md file. For this setup we will store the eureka data within the home directory of the user you are logged in as.

cd - Ensure you are in your home directory

mkdir eureka - Create the eureka directory

cd eureka - Enter the eureka directory

git init - Initialize a new git repository within the eureka directory

touch README.md - Creates the README.md file, which eureka will look for (if it does not find this file, it will error, it is case specific)

Congratulations, you have created the eureka storage directory, now in order to keep these notes safe from loss of data, such as you dropping your laptop and losing all the data, eureka automatically pushes to the "origin" remote ever change you make to your notes, so we must add this remote.

Any git provider can be used, such as Github or Gitlab as long as you have read/write permissions to the repository you would like to use, once you have created the repository, copy the ssh link and copy it into the following command:

git remote add origin ssh-url - With your ssh url of the repository you would like to use

Finally, you are ready to start eureka, once executed eureka will ask for the full path to your repository, enter /home/user/eureka.

Eureka will automatically generated the configuration for you in json format, you can find the configuration file at $HOME/.config/eureka/config.json.

Troubleshooting

Cannot find binary path error

If you get the following error ERROR eureka > cannot find binary path, Eureka defaults to the vi editor when no EDITOR environment variable is set.

If you do not want to define the environment variable globally, you can always define it inline when executing eureka, below is an example with using eureka with neovim without any environment variable set:

$ EDITOR=nvim eureka

No such file or directory error

If you get the following error ERROR eureka > No such file or directory (os error 2) Eureka has attempted to look for the directory you defined on first startup, and could not find it, or the directory does not contain the README.md file which must be present for eureka to function.