|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- /*********************************************************************
- * Dump Note Index
- * Written by Jonathan A. Foster <ChipMaster@YeOlPiShack.net>
- * Started December 28th, 2024
- *
- * This is to dump a notes index file. This is part of the testing
- * process but I thought it might come in handy as a general utility.
- *********************************************************************/
- #include <JFP/ioobjs.h>
- #include "../books.cpp"
- #include "../bibleref.cpp"
- #include "../notes.cpp"
- using namespace JFP;
-
-
-
- /*********************************************************************
- * Globals
- *********************************************************************/
-
- char **args = 0;
-
-
-
- /*********************************************************************
- * Usage (help) message
- *********************************************************************/
-
- int help(const char *msg=0) {
- if(msg) sterr << msg << "\n\n";
- sterr << basename(args[0]) << " file [file [...]]\n"
- << '\n'
- << "filenames officially have the '.ssix' extenstion." << endl;
- return 1;
- }
-
-
-
- int main(int argc, char **argv) {
- int i;
-
- args = argv;
- if(argc<2) return help();
- for(i=1; i<argc; ++i) {
-
- NoteIdx idx;
- idx.open(argv[i]);
- if(idx.first()) {
- do {
- stout << idx.reference().str() << " @ " << idx.value() << endl;
- } while(idx.next());
- }
-
- }
- return 0;
- }
|