... | ... |
@@ -5,6 +5,25 @@ Parse [Raspberry Pi revision codes][]. |
5 | 5 |
[`raspi-revcode`]: https://git.rcrnstn.net/rcrnstn/raspi-revcode |
6 | 6 |
[Raspberry Pi revision codes]: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes |
7 | 7 |
|
8 |
+## Usage |
|
9 |
+ |
|
10 |
+`raspi-revcode --help`: |
|
11 |
+ |
|
12 |
+``` |
|
13 |
+raspi-revcode 1.0 |
|
14 |
+ |
|
15 |
+Parse Raspberry Pi revision codes. |
|
16 |
+ |
|
17 |
+Usage: |
|
18 |
+ raspi-revcode [<code>] |
|
19 |
+ raspi-revcode -h|--help |
|
20 |
+ |
|
21 |
+Arguments: |
|
22 |
+ <code> |
|
23 |
+ A hexadecimal revision code to parse. If not given, '/proc/cpuinfo' will be |
|
24 |
+ used to get the revision code of the current device. |
|
25 |
+``` |
|
26 |
+ |
|
8 | 27 |
## Install |
9 | 28 |
|
10 | 29 |
Make sure [Python is installed][Python download], [`pip`][] is available and |
... | ... |
@@ -5,6 +5,68 @@ Parse [Raspberry Pi revision codes][]. |
5 | 5 |
[`raspi-revcode`]: https://git.rcrnstn.net/rcrnstn/raspi-revcode |
6 | 6 |
[Raspberry Pi revision codes]: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes |
7 | 7 |
|
8 |
+## Install |
|
9 |
+ |
|
10 |
+Make sure [Python is installed][Python download], [`pip`][] is available and |
|
11 |
+the [`pip`][], [`setuptools`][] and [`wheel`][] packages are up to date: |
|
12 |
+ |
|
13 |
+```sh |
|
14 |
+python3 -m pip install --user --upgrade pip setuptools wheel |
|
15 |
+``` |
|
16 |
+ |
|
17 |
+Reference: [Python Packaging User Guide: Requirements for Installing |
|
18 |
+Packages][]. |
|
19 |
+ |
|
20 |
+[Python download]: https://python.org/download |
|
21 |
+[`pip`]: https://pip.readthedocs.io |
|
22 |
+[`setuptools`]: https://setuptools.readthedocs.io |
|
23 |
+[`wheel`]: https://wheel.readthedocs.io |
|
24 |
+[Python Packaging User Guide: Requirements for Installing Packages]: https://packaging.python.org/tutorials/installing-packages/#requirements-for-installing-packages |
|
25 |
+ |
|
26 |
+### With [`pipx`][], for users |
|
27 |
+ |
|
28 |
+Make sure [`pipx`][] is installed: |
|
29 |
+ |
|
30 |
+```sh |
|
31 |
+python3 -m pip install --user pipx |
|
32 |
+``` |
|
33 |
+ |
|
34 |
+Install `raspi-revcode`: |
|
35 |
+ |
|
36 |
+```sh |
|
37 |
+pipx install "git+https://git.rcrnstn.net/rcrnstn/raspi-revcode" |
|
38 |
+``` |
|
39 |
+ |
|
40 |
+`raspi-revcode` should now be in your [`PATH`][] (if not, run `python3 -m pipx |
|
41 |
+ensurepath`). |
|
42 |
+ |
|
43 |
+Reference: [Python Packaging User Guide: Installing stand alone command line |
|
44 |
+tools][]. |
|
45 |
+ |
|
46 |
+[`pipx`]: https://pipxproject.github.io/pipx/ |
|
47 |
+[`PATH`]: https://en.wikipedia.org/wiki/PATH_(variable) |
|
48 |
+[Python Packaging User Guide: Installing stand alone command line tools]: https://packaging.python.org/guides/installing-stand-alone-command-line-tools/ |
|
49 |
+ |
|
50 |
+### Into [`venv`][], for developers |
|
51 |
+ |
|
52 |
+Clone and install into a repository [`venv`][] virtual environment: |
|
53 |
+ |
|
54 |
+```sh |
|
55 |
+git clone "https://git.rcrnstn.net/rcrnstn/raspi-revcode" |
|
56 |
+cd "raspi-revcode" |
|
57 |
+python3 -m venv .venv |
|
58 |
+. .venv/bin/activate |
|
59 |
+python3 -m pip install --editable . |
|
60 |
+``` |
|
61 |
+ |
|
62 |
+`raspi-revcode` should now be in your (virtual environment) [`PATH`][]. |
|
63 |
+ |
|
64 |
+Reference: [Python Packaging User Guide: Installing packages using pip and |
|
65 |
+virtual environments][]. |
|
66 |
+ |
|
67 |
+[`venv`]: https://docs.python.org/3/library/venv.html |
|
68 |
+[Python Packaging User Guide: Installing packages using pip and virtual environments]: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/ |
|
69 |
+ |
|
8 | 70 |
## License |
9 | 71 |
|
10 | 72 |
Licensed under the [ISC License][] unless otherwise noted, see the |
... | ... |
@@ -4,3 +4,11 @@ Parse [Raspberry Pi revision codes][]. |
4 | 4 |
|
5 | 5 |
[`raspi-revcode`]: https://git.rcrnstn.net/rcrnstn/raspi-revcode |
6 | 6 |
[Raspberry Pi revision codes]: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes |
7 |
+ |
|
8 |
+## License |
|
9 |
+ |
|
10 |
+Licensed under the [ISC License][] unless otherwise noted, see the |
|
11 |
+[`LICENSE`][] file. |
|
12 |
+ |
|
13 |
+[ISC License]: https://choosealicense.com/licenses/isc |
|
14 |
+[`LICENSE`]: LICENSE |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,6 @@ |
1 |
+# [`raspi-revcode`][] |
|
2 |
+ |
|
3 |
+Parse [Raspberry Pi revision codes][]. |
|
4 |
+ |
|
5 |
+[`raspi-revcode`]: https://git.rcrnstn.net/rcrnstn/raspi-revcode |
|
6 |
+[Raspberry Pi revision codes]: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes |