Skip to content

Commit

Permalink
fix: adjusted more terminology to fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
brittonhayes committed Jan 12, 2024
1 parent c8cfaff commit 1edac05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 👩‍⚕️ Psych - Find a mental health professional

Meet **Psych**, a Go application that allows you to find therapists from psychologytoday.com using a more powerful search engine. This tool provides various functionalities, including web scraping, browsing therapists in the terminal, and running a GraphQL API server to more effectively search for a therapist that meets your needs.
Meet **Psych**, a Go application that allows you to find therapists from psychologytoday.com using a more powerful search engine. This tool provides various functionalities, including pulling therapists from the web, browsing therapists in the terminal, and running a GraphQL playground to more effectively search for a therapist that meets your needs.

<img src="https://raw.githubusercontent.com/ashleymcnamara/gophers/master/GOPHER_SHARE.png" alt="drawing" width="300"/>

## Features

- **Scraping:** Retrieve therapist information from psychologytoday.com based on various criteria such as state, county, city, or zip code.
- **Fetching:** Retrieve therapist information from psychologytoday.com based on various criteria such as state, county, city, or zip code.
- **Browsing:** View therapist information in the terminal in a user-friendly interface.
- **GraphQL API:** Run a GraphQL server to query therapist data programmatically.

Expand Down
20 changes: 10 additions & 10 deletions cmd/psych/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ func main() {
Name: "psych",
Description: "Find a mental health professional",
Usage: `# Retrieve all therapists in the United States in your county
psych scrape --state <state> --county <county>
psych fetch --state <state> --county <county>
# Retrieve all therapists in your zip code
psych scrape --zip <zip>
psych fetch --zip <zip>
# Retrieve all therapists in your city
psych scrape --city <city> --state <state>`,
psych fetch --city <city> --state <state>`,
Suggest: true,
EnableBashCompletion: true,
UseShortOptionHandling: true,
Expand Down Expand Up @@ -117,13 +117,13 @@ func main() {
Name: "state",
Usage: "State to search",
Value: "",
Category: "Scraping",
Category: "Fetching",
},
&cli.StringFlag{
Name: "country",
Usage: "Country to search",
Value: "us",
Category: "Scraping",
Category: "Fetching",
Action: func(ctx *cli.Context, s string) error {
if s != "us" && s != "ca" {
return errors.New("only us or ca are supported at this time")
Expand All @@ -135,25 +135,25 @@ func main() {
Name: "city",
Usage: "City to search",
Value: "",
Category: "Scraping",
Category: "Fetching",
},
&cli.StringFlag{
Name: "zip",
Usage: "Zip code to search",
Value: "",
Category: "Scraping",
Category: "Fetching",
},
&cli.StringFlag{
Name: "county",
Usage: "County to search",
Value: "",
Category: "Scraping",
Category: "Fetching",
},
&cli.StringFlag{
Name: "insurance",
Usage: "Insurance to search",
Value: "premera",
Category: "Scraping",
Category: "Fetching",
},
),
Before: func(c *cli.Context) error {
Expand Down Expand Up @@ -187,7 +187,7 @@ func main() {

config := fetch.Config{URL: url, CacheDir: filepath.Join(c.String("config"), "cache/")}

logger.InfoContext(c.Context, "Scraping psychologytoday.com for therapists")
logger.InfoContext(c.Context, "Fetching psychologytoday.com for therapists")
s := fetch.NewFetcher(c.Context, logger, repo)
therapists := s.Fetch(config)

Expand Down

0 comments on commit 1edac05

Please sign in to comment.