Skip to content

Commit

Permalink
chore: rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
davidenke committed Nov 7, 2024
1 parent 3fc8790 commit be50008
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 53 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ jobs:
--git.commitMessage='chore: release ${version} [skip actions]' \
--git.pushArgs=--follow-tags \
--plugins.@release-it/conventional-changelog.infile=CHANGELOG.md \
--plugins.@release-it/conventional-changelog.header='# Xmind Live Protocol' \
--plugins.@release-it/conventional-changelog.header='# Live Protocol' \
--plugins.@release-it/conventional-changelog.preset=angular \
--hooks.before:release='echo "$(jq '\''.version="${version}"'\'' src-tauri/tauri.conf.json)" > src-tauri/tauri.conf.json' \
--hooks.before:release='cargo bump --manifest-path src-tauri/Cargo.toml ${version}' \
--hooks.before:release='cargo update --manifest-path src-tauri/Cargo.toml --precise ${version} xmind-live-protocol' \
--hooks.before:release='cargo update --manifest-path src-tauri/Cargo.toml --precise ${version} live-protocol' \
--hooks.before:release='git add src-tauri/tauri.conf.json src-tauri/Cargo.toml src-tauri/Cargo.lock'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagname: __VERSION__
releaseName: "Xmind Live Protocol __VERSION__"
releaseName: "Live Protocol __VERSION__"
args: ${{ matrix.args }}

- run: echo "Released ${{ needs.prepare.outputs.version }} for ${{ matrix.name }} :rocket:" >> $GITHUB_STEP_SUMMARY
50 changes: 26 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
<a href="https://github.com/davidenke/xmind-live-protocol/releases/latest"><img src="https://img.shields.io/github/v/release/davidenke/xmind-live-protocol?label=%40latest" alt="Latest version"/></a>
<a href="https://github.com/davidenke/xmind-live-protocol/actions/workflows/release.yml"><img src="https://img.shields.io/github/actions/workflow/status/davidenke/xmind-live-protocol/release.yml?label=tests" alt="Test status"/></a>
<a href="https://github.com/davidenke/xmind-live-protocol"><img src="https://img.shields.io/badge/github-sources-blue" alt="Source on GitHub"/></a>
<a href="https://davidenke.github.io/xmind-live-protocol"><img src="https://img.shields.io/badge/demo-app-yellow?logoSize=50px" alt="Demo app"/></a>
<a href="https://github.com/davidenke/live-protocol/releases/latest"><img src="https://img.shields.io/github/v/release/davidenke/live-protocol?label=%40latest" alt="Latest version"/></a>
<a href="https://github.com/davidenke/live-protocol/actions/workflows/release.yml"><img src="https://img.shields.io/github/actions/workflow/status/davidenke/live-protocol/release.yml?label=tests" alt="Test status"/></a>
<a href="https://github.com/davidenke/live-protocol"><img src="https://img.shields.io/badge/github-sources-blue" alt="Source on GitHub"/></a>
<a href="https://davidenke.github.io/live-protocol"><img src="https://img.shields.io/badge/demo-app-yellow?logoSize=50px" alt="Demo app"/></a>

# Xmind live protocol
# Live Protocol

This application converts a mind map into a protocol document.\
It creates a structured document from an XMind mind map file to be used as abstract or protocol.
This application converts mind maps into protocol documents.\
It creates a structured document from a given mind map file to be used as abstract.

Once a mind map is opened, the protocol document will be updated automatically whenever the mind map is changed.
Once a mind map is opened, the protocol document will be updated automatically whenever the source file is changed.

<img src="https://github.com/davidenke/xmind-live-protocol/blob/main/docs/example-transparent@1024.png?raw=true" alt="Mind map with live protocol" width="800"/>
<img src="https://github.com/davidenke/live-protocol/blob/main/docs/example-transparent@1024.png?raw=true" alt="Mind map with live protocol" width="800"/>

While the preview is rendered from HTML, the internal representation of the mind maps structural data is generated as [Markdown](https://en.wikipedia.org/wiki/Markdown).\
This allows for exporting the protocol document to a broad range of formats, such as plain text, PDF, or DOCX.

## Download

Download the [latest release](https://github.com/davidenke/xmind-live-protocol/releases/latest/) for your platform.\
Other versions can be found on the [releases page](https://github.com/davidenke/xmind-live-protocol/releases/).
Download the [latest release](https://github.com/davidenke/live-protocol/releases/latest/) for your platform.\
Other versions can be found on the [releases page](https://github.com/davidenke/live-protocol/releases/).

> Mac users: Determine the correct version for your macOS platform, either for Intel `*_x64.dmg` or Apple Silicon `*_aarch64.dmg`.
## Usage

> Mac users: Make sure to allow the app to run (system preferences → Security & Privacy → General) once you tried to open it unsuccessfully.
### Open mind maps
### Open your mind (maps)

> Other formats than XMind are not supported _yet_.
Simply run the application and open an XMind mind map file (`*.xmind`) to generate a protocol document.\
Xmind files can either be dragged onto the application window or opened via a file dialog after clicking the window.
Expand All @@ -40,7 +42,7 @@ To open another mind map, simply close the window with the current protocol docu
In the top right corner of the window is a tool bar containing simple stepper buttons to customize the protocol document.\
The tool bar will be hidden when not interacting with it, the cursor is not moved for a while, or the application window is not focused. Just focus the window again and move the cursor to show the tool bar again.

<img src="https://github.com/davidenke/xmind-live-protocol/blob/main/docs/tool-bar.png?raw=true" alt="Tool bar" width="160"/>
<img src="https://github.com/davidenke/live-protocol/blob/main/docs/tool-bar.png?raw=true" alt="Tool bar" width="160"/>

All steppers can be clicked on the upwards or downwards arrow to increase or decrease the value.\
The icon in the middle of the stepper can be clicked to reset the value to its default.\
Expand Down Expand Up @@ -84,8 +86,8 @@ To develop and build the application, you have to checkout the sources and insta
#### Checkout repository

```bash
git clone https://github.com/davidenke/xmind-live-protocol.git
cd ./xmind-live-protocol
git clone https://github.com/davidenke/live-protocol.git
cd ./live-protocol
```

#### Setup tooling
Expand Down Expand Up @@ -117,7 +119,7 @@ curl -fsSL https://get.pnpm.io/install.sh | sh -

#### Install dependencies

And use correct Node.js version from [`.nvmrc`](https://github.com/davidenke/xmind-live-protocol/tree/main/.nvmrc).
And use correct Node.js version from [`.nvmrc`](https://github.com/davidenke/live-protocol/tree/main/.nvmrc).

```bash
nvm install $(cat .nvmrc)
Expand Down Expand Up @@ -156,13 +158,13 @@ pnpm build
## Deployment

A browser only preview of the application is [deployed to GitHub Pages](https://davidenke.github.io/xmind-live-protocol) on every release [by a GitHub Action](https://github.com/davidenke/xmind-live-protocol/tree/main/.github/workflows/release.yml).
A browser only preview of the application is [deployed to GitHub Pages](https://davidenke.github.io/live-protocol) on every release [by a GitHub Action](https://github.com/davidenke/live-protocol/tree/main/.github/workflows/release.yml).

This happens every time when changes are pushed to the `main` branch.

## Release

Releases are created by CI only [by a GitHub Action](https://github.com/davidenke/xmind-live-protocol/tree/main/.github/workflows/release.yml). This happens in the following steps:
Releases are created by CI only [by a GitHub Action](https://github.com/davidenke/live-protocol/tree/main/.github/workflows/release.yml). This happens in the following steps:

1. Checkout with complete history
1. Install all dependencies (including [Rust], [Node.js], and [pnpm])
Expand All @@ -177,17 +179,17 @@ This happens every time when changes are pushed to the `main` branch.

### Icons

Most of the app icons are generated after installation using [the `tauri icon` command](https://v1.tauri.app/v1/guides/features/icons/) (s. `prepare` script in [`package.json`](https://github.com/davidenke/xmind-live-protocol/tree/main/package.json)).
Most of the app icons are generated after installation using [the `tauri icon` command](https://v1.tauri.app/v1/guides/features/icons/) (s. `prepare` script in [`package.json`](https://github.com/davidenke/live-protocol/tree/main/package.json)).

#### App icon

The only exception is the macOS icon, which is configured to be used from the [`./src/assets/icons/app.icon.icns` path](https://github.com/davidenke/xmind-live-protocol/tree/main/src/assets/icons/app.icon.icns) directly. \
This icon is sourced from its Adobe Illustrator file [`./src/assets/icons/app.icns.ai`](https://github.com/davidenke/xmind-live-protocol/tree/main/src/assets/icons/app.icns.ai):
The only exception is the macOS icon, which is configured to be used from the [`./src/assets/icons/app.icon.icns` path](https://github.com/davidenke/live-protocol/tree/main/src/assets/icons/app.icon.icns) directly. \
This icon is sourced from its Adobe Illustrator file [`./src/assets/icons/app.icns.ai`](https://github.com/davidenke/live-protocol/tree/main/src/assets/icons/app.icns.ai):

- Once opened and edited, the icon has to be exported in [eight different sizes as PNGs](https://gist.github.com/jamieweavis/b4c394607641e1280d447deed5fc85fc) and converted properly.
- To create the files, use the Illustrator export dialog (`File → Export → Export for Screens...`).\
A preset can be imported from the [`./src/assets/icons/app.icns.preset`](https://github.com/davidenke/xmind-live-protocol/tree/main/src/assets/icons/app.icns.preset) file.
- Output the files to the [`./src/assets/icons/icon.iconset`](https://github.com/davidenke/xmind-live-protocol/tree/main/src/assets/icons/icon.iconset) folder.
A preset can be imported from the [`./src/assets/icons/app.icns.preset`](https://github.com/davidenke/live-protocol/tree/main/src/assets/icons/app.icns.preset) file.
- Output the files to the [`./src/assets/icons/icon.iconset`](https://github.com/davidenke/live-protocol/tree/main/src/assets/icons/icon.iconset) folder.
- Then, this _folder is converted_ to an ICNS file _(Yes, you that's right!)_ using the `iconutil` command _on macOS_:\
`iconutil --convert icns --output src/assets/icons/app.icon.icns src/assets/icons/icon.iconset`.

Expand All @@ -202,7 +204,7 @@ As alternative approach, I considered conversion on the backend using a [Node.js
This could be loaded in [Tauri via Sidecar](https://tauri.app/learn/sidecar-nodejs/). To do so, the Node service must be packed into a single binary file, which can be loaded by the Tauri application.

In the Tauri examples [pkg](https://github.com/vercel/pkg) is used to pack the Node service.\
However, this module is not maintained anymore. But fortunately, this has become a first class citizen in Node.js called [Single Executable Application (SEA)](https://nodejs.org/docs/latest-v20.x/api/single-executable-applications.html#single-executable-application-creation-process). Based on this documentation, I roughly automated this steps with a little [CLI tool](https://github.com/davidenke/xmind-live-protocol/tree/main/scripts/prepare-sidecar.ts).\
However, this module is not maintained anymore. But fortunately, this has become a first class citizen in Node.js called [Single Executable Application (SEA)](https://nodejs.org/docs/latest-v20.x/api/single-executable-applications.html#single-executable-application-creation-process). Based on this documentation, I roughly automated this steps with a little [CLI tool](https://github.com/davidenke/live-protocol/tree/main/scripts/prepare-sidecar.ts).\
It can be used calling:

```bash
Expand Down
8 changes: 7 additions & 1 deletion eslint.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
import eslintJs from '@eslint/js';
import eslintPluginImport from 'eslint-plugin-import';
import eslintPluginLit from 'eslint-plugin-lit';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
import eslintPluginUnusedImports from 'eslint-plugin-unused-imports';
import eslintPluginWC from 'eslint-plugin-wc';
import eslintTs from 'typescript-eslint';

export default eslintTs.config(
eslintJs.configs.recommended,
...eslintTs.configs.recommended,
eslintPluginPrettierRecommended,
eslintPluginImport.flatConfigs.recommended,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
eslintPluginWC.configs['flat/recommended'] as any,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
eslintPluginLit.configs['flat/recommended'] as any,
{
ignores: ['dist/', 'node_modules/'],
},
Expand Down Expand Up @@ -47,7 +53,7 @@ export default eslintTs.config(
// import sorting
'simple-import-sort/imports': [
'error',
{ groups: [...eslintPluginSimpleImportSort.defaultGroups, ['\\.css\\?inline']] },
// { groups: [...eslintPluginSimpleImportSort.defaultGroups, ['\\.css\\?inline']] },
],
'simple-import-sort/exports': 'error',
'import/first': 'error',
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Xmind Live Protocol Demo</title>
<title>Live Protocol Demo</title>
<link rel="stylesheet" href="src/index.css" />
<script type="module" src="/src/index.ts" defer></script>
</head>
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "xmind-live-protocol",
"name": "live-protocol",
"version": "0.5.0",
"description": "An application to generate protocol documents from XMind mind maps.",
"description": "An application to generate protocol documents from mind maps.",
"bin": "dist/index.js",
"type": "module",
"scripts": {
Expand Down Expand Up @@ -48,6 +48,7 @@
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-simple-import-sort": "12.1.1",
"eslint-plugin-unused-imports": "4.1.4",
"eslint-plugin-wc": "2.2.0",
"jiti": "2.3.3",
"postcss": "8.4.47",
"postject": "1.0.0-alpha.6",
Expand All @@ -59,11 +60,11 @@
"vite-plugin-node-polyfills": "0.22.0",
"vitest": "2.1.3"
},
"bugs": "https://github.com/davidenke/xmind-live-protocol/issues",
"homepage": "https://github.com/davidenke/xmind-live-protocol#readme",
"bugs": "https://github.com/davidenke/live-protocol/issues",
"homepage": "https://github.com/davidenke/live-protocol#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/davidenke/xmind-live-protocol.git"
"url": "git+https://github.com/davidenke/live-protocol.git"
},
"license": "MIT",
"pnpm": {
Expand Down
31 changes: 31 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "xmind-live-protocol"
name = "live-protocol"
version = "0.5.0"
description = "Generate protocols from Xmind files"
description = "Generate protocols from mind maps"
authors = ["David Enke<david@enke.dev>"]
edition = "2021"

Expand All @@ -11,7 +11,7 @@ edition = "2021"
# The `_lib` suffix may seem redundant but it is necessary
# to make the lib name unique and wouldn't conflict with the bin name.
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
name = "xmind_live_protocol_lib"
name = "live_protocol_lib"
crate-type = ["staticlib", "cdylib", "rlib"]

[build-dependencies]
Expand Down
Binary file modified src-tauri/icons/icon.icns
Binary file not shown.
2 changes: 1 addition & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

fn main() {
xmind_live_protocol_lib::run()
live_protocol_lib::run()
}
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://schema.tauri.app/config/2.0.0",
"productName": "Xmind Live Protocol",
"productName": "Live Protocol",
"version": "0.5.0",
"identifier": "dev.enke.xmind-live-protocol.app",
"identifier": "dev.enke.live-protocol.app",
"build": {
"beforeDevCommand": "vite dev",
"devUrl": "http://localhost:5173",
Expand Down

0 comments on commit be50008

Please sign in to comment.