digitalmars.D.announce - textattr library for text colors and attributes available in D
- Shriramana Sharma (11/11) Nov 08 2018 https://github.com/jamadagni/textattr/
- Bastiaan Veelo (4/15) Nov 08 2018 Cool, must remember this in case I need it one day. Do you have
- Shriramana Sharma (6/8) Nov 08 2018 Don't know how. Can follow instructions if provided. Does DUB
- JN (7/15) Nov 09 2018 You can find the instructions on how to create a dub package
- Shriramana Sharma (3/6) Nov 22 2018 Yes indeed textattr.d is all that is needed! For C too
- Basile B. (15/26) Nov 23 2018 i was thinking to something like this the other day:
https://github.com/jamadagni/textattr/ textattr is a library and command-line tool that makes adding color and attributes to beautify the terminal output of your program easier by translating human-readable specs into ANSI escape codes. The library is available for C, C++, Python and D. C++ and Python use the C code for internal processing but the D code is a separate implementation for easy inclusion of textattr.d in a D compilation command without requiring any external linking. Copyright: Shriramana Sharma, 2018 License: BSD-2-Clause
Nov 08 2018
On Thursday, 8 November 2018 at 13:37:08 UTC, Shriramana Sharma wrote:https://github.com/jamadagni/textattr/ textattr is a library and command-line tool that makes adding color and attributes to beautify the terminal output of your program easier by translating human-readable specs into ANSI escape codes. The library is available for C, C++, Python and D. C++ and Python use the C code for internal processing but the D code is a separate implementation for easy inclusion of textattr.d in a D compilation command without requiring any external linking. Copyright: Shriramana Sharma, 2018 License: BSD-2-ClauseCool, must remember this in case I need it one day. Do you have plans to add it to the dub registry?
Nov 08 2018
On Thursday, 8 November 2018 at 19:26:15 UTC, Bastiaan Veelo wrote:Cool, must remember this in case I need it one day. Do you have plans to add it to the dub registry?Don't know how. Can follow instructions if provided. Does DUB also allow multi-language libs one of which is D? Unfortunately my D usage isn't as much as I'd like it to be so haven't kept up so closely…
Nov 08 2018
On Friday, 9 November 2018 at 03:02:01 UTC, Shriramana Sharma wrote:On Thursday, 8 November 2018 at 19:26:15 UTC, Bastiaan Veelo wrote:You can find the instructions on how to create a dub package here: http://code.dlang.org/publish It looks to me like the textattr.d is all that is needed? Should be easy to put it in a separate package that could be uploaded to dub registry.Cool, must remember this in case I need it one day. Do you have plans to add it to the dub registry?Don't know how. Can follow instructions if provided. Does DUB also allow multi-language libs one of which is D? Unfortunately my D usage isn't as much as I'd like it to be so haven't kept up so closely…
Nov 09 2018
On Friday, 9 November 2018 at 22:28:28 UTC, JN wrote:It looks to me like the textattr.d is all that is needed? Should be easy to put it in a separate package that could be uploaded to dub registry.Yes indeed textattr.d is all that is needed! For C too textattr.c|h are all that are needed.
Nov 22 2018
On Thursday, 8 November 2018 at 13:37:08 UTC, Shriramana Sharma wrote:https://github.com/jamadagni/textattr/ textattr is a library and command-line tool that makes adding color and attributes to beautify the terminal output of your program easier by translating human-readable specs into ANSI escape codes. The library is available for C, C++, Python and D. C++ and Python use the C code for internal processing but the D code is a separate implementation for easy inclusion of textattr.d in a D compilation command without requiring any external linking. Copyright: Shriramana Sharma, 2018 License: BSD-2-Clausei was thinking to something like this the other day: struct ColoredText(int color) { string payload; alias payload this; } with a writeln() like function that check if the args are template instances of ColoredText. or even more versatile: Color!Blue string b1, b2; Color!Red string r1, r2; Color!Green int i1, i2; with a writeln() like function that inspects the UDA or the args.
Nov 23 2018