LogrecAndPYcmd 3.7.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- logrecandpycmd-3.7.3/About logrec and PYcmd.md +289 -0
- logrecandpycmd-3.7.3/LICENSE +21 -0
- logrecandpycmd-3.7.3/LogrecAndPYcmd.egg-info/PKG-INFO +326 -0
- logrecandpycmd-3.7.3/LogrecAndPYcmd.egg-info/SOURCES.txt +13 -0
- logrecandpycmd-3.7.3/LogrecAndPYcmd.egg-info/dependency_links.txt +1 -0
- logrecandpycmd-3.7.3/LogrecAndPYcmd.egg-info/requires.txt +4 -0
- logrecandpycmd-3.7.3/LogrecAndPYcmd.egg-info/top_level.txt +2 -0
- logrecandpycmd-3.7.3/PKG-INFO +326 -0
- logrecandpycmd-3.7.3/PYcmd/PYcmd.py +530 -0
- logrecandpycmd-3.7.3/PYcmd/__init__.py +215 -0
- logrecandpycmd-3.7.3/README.md +4 -0
- logrecandpycmd-3.7.3/logrec/__init__.py +193 -0
- logrecandpycmd-3.7.3/logrec/logrec.py +451 -0
- logrecandpycmd-3.7.3/pyproject.toml +48 -0
- logrecandpycmd-3.7.3/setup.cfg +4 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
# logrec and PYcmd
|
|
2
|
+
|
|
3
|
+
Welcome to the logrec and PYcmd project repository! This repository contains two complementary Python tools designed to enhance your development and file management experience.
|
|
4
|
+
|
|
5
|
+
## 📦 What's Included
|
|
6
|
+
|
|
7
|
+
### 📝 logrec - Log Recorder Library
|
|
8
|
+
A simple yet powerful Python library for recording and managing logs with search capabilities.
|
|
9
|
+
|
|
10
|
+
**Key Features:**
|
|
11
|
+
- Simple & intuitive API design
|
|
12
|
+
- Multiple log levels (INFO, TIP, WARN, ERROR, CRITICAL)
|
|
13
|
+
- File management (read, search, delete, modify, clear)
|
|
14
|
+
- Automatic timestamps
|
|
15
|
+
- Lightweight with no external dependencies
|
|
16
|
+
- Object-oriented LogRecorder class
|
|
17
|
+
|
|
18
|
+
**Perfect for:**
|
|
19
|
+
- Application logging
|
|
20
|
+
- Debugging sessions
|
|
21
|
+
- Quick record keeping
|
|
22
|
+
- Learning logging concepts
|
|
23
|
+
|
|
24
|
+
### 🖥️ PYcmd - Python Command Tool
|
|
25
|
+
A powerful command-line tool for file management, calculations, and system operations with integrated logging.
|
|
26
|
+
|
|
27
|
+
**Key Features:**
|
|
28
|
+
- Complete file management suite
|
|
29
|
+
- Directory operations
|
|
30
|
+
- Mathematical calculations
|
|
31
|
+
- Random number generation
|
|
32
|
+
- Time and date utilities
|
|
33
|
+
- Interactive command interface
|
|
34
|
+
- Integrated logging with logrec
|
|
35
|
+
|
|
36
|
+
**Perfect for:**
|
|
37
|
+
- System administration tasks
|
|
38
|
+
- File batch operations
|
|
39
|
+
- Quick calculations
|
|
40
|
+
- Learning command-line tool development
|
|
41
|
+
|
|
42
|
+
## 🚀 Quick Start
|
|
43
|
+
|
|
44
|
+
### Using logrec
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
import logrec
|
|
48
|
+
|
|
49
|
+
# Simple logging
|
|
50
|
+
logrec.log("app.log", "Application started")
|
|
51
|
+
logrec.err("app.log", "Error occurred")
|
|
52
|
+
|
|
53
|
+
# Using the LogRecorder class
|
|
54
|
+
logger = LogRecorder("myapp.log")
|
|
55
|
+
logger.log("User logged in")
|
|
56
|
+
logger.warn("Session expiring soon")
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Using PYcmd
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Run the interactive command interface
|
|
63
|
+
python PYcmd.py
|
|
64
|
+
|
|
65
|
+
# Available commands include:
|
|
66
|
+
# read, write, create, delete, listdir, copy, rename
|
|
67
|
+
# mkdir, rmdir, cd, pwd, compare, stats
|
|
68
|
+
# math, calc, rand, showt, help, clear, exit
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 🛠️ Installation & Setup
|
|
72
|
+
|
|
73
|
+
### Prerequisites
|
|
74
|
+
- Python 3.10 or higher
|
|
75
|
+
- Standard Python libraries (os, math, random, time, pathlib)
|
|
76
|
+
|
|
77
|
+
### Installation Steps
|
|
78
|
+
|
|
79
|
+
1. **Clone this repository:**
|
|
80
|
+
```bash
|
|
81
|
+
git clone https://github.com/Git32-Design/logrec-and-PYcmd.git
|
|
82
|
+
cd logrec-and-PYcmd
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
2. **Install logrec library (optional):**
|
|
86
|
+
```python
|
|
87
|
+
# Option 1: Install to site-packages
|
|
88
|
+
# Copy logrec folder to your Python site-packages directory
|
|
89
|
+
|
|
90
|
+
# Option 2: Use directly
|
|
91
|
+
# Import logrec from the local directory
|
|
92
|
+
import sys
|
|
93
|
+
sys.path.append('/path/to/logrec-and-PYcmd')
|
|
94
|
+
import logrec
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
3. **Run PYcmd:**
|
|
98
|
+
```bash
|
|
99
|
+
python PYcmd/PYcmd.py
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## 📁 Repository Structure
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
logrec-and-PYcmd/ # Main repository folder
|
|
106
|
+
|-- .github/ # Github settings
|
|
107
|
+
| |-- workflows/ # To publish package
|
|
108
|
+
| | |-- python-package.yml # A setting of publish
|
|
109
|
+
| | |__ python-publish.yml # Publish messages
|
|
110
|
+
|-- logrec/ # Log Recorder Library
|
|
111
|
+
| |-- tests/ # Test of logrec
|
|
112
|
+
| | |-- test_logrec.py # Test script
|
|
113
|
+
| | |-- c.log # Test logs
|
|
114
|
+
| | |-- g.log # Test logs
|
|
115
|
+
| | |-- s.log # Test logs
|
|
116
|
+
| | |__ t.log # Test logs
|
|
117
|
+
| |-- __init__.py # Library initialization and metadata
|
|
118
|
+
| |-- logrec.py # Core logging functionality
|
|
119
|
+
│ |__ About logrec.md # Detailed logrec documentation
|
|
120
|
+
|-- PYcmd/ # Python Command Tool
|
|
121
|
+
| |-- tests/ # Tests of PYcmd
|
|
122
|
+
| | |__ test-PYcmd # Test script
|
|
123
|
+
│ |-- PYcmd.py # Main command tool implementation
|
|
124
|
+
| |__ About PYcmd.md # Detailed PYcmd documentation
|
|
125
|
+
|-- LICENSE # Project license
|
|
126
|
+
|-- .gitignore # Git ignore rules
|
|
127
|
+
|-- About logrec and PYcmd.md # This file - project overview
|
|
128
|
+
|-- requirements.txt # This repository's requirement modules
|
|
129
|
+
|__ Update msgs.md # This repository every update informations
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## 🔗 Integration
|
|
133
|
+
|
|
134
|
+
### logrec + PYcmd Integration
|
|
135
|
+
PYcmd uses logrec internally for all operation logging:
|
|
136
|
+
- Successful operations are logged as normal entries
|
|
137
|
+
- Errors are logged with detailed error information
|
|
138
|
+
- Logs are saved to `PYcmd log record.log`
|
|
139
|
+
- Provides complete audit trail of all operations
|
|
140
|
+
|
|
141
|
+
## 📋 Version Information
|
|
142
|
+
|
|
143
|
+
### Current Versions
|
|
144
|
+
- **logrec**: Release 3.3.2
|
|
145
|
+
- **PYcmd**: Dev Alpha 1.0.0
|
|
146
|
+
- **Project Status**: Development
|
|
147
|
+
|
|
148
|
+
### Development Status
|
|
149
|
+
Both tools are currently in alpha development phase:
|
|
150
|
+
- ✅ Core functionality implemented
|
|
151
|
+
- ✅ Basic testing completed
|
|
152
|
+
- 🔄 Feature development ongoing
|
|
153
|
+
- 📋 Documentation in progress
|
|
154
|
+
- 🐛 Bug fixes and improvements
|
|
155
|
+
|
|
156
|
+
## 🎯 Use Cases
|
|
157
|
+
|
|
158
|
+
### For Developers
|
|
159
|
+
- **Application Logging**: Use logrec in your Python applications
|
|
160
|
+
- **Development Tools**: Use PYcmd for quick file operations
|
|
161
|
+
- **Learning Resources**: Study the code to understand Python concepts
|
|
162
|
+
- **Script Development**: Extend or modify for custom needs
|
|
163
|
+
|
|
164
|
+
### For System Administrators
|
|
165
|
+
- **File Management**: Use PYcmd for batch file operations
|
|
166
|
+
- **Log Analysis**: Use logrec for custom logging solutions
|
|
167
|
+
- **Automation**: Integrate into existing workflows
|
|
168
|
+
- **Quick Tasks**: Use PYcmd's interactive interface
|
|
169
|
+
|
|
170
|
+
### For Students
|
|
171
|
+
- **Learning Python**: Study well-commented code examples
|
|
172
|
+
- **Understanding File I/O**: Learn practical file operations
|
|
173
|
+
- **API Design**: Study clean function interfaces
|
|
174
|
+
- **Project Structure**: Learn repository organization
|
|
175
|
+
|
|
176
|
+
## 🔧 Technical Specifications
|
|
177
|
+
|
|
178
|
+
### Dependencies
|
|
179
|
+
- **logrec**: Python standard library only (os, time)
|
|
180
|
+
- **PYcmd**: Python standard library (os, math, random, time, pathlib) + logrec
|
|
181
|
+
|
|
182
|
+
### Compatibility
|
|
183
|
+
- **Python**: 3.10+ (recommended 3.13)
|
|
184
|
+
- **Operating System**: Cross-platform (Windows, Linux, macOS)
|
|
185
|
+
- **Memory Usage**: Lightweight, minimal footprint
|
|
186
|
+
|
|
187
|
+
### Performance
|
|
188
|
+
- **Logging Speed**: Fast file I/O with minimal overhead
|
|
189
|
+
- **Command Response**: Quick execution for most operations
|
|
190
|
+
- **Resource Usage**: Low CPU and memory requirements
|
|
191
|
+
|
|
192
|
+
## 📄 Licensing
|
|
193
|
+
|
|
194
|
+
This project uses dual licensing:
|
|
195
|
+
- **logrec**: MIT License
|
|
196
|
+
- **PYcmd**: GNU General Public License v3.0
|
|
197
|
+
|
|
198
|
+
See individual LICENSE files for details.
|
|
199
|
+
|
|
200
|
+
## 🤝 Contributing
|
|
201
|
+
|
|
202
|
+
We welcome contributions! Here's how you can help:
|
|
203
|
+
|
|
204
|
+
### Reporting Issues
|
|
205
|
+
- Use GitHub Issues for bug reports
|
|
206
|
+
- Provide detailed reproduction steps
|
|
207
|
+
- Include system information
|
|
208
|
+
- Add screenshots if applicable
|
|
209
|
+
|
|
210
|
+
### Submitting Pull Requests
|
|
211
|
+
- Fork the repository
|
|
212
|
+
- Create a feature branch
|
|
213
|
+
- Make your changes
|
|
214
|
+
- Test thoroughly
|
|
215
|
+
- Submit pull request with description
|
|
216
|
+
|
|
217
|
+
### Code Standards
|
|
218
|
+
- Follow PEP 8 guidelines
|
|
219
|
+
- Add comments to complex code
|
|
220
|
+
- Update documentation
|
|
221
|
+
- Include tests when possible
|
|
222
|
+
|
|
223
|
+
## 📞 Contact Information
|
|
224
|
+
|
|
225
|
+
- Author: Git32-Design
|
|
226
|
+
- Developer page : [User stats page](https://github.com/Git32-Design)
|
|
227
|
+
- Email: git32mail@qq.com
|
|
228
|
+
- Steam : Git32-Games *In steam, You can call me "Git32Play"*
|
|
229
|
+
- Netease minecraft : Git32Design__ *I haven't money to buy release, But netease make me happy, You can call me "git32mc"*
|
|
230
|
+
- Project URL: [Into main page for see updates](https://github.com/Git32-Design/logrec-and-PYcmd)
|
|
231
|
+
|
|
232
|
+
## 🙏 Acknowledgments
|
|
233
|
+
|
|
234
|
+
### Development Tools
|
|
235
|
+
- **Visual Studio Code**: Primary development environment
|
|
236
|
+
- **CODEBUDDY**: AI coding assistant
|
|
237
|
+
- **Python Extension Pack**: Python language support
|
|
238
|
+
- **Pylance**: Python linting and intelligence
|
|
239
|
+
|
|
240
|
+
### Community
|
|
241
|
+
- **Python Community**: For excellent documentation and examples
|
|
242
|
+
- **GitHub Community**: For hosting and collaboration tools
|
|
243
|
+
- **Open Source Contributors**: For inspiration and best practices
|
|
244
|
+
|
|
245
|
+
## 🚀 Roadmap
|
|
246
|
+
|
|
247
|
+
### Upcoming Features
|
|
248
|
+
- [ ] Enhanced error handling in PYcmd
|
|
249
|
+
- [ ] Configuration file support
|
|
250
|
+
- [ ] Plugin system for PYcmd
|
|
251
|
+
- [ ] Advanced search capabilities in logrec
|
|
252
|
+
- [ ] Performance optimizations
|
|
253
|
+
- [ ] Additional file format support
|
|
254
|
+
|
|
255
|
+
### Long-term Goals
|
|
256
|
+
- [ ] GUI interface for PYcmd
|
|
257
|
+
- [ ] Web interface for log management
|
|
258
|
+
- [ ] Integration with popular frameworks
|
|
259
|
+
- [ ] Comprehensive test suite
|
|
260
|
+
- [ ] Internationalization support
|
|
261
|
+
- [ ] Package distribution (PyPI)
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## 💡 Getting Help
|
|
266
|
+
|
|
267
|
+
### Documentation
|
|
268
|
+
- Read the individual `About*.md` files for detailed information
|
|
269
|
+
- Check code comments for implementation details
|
|
270
|
+
- Review function docstrings for usage examples
|
|
271
|
+
|
|
272
|
+
### Community Support
|
|
273
|
+
- GitHub Issues for bug reports and feature requests
|
|
274
|
+
- Discussions for general questions and ideas
|
|
275
|
+
- Pull Requests for contributions
|
|
276
|
+
|
|
277
|
+
### Learning Resources
|
|
278
|
+
- Python official documentation
|
|
279
|
+
- File I/O tutorials
|
|
280
|
+
- Command-line tool development guides
|
|
281
|
+
- Logging best practices
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
**Thank you for using logrec and PYcmd!**
|
|
286
|
+
|
|
287
|
+
We're constantly working to improve these tools and would love to hear your feedback, suggestions, and ideas. Whether you're a developer, system administrator, or student, we hope these tools make your work easier and more productive.
|
|
288
|
+
|
|
289
|
+
Happy coding! 🎉
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Git32-Design
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: LogrecAndPYcmd
|
|
3
|
+
Version: 3.7.3
|
|
4
|
+
Summary: logrec: A quick record log's lib, Can search log file, And record(Or write) logs to a file. It's easy, Please use "logging" library. I know, My lib is sucks, But I well publish it to github. PYcmd: This program is a command prompt tool for managing files.
|
|
5
|
+
Author-email: Git32-Design <git32mail@qq.com>
|
|
6
|
+
License-Expression: MIT AND (Apache-2.0 OR BSD-3-Clause)
|
|
7
|
+
Project-URL: Homepage, https://github.com/Git32-Design/logrec-and-PYcmd
|
|
8
|
+
Project-URL: Documentation, https://readthedocs.org
|
|
9
|
+
Project-URL: Repository, https://github.com/Git32-Design/logrec-and-PYcmd
|
|
10
|
+
Project-URL: Issues, https://github.com/Git32-Design/logrec-and-PYcmd/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/Git32-Design/logrec-and-PYcmd/blob/main/Update%20msgs.md
|
|
12
|
+
Project-URL: MyHomepage, https://github.com/Git32-Design
|
|
13
|
+
Project-URL: DOWNLOAD, https://github.com/Git32-Design/logrec-and-PYcmd/releases
|
|
14
|
+
Keywords: log,logger,recording,search,management,file,logging,debug,custom cmd
|
|
15
|
+
Classifier: Development Status :: 3 - Alpha
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Intended Audience :: System Administrators
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
27
|
+
Classifier: Topic :: System :: Logging
|
|
28
|
+
Classifier: Topic :: System :: Systems Administration
|
|
29
|
+
Classifier: Topic :: Utilities
|
|
30
|
+
Requires-Python: >=3.8
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Requires-Dist: pytest>=7.0
|
|
34
|
+
Provides-Extra: test
|
|
35
|
+
Requires-Dist: pytest>=7.0; extra == "test"
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
|
|
38
|
+
# logrec and PYcmd
|
|
39
|
+
|
|
40
|
+
Welcome to the logrec and PYcmd project repository! This repository contains two complementary Python tools designed to enhance your development and file management experience.
|
|
41
|
+
|
|
42
|
+
## 📦 What's Included
|
|
43
|
+
|
|
44
|
+
### 📝 logrec - Log Recorder Library
|
|
45
|
+
A simple yet powerful Python library for recording and managing logs with search capabilities.
|
|
46
|
+
|
|
47
|
+
**Key Features:**
|
|
48
|
+
- Simple & intuitive API design
|
|
49
|
+
- Multiple log levels (INFO, TIP, WARN, ERROR, CRITICAL)
|
|
50
|
+
- File management (read, search, delete, modify, clear)
|
|
51
|
+
- Automatic timestamps
|
|
52
|
+
- Lightweight with no external dependencies
|
|
53
|
+
- Object-oriented LogRecorder class
|
|
54
|
+
|
|
55
|
+
**Perfect for:**
|
|
56
|
+
- Application logging
|
|
57
|
+
- Debugging sessions
|
|
58
|
+
- Quick record keeping
|
|
59
|
+
- Learning logging concepts
|
|
60
|
+
|
|
61
|
+
### 🖥️ PYcmd - Python Command Tool
|
|
62
|
+
A powerful command-line tool for file management, calculations, and system operations with integrated logging.
|
|
63
|
+
|
|
64
|
+
**Key Features:**
|
|
65
|
+
- Complete file management suite
|
|
66
|
+
- Directory operations
|
|
67
|
+
- Mathematical calculations
|
|
68
|
+
- Random number generation
|
|
69
|
+
- Time and date utilities
|
|
70
|
+
- Interactive command interface
|
|
71
|
+
- Integrated logging with logrec
|
|
72
|
+
|
|
73
|
+
**Perfect for:**
|
|
74
|
+
- System administration tasks
|
|
75
|
+
- File batch operations
|
|
76
|
+
- Quick calculations
|
|
77
|
+
- Learning command-line tool development
|
|
78
|
+
|
|
79
|
+
## 🚀 Quick Start
|
|
80
|
+
|
|
81
|
+
### Using logrec
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
import logrec
|
|
85
|
+
|
|
86
|
+
# Simple logging
|
|
87
|
+
logrec.log("app.log", "Application started")
|
|
88
|
+
logrec.err("app.log", "Error occurred")
|
|
89
|
+
|
|
90
|
+
# Using the LogRecorder class
|
|
91
|
+
logger = LogRecorder("myapp.log")
|
|
92
|
+
logger.log("User logged in")
|
|
93
|
+
logger.warn("Session expiring soon")
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Using PYcmd
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Run the interactive command interface
|
|
100
|
+
python PYcmd.py
|
|
101
|
+
|
|
102
|
+
# Available commands include:
|
|
103
|
+
# read, write, create, delete, listdir, copy, rename
|
|
104
|
+
# mkdir, rmdir, cd, pwd, compare, stats
|
|
105
|
+
# math, calc, rand, showt, help, clear, exit
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## 🛠️ Installation & Setup
|
|
109
|
+
|
|
110
|
+
### Prerequisites
|
|
111
|
+
- Python 3.10 or higher
|
|
112
|
+
- Standard Python libraries (os, math, random, time, pathlib)
|
|
113
|
+
|
|
114
|
+
### Installation Steps
|
|
115
|
+
|
|
116
|
+
1. **Clone this repository:**
|
|
117
|
+
```bash
|
|
118
|
+
git clone https://github.com/Git32-Design/logrec-and-PYcmd.git
|
|
119
|
+
cd logrec-and-PYcmd
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
2. **Install logrec library (optional):**
|
|
123
|
+
```python
|
|
124
|
+
# Option 1: Install to site-packages
|
|
125
|
+
# Copy logrec folder to your Python site-packages directory
|
|
126
|
+
|
|
127
|
+
# Option 2: Use directly
|
|
128
|
+
# Import logrec from the local directory
|
|
129
|
+
import sys
|
|
130
|
+
sys.path.append('/path/to/logrec-and-PYcmd')
|
|
131
|
+
import logrec
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
3. **Run PYcmd:**
|
|
135
|
+
```bash
|
|
136
|
+
python PYcmd/PYcmd.py
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## 📁 Repository Structure
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
logrec-and-PYcmd/ # Main repository folder
|
|
143
|
+
|-- .github/ # Github settings
|
|
144
|
+
| |-- workflows/ # To publish package
|
|
145
|
+
| | |-- python-package.yml # A setting of publish
|
|
146
|
+
| | |__ python-publish.yml # Publish messages
|
|
147
|
+
|-- logrec/ # Log Recorder Library
|
|
148
|
+
| |-- tests/ # Test of logrec
|
|
149
|
+
| | |-- test_logrec.py # Test script
|
|
150
|
+
| | |-- c.log # Test logs
|
|
151
|
+
| | |-- g.log # Test logs
|
|
152
|
+
| | |-- s.log # Test logs
|
|
153
|
+
| | |__ t.log # Test logs
|
|
154
|
+
| |-- __init__.py # Library initialization and metadata
|
|
155
|
+
| |-- logrec.py # Core logging functionality
|
|
156
|
+
│ |__ About logrec.md # Detailed logrec documentation
|
|
157
|
+
|-- PYcmd/ # Python Command Tool
|
|
158
|
+
| |-- tests/ # Tests of PYcmd
|
|
159
|
+
| | |__ test-PYcmd # Test script
|
|
160
|
+
│ |-- PYcmd.py # Main command tool implementation
|
|
161
|
+
| |__ About PYcmd.md # Detailed PYcmd documentation
|
|
162
|
+
|-- LICENSE # Project license
|
|
163
|
+
|-- .gitignore # Git ignore rules
|
|
164
|
+
|-- About logrec and PYcmd.md # This file - project overview
|
|
165
|
+
|-- requirements.txt # This repository's requirement modules
|
|
166
|
+
|__ Update msgs.md # This repository every update informations
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## 🔗 Integration
|
|
170
|
+
|
|
171
|
+
### logrec + PYcmd Integration
|
|
172
|
+
PYcmd uses logrec internally for all operation logging:
|
|
173
|
+
- Successful operations are logged as normal entries
|
|
174
|
+
- Errors are logged with detailed error information
|
|
175
|
+
- Logs are saved to `PYcmd log record.log`
|
|
176
|
+
- Provides complete audit trail of all operations
|
|
177
|
+
|
|
178
|
+
## 📋 Version Information
|
|
179
|
+
|
|
180
|
+
### Current Versions
|
|
181
|
+
- **logrec**: Release 3.3.2
|
|
182
|
+
- **PYcmd**: Dev Alpha 1.0.0
|
|
183
|
+
- **Project Status**: Development
|
|
184
|
+
|
|
185
|
+
### Development Status
|
|
186
|
+
Both tools are currently in alpha development phase:
|
|
187
|
+
- ✅ Core functionality implemented
|
|
188
|
+
- ✅ Basic testing completed
|
|
189
|
+
- 🔄 Feature development ongoing
|
|
190
|
+
- 📋 Documentation in progress
|
|
191
|
+
- 🐛 Bug fixes and improvements
|
|
192
|
+
|
|
193
|
+
## 🎯 Use Cases
|
|
194
|
+
|
|
195
|
+
### For Developers
|
|
196
|
+
- **Application Logging**: Use logrec in your Python applications
|
|
197
|
+
- **Development Tools**: Use PYcmd for quick file operations
|
|
198
|
+
- **Learning Resources**: Study the code to understand Python concepts
|
|
199
|
+
- **Script Development**: Extend or modify for custom needs
|
|
200
|
+
|
|
201
|
+
### For System Administrators
|
|
202
|
+
- **File Management**: Use PYcmd for batch file operations
|
|
203
|
+
- **Log Analysis**: Use logrec for custom logging solutions
|
|
204
|
+
- **Automation**: Integrate into existing workflows
|
|
205
|
+
- **Quick Tasks**: Use PYcmd's interactive interface
|
|
206
|
+
|
|
207
|
+
### For Students
|
|
208
|
+
- **Learning Python**: Study well-commented code examples
|
|
209
|
+
- **Understanding File I/O**: Learn practical file operations
|
|
210
|
+
- **API Design**: Study clean function interfaces
|
|
211
|
+
- **Project Structure**: Learn repository organization
|
|
212
|
+
|
|
213
|
+
## 🔧 Technical Specifications
|
|
214
|
+
|
|
215
|
+
### Dependencies
|
|
216
|
+
- **logrec**: Python standard library only (os, time)
|
|
217
|
+
- **PYcmd**: Python standard library (os, math, random, time, pathlib) + logrec
|
|
218
|
+
|
|
219
|
+
### Compatibility
|
|
220
|
+
- **Python**: 3.10+ (recommended 3.13)
|
|
221
|
+
- **Operating System**: Cross-platform (Windows, Linux, macOS)
|
|
222
|
+
- **Memory Usage**: Lightweight, minimal footprint
|
|
223
|
+
|
|
224
|
+
### Performance
|
|
225
|
+
- **Logging Speed**: Fast file I/O with minimal overhead
|
|
226
|
+
- **Command Response**: Quick execution for most operations
|
|
227
|
+
- **Resource Usage**: Low CPU and memory requirements
|
|
228
|
+
|
|
229
|
+
## 📄 Licensing
|
|
230
|
+
|
|
231
|
+
This project uses dual licensing:
|
|
232
|
+
- **logrec**: MIT License
|
|
233
|
+
- **PYcmd**: GNU General Public License v3.0
|
|
234
|
+
|
|
235
|
+
See individual LICENSE files for details.
|
|
236
|
+
|
|
237
|
+
## 🤝 Contributing
|
|
238
|
+
|
|
239
|
+
We welcome contributions! Here's how you can help:
|
|
240
|
+
|
|
241
|
+
### Reporting Issues
|
|
242
|
+
- Use GitHub Issues for bug reports
|
|
243
|
+
- Provide detailed reproduction steps
|
|
244
|
+
- Include system information
|
|
245
|
+
- Add screenshots if applicable
|
|
246
|
+
|
|
247
|
+
### Submitting Pull Requests
|
|
248
|
+
- Fork the repository
|
|
249
|
+
- Create a feature branch
|
|
250
|
+
- Make your changes
|
|
251
|
+
- Test thoroughly
|
|
252
|
+
- Submit pull request with description
|
|
253
|
+
|
|
254
|
+
### Code Standards
|
|
255
|
+
- Follow PEP 8 guidelines
|
|
256
|
+
- Add comments to complex code
|
|
257
|
+
- Update documentation
|
|
258
|
+
- Include tests when possible
|
|
259
|
+
|
|
260
|
+
## 📞 Contact Information
|
|
261
|
+
|
|
262
|
+
- Author: Git32-Design
|
|
263
|
+
- Developer page : [User stats page](https://github.com/Git32-Design)
|
|
264
|
+
- Email: git32mail@qq.com
|
|
265
|
+
- Steam : Git32-Games *In steam, You can call me "Git32Play"*
|
|
266
|
+
- Netease minecraft : Git32Design__ *I haven't money to buy release, But netease make me happy, You can call me "git32mc"*
|
|
267
|
+
- Project URL: [Into main page for see updates](https://github.com/Git32-Design/logrec-and-PYcmd)
|
|
268
|
+
|
|
269
|
+
## 🙏 Acknowledgments
|
|
270
|
+
|
|
271
|
+
### Development Tools
|
|
272
|
+
- **Visual Studio Code**: Primary development environment
|
|
273
|
+
- **CODEBUDDY**: AI coding assistant
|
|
274
|
+
- **Python Extension Pack**: Python language support
|
|
275
|
+
- **Pylance**: Python linting and intelligence
|
|
276
|
+
|
|
277
|
+
### Community
|
|
278
|
+
- **Python Community**: For excellent documentation and examples
|
|
279
|
+
- **GitHub Community**: For hosting and collaboration tools
|
|
280
|
+
- **Open Source Contributors**: For inspiration and best practices
|
|
281
|
+
|
|
282
|
+
## 🚀 Roadmap
|
|
283
|
+
|
|
284
|
+
### Upcoming Features
|
|
285
|
+
- [ ] Enhanced error handling in PYcmd
|
|
286
|
+
- [ ] Configuration file support
|
|
287
|
+
- [ ] Plugin system for PYcmd
|
|
288
|
+
- [ ] Advanced search capabilities in logrec
|
|
289
|
+
- [ ] Performance optimizations
|
|
290
|
+
- [ ] Additional file format support
|
|
291
|
+
|
|
292
|
+
### Long-term Goals
|
|
293
|
+
- [ ] GUI interface for PYcmd
|
|
294
|
+
- [ ] Web interface for log management
|
|
295
|
+
- [ ] Integration with popular frameworks
|
|
296
|
+
- [ ] Comprehensive test suite
|
|
297
|
+
- [ ] Internationalization support
|
|
298
|
+
- [ ] Package distribution (PyPI)
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## 💡 Getting Help
|
|
303
|
+
|
|
304
|
+
### Documentation
|
|
305
|
+
- Read the individual `About*.md` files for detailed information
|
|
306
|
+
- Check code comments for implementation details
|
|
307
|
+
- Review function docstrings for usage examples
|
|
308
|
+
|
|
309
|
+
### Community Support
|
|
310
|
+
- GitHub Issues for bug reports and feature requests
|
|
311
|
+
- Discussions for general questions and ideas
|
|
312
|
+
- Pull Requests for contributions
|
|
313
|
+
|
|
314
|
+
### Learning Resources
|
|
315
|
+
- Python official documentation
|
|
316
|
+
- File I/O tutorials
|
|
317
|
+
- Command-line tool development guides
|
|
318
|
+
- Logging best practices
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
**Thank you for using logrec and PYcmd!**
|
|
323
|
+
|
|
324
|
+
We're constantly working to improve these tools and would love to hear your feedback, suggestions, and ideas. Whether you're a developer, system administrator, or student, we hope these tools make your work easier and more productive.
|
|
325
|
+
|
|
326
|
+
Happy coding! 🎉
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
About logrec and PYcmd.md
|
|
2
|
+
LICENSE
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
LogrecAndPYcmd.egg-info/PKG-INFO
|
|
6
|
+
LogrecAndPYcmd.egg-info/SOURCES.txt
|
|
7
|
+
LogrecAndPYcmd.egg-info/dependency_links.txt
|
|
8
|
+
LogrecAndPYcmd.egg-info/requires.txt
|
|
9
|
+
LogrecAndPYcmd.egg-info/top_level.txt
|
|
10
|
+
PYcmd/PYcmd.py
|
|
11
|
+
PYcmd/__init__.py
|
|
12
|
+
logrec/__init__.py
|
|
13
|
+
logrec/logrec.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|