Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aksiksi/ncdmv
Find upcoming NC DMV appointments.
https://github.com/aksiksi/ncdmv
Last synced: 6 days ago
JSON representation
Find upcoming NC DMV appointments.
- Host: GitHub
- URL: https://github.com/aksiksi/ncdmv
- Owner: aksiksi
- Created: 2023-05-28T19:17:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-22T00:55:29.000Z (15 days ago)
- Last Synced: 2024-10-29T11:57:09.989Z (8 days ago)
- Language: Go
- Homepage:
- Size: 118 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ncdmv
Monitor NCDMV for new appointment slots and get notified through Discord.
## Usage
```
ncdmv monitors NC DMV appointmentsUsage:
ncdmv [flags]Flags:
-t, --appt-type string appointment type (one of: [knowledge-test motorcycle-skills-test non-cdl-road-test permit driver-license driver-license-duplicate driver-license-renewal id-card]) (default "permit")
-d, --database-path string database path
--debug enable debug mode
--debug-chrome enable debug mode for Chrome
--disable-gpu disable GPU acceleration
-w, --discord-webhook string Discord webhook URL
--headless run Chrome in headless mode (no GUI) (default true)
-h, --help help for ncdmv
--interval duration interval between searches (default 5m0s)
-l, --locations strings locations to search (default [cary,durham-east,durham-south])
--notify-unavailable if set, send a notification if an appointment becomes unavailable (default true)
--stop-on-failure if set, completely stop on failure instead of just logging
--timeout duration timeout for each search, in seconds (default 5m0s)
```## Examples
Run in headless mode:
```
go run ./cmd/ncdmv -l cary,durham-east,durham-south -w [WEBHOOK] --database-path ./ncdmv.db
```Show the browser with a timeout of 5 minutes each check (across all locations) and an interval of 10 minutes:
```
go run ./cmd/ncdmv -l cary,durham-east,durham-south -w [WEBHOOK] --database-path ./ncdmv.db --timeout 5m --interval 10m --headless=false
```## Docker
Note: you can only run headless Chrome with Docker.
```
docker run --rm -v $(pwd):/config -e NCDMV_APPT_TYPE=permit -e NCDMV_LOCATIONS=cary,durham-east ghcr.io/aksiksi/ncdmv:latest
```### Docker Compose
```yaml
services:
ncdmv:
image: ghcr.io/aksiksi/ncdmv:latest
volumes:
- /var/volumes/ncdmv:/config
environment:
NCDMV_APPT_TYPE: permit
NCDMV_LOCATIONS: cary,durham-east
NCDMV_DISCORD_WEBHOOK: "https://..." # optional
NCDMV_TIMEOUT: 5m # optional
NCDMV_INTERVAL: 5m # optional
NCDMV_NOTIFY_UNAVAILABLE: true # optional
NCDMV_DISABLE_GPU: false # optional
```## Appendix
### If you are new to Go
1. Install: https://go.dev/doc/install
2. ```go mod tidy```
3. ```go run ./cmd/ncdmv-migrate```
4. Run!### Setup (Debian)
1. Install Google Chrome: https://www.if-not-true-then-false.com/2021/install-google-chrome-on-debian/. Quick summary:
```
sudo su -cat /etc/apt/sources.list.d/google-chrome.list
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
EOFwget -O- https://dl.google.com/linux/linux_signing_key.pub |gpg --dearmor > /etc/apt/trusted.gpg.d/google.gpg
apt update
apt install google-chrome-stable
```2. Run!
### Setup (Ubuntu)
1. Install Google Chrome:```
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.debsudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt --fix-broken install
```2. Install sqlite
```
sudo apt install sqlite3
```