beta software
- Python >=3.5
- libsodium
- libkrb5-dev
This repository contains three packages nete-common
, nete-backend
and
nete-cli
. To build and install all of them, first read and then run the
install.sh
script.
Copy the file etc/_nete.zsh
to the directory ~/.config/zsh/completion
,
and in a new shell, you should be able to use the fine command line completion.
You can start the backend by running the command
$ nete-backend
without any options or configuration file. If you want to configure a different socket path or a sync URL, you need a configuration file (see below).
For available options, use
$ nete-backend --help
You probably want to start nete-backend automatically when you log in. For this,
put a systemd service file with the following content into
~/.config/systemd/user/nete-backend.service
(replace PATH_TO_INSTALL_BIN
by
the directory the nete-backend
command is installed in):
[Unit]
Description=nete Backend Service
[Service]
ExecStart=PATH_TO_INSTALL_BIN/nete-backend
[Install]
WantedBy=default.target
Then enable the service:
$ systemctl --user daemon-reload
$ systemctl --user enable nete-backend.service
$ systemctl --user start nete-backend.service
Run
$ nete --help
for a quick summary of available commands. For example, you can create, list and edit notes likes this:
$ nete new "My new note"
... edit with $EDITOR ...
$ nete ls
f05046bb-5ea3-496a-880a-3069df86a97e My new note
$ nete edit f05046bb-5ea3-496a-880a-3069df86a97e
... edit ...
You can use nete without any configuration file at all. But if you want to use synchronization or if you have special requirements, you can create one.
nete will read either no or one configuration file. It will look for it in
- the location specified by the
--config
option or $XDG_CONFIG_HOME/nete/backend.rc
(usually, this is~/.config/nete/backend.rc
)
These are the options you can configure (and the defaults used):
[api]
socket = $XDG_RUNTIME_DIR/nete/socket
[storage]
type = filesystem
base_dir = $XDG_DATA_HOME/nete/backend/storage
[sync]
url = # no default; see below
The CLI configuration is not necessary either unless you want to deviate from
the default configuration. nete
looks for it in either $NETE_CONFIG_FILE
(meaning you can override it by setting the environment variable
NETE_CONFIG_FILE
) or in $XDG_CONFIG_HOME/nete/cli.rc
.
Currently, there is only one option you can set in the configuration file:
[backend]
url = local:$XDG_RUNTIME_DIR/nete/socket
The URL can be either a Unix Domain Socket path (denoted by a local:
prefix)
or an HTTP URL (denoted by either http:
or https:
).
nete is able to synchronize with a remote server via SSH. For this to work, you need only little setup.
You need to install nete and nete-backend with the same versions as locally on the remote side. Make sure nete-backend is running when you log in, e. g. by starting it through systemd (see above).
It works if the following command prints the path of the Unix Domain Socket when executed on the local side:
$ ssh SYNCHOST nete socket
/run/user/1234/nete/socket
Use an SSH agent (like ssh-agent or gpg-agent), otherwise nete-backend won’t be able to authenticate.
Tell your local nete-backend which host you want to synchronize with by adding sync URL parameter to your configuration (see above):
[sync]
url = http+ssh://USERNAME@SYNCHOST[:PORT]
You should now be all set and can run:
$ nete sync
Take a look at the logs of the local nete backend to see what’s happening.
First, create a virtual environment and activate it:
$ virtualenv venv
$ venv/bin/activate
Then, run setup-development.sh
script, which will install the development
dependencies and the nete packages in development mode.
Simply run pytest
.