3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

Default config file location is now pylink.yml

This commit is contained in:
James Lu 2016-06-21 10:56:53 -07:00
parent 2f188dc60d
commit cb633cfba5
4 changed files with 5 additions and 13 deletions

View File

@ -48,7 +48,7 @@ Support for these IRCds exist, but are not tested as frequently and thoroughly.
1) Install PyLink by using `python3 setup.py install` (global install) or `python3 setup.py install --user` (local install) 1) Install PyLink by using `python3 setup.py install` (global install) or `python3 setup.py install --user` (local install)
2) Rename `example-conf.yml` to `config.yml` and configure your instance there. Note that the configuration format isn't finalized yet - this means that your configuration may break in an update! 2) Rename `example-conf.yml` to `pylink.yml` and configure your instance there. Note that the configuration format isn't finalized yet - this means that your configuration may break in an update!
3) Run `pylink` from the command line. 3) Run `pylink` from the command line.

12
conf.py
View File

@ -1,16 +1,8 @@
""" """
conf.py - PyLink configuration core. conf.py - PyLink configuration core.
This module is used to access the complete configuration for the current This module is used to access the configuration of the current PyLink instance.
PyLink instance. It will load the config on first import, taking the It provides simple checks for validating and loading YAML-format configurations from arbitrary files.
configuration file name from the first command-line argument, but defaulting
to 'config.yml' if this isn't given.
If world.testing is set to True, it will return a preset testing configuration
instead.
This module also provides simple checks for validating and loading YAML-format
configurations from arbitrary files.
""" """
import yaml import yaml

View File

@ -1,4 +1,4 @@
# This is a sample configuration file for PyLink. You'll likely want to rename it to config.yml # This is a sample configuration file for PyLink. You'll likely want to rename it to pylink.yml
# and begin your configuration there. # and begin your configuration there.
# Note: lines starting with a "#" are comments and will be ignored. # Note: lines starting with a "#" are comments and will be ignored.

View File

@ -138,7 +138,7 @@ def getDatabaseName(dbname):
current PyLink instance. current PyLink instance.
This returns '<dbname>.db' if the running config name is PyLink's default This returns '<dbname>.db' if the running config name is PyLink's default
(config.yml), and '<dbname>-<config name>.db' for anything else. For example, (pylink.yml), and '<dbname>-<config name>.db' for anything else. For example,
if this is called from an instance running as './pylink testing.yml', it if this is called from an instance running as './pylink testing.yml', it
would return '<dbname>-testing.db'.""" would return '<dbname>-testing.db'."""
if conf.confname != 'pylink': if conf.confname != 'pylink':