Export notes or do a backup via the command line
| 670 | |
| 671 | // Export notes or do a backup via the command line |
| 672 | int CmdLineTool::exportNotes(StartupConfig config) { |
| 673 | if (global.sharedMemory->attach()) { |
| 674 | std::cout << tr("This cannot be done with NixNote running.").toStdString() << endl; |
| 675 | return 16; |
| 676 | } |
| 677 | global.db = new DatabaseConnection("nixnote"); // Startup the database |
| 678 | if (config.exportNotes->backup) |
| 679 | config.exportNotes->backupDB(); |
| 680 | else |
| 681 | config.exportNotes->extract(); |
| 682 | return 0; |
| 683 | } |
| 684 | |
| 685 | |
| 686 |