From 2326d8cee9b2c511febe712acc990b7055bc54b4 Mon Sep 17 00:00:00 2001 From: Zachary Hampton Date: Tue, 11 Nov 2025 12:20:29 -0800 Subject: [PATCH] - delete cli & version bump --- homeharvest/cli.py | 85 ---------------------------------------------- pyproject.toml | 5 +-- 2 files changed, 1 insertion(+), 89 deletions(-) delete mode 100644 homeharvest/cli.py diff --git a/homeharvest/cli.py b/homeharvest/cli.py deleted file mode 100644 index 342c030..0000000 --- a/homeharvest/cli.py +++ /dev/null @@ -1,85 +0,0 @@ -import argparse -import datetime -from homeharvest import scrape_property - - -def main(): - parser = argparse.ArgumentParser(description="Home Harvest Property Scraper") - parser.add_argument("location", type=str, help="Location to scrape (e.g., San Francisco, CA)") - - parser.add_argument( - "-l", - "--listing_type", - type=str, - default="for_sale", - choices=["for_sale", "for_rent", "sold", "pending"], - help="Listing type to scrape", - ) - - parser.add_argument( - "-o", - "--output", - type=str, - default="excel", - choices=["excel", "csv"], - help="Output format", - ) - - parser.add_argument( - "-f", - "--filename", - type=str, - default=None, - help="Name of the output file (without extension)", - ) - - parser.add_argument("-p", "--proxy", type=str, default=None, help="Proxy to use for scraping") - parser.add_argument( - "-d", - "--days", - type=int, - default=None, - help="Sold/listed in last _ days filter.", - ) - - parser.add_argument( - "-r", - "--radius", - type=float, - default=None, - help="Get comparable properties within _ (eg. 0.0) miles. Only applicable for individual addresses.", - ) - parser.add_argument( - "-m", - "--mls_only", - action="store_true", - help="If set, fetches only MLS listings.", - ) - - args = parser.parse_args() - - result = scrape_property( - args.location, - args.listing_type, - radius=args.radius, - proxy=args.proxy, - mls_only=args.mls_only, - past_days=args.days, - ) - - if not args.filename: - timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S") - args.filename = f"HomeHarvest_{timestamp}" - - if args.output == "excel": - output_filename = f"{args.filename}.xlsx" - result.to_excel(output_filename, index=False) - print(f"Excel file saved as {output_filename}") - elif args.output == "csv": - output_filename = f"{args.filename}.csv" - result.to_csv(output_filename, index=False) - print(f"CSV file saved as {output_filename}") - - -if __name__ == "__main__": - main() diff --git a/pyproject.toml b/pyproject.toml index 862b36c..96adf70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,11 @@ [tool.poetry] name = "homeharvest" -version = "0.7.3" +version = "0.8.0" description = "Real estate scraping library" authors = ["Zachary Hampton ", "Cullen Watson "] homepage = "https://github.com/ZacharyHampton/HomeHarvest" readme = "README.md" -[tool.poetry.scripts] -homeharvest = "homeharvest.cli:main" - [tool.poetry.dependencies] python = ">=3.9" requests = "^2.32.4"