Mango Fan Fan Toolbox Documentation

website·Indexed 31 days ago

https://docs-fantools.mangofanfan.cn

Documentation for the Mango Fan Fan Toolbox, a Windows-based toolset designed to launch various packaged Python tools with one click. The docs cover installation, version history (including version 0.2.4 and development version 0.3.0), log structures using loguru, and developer guides for tool structure and public code usage.

Tokens
4.4K
Snippets
13
Records
39
Agent score
51%

What's inside Mango Fan Fan Toolbox

  1. Overview of FanTools (芒果工具箱)

    FanTools is an open-source toolbox designed to provide niche but occasionally essential utility functions. It is built using Python 3.11, PySide6, and QFluentWidgets. The project is currently in early development, focusing on expanding its library of built-in tools.
  2. Use the public directory for shared tool code

    The public directory located under the tool directory contains shared code intended to separate tool-specific logic from the main toolbox core and facilitate easy imports. Using these shared components ensures that custom tools maintain a consistent visual style and theme (light/dark mode) with the Mango ToolBox本体.
  3. FanTools System Requirements and Compatibility

    FanTools is developed exclusively for Windows systems, with primary optimization and priority given to Windows 11. Support for other operating systems or platforms is not currently planned.
  4. Coding standards for Mango Toolbox contributions

    For contributions to the toolbox core, follow these guidelines:

    1. Style: Adhere to PEP8 (Python style guide) and avoid using pinyin for naming variables or functions.
    2. Logging: When adding new modules or features, ensure comprehensive logging is implemented according to the project's log level specifications.
    3. Tool Development: There are no strict code requirements for creating individual tools, provided they follow the basic tool structure.
  5. Implement the run.py entry point based on launch mode

    Depending on the launchMode configured in tool.json, you must use a different entry point check in your run.py file to ensure the tool starts correctly:

    • For launchMode: 0, use the specific module path check: if __name__ == 'tool.exampleTool.run' (replace exampleTool with your actual module name).
    • For launchMode: 1, use the standard Python entry point: if __name__ == '__main__'.
  6. Understand Hitokoto global refresh logic in FanTools

    FanTools uses a global HitokotoManager to handle all 'Hitokoto' (one-word quote) cards and dynamic loading areas. Because all components fetch data from this single global manager, the following behavior applies:

    • All Hitokoto displays across the application are synchronized and show the same sentence.
    • Triggering a refresh in any single Hitokoto location will trigger the global manager to fetch a new quote, updating all other Hitokoto displays simultaneously.
  7. Contribute to Mango Toolbox (FanTools2) repository

    The Mango Toolbox is open-sourced on GitHub. When contributing, always base your work on the dev branch, as it contains the most recent commits, new features, and bug fixes. The master branch represents the current stable release, and the gh-pages branch is a deprecated static documentation site.
  8. Download and verify FanTools version 0.2.1

    FanTools version 0.2.1 introduced startup version checking (configurable in settings) and a basic news feature. It is available for Windows systems.

    Installation Link: https://file.mangofanfan.cn/s/1nehnw

    Checksums:

    • MD5: 992cd3bf1b1b8b3b4089559cff4db91c
    • SHA1: 3703329b0bd54e925aa668a926ae26c2687d73fe
    • SHA256: f42a08a69112220cfa25e59506fb99461c465a7c46b8ff88b48f43bf25239d6e
  9. Log in to FanTools using an email address

    This is a temporary login system used in version 0.2.2 and earlier. It does not verify if the email is valid or active.

    • Registration: If an email is not registered, logging in twice consecutively will register the account. During registration, you can set an activation code (which acts as a password).
    • Activation Code: Optional. If not set during registration, it is not required for login. Once set, it can be changed but not removed.
    • Avatars: Uses cravatar.cn; QQ emails will automatically load the associated QQ avatar.
  10. Upgrade to FanTools v0.2.4 from older versions

    Version 0.2.4 was released as an emergency fix for v0.2.3 (which is completely non-functional). If upgrading from any version prior to 0.2.4, you must uninstall the previous version before installing v0.2.4 to ensure a clean setup.

    Technical change: This version utilizes Nuitka for the toolbox core and bundles a Python 3.11 environment to run various tools.

    Download Link: https://file.mangofanfan.cn/s/c8ii19 SHA256: 335e51087d227c1a2a12190be20c1b1172e0e8d0e028817881e81ba2d40b05f5

  11. Use Test Mode for FanTools development

    When starting FanTools from source code, you can enable Test Mode. This allows you to open the toolbox without logging in, which is useful for developers who need to restart the application frequently to apply source code updates. Note that all user-system features are disabled in Test Mode.