From bcbba258231eac395afe9092df0f5eac8473b34b Mon Sep 17 00:00:00 2001 From: jadon <16850875+wolffshots@users.noreply.github.com> Date: Tue, 9 Apr 2024 12:02:18 +0200 Subject: [PATCH] chore: format and lint readmes a bit --- README.md | 44 +++++++++++++++++++++----------------------- web/README.md | 16 ++++++++-------- 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 1802eb3..ca0f7c9 100755 --- a/README.md +++ b/README.md @@ -1,27 +1,27 @@ +# phocus + ![Worklow Status](https://github.com/wolffshots/phocus/actions/workflows/go.yml/badge.svg) [![Go Reference](https://pkg.go.dev/badge/github.com/wolffshots/phocus.svg)](https://pkg.go.dev/github.com/wolffshots/phocus/v2) [![codecov](https://codecov.io/github/wolffshots/phocus/branch/main/graph/badge.svg?token=641UGV72AY)](https://codecov.io/github/wolffshots/phocus) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/ae8e8489462c460ab79c61fc2f8d10e9)](https://app.codacy.com/gh/wolffshots/phocus/dashboard) -## phocus - -A generic set of packages and app to speak to a device via serial and +A generic set of packages and app to speak to a device via serial and relay the responses to an MQTT broker in a way that Home Assistant expects -Primarily built to communicate with Phocos branded inverters but -the only thing you should need to change to use other inverters is +Primarily built to communicate with Phocos branded inverters but +the only thing you should need to change to use other inverters is the structure of the messages and the populating of the queue -### Installation +## Installation -#### Ubuntu/systemd +### Ubuntu/systemd If you don't need to differ from the default setup then it should be as simple as: -##### Minimal dependencies +#### Minimal dependencies -1. Install the latest executable directly and customise the config -(the script should create the `config.json` +1. Install the latest executable directly and customise the config +(the script should create the `config.json` for you to customise if you don't do it beforehand) ```sh @@ -34,35 +34,35 @@ for you to customise if you don't do it beforehand) sudo systemctl daemon-reload && sudo systemctl restart phocus ``` -##### Build from source +#### Build from source -1. Clone the repo +1. Clone the repo ```sh git clone https://github.com/wolffshots/phocus.git ``` -2. Create a `config.json` file from `config.json.example` and customise -your settings (`install.sh` will just prompt you to do this in the next step +2. Create a `config.json` file from `config.json.example` and customise +your settings (`install.sh` will just prompt you to do this in the next step if you don't) -3. Run the install script -(which builds the app then will ask for your password to put it +3. Run the install script +(which builds the app then will ask for your password to put it in the correct place and makes a service file for it linked to `phocus.service` ) ```sh cd phocus && ./install.sh ``` -4. (Re)start the service +4. (Re)start the service ```sh sudo systemctl daemon-reload && sudo systemctl restart phocus ``` -### Updating +## Updating -#### From latest binary +### From latest binary Just run this command again: @@ -70,9 +70,7 @@ Just run this command again: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/wolffshots/phocus/HEAD/install_prebuilt.sh)" ``` -#### From source +### From source -To update you should just be able to pull/checkout the newer version, +To update you should just be able to pull/checkout the newer version, call `./install.sh` and restart the app with `sudo service phocus restart` - - diff --git a/web/README.md b/web/README.md index 619cb0a..ab39b0c 100644 --- a/web/README.md +++ b/web/README.md @@ -1,9 +1,9 @@ -## create-svelte +# create-svelte -Everything you need to build a Svelte project, +Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). -### Creating a project +## Creating a project If you're seeing this, you've probably already done this step. Congrats! @@ -15,9 +15,9 @@ npm create svelte@latest npm create svelte@latest my-app ``` -### Developing +## Developing -Once you've created a project and installed dependencies +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: ```bash @@ -27,7 +27,7 @@ npm run dev npm run dev -- --open ``` -### Building +## Building To create a production version of your app: @@ -37,6 +37,6 @@ npm run build You can preview the production build with `npm run preview`. -> To deploy your app, you may need to -install an [adapter](https://kit.svelte.dev/docs/adapters) +> To deploy your app, you may need to +install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.