MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / exportNotes

Method exportNotes

cmdtools/cmdlinetool.cpp:672–683  ·  view source on GitHub ↗

Export notes or do a backup via the command line

Source from the content-addressed store, hash-verified

670
671// Export notes or do a backup via the command line
672int 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

Callers

nothing calls this directly

Calls 3

attachMethod · 0.80
backupDBMethod · 0.80
extractMethod · 0.80

Tested by

no test coverage detected