Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ttldtor/console
Cross-platform library of utilities for working with the console.
https://github.com/ttldtor/console
Last synced: about 2 months ago
JSON representation
Cross-platform library of utilities for working with the console.
- Host: GitHub
- URL: https://github.com/ttldtor/console
- Owner: ttldtor
- License: bsl-1.0
- Created: 2023-09-27T09:54:14.000Z (about 1 year ago)
- Default Branch: default
- Last Pushed: 2023-09-27T11:16:04.000Z (about 1 year ago)
- Last Synced: 2023-09-28T16:35:34.668Z (about 1 year ago)
- Language: C++
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Console
Cross-platform library of utilities for working with the console.[![Build](https://github.com/ttldtor/Console/actions/workflows/build.yml/badge.svg?branch=default)](https://github.com/ttldtor/Console/actions/workflows/build.yml)
[![Release](https://img.shields.io/github/v/release/ttldtor/Console)](https://github.com/ttldtor/Console/releases/latest)
![](https://img.shields.io/badge/C++%20standard-C++11-blueviolet)
[![License](https://img.shields.io/badge/license-BSL--1.0-orange)](https://github.com/ttldtor/Console/blob/default/LICENSE)
[![Downloads](https://img.shields.io/github/downloads/ttldtor/Console/total)](https://github.com/ttldtor/Console/releases/latest)### Status:
* [x] Windows
* [x] Linux
* [x] MacOS
* [x] Termux
* [ ] FreeBSD
* [ ] OpenBSD
* [ ] AIX
* [ ] ...### Example:
_**CMakeLists.txt:**_
```cmake
cmake_minimum_required(VERSION 3.20)project(Test LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_STANDARD 11)
set(CXX_EXTENSIONS OFF)
set(C_EXTENSIONS OFF)include(FetchContent)
FetchContent_Declare(Console GIT_REPOSITORY "https://github.com/ttldtor/Console.git" GIT_TAG default)
FetchContent_MakeAvailable(Console)add_executable(${PROJECT_NAME}
main.cpp
)target_link_libraries(${PROJECT_NAME} PRIVATE console::console)
```
**_main.cpp:_**
```cpp
#include#include
using namespace org::ttldtor::console;
int main() {
auto consoleSize = Console::getSize();std::cout << "Console size: " << consoleSize.first << " x " << consoleSize.second << std::endl;
return 0;
}
```_**Program output:**_
```text
Console size: 120 x 27
```