Command-line mode on Linux

Last modified: April 10, 2024

You can use the native Linux command line to run dbForge Documenter for MySQL.

Note

This topic describes the CLI-powered access to the functionality of dbForge Documenter installed into a CrossOver bottle. For more information on the command-line functionality of the tool, refer to the corresponding topics of the documentation.

As an example, let’s see how to generate documentation of an entire database from the command line. To do that, run the following command:

"/opt/cxoffice/bin/wine" --bottle "dbForge_MySQL" --check --wait-children --start "C:\Program Files\Devart\dbForge Documenter for MySQL\documenter.com" /document /connection:"User Id=[yourusername];Host=[host];Password=[yourpassword];Database=[database];Character Set=utf8" /database:[database] /documentformat:Pdf /outputfile:"C:\users\crossover\My Documents\[file_name].pdf" /copyright:"Copyright - All Rights Reserved" /created:"dd/MM/yyyy" /doctitle:"filename" /doclogo:"logo.svg" /breadcrumbs:Y

In this example:

"/opt/cxoffice/bin/wine"

…is the command that initiates CrossOver.

--bottle "dbForge_MySQL"

…is the parameter that specifies the name of the bottle that contains dbForge Documenter for MySQL.

--check --wait-children --start

…are the options that configure the launch of the application.

"C:\Program Files\Devart\dbForge Documenter for MySQL\documenter.com" 
/document /connection:"User Id=[yourusername];Host=[host];Password=[yourpassword];Database=[database];Character Set=utf8" 
/database:[database] /documentformat:Pdf /outputfile:"C:\users\crossover\My Documents\[file_name].pdf" 
/copyright:"Copyright - All Rights Reserved" /created:"dd/MM/yyyy" /doctitle:"filename" 
/doclogo:"logo.svg"

…is the command to generate documentation with the specified options.

/breadcrumbs:Y

…enables breadcrumbs.

Worked example

Let us look at a worked example command to generate documentation of the MySQL sakila database that resides on the dbfmylast server.

"/opt/cxoffice/bin/wine" --bottle "dbForge_MySQL" --check --wait-children --start "C:\Program Files\Devart\dbForge Documenter for MySQL\documenter.com" /document /connection:"User Id=yourusername;Host=dbfmylast;Password=yourpassword;Database=sakila;Character Set=utf8" /database:sakila /documentformat:Pdf /outputfile:"C:\users\crossover\My Documents\sakila_dbfmylast.pdf" /copyright:"Copyright - All Rights Reserved" /created:"dd/MM/yyyy" /doctitle:"sakila.dbfmylast" /doclogo:"logo.svg" /breadcrumbs:Y

The documentation is being generated.

Documentation generation from CLI

The process finishes successfully.

Run a batch file

You can run not only individual commands, but also generated batch files (*.bat/*.cmd files), which are to be created as usual Windows batch files.

Let’s look at an example of code for a batch file.

"/opt/cxoffice/bin/wine" --bottle "dbForge_MySQL" --check --wait-children --start "C:\users\crossover\My Documents\documenter.bat" 

In this example:

"/opt/cxoffice/bin/wine"

…is the command that initiates CrossOver.

--bottle "dbForge_MySQL"

…is the parameter that specifies the name of the bottle that contains dbForge Documenter for MySQL.

--check --wait-children --start

…are the options that configure the launch of the application.

"C:\users\crossover\My Documents\documenter.bat"

…is the parameter that specifies the path to the batch file.

Note

You can automate the launch of dbForge Documenter from the command line using the standard Linux scheduler.