Giter Site home page Giter Site logo

termshot's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar github-actions[bot] avatar heavywombat avatar prabhat-kumar avatar qu1queee avatar rothgar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

termshot's Issues

panic: reached end of file before reaching end identifier

When running the following command I get the following problem. I'm not sure if it's because the output from the composer updated command is just too big or because it's using a lot of width. Any help understanding the error further would be appreciated.

I'm using a build of main branch but it happens with the latest release 0.27 as well. Running on MacOS using an M3 Pro.

$ termshot --show-cmd -- composer outdated

Color legend:
- patch or minor release available - update recommended
- major release available - update possible

Direct dependencies required in composer.json:
algolia/algoliasearch-client-php               3.3.2                                  3.4.1          Algolia Search API Client for PHP
driftingly/rector-laravel                      dev-feature/assert-status-rule fe9b4fd [none matched] Rector upgrades rules for Laravel Framework
fakerphp/faker                                 1.20.0                                 1.23.1         Faker is a PHP library that generates fake data for you.
fruitcake/laravel-cors                         3.0.0                                  3.0.0          Adds CORS (Cross-Origin Resource Sharing) headers support in your Lar...
Package fruitcake/laravel-cors is abandoned, you should avoid using it. No replacement was suggested.
google/cloud-error-reporting                   0.19.7                                 0.22.6         Stackdriver Error Reporting Client for PHP
google/cloud-logging                           1.24.9                                 1.30.3         Stackdriver Logging Client for PHP
guzzlehttp/guzzle                              7.5.0                                  7.8.1          Guzzle is a PHP HTTP client library
laravel/framework                              9.43.0                                 11.14.0        The Laravel Framework.
laravel/jetstream                              2.12.6                                 5.1.2          Tailwind scaffolding for the Laravel framework.
laravel/octane                                 1.3.9                                  2.5.1          Supercharge your Laravel application's performance.
laravel/pint                                   1.2.1                                  1.16.1         An opinionated code formatter for PHP.
laravel/sail                                   1.16.3                                 1.30.1         Docker files for running a basic Laravel application.
laravel/sanctum                                3.0.1                                  4.0.2          Laravel Sanctum provides a featherweight authentication system for SP...
laravel/scout                                  9.5.1                                  10.10.1        Laravel Scout provides a driver based solution to searching your Eloq...
laravel/spark-paddle                           2.1.13                                 5.2.1          Laravel Spark provides scaffolding for Laravel SaaS applications.
laravel/tinker                                 2.7.3                                  2.9.0          Powerful REPL for the Laravel framework.
livewire/livewire                              2.10.7                                 3.5.1          A front-end framework for Laravel.
meilisearch/meilisearch-php                    0.26.0                                 1.9.0          PHP wrapper for the Meilisearch API
mockery/mockery                                1.5.1                                  1.6.12         Mockery is a simple yet flexible PHP mock object framework
nunomaduro/collision                           6.3.1                                  8.1.1          Cli error handling for console/command-line PHP applications.
nunomaduro/larastan                            2.2.9                                  2.9.7          Larastan - Discover bugs in your code without running it. A phpstan/p...
Package nunomaduro/larastan is abandoned, you should avoid using it. Use larastan/larastan instead.
nunomaduro/phpinsights                         2.6.1                                  2.11.0         Instant PHP quality checks from your console.
pestphp/pest                                   1.22.3                                 2.34.8         An elegant PHP Testing Framework.
pestphp/pest-plugin-laravel                    1.3.0                                  2.4.0          The Pest Laravel Plugin
pestphp/pest-plugin-livewire                   1.0.0                                  2.1.0          The Pest Livewire Plugin
phpunit/phpunit                                9.5.27                                 11.2.5         The PHP Unit Testing framework.
rector/rector                                  0.14.8                                 1.2.0          Instant Upgrade and Automated Refactoring of any PHP code
spatie/data-transfer-object                    3.9.1                                  3.9.1          Data transfer objects with batteries included
Package spatie/data-transfer-object is abandoned, you should avoid using it. Use spatie/laravel-data instead.
spatie/laravel-activitylog                     4.7.2                                  4.8.0          A very simple activity logger to monitor the users of your website or...
spatie/laravel-google-cloud-storage            2.0.5                                  2.3.0          Google Cloud Storage filesystem driver for Laravel
spatie/laravel-ignition                        1.6.2                                  2.8.0          A beautiful error page for Laravel applications.
spatie/laravel-morph-map-generator             1.0.7                                  1.2.1          Automatically generate morph maps in your Laravel application
spatie/laravel-ray                             1.31.0                                 1.36.3         Easily debug Laravel apps
spiral/roadrunner                              2.12.1                                 2024.1.5       RoadRunner: High-performance PHP application server and process manag...
ylsideas/cockroachdb-laravel                   1.1.1                                  1.4.0          This is my package cockroachdb-laravel

Transitive dependencies not required in composer.json:
bacon/bacon-qr-code                            2.0.8                                  3.0.0          BaconQrCode is a QR code generator for PHP.
brick/math                                     0.10.2                                 0.12.1         Arbitrary-precision arithmetic library
clue/stream-filter                             1.6.0                                  1.7.0          A simple and modern approach to stream filtering in PHP
composer/pcre                                  3.1.0                                  3.1.4          PCRE wrapping library that offers type-safe preg_* replacements.
composer/semver                                3.3.2                                  3.4.0          Semver library that offers utilities, version constraint parsing and ...
composer/xdebug-handler                        3.0.3                                  3.0.5          Restarts a process without Xdebug.
dasprid/enum                                   1.0.3                                  1.0.5          PHP 7.1 enum implementation
dealerdirect/phpcodesniffer-composer-installer 0.7.2                                  1.0.0          PHP_CodeSniffer Standards Composer Installer Plugin
doctrine/annotations                           1.13.3                                 2.0.1          Docblock Annotations Parser
doctrine/inflector                             2.0.6                                  2.0.10         PHP Doctrine Inflector is a small library that can perform string man...
doctrine/instantiator                          1.4.1                                  2.0.0          A small, lightweight utility to instantiate objects in PHP without in...
doctrine/lexer                                 1.2.3                                  3.0.1          PHP Doctrine Lexer parser library that can be used in Top-Down, Recur...
dragonmantank/cron-expression                  3.3.2                                  3.3.3          CRON for PHP: Calculate the next or previous run date and determine i...
egulias/email-validator                        3.2.1                                  4.0.2          A library for validating emails against several RFCs
filp/whoops                                    2.14.6                                 2.15.4         php error handling for cool kids
firebase/php-jwt                               6.3.1                                  6.10.1         A simple library to encode and decode JSON Web Tokens (JWT) in PHP. S...
friendsofphp/php-cs-fixer                      3.13.0                                 3.59.3         A tool to automatically fix PHP code style
fruitcake/php-cors                             1.2.0                                  1.3.0          Cross-origin resource sharing library for the Symfony HttpFoundation
google/auth                                    1.24.0                                 1.40.0         Google Auth Library for PHP
google/cloud-core                              1.48.0                                 1.59.0         Google Cloud PHP shared dependency, providing functionality useful to...
google/cloud-scheduler                         1.6.7                                  1.10.5         Cloud Scheduler Client for PHP
google/cloud-storage                           1.30.0                                 1.42.0         Cloud Storage Client for PHP
google/cloud-tasks                             1.11.6                                 1.14.6         Google Cloud Tasks Client for PHP
google/common-protos                           3.1.0                                  4.6.0          Google API Common Protos for PHP
google/crc32                                   0.1.0                                  0.2.0          Various CRC32 implementations
google/gax                                     1.18.1                                 1.34.0         Google API Core for PHP
google/grpc-gcp                                0.2.1                                  0.4.0          gRPC GCP library for channel management
google/longrunning                             0.2.1                                  0.4.3          Google LongRunning Client for PHP
google/protobuf                                3.21.11                                4.27.2         proto library for PHP
graham-campbell/result-type                    1.1.0                                  1.1.2          An Implementation Of The Result Type
grpc/grpc                                      1.42.0                                 1.57.0         gRPC library for PHP
guzzlehttp/promises                            1.5.2                                  2.0.2          Guzzle promises library
guzzlehttp/psr7                                2.4.3                                  2.6.2          PSR-7 message implementation that also provides common utility methods
inertiajs/inertia-laravel                      0.6.4                                  1.3.0          The Laravel adapter for Inertia.js.
jaybizzle/crawler-detect                       1.2.112                                1.2.119        CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via ...
justinrainbow/json-schema                      5.2.12                                 5.2.13         A library to validate a json schema.
kevinrob/guzzle-cache-middleware               3.5.0                                  5.1.0          A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added i...
laminas/laminas-diactoros                      2.22.0                                 3.3.1          PSR HTTP Message implementations
laravel/cashier-paddle                         1.6.2                                  2.4.4          Cashier Paddle provides an expressive, fluent interface to Paddle's s...
laravel/fortify                                1.14.0                                 1.21.4         Backend controllers and scaffolding for Laravel authentication.
laravel/serializable-closure                   1.2.2                                  1.3.3          Laravel Serializable Closure provides an easy and secure way to seria...
league/commonmark                              2.3.8                                  2.4.2          Highly-extensible PHP Markdown parser which fully supports the Common...
league/config                                  1.1.1                                  1.2.0          Define configuration arrays with strict schemas and access values wit...
league/container                               4.2.0                                  4.2.2          A fast and intuitive dependency injection container.
league/flysystem                               3.11.0                                 3.28.0         File storage abstraction for PHP
league/flysystem-google-cloud-storage          3.11.0                                 3.28.0         Google Cloud Storage adapter for Flysystem.
league/mime-type-detection                     1.11.0                                 1.15.0         Mime-type detection for Flysystem
mobiledetect/mobiledetectlib                   2.8.41                                 4.8.06         Mobile_Detect is a lightweight PHP class for detecting mobile devices...
moneyphp/money                                 4.0.3                                  4.5.0          PHP implementation of Fowler's Money pattern
monolog/monolog                                2.8.0                                  3.7.0          Sends your logs to files, sockets, inboxes, databases and various web...
myclabs/deep-copy                              1.11.0                                 1.12.0         Create deep copies (clones) of your objects
nesbot/carbon                                  2.64.0                                 3.6.0          An API extension for DateTime that supports 281 different languages.
nette/schema                                   1.2.3                                  1.3.0          ๐Ÿ“ Nette Schema: validating data structures against a given Schema.
nette/utils                                    3.2.8                                  4.0.4          ๐Ÿ›   Nette Utils: lightweight utilities for string & array manipulat...
nikic/php-parser                               4.15.2                                 5.1.0          A PHP parser written in PHP
nunomaduro/termwind                            1.14.2                                 2.0.1          Its like Tailwind CSS, but for the console.
paragonie/constant_time_encoding               2.6.3                                  3.0.0          Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32,...
pestphp/pest-plugin                            1.1.0                                  2.1.1          The Pest plugin manager
phar-io/manifest                               2.0.3                                  2.0.4          Component for reading phar.io manifest information from a PHP Archive...
php-http/client-common                         2.6.0                                  2.7.1          Common HTTP Client implementations and tools for HTTPlug
php-http/discovery                             1.14.3                                 1.19.4         Finds installed HTTPlug implementations and PSR-7 message factories
php-http/httplug                               2.3.0                                  2.4.0          HTTPlug, the HTTP client abstraction for PHP
php-http/message                               1.13.0                                 1.16.1         HTTP Message related tools
php-http/message-factory                       1.0.2                                  1.1.0          Factory interfaces for PSR-7 HTTP Message
Package php-http/message-factory is abandoned, you should avoid using it. Use psr/http-factory instead.
php-http/promise                               1.1.0                                  1.3.1          Promise used for asynchronous HTTP requests
php-parallel-lint/php-parallel-lint            1.3.2                                  1.4.0          This tool check syntax of PHP files about 20x faster than serial check.
phpmyadmin/sql-parser                          5.5.0                                  5.9.0          A validating SQL lexer and parser with a focus on MySQL dialect.
phpoption/phpoption                            1.9.0                                  1.9.2          Option Type for PHP
phpstan/phpdoc-parser                          1.15.0                                 1.29.1         PHPDoc parser with support for nullable, intersection and generic types
phpstan/phpstan                                1.9.2                                  1.11.6         PHPStan - PHP Static Analysis Tool
phpunit/php-code-coverage                      9.2.19                                 11.0.4         Library that provides collection, processing, and rendering functiona...
phpunit/php-file-iterator                      3.0.6                                  5.0.0          FilterIterator implementation that filters files based on a list of s...
phpunit/php-invoker                            3.1.1                                  5.0.0          Invoke callables with a timeout
phpunit/php-text-template                      2.0.4                                  4.0.0          Simple template engine.
phpunit/php-timer                              5.0.3                                  7.0.0          Utility class for timing
psr/http-client                                1.0.1                                  1.0.3          Common interface for HTTP clients
psr/http-factory                               1.0.1                                  1.1.0          Common interfaces for PSR-7 HTTP message factories
psr/http-message                               1.0.1                                  2.0            Common interface for HTTP messages
psr/log                                        2.0.0                                  3.0.0          Common interface for logging libraries
psy/psysh                                      0.11.9                                 0.12.4         An interactive shell for modern PHP.
ramsey/collection                              1.2.2                                  2.0.0          A PHP library for representing and manipulating collections.
ramsey/uuid                                    4.6.0                                  4.7.6          A PHP library for generating and working with universally unique iden...
rize/uri-template                              0.3.5                                  0.3.6          PHP URI Template (RFC 6570) supports both expansion & extraction
sebastian/cli-parser                           1.0.1                                  3.0.1          Library for parsing CLI options
sebastian/code-unit                            1.0.8                                  3.0.0          Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup             2.0.3                                  4.0.0          Looks up which function or method a line of code belongs to
sebastian/comparator                           4.0.8                                  6.0.0          Provides the functionality to compare PHP values for equality
sebastian/complexity                           2.0.2                                  4.0.0          Library for calculating the complexity of PHP code units
sebastian/diff                                 4.0.4                                  6.0.1          Diff implementation
sebastian/environment                          5.1.4                                  7.1.0          Provides functionality to handle HHVM/PHP environments
sebastian/exporter                             4.0.5                                  6.1.2          Provides the functionality to export PHP variables for visualization
sebastian/global-state                         5.0.5                                  7.0.1          Snapshotting of global state
sebastian/lines-of-code                        1.0.3                                  3.0.0          Library for counting the lines of code in PHP source code
sebastian/object-enumerator                    4.0.4                                  6.0.0          Traverses array structures and object graphs to enumerate all referen...
sebastian/object-reflector                     2.0.4                                  4.0.0          Allows reflection of object attributes, including inherited and non-p...
sebastian/recursion-context                    4.0.4                                  6.0.1          Provides functionality to recursively process PHP variables
sebastian/resource-operations                  3.0.3                                  3.0.4          Provides a list of PHP built-in functions that operate on resources
sebastian/type                                 3.2.0                                  5.0.0          Collection of value objects that represent the types of the PHP type ...
sebastian/version                              3.0.2                                  5.0.0          Library that helps with managing the version number of Git-hosted PHP...
slevomat/coding-standard                       7.2.1                                  8.15.0         Slevomat Coding Standard for PHP_CodeSniffer complements Consistence ...
spatie/backtrace                               1.2.1                                  1.6.1          A better backtrace
spatie/flare-client-php                        1.3.1                                  1.7.0          Send PHP errors to Flare
spatie/ignition                                1.4.1                                  1.15.0         A beautiful error page for PHP applications.
spatie/invade                                  1.1.1                                  2.1.0          A PHP function to work with private properties and methods
spatie/laravel-package-tools                   1.13.7                                 1.16.4         Tools for creating Laravel packages
spatie/ray                                     1.36.0                                 1.41.2         Debug with Ray to fix problems faster
spatie/url                                     2.1.1                                  2.4.0          Parse, build and manipulate URL's
spiral/core                                    3.4.0                                  3.13.0         IoC container, IoC scopes, factory, memory, configuration interfaces
spiral/goridge                                 3.2.0                                  4.2.0          High-performance PHP-to-Golang RPC bridge
spiral/logger                                  3.4.0                                  3.13.0         LogFactory and global log listeners
spiral/roadrunner-cli                          2.3.0                                  2.6.0          RoadRunner: Command Line Interface
spiral/roadrunner-http                         2.2.0                                  3.5.1          RoadRunner: HTTP and PSR-7 worker
spiral/roadrunner-worker                       2.3.0                                  3.6.0          RoadRunner: PHP worker
spiral/tokenizer                               3.4.0                                  3.13.0         Static Analysis: Class and Invocation locators
squizlabs/php_codesniffer                      3.7.1                                  3.10.1         PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects v...
symfony/cache                                  6.2.0                                  7.1.2          Provides extended PSR-6, PSR-16 (and tags) implementations
symfony/cache-contracts                        3.2.0                                  3.5.0          Generic abstractions related to caching
symfony/console                                6.2.1                                  7.1.2          Eases the creation of beautiful and testable command line interfaces
symfony/css-selector                           6.2.0                                  7.1.1          Converts CSS selectors to XPath expressions
symfony/deprecation-contracts                  3.2.0                                  3.5.0          A generic function and convention to trigger deprecation notices
symfony/error-handler                          6.2.1                                  7.1.2          Provides tools to manage errors and ease debugging PHP code
symfony/event-dispatcher                       6.2.0                                  7.1.1          Provides tools that allow your application components to communicate ...
symfony/event-dispatcher-contracts             3.2.0                                  3.5.0          Generic abstractions related to dispatching event
symfony/filesystem                             6.2.0                                  7.1.2          Provides basic utilities for the filesystem
symfony/finder                                 6.2.0                                  7.1.1          Finds files and directories via an intuitive fluent interface
symfony/http-client                            6.2.0                                  7.1.2          Provides powerful methods to fetch HTTP resources synchronously or as...
symfony/http-client-contracts                  3.1.1                                  3.5.0          Generic abstractions related to HTTP clients
symfony/http-foundation                        6.2.1                                  7.1.1          Defines an object-oriented layer for the HTTP specification
symfony/http-kernel                            6.2.1                                  7.1.2          Provides a structured process for converting a Request into a Response
symfony/mailer                                 6.2.1                                  7.1.2          Helps sending emails
symfony/mime                                   6.2.0                                  7.1.2          Allows manipulating MIME messages
symfony/options-resolver                       6.2.0                                  7.1.1          Provides an improved replacement for the array_replace PHP function
symfony/polyfill-ctype                         1.27.0                                 1.30.0         Symfony polyfill for ctype functions
symfony/polyfill-iconv                         1.27.0                                 1.30.0         Symfony polyfill for the Iconv extension
symfony/polyfill-intl-grapheme                 1.27.0                                 1.30.0         Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-icu                      1.27.0                                 1.30.0         Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-intl-idn                      1.27.0                                 1.30.0         Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer               1.27.0                                 1.30.0         Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring                      1.27.0                                 1.30.0         Symfony polyfill for the Mbstring extension
symfony/polyfill-php72                         1.27.0                                 1.30.0         Symfony polyfill backporting some PHP 7.2+ features to lower PHP vers...
symfony/polyfill-php80                         1.27.0                                 1.30.0         Symfony polyfill backporting some PHP 8.0+ features to lower PHP vers...
symfony/polyfill-php81                         1.27.0                                 1.30.0         Symfony polyfill backporting some PHP 8.1+ features to lower PHP vers...
symfony/polyfill-uuid                          1.27.0                                 1.30.0         Symfony polyfill for uuid functions
symfony/process                                6.2.0                                  7.1.1          Executes commands in sub-processes
symfony/psr-http-message-bridge                2.1.4                                  7.1.1          PSR HTTP message bridge
symfony/routing                                6.2.0                                  7.1.1          Maps an HTTP request to a set of configuration variables
symfony/service-contracts                      3.1.1                                  3.5.0          Generic abstractions related to writing services
symfony/stopwatch                              6.2.0                                  7.1.1          Provides a way to profile code
symfony/string                                 6.2.0                                  7.1.2          Provides an object-oriented API to strings and deals with bytes, UTF-...
symfony/translation                            6.2.0                                  7.1.1          Provides tools to internationalize your application
symfony/translation-contracts                  3.2.0                                  3.5.0          Generic abstractions related to translation
symfony/uid                                    6.2.0                                  7.1.1          Provides an object-oriented API to generate and represent UIDs
symfony/var-dumper                             6.2.1                                  7.1.2          Provides mechanisms for walking through any arbitrary PHP variable
symfony/var-exporter                           6.2.1                                  7.1.2          Allows exporting any serializable PHP data structure to plain PHP code
symfony/yaml                                   6.2.0                                  7.1.1          Loads and dumps YAML files
theseer/tokenizer                              1.2.1                                  1.2.3          A small library for converting tokenized PHP source code into XML and...
tijsverkoyen/css-to-inline-styles              2.2.5                                  2.2.7          CssToInlineStyles is a class that enables you to convert HTML-pages/f...
vlucas/phpdotenv                               5.5.0                                  5.6.0          Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$...
zbateson/mail-mime-parser                      2.2.3                                  3.0.1          MIME email message parser
zbateson/mb-wrapper                            1.1.2                                  2.0.0          Wrapper for mbstring with fallback to iconv for encoding conversion a...
zbateson/stream-decorators                     1.0.7                                  2.1.1          PHP psr7 stream decorators for mime message part streams
panic: reached end of file before reaching end identifier

goroutine 1 [running]:
github.com/gonvenience/bunt.ParseStream.func2(0x7)
	/Users/peterfox/go/pkg/mod/github.com/gonvenience/[email protected]/parse.go:100 +0x94
github.com/gonvenience/bunt.ParseStream.func4()
	/Users/peterfox/go/pkg/mod/github.com/gonvenience/[email protected]/parse.go:172 +0xa4
github.com/gonvenience/bunt.ParseStream({0x10308f5c8?, 0x14000150ae0?}, {0x0, 0x0, 0x140001b01e0?})
	/Users/peterfox/go/pkg/mod/github.com/gonvenience/[email protected]/parse.go:225 +0x3a8
github.com/homeport/termshot/internal/img.(*Scaffold).AddContent(0x14000149aa8, {0x10308f5c8?, 0x14000150ae0?})
	/Users/peterfox/Code/Forks/termshot/internal/img/output.go:118 +0x3c
github.com/homeport/termshot/internal/cmd.init.func1(0x103356400, {0x1400007c340, 0x2, 0x4})
	/Users/peterfox/Code/Forks/termshot/internal/cmd/root.go:120 +0x464
github.com/spf13/cobra.(*Command).execute(0x103356400, {0x140000120b0, 0x4, 0x4})
	/Users/peterfox/go/pkg/mod/github.com/spf13/[email protected]/command.go:985 +0x840
github.com/spf13/cobra.(*Command).ExecuteC(0x103356400)
	/Users/peterfox/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/peterfox/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041
github.com/homeport/termshot/internal/cmd.Execute()
	/Users/peterfox/Code/Forks/termshot/internal/cmd/root.go:161 +0x58
main.main()
	/Users/peterfox/Code/Forks/termshot/cmd/termshot/main.go:26 +0x1c

way to influence image file size

@HeavyWombat suggested looking at termshot in homeport/dyff#264, and I tried running it with the commands I used there. The output is gorgeous, but quite large: The MacOS screenshot was a 30k PNG, and the termshot one was 134k. That's probably just the resolution difference: termshot gave me a 2051 x 1462 image, while I grabbed a 443 x 308 image with the screenshot. termshot seems more efficient per pixel, but maybe an option to reduce the resolution would be handy.

Support for taking stdin or using termshot as a pipe

I'm not too sure if this is possible, though given the following sequence of commands, I think it should be possible code-wise?

Screenshot 2023-11-21 at 02 44 56

Naturally, if I attempt to use - as the command or simply nothing, it just errors, though, given the fact it's still able to take stdin as a command, and correctly produce a screenshot, when provided with any valid executable, seems to point to it just being an error handling thing.

If you can point me to where in the code this kind of thing is handled, I'm more than happy to impl it myself and open a pull request :)

Make output filename configurable

The generated output filename is fixed at the moment and the file will be overwritten if it exists already. Add code to make the name configurable via a command line flag.

Acceptance Criteria: Be able to specify a filename using the CLI, for example:

termshot --output termshot.png -- uptime

Frozen terminal when using `--edit` using last release (0.2.7) in Arch Linux.

Thanks 4 termshot because till today, I just did enlarge the font a lot and did the best screenshot I could to share it with someone.

Works good when doing basic CLI screenshot:

$ termshot --show-cmd -- ls -1

But adding --edit command, editor show content, but stay frozen:

$ termshot --edit --show-cmd -- ls -1

I did try changing editor (vis, nano, busybox vi) with same result:
$ EDITOR=nano termshot --edit --show-cmd -- ls -1 ~/.config/mpv

This is the frozen output (ls -1 ~/.config/mpv):

^[[38;2;0;255;0m...^[[0m ^[[38;2;105;105
input.conf^M
mpv.conf^M
scripts^M
shaders^M
~
~
~
~
~
bad option: number

Then I had to open another terminal to unfrozen it (by killing): pkill termshot

I did try with two terminals, with | without multiplexer, but happens the same:

  • xterm
  • kitty
  • st
  • tmux

I did use:

  • Last binary from: releases
  • Also: brew install homeport/tap/termshot from README.md

Maybe it's the same and will work if I do compilation by myself with last GIT. I'm no programmer and just do AUR compilations, if I get a minimal problem, I'm not able to fix it.

  • But seems strange, that no one else did the Issue.
  • What am I doing wrong?

Software versions:

$ termshot -v
termshot version 0.2.7

$ xterm -v
XTerm(390)

$ st -v
st 0.9

$ kitty -v
kitty 0.31.0 created by Kovid Goyal

$ neofetch distro kernel
distro: Arch Linux x86_64
kernel: 6.1.52-1-lts

Multiple commands in one screenshot?

would be useful to me to be able to specify a series of commands, and see each command/output in sequence in the screenshot

would this be feasible to add? could you direct me to the relevant parts of the code?

Feature request: emojis

Love this project. Would be great if you could add support for basic unicode emojis ๐Ÿ™

Fails with an error on Linux systems

On Linux systems, termshot fails with an IO error:

โ•ญ Error occurred
โ”‚ read /dev/ptmx: input/output error
โ•ต

Based on creack/pty#100, this happens because io.Copy() is reading until io.EOF. However, if the child process is already done it can happen on a Linux system that the parent process is still trying to read.

Content width is exceeding the rounded rectangle x axis

Issue description:

I'm using latest termshot to generate an image based on an ls cmd. I can see that the stdout of my cmd is not fitting into the rounded rectangle but it actually exceeds it(in other words, the list of files and directories is incomplete in the generated image). I unfortunately was not able to understand why, any ideas?

Would be good if you can reproduce this from your side.

Moving cursor left by 500 crashes termshot

Seems like this is an issue with bunt.. I'll report it there too.

panic: strconv.ParseUint: parsing "500": value out of range

goroutine 1 [running]:
github.com/gonvenience/bunt.ParseStream.func3({0xc00020c0d0?, 0x0?})
        github.com/gonvenience/[email protected]/parse.go:112 +0x48
github.com/gonvenience/bunt.ParseStream.func4()
        github.com/gonvenience/[email protected]/parse.go:142 +0x148
github.com/gonvenience/bunt.ParseStream({0x6ce1a8?, 0xc0000f6bd0?}, {0x0, 0x0, 0xc000224000?})
        github.com/gonvenience/[email protected]/parse.go:225 +0x4e2
github.com/homeport/termshot/internal/img.(*Scaffold).AddContent(0xc000687bd0, {0x6ce1a8?, 0xc0000f6bd0?})
        github.com/homeport/termshot/internal/img/output.go:116 +0x39
github.com/homeport/termshot/internal/cmd.glob..func1(0x960900?, {0xc0000f6b70?, 0x1, 0x3})
        github.com/homeport/termshot/internal/cmd/root.go:115 +0x4d0
github.com/spf13/cobra.(*Command).execute(0x960900, {0xc000010090, 0x3, 0x3})
        github.com/spf13/[email protected]/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x960900)
        github.com/spf13/[email protected]/command.go:1040 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/[email protected]/command.go:968
github.com/homeport/termshot/internal/cmd.Execute()
        github.com/homeport/termshot/internal/cmd/root.go:144 +0x67
main.main()
        ./main.go:26 +0x17

How to save contents to clipboard instead of path

Is it possible to save the contents of your termshot to clipboard instead of file?

I'm using MacOS Ventura which has pbcopy/pbpaste. Would it work if you can pass the output to STOUT?

Command would look something like
termshot --<COMMAND FOR CLIPBOARD> --- ls .

panic: reached end of file before reaching end identifier

I'm trying to use termshot to capture Nushell output, and it panics.

โฏ ./result/bin/termshot nu

โฏ ls
โ•ญโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  # โ”‚          name          โ”‚  type   โ”‚  size  โ”‚   modified    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  0 โ”‚ CONTRIBUTING.md        โ”‚ file    โ”‚ 8.4 KB โ”‚ 8 hours ago   โ”‚
โ”‚  1 โ”‚ COPYING                โ”‚ file    โ”‚ 1.1 KB โ”‚ 8 hours ago   โ”‚
โ”‚  2 โ”‚ README.md              โ”‚ file    โ”‚ 6.2 KB โ”‚ 2 months ago  โ”‚
โ”‚  3 โ”‚ default.nix            โ”‚ file    โ”‚  971 B โ”‚ a year ago    โ”‚
โ”‚  4 โ”‚ doc                    โ”‚ dir     โ”‚   23 B โ”‚ 8 hours ago   โ”‚
โ”‚  5 โ”‚ flake.nix              โ”‚ file    โ”‚ 2.3 KB โ”‚ 2 months ago  โ”‚
โ”‚  6 โ”‚ lib                    โ”‚ dir     โ”‚   34 B โ”‚ 8 hours ago   โ”‚
โ”‚  7 โ”‚ maintainers            โ”‚ dir     โ”‚    5 B โ”‚ 8 hours ago   โ”‚
โ”‚  8 โ”‚ nixos                  โ”‚ dir     โ”‚   13 B โ”‚ 8 hours ago   โ”‚
โ”‚  9 โ”‚ pkgs                   โ”‚ dir     โ”‚   18 B โ”‚ a year ago    โ”‚
โ”‚ 10 โ”‚ result                 โ”‚ symlink โ”‚   58 B โ”‚ 5 minutes ago โ”‚
โ”‚ 11 โ”‚ update-git-commits.txt โ”‚ file    โ”‚  740 B โ”‚ 2 months ago  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

โฏ exit
panic: reached end of file before reaching end identifier

goroutine 1 [running]:
github.com/gonvenience/bunt.ParseStream.func2(0x7)
	github.com/gonvenience/[email protected]/parse.go:100 +0x88
github.com/gonvenience/bunt.ParseStream.func4()
	github.com/gonvenience/[email protected]/parse.go:172 +0xb8
github.com/gonvenience/bunt.ParseStream({0x6db758?, 0xc00018eb70?}, {0x0, 0x0, 0xc0001e7000?})
	github.com/gonvenience/[email protected]/parse.go:225 +0x4ed
github.com/homeport/termshot/internal/img.(*Scaffold).AddContent(0xc000181bd0, {0x6db758?, 0xc00018eb70?})
	github.com/homeport/termshot/internal/img/output.go:116 +0x39
github.com/homeport/termshot/internal/cmd.glob..func1(0x9778e0?, {0xc0000b33d0?, 0x1, 0x1})
	github.com/homeport/termshot/internal/cmd/root.go:115 +0x4d0
github.com/spf13/cobra.(*Command).execute(0x9778e0, {0xc000016050, 0x1, 0x1})
	github.com/spf13/[email protected]/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x9778e0)
	github.com/spf13/[email protected]/command.go:1040 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:968
github.com/homeport/termshot/internal/cmd.Execute()
	github.com/homeport/termshot/internal/cmd/root.go:144 +0x67
main.main()
	github.com/homeport/termshot/cmd/termshot/main.go:26 +0x17

โฏ

This is with v0.2.5 of termshot.

Termshot does not preserve colors

Idea:

This might be a no-op, quickly adding this for now.

When I do a git status and git highlights in RED new files, that color is not preserved if I do a termshot -i "git status"

Add highlight flag

Idea: Add a flag to configure text that is later highlighted in the output. It could be encircled with a red oval, or some kind or arrow is used, or simply text color is added. Options could include from highlighting only piece of text or the entire line.

Add `--output` flag

Hi, great work,

Have you consider adding an --output flag so the filename is not defaulting to out.png

Feature: Light mode

Would be nice to have a light mode when generating the image.

Use case is that our CLI program has both a dark and light mode, and we would like to preview both using termshot.

Mockup of how I envision it (super simple):

example


Edit: Sorry, just realized that this is a potential duplicate of #80

Font selection

Add an option to select the desired font.

Description

As far as I can tell, the font is hardcoded to "Hack", which does not support all of unicode.
The user should be able to select a font on their system, so as to use whatever patched font they fancy.

This would probably fix both #1 and #60

`panic: move cursor value is out of bounds` after any command with ANSI escape sequences

I get the following panic when trying to use termshot -- pfetch and termshot -- "./simple-go-cli-program", the latter just prints plain text, it's a tiny go program I wrote to test.

I think this has to do with color handling in my terminal? Though, I'm not sure why my Go program (only using log.Printf) would have any color escapes in the output.

panic: move cursor value is out of bounds

goroutine 1 [running]:
github.com/gonvenience/bunt.ParseStream.func4()
	github.com/gonvenience/[email protected]/parse.go:144 +0x1a8
github.com/gonvenience/bunt.ParseStream({0x102456738?, 0x1400016ac00?}, {0x0, 0x0, 0x1400033f000?})
	github.com/gonvenience/[email protected]/parse.go:225 +0x3b0
github.com/homeport/termshot/internal/img.(*Scaffold).AddContent(0x14000123bb8, {0x102456738?, 0x1400016ac00?})
	github.com/homeport/termshot/internal/img/output.go:118 +0x3c
github.com/homeport/termshot/internal/cmd.glob..func1(0x1026eca80?, {0x1400016aba0?, 0x1, 0x3})
	github.com/homeport/termshot/internal/cmd/root.go:120 +0x39c
github.com/spf13/cobra.(*Command).execute(0x1026eca80, {0x14000132050, 0x3, 0x3})
	github.com/spf13/[email protected]/command.go:940 +0x5c8
github.com/spf13/cobra.(*Command).ExecuteC(0x1026eca80)
	github.com/spf13/[email protected]/command.go:1068 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:992
github.com/homeport/termshot/internal/cmd.Execute()
	github.com/homeport/termshot/internal/cmd/root.go:162 +0x64
main.main()
	./main.go:26 +0x1c

Using the following answer from StackoverFlow with pfetch does indeed work as expected, though without and color or formatting.

Terminal info:
out

If there's any other info I can help provide, please let me know.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.