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 +9 -0
- package/.nvmrc +1 -0
- package/Dockerfile +18 -0
- package/README.md +22 -0
- package/compose.yaml +6 -0
- package/package.json +8 -3
- package/src/astrology/astrologyConstants.js +7 -0
- package/src/astrology/astrologyService.js +327 -302
- package/src/astrology/astrologyServiceWeb.js +369 -0
- package/src/astrology/swephWasmLoader.js +106 -0
- package/src/astrology/swissephAdapter.js +279 -0
- package/src/cli/cli.js +148 -152
- package/src/cli/cliService.js +1197 -0
- package/src/cli/cliServiceWeb.js +406 -0
- package/src/config/configService.js +59 -35
- package/src/gui/public/index.html +839 -298
- package/src/gui/public/sweph/astro.data +0 -0
- package/src/gui/public/sweph/astro.js +3934 -0
- package/src/gui/public/sweph/astro.wasm +0 -0
- package/src/gui/public/tailwind.css +3 -0
- package/src/gui/public/tailwind.generated.css +1 -0
- package/src/gui/public/webcontainerService.js +435 -0
- package/src/gui/routes/api.js +64 -101
- package/src/gui/server.js +80 -31
- package/src/gui/webcontainerSetup.js +244 -0
- package/src/health/fileAnalysis.js +2 -2
- package/commands.db +0 -0
- package/src/gui/commandLogger.js +0 -67
- package/src/gui/database.js +0 -135
package/.dockerignore
ADDED
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
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "klio",
|
|
3
|
-
"version": "1.
|
|
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
|
-
"
|
|
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
|
};
|