Skip to content

Commit

Permalink
[CONFIG] Moves config.json file outside archey Python sources
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel FORESTIER committed Oct 11, 2020
1 parent ef14c15 commit 4809de2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ sudo python3 setup.py install
```bash
# System-wide configuration file :
sudo mkdir /etc/archey4
sudo cp archey/config.json /etc/archey4/config.json
sudo cp config.json /etc/archey4/config.json

# User-specific configuration file :
mkdir -p ~/.config/archey4
cp archey/config.json ~/.config/archey4/config.json
cp config.json ~/.config/archey4/config.json
```

#### Step 4 (optional) : Standalone building
Expand Down Expand Up @@ -185,7 +185,7 @@ python3 -m archey --help
## Configuration (optional)

Since v4.3.0, Archey 4 **may** be "tweaked" a bit with external configuration.
You can place a [`config.json`](archey/config.json) file in these locations :
You can place a [`config.json`](config.json) file in these locations :

1. `/etc/archey4/config.json` (system preferences)
2. `~/.config/archey4/config.json` (user preferences)
Expand All @@ -195,7 +195,7 @@ You can place a [`config.json`](archey/config.json) file in these locations :

Alternatively, you may specify your own configuration file with the `-c` command-line option.

The [example file](archey/config.json) provided in this repository lists exhaustively the parameters you can set.
The [example file](config.json) provided in this repository lists exhaustively the parameters you can set.
Below stand further descriptions for each available (default) option :

<!-- We use JavaScript syntax coloration below because JSON does not allow the usage of comments in it -->
Expand Down
4 changes: 3 additions & 1 deletion archey/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def __init__(self, config_path=None):
else:
self._load_configuration('/etc/archey4/')
self._load_configuration(os.path.expanduser('~/.config/archey4/'))
self._load_configuration(os.path.dirname(os.path.realpath(__file__)))
self._load_configuration(
os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)
)

def get(self, key, default=None):
"""
Expand Down
File renamed without changes.

0 comments on commit 4809de2

Please sign in to comment.