ani-auto 1.2.3 → 1.2.5

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/README.md CHANGED
@@ -1,3 +1,13 @@
1
+ ```
2
+ █████╗ ███╗ ██╗██╗ █████╗ ██╗ ██╗████████╗ ██████╗
3
+ ██╔══██╗████╗ ██║██║ ██╔══██╗██║ ██║╚══██╔══╝██╔═══██╗
4
+ ███████║██╔██╗ ██║██║ ███████║██║ ██║ ██║ ██║ ██║
5
+ ██╔══██║██║╚██╗██║██║ ██╔══██║██║ ██║ ██║ ██║ ██║
6
+ ██║ ██║██║ ╚████║██║ ██║ ██║╚██████╔╝ ██║ ╚██████╔╝
7
+ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝
8
+ A N I M E A U T O D O W N L O A D E R
9
+ ```
10
+
1
11
  # ani-auto
2
12
 
3
13
  automatically downloads new anime episodes based on your anilist watching list.
@@ -61,6 +71,7 @@ Commands:
61
71
  disable Pause downloads for an anime (keeps history)
62
72
  status [options] Show recent run log
63
73
  config [options] View, update, or open config file
74
+ update Check for updates and install the latest version
64
75
  daemon [options] Start the background daemon
65
76
  help [command] display help for command
66
77
  ```
@@ -82,25 +93,42 @@ ani-auto config --open
82
93
 
83
94
  ## background service (linux)
84
95
 
85
- ```bash
86
- mkdir -p ~/.config/systemd/user
87
- nano ~/.config/systemd/user/ani-auto.service
88
- ```
96
+ run this once to install and start the daemon as a systemd service:
89
97
 
90
- ```ini
98
+ ```bash
99
+ mkdir -p ~/.config/systemd/user && \
100
+ NODE_BIN=$(which node) && \
101
+ DAEMON_PATH=$(npm root -g)/ani-auto/src/daemon.js && \
102
+ cat > ~/.config/systemd/user/ani-auto.service << SERVICE
91
103
  [Unit]
92
104
  Description=ani-auto daemon
93
105
  After=network-online.target
94
106
 
95
107
  [Service]
96
- ExecStart=/usr/bin/node /path/to/ani-auto/src/daemon.js
108
+ ExecStart=$NODE_BIN $DAEMON_PATH
97
109
  Restart=on-failure
110
+ RestartSec=10
98
111
 
99
112
  [Install]
100
113
  WantedBy=default.target
114
+ SERVICE
115
+ systemctl --user daemon-reload && \
116
+ systemctl --user enable --now ani-auto && \
117
+ echo "ani-auto daemon installed and started"
101
118
  ```
102
119
 
120
+ **useful commands:**
121
+
103
122
  ```bash
104
- systemctl --user enable --now ani-auto
123
+ # check status
124
+ systemctl --user status ani-auto
125
+
126
+ # view live logs
105
127
  journalctl --user -u ani-auto -f
128
+
129
+ # restart
130
+ systemctl --user restart ani-auto
131
+
132
+ # stop
133
+ systemctl --user stop ani-auto
106
134
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ani-auto",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Automatic anime episode downloader",
5
5
  "bin": {
6
6
  "ani-auto": "./src/cli.js"
package/src/cli.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
+ process.removeAllListeners('warning');
3
4
 
4
5
  const { program } = require('commander');
5
6
  const inquirer = require('inquirer');
package/src/daemon.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
+ process.removeAllListeners('warning');
3
4
  /**
4
5
  * daemon.js
5
6
  * Keeps running indefinitely, polling on a configurable interval.