Next: , Previous:   [Contents]


2 OrgaDoc Examples

OrgaDoc is used for a variety of purposes from keeping a digital file about your documents in one place (for easy querying) to using the document pool to ensure your backups are up-to-date. This manual will describe some examples and usages of OrgaDoc.

You have some documents in your ’Document’ directory which you wish to pool into a single, queriable document.

First we use orgadoc-init-readme to generate a pool for our documents. This example uses the ’-m/–merge’ argument:

Entering directory [docs/]
Leaving directory [docs/]

readme.xml files are now created, please edit the FIXME lines
moving readme.xml files to /home/<user>/.orgadoc completed

Now we will check our document pool (readme.xml files):

~/.orgadoc$ ls
docs

Now we can use orgadoc on this pool (the merge command mimics the directory structure) that your readme.xml files are in:

./orgadoc --json ~/.orgadoc/docs/readme.xml

    "Title" : "(null)"
    "Filename" : "CPlusPlusProgramming.pdf"
    "Date-Time" : "Sun Apr 22 07:31:11 2012 CEST"
    "Type" : "public"
    "Author" : "(null)"
    "Number-of-Pages" : 684
    "Document-language" : "FIXME LANGUAGE"
    "Summary" : "FIXME SUMMARY"
    "Chapter" : "FIXME PART"
    "Notes" : "FIXME NOTES"

    "Title" : "(null)"
    "Filename" : "C_Programming.pdf"
    "Date-Time" : "Fri Dec 15 17:40:22 2017 CET"
    "Type" : "public"
    "Author" : "(null)"
    "Number-of-Pages" : 290
    "Document-language" : "FIXME LANGUAGE"
    "Summary" : "FIXME SUMMARY"
    "Chapter" : "FIXME PART"
    "Notes" : "FIXME NOTES"

    "prog": "Generated by GNU OrgaDoc 1.2"

Now we can see the structure of our pool and the documents that are within it. If you wish to save this file it is easily transferred in the standard way:

./orgadoc --json ~/.orgadoc/docs/readme.xml > readme.json

This will create the file ’readme.json’ in your current directory if you use it without an absolute path.

Now say we would like to query our pool, do I have a C++ book somewhere?

./orgadoc --json ~/.orgadoc/docs/readme.xml | grep -Ri 'CPlusPlus' ~/.orgadoc/*
/home/<user>/.orgadoc/docs/readme.xml:<file>CPlusPlusProgramming.pdf</file>

Next: , Previous:   [Contents]