Skip to content

Commit

Permalink
Added the --for-address option to ronin-db people (closes #70).
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Jun 23, 2024
1 parent 5825351 commit fb35e52
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/ronin/db/cli/commands/people.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module Commands
# --import FILE Imports the values from the FILE into the database
# --delete VALUE Deletes a value from the database
# --delete-all Deletes all values from the database
# -a, --for-address ADDRESS Searches for all People associated with the street address
# -P, --with-prefix PREFIX Searches for all People with the prefix
# -f, --with-first-name NAME Searches for all People with the first name
# -m, --with-middle-name NAME Searches for all People with the middle name
Expand All @@ -60,6 +61,15 @@ class People < ModelCommand
model_file 'ronin/db/person'
model_name 'Person'

option :for_address, short: '-a',
value: {
type: String,
usage: 'ADDRESS'
},
desc: 'Searches for all People associated with the street address' do |address|
@query_method_calls << [:for_address, [address]]
end

option :with_prefix, short: '-P',
value: {
type: String,
Expand Down
3 changes: 3 additions & 0 deletions man/ronin-db-people.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Queries people.
`-v`, `--verbose`
: Enable verbose output.

`-a`, `--for-address` *ADDRESS*
: Searches for all People associated with the street address.

`-P`, `--with-prefix` *PREIFX*
: Searches for all People with the given prefix.

Expand Down

0 comments on commit fb35e52

Please sign in to comment.