Skip to content

Commit

Permalink
chore: Cleanup old README, PyPI install, and fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
whisperity committed May 29, 2022
1 parent e6bb776 commit 5354948
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 120 deletions.
94 changes: 17 additions & 77 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,18 @@ These are the configurations that the [CI](http://github.com/whisperity/Envprobe

### Download

You can grab Envprobe from the GitHub repository, either via `git` or in a tarball form.
Download the project anywhere you please.
In this example, we'll use `~/envprobe`.
You can download Envprobe's official releases from [PyPI](http://pypi.org/project/envprobe).

~~~{.sh}
pip install envprobe
~~~


#### From GitHub

You can also download Envprobe from the GitHub repository, either via `git` or in a tarball form.
Download the project anywhere you please, and extract the archive.
In this example, we'll use `~/envprobe` as the location.

~~~{.sh}
git clone http://github.com/whisperity/envprobe.git ~/envprobe \
Expand All @@ -68,11 +77,11 @@ The easiest way to do this is to add the hook script at the end of the configura

> **:warning: Note!** If you are using other custom shell extensions, it is **well-advised** for the best experience to load Envprobe **last**.
| Shell | Configuration file (usually) | Code to add |
|:-----------------------------------|:-----------------------------------------------------:|:----------------------------------------------------:|
| Bash | `~/.bashrc` | `eval "$(~/envprobe/envprobe config hook bash $$)";` |
| Zsh (stock) | `~/.zshrc` | `eval "$(~/envprobe/envprobe config hook zsh $$)";` |
| Zsh ([Oh My Zsh](http://ohmyz.sh)) | `~/.oh-my-zsh/custom/zzzzzz_envprobe.zsh` (new file!) | `eval "$(~/envprobe/envprobe config hook zsh $$)";` |
| Shell | Configuration file (usually) | Code to add |
|:-----------------------------------|:-----------------------------------------------------:|:-----------------------------------------:|
| Bash | `~/.bashrc` | `eval "$(envprobe config hook bash $$)";` |
| Zsh (stock) | `~/.zshrc` | `eval "$(envprobe config hook zsh $$)";` |
| Zsh ([Oh My Zsh](http://ohmyz.sh)) | `~/.oh-my-zsh/custom/zzzzzz_envprobe.zsh` (new file!) | `eval "$(envprobe config hook zsh $$)";` |


## Quick user guide
Expand Down Expand Up @@ -268,72 +277,3 @@ The description of a variable, when queried, may come from a local copy of this
To initially download, or subsequently update, the description database, execute:

epc descriptions update


---

---

# :warning: OLD DOCUMENTATION

> :loudspeaker: Below follows the documentation for the **previous version** of Envprobe that is being rewritten.
> Some of the parts might no longer or not yet apply!
Why?
----

However, there is a use case on which all of the aforementioned tools fall
short, or are hard to configure. **`envprobe`** — the name idea came
from [`modprobe`](http://enwp.org/Modprobe), but for environments —
was born out of this personal necessity, to give the ability to easily
configure your shell, without the need of actually writing tedious
configuration files, to either of these mentioned systems.



How to Install?
---------------


### Invoking *Envprobe*

After envprobe is installed, you can use it in the shell with the `envprobe`
or `ep` command. **You should NOT alter `PATH` or use the absolute
`~/envprobe/envprobe.py` path to access `envprobe`.** The hook executed by
the lines above enabled `envprobe` for you.



Advanced: Configuring type of variables
---------------------------------------

* `ignored`: Remove the variable from Envprobe's allowed and managed
variables.

*Note:* Setting a variable's *type* to `ignored` is not the same as
*"tracking ignoring"* a variable. "Tracking ignore" means that changes of the
variable is not visible to the `diff`, `save`, `load`, ... commands, but
the variable can still be managed locally, in an ad-hoc fashion. A variable
with `ignored` type will result in Envprobe rejecting every access (`get`,
`set`) on that variable.



Extreme: Resetting or hacking *Envprobe*
----------------------------------------

We share the philosophy of small individual commands and easily readable
configuration files in this project. Your local configuration is saved under
`~/.local/share/envprobe` in the form of JSON files. Adventurous and power
users are welcome to tinker their configuration through these files, but be
advised that we cannot provide any help in case a mess-up happens.

To make Envprobe *completely **and irrevocably** forget* all configuration,
along with **all your saved states!**, simply delete the aforementioned folder,
and then restart your Terminal.

**Warning!** Data and configuration specific to a running shell session is
saved to a temporary folder and might include binary files and files with
ephemeral lifespan. These files are not meant to be altered manually apart
from development or debugging purposes. Altering these files can make your
running shell irrevocably broken!
39 changes: 0 additions & 39 deletions RELEASE_NOTES.md

This file was deleted.

24 changes: 23 additions & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@ Apart from Python and one of the supported POSIX-compatible shells, there are no
Obtaining Envprobe
==================

You can download Envprobe's official releases from `PyPI <http://pypi.org/project/envprobe>`_.
``pip`` will automatically install *Envprobe* to an appropriate location for your local user.

.. code-block:: bash
pip install envprobe
From GitHub
-----------
You can download Envprobe from the `official repository <http://github.com/whisperity/Envprobe>`_, either using `Git <http://git-scm.org>`_ or a ``tar`` download.
Extract the downloaded files to any location comfortable.
Extract the downloaded archive to any location comfortable.
In the documentation, we will use ``~/envprobe`` as the location where Envprobe is installed to.

.. code-block:: bash
Expand Down Expand Up @@ -50,6 +60,10 @@ Put the following code as-is (including quotes, etc.) at the end of ``~/.bashrc`

.. code-block:: bash
# If obtained from PyPI:
eval "$(envprobe config hook bash $$)";
# If obtained from GitHub:
eval "$(~/envprobe/envprobe config hook bash $$)";
Zsh
Expand All @@ -62,6 +76,10 @@ Put the following code as-is (including quotes, etc.) at the end of ``~/.zshrc``

.. code-block:: bash
# If obtained from PyPI:
eval "$(envprobe config hook zsh $$)";
# If obtained from GitHub:
eval "$(~/envprobe/envprobe config hook zsh $$)";
Expand All @@ -72,6 +90,10 @@ If you are using `Oh-My-Zsh <http://ohmyz.sh>`_ to manage your Zsh, create a new

.. code-block:: bash
# If obtained from PyPI:
eval "$(envprobe config hook zsh $$)";
# If obtained from GitHub:
eval "$(~/envprobe/envprobe config hook zsh $$)";
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ All these classes are subclasses of :py:class:`EnvVarTypeHeuristic<envprobe.envi
HiddenEnvVarHeuristic
NumericalNameEnvVarHeuristic
NumericalValueEnvVarHeuristic
PathEnvVarHeuristic
PathNameEnvVarHeuristic

.. autofunction:: assemble_standard_type_heuristics_pipeline
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
version = version.decode().strip()
if version[0] == "v":
version = version[1:]
version = version.replace("-dirty", "dev")
version = version.replace("\"-dirty\"", "dev")
version_parts = version.split("-")
if len(version_parts) == 1:
version = version_parts[0]
Expand All @@ -65,7 +65,7 @@
license="GPLv3+",
keywords="shell environment environment-variables bash zsh",
classifiers=[
"Development Status :: 3 - Alpha",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Information Technology",
Expand Down

0 comments on commit 5354948

Please sign in to comment.