semvec/pypi-packages huggingface dataset:
pyscrap-tool 0.1
A CLI tool for web scraping
License: MIT

# PyScrap Tool

<p align="center">
 <img height="150" src="https://raw.githubusercontent.com/h471x/web_scraper/master/imgs/pyscrap.png"/>
</p>

<div align="center">

<p>

``pyscrap-tool`` is a Python-based web scraping utility that allows users to extract data from specified web pages. It provides options to scrape specific HTML tags and presents the data in a structured format, including the ability to save results to a CSV file.

</p>

</div>

## Features

- **Command-Line Interface (CLI)**: Easily scrape data directly from the terminal using command-line arguments.
- **Custom HTML Tag Scraping**: Specify which HTML tag to scrape from the webpage, allowing for flexible data extraction.
- **Data Output**: Print scraped data to the console and save it to a CSV file for further analysis.
- **Versioning**: Check the version of the tool using command-line options.

## Installation

### Option 1: Install from PyPI

To install `pyscrap-tool` directly from PyPI:

```bash
pip install pyscrap-tool
```

### Option 2: Build from Source

For those who prefer to build it themselves:

1. Clone the repository and navigate to the project directory:

   ```bash
   git clone https://github.com/h471x/web_scraper.git
   cd web_scraper
   ```

2. Build the package:

   ```bash
   python setup.py sdist bdist_wheel
   ```

3. Install the package:

   ```bash
   pip install dist/*.whl
   ```

## Usage

Once the package is installed, you can use the `pyscrap` command from the terminal. The script accepts the following command-line arguments:

- **URL**:
  - `-l` or `--link`: Specify the URL of the webpage to scrape.

- **HTML Tag**:
  - `-t` or `--tag`: Specify the HTML tag to scrape (e.g., `article`, `div`).

- **Version**:
  - `-v` or `--version`: Display the version of the tool.

### Example Usage

1. **Basic Scrape**:
   ```bash
   pyscrap -l https://example.com -t article
   ```

2. **Display Version**:
   ```bash
   pyscrap -v
   ```

3. **Help Option**:
   For help with command-line options, use:
   ```bash
   pyscrap -h
   ```

## Development

To modify or extend the functionality, ensure you have the required dependencies installed. You can add new features to the CLI as needed.

## Contributing

Feel free to fork this repository, open issues, or submit pull requests with improvements or bug fixes. Your contributions help make the `PyScrap Tool` better!
bdd-google-drive-helper 0.1.1
A simple Google Drive file uploader tool.
License: MIT
Requires Python: <4.0,>=3.9

# Google Drive Uploader

Google Drive Uploader 是一個簡單的工具，用於將文件上傳到 Google Drive。這個工具提供了一個簡單的 Python API，可以方便地集成到您的自動化腳本和應用程序中。

## PyPI url
https://pypi.org/project/bdd-google-drive-helper/

## 功能

- 身份驗證管理
- 列出和搜索 Google Drive 上的共用雲端硬碟
- 根據資料夾路徑查找特定資料夾的 ID
- 將檔案上傳到指定的 Google Drive 資料夾
- 探索和管理 Google Drive 的內容，包括列出所有資料夾
- 根據日期刪除指定資料夾中的檔案

## 安裝

您可以通過 Python 的包管理工具 Poetry 來安裝 Google Drive Uploader：```bash
poetry add bdd-google-drive-helperer
```

或者，如果您使用的是 pip，請先確保您的環境中安裝了 Poetry，然後運行以下命令：

```bash
pip install bdd-google-drive-helperer
```

## 配置
- 請確保您已經在本地配置了 `credentials.json` 文件，並且您的 Google API 應用程序有足夠的權限來訪問 Google Drive。
- 若還沒有'credentials.json' 文件:
    - 至Google Cloud Console 開啟新的專案
    - 啟用Google Drive API
    - 創建憑證 -> 電腦端應用程式 -> 下載憑證
    - 將下載後的憑證移至專案的根目錄

- 請在本地端進行初始化時提供 `credentials_json` 和 `credentials_pickle` 來自訂您的身份驗證憑證存放路徑：
    ```python
    uploader = GoogleDriveUploader(credentials_json="path/to/your/credentials.json")
    explorer = GoogleDriveExplorer(credentials_json="path/to/your/credentials.json")
    deleter = GoogleDriveDeleter(credentials_json="path/to/your/credentials.json")
    ```
- 首次初始化時，會在Terminal生成一個連結，直接打開該連結進行驗證，認證完成後，就可以獲得可復用的 `token.pkl`。

- 獲得此`token.pkl`後就可以使用此檔案在任何環境進行使用和開發。

## 快速入門

以下是一個如何使用 Google Drive Uploader 的簡單範例：

```python
from google_drive_helper.google_drive_uploader import GoogleDriveUploader

# 初始化 uploader
uploader = GoogleDriveUploader()

# 上傳檔案到指定的 Google Drive 資料夾
drive_name = "YourDriveName"
drive_folder_path = "path/to/your/google drive folder"
upload_file_path = "path/to/your/local_file.txt"
uploader.upload_to_drive(drive_name, drive_folder_path, upload_file_path)
```

以下是如何使用 Google Drive Explorer 來列出和探索 Google Drive 的範例：

```python
from google_drive_helper.google_drive_explorer import GoogleDriveExplorer

# 初始化 explorer
explorer = GoogleDriveExplorer()

# 列出所有共用雲端硬碟或查找特定資料夾
drive_name = "YourDriveName"
explorer.find_folder(drive_name)
```

以下是如何使用 Google Drive Explorer 來確認查找資料夾是否存在

```python
from google_drive_helper.google_drive_explorer import GoogleDriveExplorer

# 初始化 explorer
explorer = GoogleDriveExplorer()

# 列出所有共用雲端硬碟或查找特定資料夾
drive_name = "YourDriveName"
folder_to_find = "folder/path/you/want/to/find"
explorer.find_folder(drive_name,folder_to_find)
```


以下是如何使用 Google Drive Deleter 來刪除指定資料夾中的檔案

```python
from google_drive_helper.google_drive_deleter import GoogleDriveDeleter

# 初始化 deleter
deleter = GoogleDriveDeleter()

# 刪除指定資料夾中指定日期的檔案
drive_name = "YourDriveName"
folder_path = "path/to/your/google drive folder"
target_date = "YYYY-MM-DD"
deleter.delete_files_by_date(drive_name, folder_path, target_date)
```