https://github.com/samuelmarks/odbc-ini-gen
ODBC dynamic ini builder, like GRUB update-triggers os-probe but for your database drivers.
https://github.com/samuelmarks/odbc-ini-gen
Last synced: 3 months ago
JSON representation
ODBC dynamic ini builder, like GRUB update-triggers os-probe but for your database drivers.
- Host: GitHub
- URL: https://github.com/samuelmarks/odbc-ini-gen
- Owner: SamuelMarks
- License: apache-2.0
- Created: 2024-08-08T03:43:47.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-18T04:00:13.000Z (almost 2 years ago)
- Last Synced: 2025-03-23T01:27:32.095Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 97.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
odbc-ini-gen
============
[](https://opensource.org/licenses/Apache-2.0)
[](https://github.com/SamuelMarks/odbc-ini-gen/actions)
[](https://cirrus-ci.com/github/SamuelMarks/odbc-ini-gen)
[](https://en.wikipedia.org/wiki/C89_(C_version))
ODBC dynamic ini builder, like GRUB update-triggers os-probe but for your database drivers.
## Current inferences
| Name | Detected from |
|--------------------------|-----------------------------------------------------------------------------|
| 1-Wire weather sensors | `libw1odbc.so` |
| FreeTDS (MS SQL, Sybase) | `libtdsodbc.so` |
| MariaDB | `libmaodbc.so` |
| MDB (MS Access, JET) | `libmdbodbc.so` |
| PostgreSQL | `psqlodbca.so`; `psqlodbcw.so` |
| SQLite | `libsqliteodbc.so`; `libsqlite3odbc-0.9998.so`; `libsqlite3odbc-0.99991.so` |
## `--help`
odbc-ini-gen: ODBC dynamic ini builder, like GRUB update-triggers os-probe but for your database drivers.
(by default does `--infer-all` with output to stdout)
Usage:
odbc-ini-gen...
odbc-ini-gen --output=...
odbc-ini-gen --infer-all...
odbc-ini-gen --infer-all --output=...
odbc-ini-gen --infer-all --search=...
odbc-ini-gen --infer-all --search= --output=...
odbc-ini-gen --name= --driver=...
odbc-ini-gen --name= --driver= --output=...
odbc-ini-gen --name= --driver= --desc=...
odbc-ini-gen --name= --driver= --desc= --output=...
odbc-ini-gen --help
odbc-ini-gen --version
Options:
-h --help Show this screen.
--version Show version.
--infer-all Find ODBC shared libraries and infer their database names. This is the default.
--no-infer-all Doesn't infer anything automatically. This is default when `--name` or `--driver` is provided.
--name= Explicitly provided library name
--desc= Explicitly provided description
--props= Explicitly additional properties (doesn't validate)
--driver= Explicitly provided shared library||object location (doesn't check existence)
--search= Folder to (non-recursively) search for shared objects within
-o=, --output= Output file. If not specified: will use `stdout`. If specified: will overwrite file.
## Build dependencies
- [CMake](https://cmake.org) (3.19 or later)
- C compiler (any that work with CMake, and were released within the last 30 years)
### Build
```bash
mkdir build && cd build
cmake ..
cmake --build .
```
### Docker
```bash
docker build . -t odbc-ini-gen:latest
```
### CLI interface
Generated with `docopt`, use `python -m pip install https://api.github.com/repos/offscale/docopt.c/zipball/pyth
on-3-13#egg=docopt_c` then:
```bash
$ python -m docopt_c '.docopt' -o 'odbc_ini_gen/'
```
## OS/distribution specific notes
### Cygwin
[iODBC](https://www.iodbc.org) is used.
---
## License
Licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or )
- MIT license ([LICENSE-MIT](LICENSE-MIT) or )
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.