Skip to content

AutoBotSolutions/Automation-Python-Code-Library

Automation Code Library GUI

A modern, dark-themed Python code library browser with advanced text editing capabilities and comprehensive tracking system.

Features

Code Library Browser

  • Modern Dark Theme: Beautiful Catppuccin-inspired color scheme
  • Hierarchical Navigation: Browse through nested directory structures
  • Search Functionality: Filter categories and files instantly
  • Code Preview: View code snippets with syntax highlighting
  • Copy to Clipboard: One-click code copying
  • Refresh Capability: Dynamically discover new scripts and folders

Advanced Text Editor

  • Syntax Highlighting: Python syntax with multiple color schemes
  • Line Numbers: Auto-updating line number sidebar
  • Find & Replace: Search and replace functionality
  • Undo/Redo: 50-level undo history
  • Multiple Encodings: Support for UTF-8, Latin-1, CP1252, ISO-8859-1, ASCII
  • File Operations: New, Open, Save, Save As
  • Modern UI: Matching dark theme with the main browser

Tracking System

  • File Change Detection: MD5 hashing to detect new, modified, and deleted files
  • Usage Statistics: Track most accessed files and categories
  • Session Tracking: Monitor GUI usage sessions
  • Event Logging: Comprehensive logging of all activities
  • Persistent Storage: Usage data saved between sessions
  • Statistics Dashboard: Visual display of usage metrics

Installation

Requirements

  • Python 3.7 or higher
  • tkinter (usually included with Python)
  • No external dependencies required for core functionality

Setup

  1. Clone the repository:
git clone https://github.com/AutoBotSolutions/Automation-Python-Code-Library.git
cd Automation-Python-Code-Library
  1. Run the application:
python3 code_library_gui.py

Configuration

The application uses environment variables for configuration with sensible defaults. Set the following environment variables to customize paths:

export CODE_LIBRARY_PATH="/path/to/your/code-library"
export TRACKING_LOG_FILE="/path/to/tracking_log.txt"
export STATS_FILE="/path/to/usage_stats.json"
export HASHES_FILE="/path/to/file_hashes.json"
export TEMP_DIR="/tmp"

If not set, the application will use relative paths based on the script location:

  • CODE_LIBRARY_PATH: script_dir/code-library
  • TRACKING_LOG_FILE: script_dir/tracking_log.txt
  • STATS_FILE: script_dir/usage_stats.json
  • HASHES_FILE: script_dir/file_hashes.json
  • TEMP_DIR: /tmp

Usage

Browsing the Library

  1. Select a category from the left panel tree
  2. Choose a file from the file list
  3. View the code in the right panel
  4. Use the "Copy Code" button to copy to clipboard
  5. Use "Open in Editor" to edit in the advanced text editor

Using the Advanced Editor

  1. Click "Open in Editor" when viewing a file
  2. Edit the code with syntax highlighting
  3. Use Find/Replace for text operations
  4. Save changes directly to the file
  5. Track file edits automatically

Tracking & Statistics

  1. Click "Statistics" button to view usage data
  2. Click "Refresh" to detect file changes
  3. View tracking logs in tracking_log.txt
  4. Usage stats saved in usage_stats.json

Project Structure

CodeLibrary/
├── code_library_gui.py              # Main GUI application
├── README.md                        # Project documentation
├── LICENSE                          # MIT License
├── .gitignore                       # Git ignore rules
├── tracking_log.txt                 # Event logs (auto-generated)
├── usage_stats.json                 # Usage statistics (auto-generated)
├── api_requirements.txt             # API dependencies
├── backend_api.py                   # Backend REST API
├── docs/                            # Documentation directory
│   ├── CONTRIBUTING.md              # Contribution guidelines
│   ├── GITHUB_SETUP.md              # GitHub upload instructions
│   ├── GITHUB_2FA_SETUP.md          # 2FA authentication guide
│   ├── INSTALLATION_GUIDE.md        # Cross-platform installation
│   ├── CHANGELOG.md                 # Version history
│   ├── SECURITY.md                  # Security policy
│   ├── CODE_OF_CONDUCT.md           # Community guidelines
│   ├── API_DOCUMENTATION.md         # API documentation
│   ├── GUI_SYSTEM.md               # GUI system documentation
│   ├── CODE_LIBRARY_OVERVIEW.md     # Code library overview
│   ├── CATEGORIES.md                # Script categories
│   ├── API_REFERENCE.md             # API reference
│   └── TROUBLESHOOTING.md           # Troubleshooting guide
├── installers/                      # Installer scripts
│   ├── windows_installer.spec       # PyInstaller spec
│   ├── build_windows.bat            # Windows build script
│   ├── build_linux.sh               # Linux build script
│   ├── build_macos.sh               # macOS build script
│   └── README.md                    # Installer documentation
└── code-library/                    # Automation code library
    ├── AccountFuntions/             # Account-related functions
    ├── BrowserCommands/             # Browser automation commands
    ├── BrowserFunction/             # Browser functions
    ├── BrowserSettingsCommands/     # Browser settings
    ├── CodeLibrary/                 # Code library utilities
    ├── CustomFunctions/             # Custom function scripts
    ├── CustomScripting/             # Custom scripting tools
    ├── DataBaseCommands/            # Database operations
    ├── DataCommands/                # Data manipulation commands
    ├── DataFunctions/               # Data processing functions
    ├── DriverFunctions/             # Driver-related functions
    ├── EmailCommands/               # Email automation
    ├── FileCommands/                # File operations
    ├── FileFunctions/               # File processing
    ├── FlowCommands/                # Flow control
    ├── FTPCommands/                 # FTP operations
    ├── HeadlessFunctions/           # Headless browser functions
    ├── HTTPCommands/                # HTTP requests
    ├── Info Lib/                    # Information library
    ├── JavaScriptCommands/          # JavaScript execution
    ├── ListCommands/                # List operations
    ├── LogCommands/                 # Logging functions
    ├── MathFunctions/               # Mathematical functions
    ├── OporationCommands/           # Operation commands
    ├── ProxyFunction/               # Proxy functions
    ├── ProxyFunctions/              # Additional proxy functions
    ├── QualifierFunction/           # Qualifier functions
    ├── Refracted Projects/          # Refracted automation projects
    ├── SystemCommands/              # System operations
    ├── SystemFunctions/             # System functions
    ├── TableCommands/               # Table operations
    ├── TextFunctions/              # Text processing
    ├── ThreadingFunctions/          # Threading utilities
    ├── TimeFunctions/               # Time/date functions
    ├── UserInterfaceLib/            # UI library components
    └── WindowCommands/              # Window management

Tracking Data

The application automatically generates:

  • tracking_log.txt: Timestamped log of all events
  • usage_stats.json: Persistent usage statistics

These files are created in the application directory and should not be committed to version control.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the 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 licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Catppuccin color palette for the modern dark theme
  • Python tkinter for the GUI framework
  • The automation code library community

Support

For issues, questions, or suggestions, please open an issue on GitHub.

Roadmap

  • Add support for additional programming languages
  • Implement file comparison/diff viewer
  • Add bookmarking functionality
  • Export usage reports
  • Add plugin system for custom features

About

A lightweight Python library designed to simplify data processing and automation. It offers intuitive APIs, modular components, and seamless integration with popular frameworks. Built for performance and scalability, it helps developers rapidly build, test, and deploy efficient applications.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages