klio 1.4.9 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.dockerignore ADDED
@@ -0,0 +1,9 @@
1
+ node_modules
2
+ npm-debug.log*
3
+ yarn-debug.log*
4
+ yarn-error.log*
5
+ .git
6
+ .gitignore
7
+ .idea
8
+ sessions
9
+ .DS_Store
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 20
package/Dockerfile ADDED
@@ -0,0 +1,18 @@
1
+ FROM node:20-bookworm-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Build deps for native modules like swisseph
6
+ RUN apt-get update \
7
+ && apt-get install -y --no-install-recommends python3 make g++ \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ COPY package.json package-lock.json ./
11
+ RUN npm ci
12
+
13
+ COPY . .
14
+
15
+ ENV NODE_ENV=production
16
+ EXPOSE 37421
17
+
18
+ CMD ["node", "src/gui/server.js"]
package/README.md CHANGED
@@ -56,6 +56,27 @@ This will start a web server on port 37421 (or a different port if specified) an
56
56
  klio --gui --gui-port 8080
57
57
  ```
58
58
 
59
+ ### Running with Docker
60
+
61
+ You can also run the GUI using Docker for easy deployment:
62
+
63
+ ```bash
64
+ # Build the Docker image
65
+ docker build -t astrocli-gui .
66
+
67
+ # Run the container
68
+ docker run -p 3006:37421 astrocli-gui
69
+ ```
70
+
71
+ This will start the GUI on `http://localhost:3000`.
72
+
73
+
74
+ ### Demo
75
+
76
+ Try a live demo of klio web here:
77
+
78
+ 🌐 [https://klio.up.railway.app](https://klio.up.railway.app)
79
+
59
80
  ### Configuration
60
81
 
61
82
  - **Show status**: `--status` - Shows the stored configuration data
@@ -98,6 +119,7 @@ It's possible to analyze a csv with a column of either ISO date time or unix tim
98
119
  - **Show house and sign distribution of the datetime column**: `klio [planet] --csv <file-path>`
99
120
  - **Show aspect type distribution between two planets:** `klio [planet1] [planet2] --csv <file-path> --a`
100
121
  - **Filter CSV data by column value:** `klio [planet] --csv <file-path> --filter "column:value"` (e.g., `--filter "Item:coffee"`)
122
+ - **Filter CSV data by multiple conditions:** `klio [planet] --csv <file-path> --filter "column1:value1,column2:value2"` (e.g., `--filter "FTR:H,HomeTeam:Liverpool"`)
101
123
  - **Creating a bar chart**: Create a bar chart and save the image to the downloads' folder. The image shows the aspect distribution of your csv datetime values: `klio moon sun --csv /home/user/Downloads/coffee.csv --filter "Item:cookie" --a --title "Eaten cookies during sun-moon aspects"`
102
124
 
103
125
  - The command also returns a Chi-Square.
package/compose.yaml ADDED
@@ -0,0 +1,6 @@
1
+ services:
2
+ astrocli-gui:
3
+ build: .
4
+ ports:
5
+ - "3006:37421"
6
+ restart: unless-stopped
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "klio",
3
- "version": "1.4.9",
3
+ "version": "1.5.1",
4
4
  "description": "A CLI for astrological calculations",
5
5
  "main": "src/main.js",
6
6
  "bin": {
7
7
  "klio": "./src/main.js"
8
8
  },
9
9
  "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1"
10
+ "test": "echo \"Error: no test specified\" && exit 1",
11
+ "build:gui-css": "tailwindcss -i ./src/gui/public/tailwind.css -o ./src/gui/public/tailwind.generated.css --minify",
12
+ "watch:gui-css": "tailwindcss -i ./src/gui/public/tailwind.css -o ./src/gui/public/tailwind.generated.css --watch"
11
13
  },
12
14
  "keywords": [
13
15
  "astrology",
@@ -19,15 +21,18 @@
19
21
  "license": "ISC",
20
22
  "type": "commonjs",
21
23
  "dependencies": {
24
+ "@webcontainer/api": "^1.6.1",
22
25
  "axios": "^1.13.4",
26
+ "bcryptjs": "^3.0.3",
23
27
  "commander": "^14.0.3",
24
28
  "csv": "^6.4.1",
25
29
  "csv-parser": "^3.0.0",
26
30
  "express": "^4.19.2",
31
+ "express-session": "^1.19.0",
27
32
  "fast-xml-parser": "^5.3.4",
28
33
  "moment-timezone": "^0.6.0",
29
34
  "node-fetch": "^3.3.2",
30
- "sqlite3": "^5.1.7",
35
+ "session-file-store": "^1.5.0",
31
36
  "swisseph": "^0.5.17"
32
37
  }
33
38
  }
@@ -24,6 +24,12 @@ const elements = [
24
24
  'Air', 'Water', 'Fire', 'Earth', 'Air', 'Water'
25
25
  ];
26
26
 
27
+ // Sign types (Cardinal, Fixed, Mutable)
28
+ const signTypes = [
29
+ 'Cardinal', 'Fixed', 'Mutable', 'Cardinal', 'Fixed', 'Mutable',
30
+ 'Cardinal', 'Fixed', 'Mutable', 'Cardinal', 'Fixed', 'Mutable'
31
+ ];
32
+
27
33
  // Decans
28
34
  const decans = [
29
35
  '1st Decan', '2nd Decan', '3rd Decan',
@@ -50,6 +56,7 @@ module.exports = {
50
56
  planets,
51
57
  signs,
52
58
  elements,
59
+ signTypes,
53
60
  decans,
54
61
  dignities
55
62
  };