Timestamp Sort
A Sublime Text 4 plugin to sort log messages based on their timestamps.
Details
Installs
- Total 0
- Win 0
- Mac 0
- Linux 0
Jul 16 | Jul 15 | Jul 14 | Jul 13 | Jul 12 | Jul 11 | Jul 10 | Jul 9 | Jul 8 | Jul 7 | Jul 6 | Jul 5 | Jul 4 | Jul 3 | Jul 2 | Jul 1 | Jun 30 | Jun 29 | Jun 28 | Jun 27 | Jun 26 | Jun 25 | Jun 24 | Jun 23 | Jun 22 | Jun 21 | Jun 20 | Jun 19 | Jun 18 | Jun 17 | Jun 16 | Jun 15 | Jun 14 | Jun 13 | Jun 12 | Jun 11 | Jun 10 | Jun 9 | Jun 8 | Jun 7 | Jun 6 | Jun 5 | Jun 4 | Jun 3 | Jun 2 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Timestamp Sort (Editor Plugin)
A text editor plugin to sort log messages based on their timestamps.
Supports multiple timestamp formats, including Unix time.
Works under Sublime 4
Features
- Sorts log entries by timestamp.
- Handles multi-line log messages.
- Preserves non-timestamped lines at the end.
- Supports a variety of timestamp formats.
Supported Timestamp Formats
YYYY-MM-DD HH:mm:ss.SSS
(e.g.2025-06-06 08:36:46.827
)YYYY-MM-DD HH:mm:ss
(e.g.2025-06-06 08:36:46
)YYYY/MM/DD HH:mm:ss
(e.g.2025/06/06 08:36:46
)HH:mm:ss
(defaults to2000-01-01
date)- Unix timestamps in:
- seconds:
1717666606
- milliseconds:
1717666606827
- seconds:
Manual Installation
- Place your plugin
.py
file in: Packages/User/timestamp_sort.py
To open this folder from Sublime Text:
Preferences > Browse Packages...
- Create or update a Command Palette entry in
Packages/User/Default.sublime-commands
:
[
{
"caption": "Sort: By Timestamp",
"command": "timestamp_sort"
}
]
3. (Optional) Add a main menu entry in Packages/User/Main.sublime-menu:
## Usage
Open a file with log entries.
Use the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and search for:
Sort: By Timestamp
Or use the Tools menu if you added a menu item.
## Notes
- processes the currently open file
- Assumes timestamps are at the beginning of log entry:
**Log entries can have multiple lines but the 1st line of each entry (paragraph) has to start with a timestamp.**
- Lines before any detectable timestamp are moved to the end in their original order.
## License
MIT