Companies
Company objects are central to Mediumroast for GitHub. Interactions and in the future Studies rely on Companies to function. After setup is run, via mrcli setup
, two companies are present to work with. Additional Companies can be added, updated, or removed; essentially, company
is an mrcli
sub-command that affords users Create, Read, Update and Delete capabilities. Each of the major functions for mrcli company
are described in this document.
Notice
Some of the command line options and switches may not yet be implemented; therefore, if a switch or option is not yet implemented the CLI will inform the user and then exit.
Help
Prints the usage for the company
sub-command and exits.
Command(s) run
mrcli company --help
Screenshot with output
List company objects
Print out one or more Companies to the command line or an alternative output mechanism like a CSV file. Filtering can be applied to find Companies with specific attributes.
List all company objects in a table format
This is the default output when running mrcli c
or mrcli company
which prints a text table to STDOUT.
Command(s) run
mrcli c
mrcli company
Screenshot with output
List all company objects in JSON format
Output a list of company objects in properly formatted JSON to STDOUT which can be viewed, redirected to a file, or piped to another command.
Command(s) run
mrcli c --output=json
mrcli company --output=json
Screenshot with output
List all company objects and output to a CSV or XLSX
Company data can be output in either a CSV or XLSX files to enable consumption in common tools like Microsoft Excel. The resulting files will be stored in $HOME/Documents directory as Mr_Companies.csv
or Mr_Companies.xlsx
depending on your intended output.
Command(s) run
mrcli c --output=csv
mrcli c --output=xls
Screenshot of commands being run
Screenshot of CSV imported into MacOS numbers
Filter company outputs
The CLI offers the ability to filter outputs by almost any company attribute. This is manifest by two switches on the company sub-command one specific to finding companies by name, --find_by_name
and the other by an arbitrary attribute, --find_by_x
. Note all output format options, like JSON, CSV, etc., are available when the outputs are filtered. Finally, only exact matches are supported, meaning if you want to search for a company using any attribute you have to fully provide the attribute's value (i.e., "Med" would not match "Mediumroast, Inc.", but "Mediumroast, Inc." would).
Filter in a company by name
To zero in on a specific company using the find by name switch is provided.
Command(s) run
mrcli c --find_by_name="Mediumroast, Inc."
Screenshot with output
Filter a company by attribute
Find a specific company by a particular attribute in the example below the switch filters on the attribute company_type
.
Command(s) run
mrcli c --find_by_x='{"company_type": "Public"}'
Screenshot with output
Update a company attribute
To update a company attribute the --update
switch is provided. A properly formatted JSON stanza is supplied to the --update
switch that specifies the name of the company to update, the key to update, and finally the value of the key to update.
Command(s) run
mrcli c --update='{"name": "Atlassian Corp", "key": "company_type", "value": "Public"}'
Screencast with output
Notice: Only the markdown version rendered through the GitHub web interface will display the screencast. If you're viewing these files through the GitHub Page Version the link below will just show up as text.
https://github.com/mediumroast/mediumroast_js/assets/10818650/a74cb8cd-f8cb-4a8d-8968-ccf9b875d86b
Delete a company
Remove a company and associated interactions if in the repository. There is a confirmation prompt which defaults to yes. Note that the exact company name is needed to proceed with a deletion.
Command(s) run
mrcli c --delete="Atlassian Corp"
Screenshot with output
Add a company
A command line prompt based wizard steps the user through either a semi-automated process or a fully-automated process to define a company. The semi-automated process is typically used for companies that aren't public. While the fully-automated process is typically used for companies that are public. In either case the user is asked to verify the steps taken before the company is committed to the repository.
Command(s) run
mrcli c --add_wizard
Screenshot with output
Report on a company
Produce a MS Word document report on a company. The report includes a dashboard with a company similarity report, company firmographics, detail on similar companies, and summaries for all interactions associated to the company reported on. The report is stored in the $HOME/Documents
directory as <company_name>.docx
.
Optionally, if the --package
switch is used the report is zipped and stored in the $HOME/Documents directory as <company_name>.zip
including all of the interactions associated to the company and the set of most and least similar companies.
Command(s) run
mrcli c --report="Atlassian Corp"
mrcli c --report="Atlassian Corp" --package