A modern, dark-themed Python code library browser with advanced text editing capabilities and comprehensive tracking system.
- 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
- 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
- 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
- Python 3.7 or higher
- tkinter (usually included with Python)
- No external dependencies required for core functionality
- Clone the repository:
git clone https://github.com/AutoBotSolutions/Automation-Python-Code-Library.git
cd Automation-Python-Code-Library- Run the application:
python3 code_library_gui.pyThe 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-libraryTRACKING_LOG_FILE: script_dir/tracking_log.txtSTATS_FILE: script_dir/usage_stats.jsonHASHES_FILE: script_dir/file_hashes.jsonTEMP_DIR: /tmp
- Select a category from the left panel tree
- Choose a file from the file list
- View the code in the right panel
- Use the "Copy Code" button to copy to clipboard
- Use "Open in Editor" to edit in the advanced text editor
- Click "Open in Editor" when viewing a file
- Edit the code with syntax highlighting
- Use Find/Replace for text operations
- Save changes directly to the file
- Track file edits automatically
- Click "Statistics" button to view usage data
- Click "Refresh" to detect file changes
- View tracking logs in
tracking_log.txt - Usage stats saved in
usage_stats.json
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
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.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Catppuccin color palette for the modern dark theme
- Python tkinter for the GUI framework
- The automation code library community
For issues, questions, or suggestions, please open an issue on GitHub.
- Add support for additional programming languages
- Implement file comparison/diff viewer
- Add bookmarking functionality
- Export usage reports
- Add plugin system for custom features