Skip to content

Commit

Permalink
chore: format and lint readmes a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
wolffshots committed Apr 9, 2024
1 parent c93c66e commit bcbba25
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 31 deletions.
44 changes: 21 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -34,45 +34,43 @@ 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:
```sh
/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`
16 changes: 8 additions & 8 deletions web/README.md
Original file line number Diff line number Diff line change
@@ -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!

Expand All @@ -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
Expand All @@ -27,7 +27,7 @@ npm run dev
npm run dev -- --open
```

### Building
## Building

To create a production version of your app:

Expand All @@ -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.

0 comments on commit bcbba25

Please sign in to comment.