dbconfig-generate-include(1)

πŸ’– dbconfig-generate-include(1) πŸ’–

okay bestie, welcome to dbconfig-common's little generator bestie, dbconfig-generate-include πŸ’… she makes custom-format include files, and honestly? she ate.


✨ NAME ✨

dbconfig-generate-include β€” generate custom format db include files πŸŽ€


✨ SYNOPSIS ✨

dbconfig-generate-include [-hv] [-f format] [-o options] [-a]
[-d[varname]] [-u[varname]] [-p[varname]] [-s[varname]] [-P[varname]]
[-t[varname]] [-C[commentstr]] [-O owner[:group]] [-m mode] [-U] infile
[outfile]

like, yes, that's a lot of brackets. she's flexible, she's versatile, she's that girl. πŸ¦‹


✨ DESCRIPTION ✨

dbconfig-generate-include is a whole program whose entire job is generating custom format include files β€” and inside those files lives all the info you need to connect a program to a database resource. literally her only purpose and she's obsessed with it. 🌸


✨ OPTIONS ✨

okay so here's the full menu, no skips, no cuts, we're listing every single one:

  • infile β€” use the given dbconfig-common config file as input. the main character of the inputs, fr fr. πŸ“₯
  • outfile β€” use the given file as output. default? stdout, because she's chill like that. πŸ“€
  • -f, --format β€” use the given output format. default is sh. 🎨
  • -o, --options β€” pass options specific to an output format, as a semicolon separated list. peep the OUTPUT FORMATS/OPTIONS section below for the tea. β˜•
  • -a, --all β€” include all the information in the output. this one's the default, bestie. πŸ‘‘
  • -d, --dbname β€” include the dbname in the output. πŸ—‚οΈ
  • -p, --dbpass β€” include the dbpass in the output. 🀫 (a password! keep it cute and keep it safe)
  • -s, --dbserver β€” include the dbserver in the output. πŸ–₯️
  • -P, --dbport β€” include the dbport in the output. πŸ”Œ
  • -u, --dbuser β€” include the dbuser in the output. πŸ™‹
  • -t, --dbtype β€” include the dbtype in the output. 🧬
  • -C, --comment β€” "comment out" any unset variables, using a comment string that's appropriate for whatever programming language we're in. you can override it with an optional parameter as an arbitrary comment. so like, unset stuff gets politely hidden, not silently yeeted. πŸ’¬
  • -O, --owner β€” set the owner:group of the output file. 🫢
  • -m, --mode β€” set the permissions on the output file. πŸ”
  • -U, --ucf β€” register the outputfile with ucf. πŸ“‹
  • -h, --help β€” display this helpful message. hi bestie, you found it πŸ’–
  • -v, --version β€” output the version and exit. dramatic exit, love that for her. πŸšͺ

🌈 OUTPUT FORMATS/OPTIONS 🌈

format is one of a list of include-file style formats for various programming languages. the current list includes:

  • sh β€” /bin/sh style include file. the classic. the default. the moment. ✨
  • perl β€” perl parseable include file. πŸͺ
  • php β€” php parseable include file. 🐘
  • template β€” a file which contains a series of fields to be replaced with actual values. all substitutable fields consist of the underlying dbc_ variable name capitalized and surrounded with underscores. for example: _DBC_DBUSER_. no cap, that's the whole pattern. 🧚
    • options: template_infile (path to input file containing template)
  • cpp β€” c-style header file, using #define'd constants. πŸ”₯
⚠️ heads up bestie: -o/--options wants that semicolon separated list, and format-specific options live here in this section. don't go inventing format options that aren't listed, ok? iykyk. πŸ’€

and that's the whole page, periodt. πŸ’… this little icon was written by sean finney back in March 2005, and it ships as part of dbconfig-common, manual section 1. go forth and generate those include files, bestie β€” you're gonna slay πŸŽ€βœ¨πŸ¦‹