-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
252 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# SPDX-FileCopyrightText: 2024 Alec Delaney, for Adafruit Industries | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
"""CLI functionality for the paths subcommand. | ||
Author(s): Alec Delaney | ||
""" | ||
|
||
import click | ||
|
||
import circfirm | ||
|
||
|
||
@click.group() | ||
def cli() -> None: | ||
"""See filepaths for files and folders used by circfirm.""" | ||
|
||
|
||
@cli.command(name="config") | ||
def path_config() -> None: | ||
"""Get the configuration settings filepath.""" | ||
click.echo(circfirm.SETTINGS_FILE) | ||
|
||
|
||
@cli.command(name="local-plugins") | ||
def path_local_plugins() -> None: | ||
"""Get the local plugins folder filepath.""" | ||
click.echo(circfirm.LOCAL_PLUGINS) | ||
|
||
|
||
@cli.command(name="archive") | ||
def path_archive() -> None: | ||
"""Get the firmware archive folder filepath.""" | ||
click.echo(circfirm.UF2_ARCHIVE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
token: | ||
github: str | ||
output: | ||
supporting: | ||
silence: bool | ||
warning: | ||
silence: bool | ||
editor: str | ||
plugins: | ||
downloaded: [str] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.. | ||
SPDX-FileCopyrightText: 2024 Alec Delaney, for Adafruit Industries | ||
SPDX-License-Identifier: MIT | ||
Viewing Important Filespaths | ||
============================ | ||
|
||
You can see important filepaths used by ``circfirm`` using ``circfirm path``. | ||
|
||
See ``circfirm path --help`` and ``circfirm path [command] --help`` for more information on commands. | ||
|
||
Configuration Settings | ||
---------------------- | ||
|
||
You can get the filepath of ``circfirm``'s configuration settings using ``circfirm path config``. | ||
|
||
.. note:: | ||
|
||
This is identical to the response given by ``circfirm config path``. | ||
|
||
.. code-block:: shell | ||
# Get the configuration settings filepath | ||
circfirm path config | ||
UF2 Archive | ||
----------- | ||
|
||
You can get the filepath of the UF2 archive folder using ``circfirm path archive``. | ||
|
||
.. code-block:: shell | ||
# Get the UF2 archive folder filepath | ||
circifrm path archive | ||
Local Plugins Folder | ||
-------------------- | ||
|
||
You can get the filepath of the local plugins folder using ``circfirm path local-plugins``. | ||
|
||
.. code-block:: shell | ||
# Get the local plugins folder filepath | ||
circfirm path local-plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.. | ||
SPDX-FileCopyrightText: 2024 Alec Delaney, for Adafruit Industries | ||
SPDX-License-Identifier: MIT | ||
Creating Plugins | ||
================ | ||
|
||
Creating a plugin is idnetical to creating other `click <https://click.palletsprojects.com>`_-based | ||
command line tools. When ``circfirm`` is called from the command line, these command line tools | ||
are loaded and added as commands. | ||
|
||
Local Plugins | ||
------------- | ||
|
||
The easiest way to get started with creating plugins is to create a local plugin. Local plugins | ||
reside in a designated folder next to where | ||
|
||
Downloadable Plugins | ||
-------------------- | ||
|
||
Adding a Configuration File | ||
--------------------------- | ||
|
||
Important Notes | ||
--------------- |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.. | ||
SPDX-FileCopyrightText: 2024 Alec Delaney, for Adafruit Industries | ||
SPDX-License-Identifier: MIT | ||
Example Plugin | ||
============== |
Oops, something went wrong.