Skip to content

ClipBox is an exquisite and efficient temporary file sharing station, similar to FileCodeBox, supporting file sharing, clipboard sharing, and short link functionality. Additionally, it integrates a unique examination clock feature that allows setting subjects and times based on a configuration file, and supports NTP time synchronization.

License

Notifications You must be signed in to change notification settings

MeTerminator/ClipBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClipBox

English | 简体中文

Python Flask GitHub license

ClipBox is an exquisite and efficient temporary file sharing station, similar to FileCodeBox, supporting file sharing, clipboard sharing, and short link functionality. Additionally, it integrates a unique Exam Clock feature, allowing users to set exam subjects and times based on a configuration document and supporting NTP time synchronization.

Features

  • Instant File Transfer: Achieves rapid file upload through dual hash verification on the frontend and backend, ensuring data security.
  • Clipboard Sharing: Supports quick sharing of text content and cross-device access.
  • Short Link Service: Can convert long URLs into easy-to-share short links.
  • Exam Clock: A customizable exam countdown clock that supports NTP network time synchronization to ensure precise timing.
  • Lightweight and Efficient: Built on Flask, it has low resource consumption and fast response times.
  • Dark/Light Mode Toggle: Supports switching between dark and light modes to suit different environments.

Demo

Home Page File Upload Text Sharing
Home Page File Upload Text Sharing
Retrieval Code Exam Clock Clock Config Doc
Retrieval Code Exam Clock Clock Config Doc

Use Cases

  • Temporary File Transfer: Quickly transfer files between different devices without the need to log in or install heavy applications.
  • Code Snippet Sharing: Share code snippets, configuration files, or logs with colleagues or friends.
  • Online Exam Timing: Provide a precise, unified network countdown clock for online exams or simulated tests.
  • Temporary Link Sharing: Convert complex long links into concise short links for easy sharing on social media or messaging apps.

Technical Stack

  • Backend: Flask, Flask-SQLAlchemy
  • Database: MySQL (connected via PyMySQL)
  • Frontend: Native HTML, CSS, JavaScript
  • Others: NTP

Quick Start

Environment Requirements

  • Python 3.x
  • MySQL

Local Development

  1. Clone the Repository:

    git clone https://github.com/MeTerminator/ClipBox.git
    cd clipbox
  2. Install Dependencies:

    pip install -r requirements.txt
  3. Configure the Application:

    • Modify the database connection information and other configurations in app/config.py as prompted.
  4. Run the Application:

    python main.py

    The application will be running at http://127.0.0.1:5328.

Deployment Guide

For stable operation in a production environment, it is recommended to use a WSGI server for deployment.

Option 1: Gunicorn (for Linux/macOS)

  1. Install Gunicorn:

    pip install gunicorn
  2. Run the Application:

    gunicorn -w 4 -b 0.0.0.0:5328 'app:create_app()'
    • -w 4: Starts 4 worker processes.
    • -b 0.0.0.0:5328: Binds to port 5328 on all network interfaces.

Option 2: Waitress (for Windows)

  1. Install Waitress:

    pip install waitress
  2. Create a run.py file:

    from waitress import serve
    from app import create_app
    
    app = create_app()
    
    if __name__ == '__main__':
        serve(app, host='0.0.0.0', port=5328)
  3. Run the Application:

    python run.py

Contribution Guide

We welcome contributions in any form!

  • Report Bugs: If you find a bug, please submit the details through GitHub Issues.
  • Feature Suggestions: If you have ideas for new features, feel free to propose them via Issues.
  • Code Contribution: Please follow these steps:
    1. Fork this repository.
    2. Create your feature branch (git checkout -b feature/AmazingFeature).
    3. Commit your changes (git commit -m 'Add some AmazingFeature').
    4. Push to the branch (git push origin feature/AmazingFeature).
    5. Open a Pull Request.

License

This project is open-sourced under the MIT License.


About

ClipBox is an exquisite and efficient temporary file sharing station, similar to FileCodeBox, supporting file sharing, clipboard sharing, and short link functionality. Additionally, it integrates a unique examination clock feature that allows setting subjects and times based on a configuration file, and supports NTP time synchronization.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published