GithubHelp home page GithubHelp logo

scottrhoyt / swiftytexttable Goto Github PK

View Code? Open in Web Editor NEW
305.0 9.0 29.0 377 KB

A lightweight library for generating text tables.

License: MIT License

Objective-C 1.55% Swift 79.43% Shell 1.95% Ruby 17.08%
swift linux command-line tabular-data macos swift-package-manager carthage cocoapods

swiftytexttable's People

Contributors

eneko avatar jpsim avatar norio-nomura avatar roslund avatar scottrhoyt 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  avatar  avatar  avatar

swiftytexttable's Issues

Multi-Byte Unicode Characters not counted correctly

I found that multi-byte unicode characters are counted incorrectly resulting in wrong column widths:

+----------------------------------------+-------------+-----------------+
| FILENAME                               | STATUS      | TIMESTAMP       |
+----------------------------------------+-------------+-----------------+
| 234212640FW20_0716_C_FRONT_WHL_096.jpg | ❇️ DELIVERED | 17.06.20, 01:57 |
| 230257732FW20_0013_C_FRONT_BLL_019.jpg | ❇️ DELIVERED | 22.06.20, 19:54 |
| 230306780BLAA_038.jpg                  | ❇️ DELIVERED | 16.06.20, 12:00 |
| 230306780FW20_0290_C_FRONT_BKER.jpg    | ❇️ DELIVERED | 17.06.20, 01:58 |
+----------------------------------------+-------------+-----------------+

Right alignment?

All the values are left aligned. Does it support right alignment?

Thanks!

Swift 4.2 Carthage

I'm trying to use SwiftyTextTable using Carthage on macOS Mojave, with Xcode 10 that uses Swift 4.2, and I'm getting the following error:

*** Cloning SwiftyTextTable
*** Checking out SwiftyTextTable at "0.8.2"
*** xcodebuild output can be found in /var/folders/9t/kjmwgng518vcjnczl_0j9h780000gn/T/carthage-xcodebuild.R3VNUw.log
*** Downloading SwiftyTextTable.framework binary at "0.8.2"
***  Skipped installing SwiftyTextTable.framework binary due to the error:
	"Incompatible Swift version - framework was built with 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2) and the local version is 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)."

    Falling back to building from the source
*** Building scheme "SwiftyTextTable" in SwiftyTextTable.xcodeproj

Carthage failing on CI builds (Xcode 9.4 required)

Just noticed CI builds failing on Travis CI because of Carthage now requiring Xcode 9.4.

Carthage installed. Upgrading if neccessary.
carthage (0.25.0) < 0.31.1
==> Upgrading 1 outdated package:
carthage 0.25.0 -> 0.31.1
carthage: A full installation of Xcode.app 9.4 is required to compile this software.
Installing just the Command Line Tools is not sufficient.
Xcode 9.4 cannot be installed on macOS 10.12.
You must upgrade your version of macOS.
Error: carthage: An unsatisfied requirement failed this build.
The command "./scripts/upstall-carthage.sh" failed and exited with 1 during .

I believe this would be fixed by requiring Xcode 9.4 on the .travis.yml file. @scottrhoyt let me know your thoughts, I can submit a PR for that.

Updated Version

Hi Team,

Is there any support available for this library.Any upcoming releases planned?

Improve support for escape sequences to support Rainbow.

Hi, just stumbled across SwiftyTextTable and wanted to use it for a project. Thanks for building it!

Unfortunately it seems SwiftTextTable is unable to calculate the correct size for a column when trying to apply additional information to the strings via something like onevcat/Rainbow.

I'm getting this for example when applying the color red to the string foo:

+--------------+-----+-----+
| foo | bar | baz |
+--------------+-----+-----+
| 1            | 2   | 3   |
| 11           |     | 33  |
| 111          | 222 | 333 |
+--------------+-----+-----+

I'm guessing it's because of this, seeing how color information in the terminal is represented through escape sequences that are counted as additional length in this case. Is there any way one could work around this?

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.