Skip to content

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Group Buying

Python 3.10+ License: GPL v3

A suite of lightweight, efficient tools built with Python (CustomTkinter / Tkinter) and HTML/JavaScript to automate community group-buying management, post comment parsing, per-customer message generation, and order statistics.


Key Features

1. Order Sheet Generator (表單.py / 表單.html)

  • Comment Parsing: Automatically extracts customer names, quantities, and specifications from Facebook post comments.
  • Auto-Aggregation: Merges and sums repeated orders from the same customer.
  • Format Flexibility: Supports Name + Quantity, multi-line inputs, and custom specifications (e.g., Red+1, Blue+2).
  • Noise Filtering: Cleans out platform noise (e.g., "Top Fan", timestamps, edit notices, reply markers).
  • Excel Export: Generates structured .xlsx spreadsheets.

2. Order Message Generator (訊息.py / 訊息.html)

  • Excel Data Ingestion: Reads .xlsx and .xls order spreadsheets with automated header and pricing detection.
  • Personalized Message Formatting: Generates clean, ready-to-send pickup notices per customer with item details and pricing.
  • Real-time Filter & Sort: Search customers by name or sort by specific product ordering status.
  • Interactive Editing & Clipboard: Edit and preview messages directly in the UI with one-click copy and tracking.
  • Batch Export: Exports all generated notices into a single formatted .txt file.

3. Quantity Statistics Tool (統計.py / 數量統計.html)

  • Product-Specific Counting: Aggregates quantities by item code or SKU (e.g., A+1, B*2, C+3).
  • Total Quantity Counting: Sums all numeric additions and multiples across raw text.
  • Unicode Normalization: Supports full-width/half-width normalization (NFKC) for messy user inputs.
  • Cross-Platform Access: Available as a desktop GUI and a zero-dependency standalone web tool.

Project Structure

group_buying/
├── requirements.txt
├── README.md
├── 表單.py              # Desktop: FB Comment Parser & Excel Generator
├── 表單.html             # Web: Standalone Order Sheet Generator
├── 訊息.py              # Desktop: Excel-to-Message Notification Tool
├── 訊息.html             # Web: Standalone Message Generator
├── 統計.py              # Desktop: Text Quantity Counter
└── 數量統計.html          # Web: Standalone Statistics Tool


Getting Started

Prerequisites

  • Python 3.10+ (for desktop tools)
  • Modern web browser (Chrome, Edge, Safari, or Firefox for HTML tools)

Installation

  1. Clone the repository:
git clone [https://github.com/422August/group_buying.git](https://github.com/422August/group_buying.git)
cd group_buying
  1. Set up a virtual environment (optional but recommended):
  • macOS / Linux:
python3 -m venv venv
source venv/bin/activate
  • Windows:
python -m venv venv
venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Usage

Desktop Applications (Python)

  • Launch Order Sheet Generator:
python 表單.py
  • Launch Order Message Generator:
python 訊息.py
  • Launch Quantity Statistics Tool:
python 統計.py

Web Applications (Browser)

The HTML tools require no local server or backend installation. Open any of the .html files directly in your web browser:

  • 表單.html
  • 訊息.html
  • 數量統計.html

License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for details.


Author

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages