asphaltbuffet / ogma

A LEX DB and letter tracking application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OGMA

A LEX Magazine DB and letter tracking application.

Keep a Changelog GitHub Release ogma Go Reference go.mod LICENSE Build Status Go Report Card Codecov Quality Gate Status

Usage

Ogma does not come pre-loaded with any issue information. As the service requires members to buy issues but not pay for letters forwarded, this application is not intended to skirt that monetary flow. You can hand-type information, scan, invoke blood magic, whatever.

There is one method to add issue listings for later use: Import.

Application usage details can be found via the -h or --help flag in the base application or with any command. This will show argument details, flag detail, and some examples. In-application documentation always supersedes this documentation.

Mail Command

The mail command tracks correspondence and provides the ability to link with LEX listings, members, and/or other correspondence.

ogma mail --sender=<member> --receiver=<member> --date=<date> -link<member or mail ref>

By default, the member numbers are set to the configured member number in the application configuration. They must be entered as integers. Any extended member number (those with a letter) should be entered without text characters.

On success, a reference number is returned for use in tracking correspondence artifacts.

ogma mail -s1234 -r5678 -d2021-11-15
Added mail. Reference: f8427e

Import Command

The import command takes the filename (for now) of a JSON file that contains listing or mail entries.

There is no checking for duplicates already in the application database. Careful!

ogma import [listing|mail] <filename.json>

By default, the import command will only output the number of entries saved to the db (#33). No, there's no way to check this right now other than doing manual searches for entries to figure out what made it in.

If you want to see everything that has been imported, use the verbose flag (-v or --verbose) to see all entries printed on the screen. This may be a lot of stuff on your screen...

ogma import listing <filename> -v

Example listing import file

{
    "listings": [
        {
            "volume": 1,
            "issue": 1,
            "year": 1986,
            "season": "Spring",
            "page": 1,
            "category": "Art & Photography",
            "member": 123,
            "alt": "",
            "international": true,
            "review": false,
            "text": "This is an example.",
            "art": false,
            "flag": false
        }
    ]
}

Search Command

This is the primary use of the application and is simplified at the moment. Only searching by member number is supported; this must be entered as an integer. Adding in a letter after the member number, as seen in some issues, is invalid and will fail. All listings with that member number will be found (listings with an alphabetic extension will be included and shown as such).

ogma search <member number>

Currently, the output defaults to something pretty, with colors (results on Windows may vary). Output configuration may be expanded in the future. See #16

Delete Command

Used to remove all data (listings and mail). No backup is created, and the action cannot be undone. You have been warned!

ogma delete -a

The -a flag ensures you didn't accidentally type in the command name trying to get help. It also leaves room for future selective deletion functionality.

Export Command

Used to write the mail/listing data to JSON file(s) for backup. The JSON file will overwrite application data if it is changed and reimported. This can be used for editing functionality.

ogma export -records=mail -outfile=mailExport.json

Configuration

Default config

logging:
  level: info
search:
  max_results: 10
datastore:
  filename: "ogma.db"
defaults:
  issue: 56
  max_column: 40
member: 13401

About

A LEX DB and letter tracking application.

License:MIT License


Languages

Language:Go 81.5%Language:Shell 16.0%Language:Makefile 1.3%Language:Dockerfile 1.2%