Commit graph

26 commits

Author SHA1 Message Date
818f5ddc5e fix: Add missing memory headers for unique_ptr
All headers using std::unique_ptr now explicitly include <memory>
2025-12-08 16:05:22 +08:00
6564f23707 fix: Add missing memory header to html_parser.h
Linux build requires explicit include of <memory> for std::unique_ptr
2025-12-08 16:03:17 +08:00
ef80f9ab82 refactor: Improve code quality and Unix philosophy
- Remove redundant comments for cleaner code
- Simplify error messages and status display
- Improve code consistency across modules
- Fix GitHub Actions workflow binary names
- Enhance .gitignore for common editor files
- Align help text formatting
- Remove unnecessary verbose comments
2025-12-08 15:53:17 +08:00
ab2d1932e4 feat: Transform to vim-style terminal browser (#10)
* feat: Add HTTP/HTTPS client module

Implement HTTP client with libcurl for fetching web pages:
- Support for HTTP and HTTPS protocols
- Configurable timeout and user agent
- Automatic redirect following
- SSL certificate verification
- Pimpl pattern for implementation hiding

This module provides the foundation for web page retrieval
in the terminal browser.

* feat: Add HTML parser and content extraction

Implement HTML parser for extracting readable content:
- Parse HTML structure (headings, paragraphs, lists, links)
- Extract and decode HTML entities
- Smart content area detection (article, main, body)
- Relative URL to absolute URL conversion
- Support for both absolute and relative paths
- Filter out scripts, styles, and non-content elements

The parser uses regex-based extraction optimized for
text-heavy websites and documentation.

* feat: Add newspaper-style text rendering engine

Implement text renderer with adaptive layout:
- Adaptive width with maximum 80 characters
- Center-aligned content for comfortable reading
- Smart text wrapping and paragraph spacing
- Color scheme optimized for terminal reading
- Support for headings, paragraphs, lists, and links
- Link indicators with numbering
- Horizontal rules and visual separators

The renderer creates a newspaper-like reading experience
optimized for terminal displays.

* feat: Implement vim-style input handling

Add complete vim-style keyboard navigation:
- Normal mode: hjkl movement, gg/G jump, numeric prefixes
- Command mode: :q, :o URL, :r, :h, :[number]
- Search mode: / for search, n/N for next/previous match
- Link navigation: Tab/Shift-Tab, Enter to follow
- Scroll commands: Ctrl-D/U, Space, b for page up/down
- History navigation: h for back, l for forward

Input handler manages mode transitions and command parsing
with full vim compatibility.

* feat: Implement browser core with TUI interface

Add main browser engine and user interface:
- Page loading with HTTP client integration
- HTML parsing and text rendering pipeline
- History management (back/forward navigation)
- Link selection and following with Tab navigation
- Search functionality with highlighting
- Scrolling with position tracking
- Status bar with mode indicator and progress
- Built-in help page with usage instructions
- Error handling and user feedback
- Support for static HTML websites

The browser provides a complete vim-style terminal
browsing experience optimized for reading text content.

* build: Update build system for terminal browser

Update CMake and add Makefile for the new project:
- Rename project from NBTCA_TUI to TUT
- Update executable name from nbtca_tui to tut
- Add all new source files to build
- Include Makefile for environments without CMake
- Update .gitignore for build artifacts

Both CMake and Make build systems are now supported
for maximum compatibility.

* docs: Complete project transformation to terminal browser

Transform project from ICS calendar viewer to terminal browser:
- Rewrite main.cpp for browser launch with URL argument support
- Complete README rewrite with:
  - New project description and features
  - Comprehensive keyboard shortcuts documentation
  - Installation guide for multiple platforms
  - Usage examples and best practices
  - JavaScript/SPA limitations explanation
  - Architecture overview
- Add help command line option
- Update version to 1.0.0

The project is now TUT (Terminal User Interface Browser),
a vim-style terminal web browser optimized for reading.
2025-12-05 15:01:21 +08:00
5b54b3e9c8 Merge pull request #9 from m1ngsama/fix/release-permissions
fix: Add contents write permission for release job
2025-11-20 11:51:13 +08:00
048271cdc8 fix: Add contents write permission for release job
GitHub Actions requires explicit permissions to create releases.
Added permissions.contents: write to the release job.
2025-11-20 11:50:43 +08:00
a866331bc2 Merge pull request #8 from m1ngsama/feature/cicd-auto-release
ci: Auto release on push to main with multi-platform builds
2025-11-20 11:46:52 +08:00
ffacdc8c3e ci: Auto release on push to main with multi-platform builds
- Change trigger from tags to push on main branch
- Add matrix build for macOS and Linux platforms
- Use softprops/action-gh-release for creating releases
- Auto-generate version using date and commit hash
- Upload platform-specific binaries to release
- Fix CMakeLists.txt to conditionally set Homebrew path for macOS only
2025-11-20 11:45:50 +08:00
1e9b523130 Merge pull request #7 from m1ngsama/feature/tui-interface-enhancement
feat: Enhance TUI interface with modern design and ASCII compatibility
2025-11-20 10:13:01 +08:00
56df39a755 feat: Replace emoji with ASCII art for maximum terminal compatibility
- Replace Braille spinner with classic ASCII spinner (|/-\)
- Update calendar banner: [CAL] NBTCA CALENDAR [CAL]
- Update tools banner: [TOOL] NBTCA UTILITY TOOLS [TOOL]
- Replace event status icons: * for today, v for past, ○ for upcoming
- Update menu items: [CAL] Calendar, [X] Exit
- Replace location emoji with @ symbol
- Ensure compatibility across all terminal environments including legacy systems
2025-11-20 10:10:26 +08:00
cb9cde8958 Merge pull request #6 from m1ngsama/feature/github-actions-release
docs: Add developer guide to README.md
2025-11-19 18:00:58 +08:00
0a164f93ce docs: Add developer guide to README.md 2025-11-19 17:58:34 +08:00
dbc61f8385 Merge pull request #5 from m1ngsama/feature/github-actions-release
feat: Add GitHub Actions workflow for automated build and source-only release
2025-11-19 17:56:55 +08:00
993d81a136 feat: Add GitHub Actions workflow for automated build and source-only release 2025-11-19 17:56:01 +08:00
48bbd6a2b7 feat: Initial release v0.0.1 with updated README and build instructions 2025-11-19 17:50:58 +08:00
9acf7f6bbd Update README.md with version 0.0.1 2025-11-19 17:39:32 +08:00
5f1371c1f2 Add build/ to .gitignore and remove build directory from Git tracking. 2025-11-19 17:32:41 +08:00
6b433e530d Merge pull request #4 from m1ngsama/feature/ascii-art-tui
feat: Add ASCII art and ANSI shadow effects to TUI
2025-11-19 17:28:40 +08:00
9f334ec0a0 feat: Add ASCII art and ANSI shadow effects to TUI 2025-11-19 17:27:46 +08:00
1675aa80ff Merge pull request #3 from m1ngsama/feature/vim-keybindings
feat: Add Vim keybindings (j/k) for navigation in TUI
2025-11-19 16:52:29 +08:00
38d97b1d46 feat: Add Vim keybindings (j/k) for navigation in TUI 2025-11-19 16:48:55 +08:00
6059bcbcc6 Merge remote-tracking branch 'origin/feature/vim-bindings' 2025-11-19 16:39:59 +08:00
4f2cc49534 Merge pull request #2 from m1ngsama/feature/modularize-calendar
feat: Modularize calendar and create TUI portal
2025-11-19 16:37:13 +08:00
ee244aaeb6 Merge pull request #1 from m1ngsama/feature/modularize-calendar
feat: Modularize calendar and create TUI portal
2025-11-19 16:35:30 +08:00
77784f7453 feat: Modularize calendar and create TUI portal
Refactored the calendar functionality into a separate Calendar class.
Created a TUI portal in main.cpp to allow for future feature expansion.
The TUI portal provides a menu to select different features, with the calendar being the first one.
Updated the build system to include the new files.
2025-11-19 16:34:25 +08:00
e7edc3455f Initial commit: NBTCA TUI with ICS calendar support 2025-11-19 11:50:45 +08:00