code / nowopen

Lines270 Lua215 make29 Markdown26
(35 lines)

nowopen

nowopen is a simple program to display which places are currently open.

Preview

Installing

sudo make install to install, and sudo make uninstall to uninstall. You should also create a file to store business hours in at either ~/.local/share/nowopen/businesshours (recommended) or ~/.businesshours. An example businesshours file is provided, so you can get started by running mkdir -p ~/.local/share/nowopen && cp example_businesshours ~/.local/share/nowopen/businesshours. The businesshours format looks like:

Mario Bros Plumbing (plumbers):
    7am-6:30pm
    sun: closed

Usage

Once you have a businesshours file, run nowopen [tag1 tag2...]. Establishments matching any of the specified tags (prefix matching is used) and the amount of time till they close will be displayed. E.g. nowopen plumber will show how long "Mario Bros Plumbing" is open.

Flags

  • -h/--help: Print the usage and exit.
  • -w/--where: Print where the config file is stored and exit.
  • -e/--edit: Edit the config file and exit.
  • -r/--random: Pick a single random option.
  • -p/--plain: Print the results to stdout in plain text.
1 # nowopen
3 `nowopen` is a simple program to display which places are currently open.
5 ![Preview](nowopen_preview.gif)
7 ## Installing
9 `sudo make install` to install, and `sudo make uninstall` to uninstall.
10 You should also create a file to store business hours in at either
11 `~/.local/share/nowopen/businesshours` (recommended) or `~/.businesshours`.
12 An example businesshours file is provided, so you can get started by
13 running `mkdir -p ~/.local/share/nowopen && cp example_businesshours ~/.local/share/nowopen/businesshours`.
14 The businesshours format looks like:
16 ```
17 Mario Bros Plumbing (plumbers):
18 7am-6:30pm
19 sun: closed
20 ```
22 ## Usage
24 Once you have a businesshours file, run `nowopen [tag1 tag2...]`.
25 Establishments matching any of the specified tags (prefix matching is used) and
26 the amount of time till they close will be displayed. E.g. `nowopen plumber`
27 will show how long "Mario Bros Plumbing" is open.
29 ### Flags
31 - `-h`/`--help`: Print the usage and exit.
32 - `-w`/`--where`: Print where the config file is stored and exit.
33 - `-e`/`--edit`: Edit the config file and exit.
34 - `-r`/`--random`: Pick a single random option.
35 - `-p`/`--plain`: Print the results to stdout in plain text.