colofabrix / figlet4s Goto Github PK
View Code? Open in Web Editor NEWASCII-art banners in Scala
License: MIT License
ASCII-art banners in Scala
License: MIT License
As a user of the figlet4s library I would like to use different types of vertical layouts as the original figlet does.
When wrapping lines figlet can align the next line in different way in a similar way as he places one character after the other. Support the same layout as the original figlet command line does.
The core algorithm should suffice, however, at the moment, is specialized for left-to-right horizontal appending of characters.
See the figlet man page: https://linux.die.net/man/6/figlet
As a user of the figlet library I would like to use the Validated
applicative to handle figlet errors or, at worse, add support for my own effect.
I would like figlet to have a package that wraps results in Validated
and a package that directly exposes the generic effect F[_]
.
Add two new packages in the figlet4s-effects
project, one for Validated
and one for generic and use the existing packages as starting point to implement this feature.
On a different thought this might require a rethink of the structure of the packages because, like it is now, when importing the effects library a whole lot of unwanted dependencies can be added. I.e. if I want to use support for Either I'm forced to depend on Cats. Do not proceed before taking a decision with this.
For small, self-contained library like figlet4s I believe in the "battery included" approach and easy integration. For this reason I don't want users to fiddle with conversions to and from effects that they are not currently using in their library and this is why I want to add support for the most common and reasonable effect in the Scala ecosystem.
As a user of the terminal I would like to use figlet4s not only as a Scala library but also from the command line.
I would like the command line interface to be similar to the original figlet implmentation so that I don't have to learn a different way of doing the same things (this is the man page for figlet: https://linux.die.net/man/6/figlet).
I would like that terminal Figlet4s behaves like a Unix filter so I can use it as part of bigger programs.
I would like to not invoke scala directly (i.e. not using scala -cp classes figlet4s....
but I want to run it as a standard executable file. A simple way of doing this can be seen in this page: https://coderwall.com/p/ssuaxa/how-to-make-a-jar-file-linux-executable
I would like errors to be displayed nicely, when possible, instead of an uncomprehensible mess of geek lingo.
If figlet4s doesn't yet support a feature that figlet does and this feature is in the backlog, add the command line option anyway and print out a message that says the feature is not available.
Consider compiling for https://github.com/scala-native/scala-native (investigate the details of the project first)
Figlet4s is a "battery included" library and it already ships with many internal fonts but many more are freely available online. Top up the internal fonts shipped with Figlet4s.
There are a number of places where more fonts can be found:
Figlet4s includes rendering tests for all the fonts in the library. All the new fonts must pass the test. Some of them might not for several reasons: they might be corrupt, designed badly, they might use undocumented features. Depending on the nature of the problem a case can be made to include the font in the library but skip the testing.
P.S. Pay attention to the encoding of the original font so that they are rendered the same way
Upgrade figlet4s to use cats-effects 3 and release it as a new minor release
Using GitHub Actions, create an automated release system that:
I found this can be done in a variety of way but I haven't settled yet on the best/easier:
The API documentation should be published in GitHub Pages, together with the docsite.
At the moment there is a direct link to the JAR in sonatype with a hard-coded version, plus it's very slow to open and work with. Move away from this temporary solution.
Create and automated GitHub Action to build and publish the documentation at every release (check if this is possible).
Remove the manual managemnt of compiler flags and use sbt-tpolecat.
This will also help in migrating to Scala 3
As a user of the figlet4s library I would like to have support for justification, which is the ability to align my text left, center, or right.
The original command line figlet allows users to align their text inside the defined max width, either left, center, right or use the default of the font.
Figlet4s already has the data structures required to support justification but doesn't implement the algorithm yet.
See the figlet man page: https://linux.die.net/man/6/figlet
Create and publish a docsite for the project to be hosted in GitHub Pages.
The final result has to:
I saw there are several ways this can be done with sbt plugins in different formats. I generally like the stile of docsites like Cats and Circe. Find out what technology they use and apply the same.
Create an automated GitHub Action to build and publish the docsite at every release (check if this is possible).
Scala is clearly moving towards the next version and Figlet4s wants to be an up to date library.
Do a spike for to investigate the effort required to support Scala 3 and produce a PoC. Consider using 2.13 libraries for Scala 3 too.
If the PoC is succesfully and the effort required it not too big (i.e. a week for production ready), extend the PoC to full feature.
Figlet4s needs to also support Scala 2.12 and 2.13 at the moment of writing
Core libraries
Testing
SBT plugins
Compiler
The microsite is built the wrong version of the library (now it's 0.0.0
) so links and package dependencies are wrong
I guess there is something wrong with GitHub Actions + sbt dynver plugin
Currently many parts of the code are not tested, specifically font loading checks but other things too.
Using scoverage look what's missing and add tests for the most important parts (i.e. test that a constraint is respected but don't teste that a println function works).
This can also mean removing unused code (scoverage can report unused code) if it really not needed, not even for a future release.
As a user of the figlet4s library I would like to have support for print direction, which is the ability to print the text left-to-right (as per usual western writing) or right-to-left.
Here are the example of what that means.
Left-to-right:
_ _ ____ _
/ \ | |__ / ___|__| |
/ _ \ | '_ \| | / _` |
/ ___ \| |_) | |__| (_| |
/_/ \_\_.__/ \____\__,_|
Right-to-left:
_ ____ _ _
__| |/ ___| |__ / \
/ _` | | | '_ \ / _ \
| (_| | |___| |_) / ___ \
\__,_|\____|_.__/_/ \_\
The original command line figlet allows users to print their text left-to-right, right-to-left or use the default setting for the font.
Figlet4s already has the data structures required to support print direction but doesn't implement the algorithm yet.
See the figlet man page: https://linux.die.net/man/6/figlet
As a Java developer I would like to use Figlet4s in my library because there are only a few Java figlet libraries and they all lack some basic functionalities of figlet that I like.
I also don't want to worry about Java-Scala interoperability, I want to import the package of figlet4s and start using it without any "magic" or "workarounds".
Scala code should already be interoperable with Java and there are several guides on how do to it but there are a couple of points that I'm not sure about.
Figlet4s uses heavily extension methods and I'm concerned that this can break Java compatibility. This should be tested to see if figlet4s works out of the box.
If there are issues I think the best approach would be to create a new package figlet4s-java
that only Java developers will import and that tries to hide as many compatibility issues as possible.
Thank you so much for fixing #20. Internal font loading works correctly when using "/" path separator (i.e. "c64/platoon2"
), however the internal font list still returns paths with the windows path separator (\
).
OS type and version: Windows 10 21H1
JVM type and version: 11.0.13
Scala version: 2.12.13
Figlet4s version: 0.3.1
> println(Figlet4s.internalFonts)
Vector(1row, 3-d, 3x5, 4max, 5lineoblique, B1FF, acrobatic, alligator, alligator2, alligator3, alpha, alphabet, amc3line, amc3liv1, amcaaa01, amcneko, amcrazo2, amcrazor, amcslash, amcslder, amcthin, amctubes, amcun1, arrows, avatar, banner, banner3-D, banner3, banner4, barbwire, basic, bell, benjamin, big, bigchief, bigfig, binary, block, bolger, bright, broadway, bubble, bulbhead, c64\1943____, c64\4x4_offr, c64\64f1____, c64\a_zooloo, c64\advenger, c64\aquaplan, c64\asc_____, c64\ascii___, c64\assalt_m, c64\asslt__m, c64\atc_____, c64\atc_gran, c64\b_m__200, c64\battle_s, c64\battlesh, c64\baz__bil, c64\beer_pub, c64\bubble__, c64\bubble_b, c64\c1______, c64\c2______, c64\c_ascii_, c64\c_consen, c64\caus_in_, c64\char1___, c64\char2___, c64\char3___, c64\char4___, c64\charact1, c64\charact2, c64\charact3, c64\charact4, c64\charact5, c64\charact6, c64\characte, c64\charset_, c64\coil_cop, c64\com_sen_, c64\computer, c64\convoy__, c64\d_dragon, c64\dcs_bfmo, c64\deep_str, c64\demo_1__, c64\demo_2__, c64\demo_m__, c64\devilish, c64\druid___, c64\e__fist_, c64\ebbs_1__, c64\ebbs_2__, c64\eca_____, c64\etcrvs__, c64\f15_____, c64\faces_of, c64\fair_mea, c64\fairligh, c64\fantasy_, c64\fbr12___, c64\fbr1____, c64\fbr2____, c64\fbr_stri, c64\fbr_tilt, c64\finalass, c64\fireing_, c64\flyn_sh, c64\fp1_____, c64\fp2_____, c64\funky_dr, c64\future_1, c64\future_2, c64\future_3, c64\future_4, c64\future_5, c64\future_6, c64\future_7, c64\future_8, c64\gauntlet, c64\ghost_bo, c64\gothic, c64\gothic__, c64\grand_pr, c64\green_be, c64\hades___, c64\heavy_me, c64\heroboti, c64\high_noo, c64\hills___, c64\home_pak, c64\house_of, c64\hypa_bal, c64\hyper___, c64\inc_raw_, c64\italics_, c64\joust___, c64\kgames_i, c64\kik_star, c64\krak_out, c64\lazy_jon, c64\letter_w, c64\letterw3, c64\lexible_, c64\mad_nurs, c64\magic_ma, c64\master_o, c64\mayhem_d, c64\mcg_____, c64\mig_ally, c64\modern__, c64\new_asci, c64\nfi1____, c64\notie_ca, c64\npn_____, c64\odel_lak, c64\ok_beer_, c64\out
run__, c64\p_s_h_m_, c64\p_skateb, c64\pacos_pe, c64\panther_, c64\pawn_ins, c64\phonix__, c64\platoon2, c64\platoon_, c64\pod_____, c64\r2-d2___, c64\rad_____, c64\rad_phan, c64\radical_, c64\rainbow_, c64\rally_s2, c64\rally_sp, c64\rampage_, c64\rastan__, c64\raw_recu, c64\rci_____, c64\ripper!_, c64\road_rai, c64\rockbox_, c64\rok_____, c64\roman, c64\roman___, c64\script__, c64\skate_ro, c64\skateord, c64\skateroc, c64\sketch_s, c64\sm______, c64\space_op, c64\spc_demo, c64\star_war, c64\stealth_, c64\stencil1, c64\stencil2, c64\street_s, c64\subteran, c64\super_te, c64\t__of_ap, c64\tav1____, c64\taxi____, c64\tec1____, c64\tec_7000, c64\tecrvs__, c64\ti_pan__, c64\timesofl, c64\tomahawk, c64\top_duck, c64\trashman, c64\triad_st, c64\ts1_____, c64\tsm_____, c64\tsn_base, c64\twin_cob, c64\type_set, c64\ucf_fan_, c64\ugalympi, c64\unarmed_, c64\usa_____, c64\usa_pq__, c64\vortron_, c64\war_of_w, c64\yie-ar__, c64\yie_ar_k, c64\z-pilot_, c64\zig_zag_, c64\zone7___, calgphy2, caligraphy, catwalk, chunky, coinstak, colossal, computer, contessa, contrast, cosmic, cosmike, crawford, cricket, cyberlarge, cybermedium, cybersmall, decimal, diamond, digital, doh, doom, dosrebel, dotmatrix, double, drpepper, eftichess, eftifont, eftipiti, eftirobot, eftitalic, eftiwall, eftiwater, epic, fender, fourtops, fraktur, fuzzy, goofy, gothic, gradient, graffiti, greek, henry3d, hex, hollywood, invita, isometric1, isometric2, isometric3, isometric4, italic, ivrit, jacky, jazmine, jerusalem, katakana, kban, keyboard, larry3d, lcd, lean, letters, linux, lockergnome, madrid, marquee, maxfour, mike, mini, mirror, mnemonic, morse, moscow, nancyj-fancy, nancyj-improved, nancyj-underlined, nancyj, nipples, nscript, ntgreek, o8, octal, ogre, oldbanner, os2, pawp, peaks, peaksslant, pebbles, pepper, poison, puffy, rectangles, redphoenix, relief, relief2, reverse, roman, rot13, rounded, rowancap, rozzo, runic, s-relief, santaclara, sblood, script, serifcap, shadow, shimrod, short, slant, slide, slscript, small, smisome1, smkeyboard, smpoison, smscript, smshadow, smslant, smtengwar, speed, stacey, stampate, stampatello, standard, starwars, stellar, stop, straight, sub-zero, tanja, tengwar, term, thick, thin, threepoint, ticks, ticksslant, tiles, tinker-toy, tombstone, trek, tsalagi, tubular, twopoint, univers, usaflag, weird, whimsy)
Needless to say, using C64 fonts from the internal lists as-is fails:
val text = "hello, world!"
val font = Figlet4s.internalFonts.find(_.startsWith("c64")).get
println(font)
val banner = Figlet4s.builder(text).withInternalFont(font).render().asString()
This fails witth:
[info] running Test
c64\1943____
[error] (run-main-d) com.colofabrix.scala.figlet4s.errors$FigletLoadingError
[error] com.colofabrix.scala.figlet4s.errors$FigletLoadingError
[error] at com.colofabrix.scala.figlet4s.errors$FigletLoadingError$.apply(errors.scala:69)
[error] at com.colofabrix.scala.figlet4s.core.Braket$.withResource(Braket.scala:28)
[error] at com.colofabrix.scala.figlet4s.core.FontFileReader$.readInternal(FontFileReader.scala:27)
[error] at com.colofabrix.scala.figlet4s.core.Figlet4sClient$.$anonfun$loadFontInternal$2(Figlet4sClient.scala:48)
[error] at cats.package$$anon$1.flatMap(package.scala:73)
[error] at com.colofabrix.scala.figlet4s.unsafe.package$$anon$1.flatMap(package.scala:69)
[error] at cats.FlatMap$Ops.flatMap(FlatMap.scala:229)
[error] at cats.FlatMap$Ops.flatMap$(FlatMap.scala:229)
[error] at cats.FlatMap$ToFlatMapOps$$anon$2.flatMap(FlatMap.scala:243)
[error] at com.colofabrix.scala.figlet4s.core.Figlet4sClient$.$anonfun$loadFontInternal$1(Figlet4sClient.scala:47)
[error] at cats.package$$anon$1.flatMap(package.scala:73)
[error] at com.colofabrix.scala.figlet4s.unsafe.package$$anon$1.flatMap(package.scala:69)
[error] at cats.FlatMap$Ops.flatMap(FlatMap.scala:229)
[error] at cats.FlatMap$Ops.flatMap$(FlatMap.scala:229)
[error] at cats.FlatMap$ToFlatMapOps$$anon$2.flatMap(FlatMap.scala:243)
[error] at com.colofabrix.scala.figlet4s.core.Figlet4sClient$.loadFontInternal(Figlet4sClient.scala:46)
[error] at com.colofabrix.scala.figlet4s.options.OptionsBuilder$$anonfun$compileFonts$1.applyOrElse(OptionsBuilder.scala:245)
[error] at com.colofabrix.scala.figlet4s.options.OptionsBuilder$$anonfun$compileFonts$1.applyOrElse(OptionsBuilder.scala:225)
[error] at scala.PartialFunction$OrElse.apply(PartialFunction.scala:172)
[error] at scala.Function$.$anonfun$untupled$1(Function.scala:110)
[error] at cats.instances.ListInstances$$anon$1.step$1(list.scala:153)
[error] at cats.instances.ListInstances$$anon$1.$anonfun$foldM$2(list.scala:158)
[error] at cats.package$$anon$1.tailRecM(package.scala:76)
[error] at com.colofabrix.scala.figlet4s.unsafe.package$$anon$1.tailRecM(package.scala:72)
[error] at cats.instances.ListInstances$$anon$1.foldM(list.scala:158)
[error] at cats.instances.ListInstances$$anon$1.foldM(list.scala:17)
[error] at cats.Foldable$Ops.foldM(Foldable.scala:975)
[error] at cats.Foldable$Ops.foldM$(Foldable.scala:974)
[error] at cats.Foldable$ToFoldableOps$$anon$6.foldM(Foldable.scala:1008)
[error] at com.colofabrix.scala.figlet4s.options.OptionsBuilder$.compile(OptionsBuilder.scala:206)
[error] at com.colofabrix.scala.figlet4s.options.OptionsBuilder.compile(OptionsBuilder.scala:163)
[error] at com.colofabrix.scala.figlet4s.unsafe.OptionsBuilderMixin$OptionsBuilderOps.buildOptions$lzycompute(OptionsBuilderMixin.scala:15)
[error] at com.colofabrix.scala.figlet4s.unsafe.OptionsBuilderMixin$OptionsBuilderOps.buildOptions(OptionsBuilderMixin.scala:15)
[error] at com.colofabrix.scala.figlet4s.unsafe.OptionsBuilderMixin$OptionsBuilderOps.render(OptionsBuilderMixin.scala:32)
[error] at Test$.delayedEndpoint$Test$1(Test.scala:27)
[error] at Test$delayedInit$body.apply(Test.scala:8)
[error] at scala.Function0.apply$mcV$sp(Function0.scala:39)
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:39)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
[error] at scala.App.$anonfun$main$1$adapted(App.scala:80)
[error] at scala.collection.immutable.List.foreach(List.scala:431)
[error] at scala.App.main(App.scala:80)
[error] at scala.App.main$(App.scala:78)
[error] at Test$.main(Test.scala:8)
[error] at Test.main(Test.scala)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error] Caused by: java.lang.NullPointerException
[error] at java.base/java.io.Reader.<init>(Reader.java:167)
[error] at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:125)
[error] at scala.io.BufferedSource.reader(BufferedSource.scala:26)
[error] at scala.io.BufferedSource.bufferedReader(BufferedSource.scala:27)
[error] at com.colofabrix.scala.figlet4s.core.FontFileReader$.tapSource(FontFileReader.scala:43)
[error] at com.colofabrix.scala.figlet4s.core.FontFileReader$.$anonfun$readInternal$1(FontFileReader.scala:27)
[error] at com.colofabrix.scala.figlet4s.core.Braket$.withResource(Braket.scala:24)
[error] at com.colofabrix.scala.figlet4s.core.FontFileReader$.readInternal(FontFileReader.scala:27)
[error] at com.colofabrix.scala.figlet4s.core.Figlet4sClient$.$anonfun$loadFontInternal$2(Figlet4sClient.scala:48)
[error] at cats.package$$anon$1.flatMap(package.scala:73)
[error] at com.colofabrix.scala.figlet4s.unsafe.package$$anon$1.flatMap(package.scala:69)
[error] at cats.FlatMap$Ops.flatMap(FlatMap.scala:229)
[error] at cats.FlatMap$Ops.flatMap$(FlatMap.scala:229)
[error] at cats.FlatMap$ToFlatMapOps$$anon$2.flatMap(FlatMap.scala:243)
[error] at com.colofabrix.scala.figlet4s.core.Figlet4sClient$.$anonfun$loadFontInternal$1(Figlet4sClient.scala:47)
[error] at cats.package$$anon$1.flatMap(package.scala:73)
[error] at com.colofabrix.scala.figlet4s.unsafe.package$$anon$1.flatMap(package.scala:69)
[error] at cats.FlatMap$Ops.flatMap(FlatMap.scala:229)
[error] at cats.FlatMap$Ops.flatMap$(FlatMap.scala:229)
[error] at cats.FlatMap$ToFlatMapOps$$anon$2.flatMap(FlatMap.scala:243)
[error] at com.colofabrix.scala.figlet4s.core.Figlet4sClient$.loadFontInternal(Figlet4sClient.scala:46)
[error] at com.colofabrix.scala.figlet4s.options.OptionsBuilder$$anonfun$compileFonts$1.applyOrElse(OptionsBuilder.scala:245)
[error] at com.colofabrix.scala.figlet4s.options.OptionsBuilder$$anonfun$compileFonts$1.applyOrElse(OptionsBuilder.scala:225)
[error] at scala.PartialFunction$OrElse.apply(PartialFunction.scala:172)
[error] at scala.Function$.$anonfun$untupled$1(Function.scala:110)
[error] at cats.instances.ListInstances$$anon$1.step$1(list.scala:153)
[error] at cats.instances.ListInstances$$anon$1.$anonfun$foldM$2(list.scala:158)
[error] at cats.package$$anon$1.tailRecM(package.scala:76)
[error] at com.colofabrix.scala.figlet4s.unsafe.package$$anon$1.tailRecM(package.scala:72)
[error] at cats.instances.ListInstances$$anon$1.foldM(list.scala:158)
[error] at cats.instances.ListInstances$$anon$1.foldM(list.scala:17)
[error] at cats.Foldable$Ops.foldM(Foldable.scala:975)
[error] at cats.Foldable$Ops.foldM$(Foldable.scala:974)
[error] at cats.Foldable$ToFoldableOps$$anon$6.foldM(Foldable.scala:1008)
[error] at com.colofabrix.scala.figlet4s.options.OptionsBuilder$.compile(OptionsBuilder.scala:206)
[error] at com.colofabrix.scala.figlet4s.options.OptionsBuilder.compile(OptionsBuilder.scala:163)
[error] at com.colofabrix.scala.figlet4s.unsafe.OptionsBuilderMixin$OptionsBuilderOps.buildOptions$lzycompute(OptionsBuilderMixin.scala:15)
[error] at com.colofabrix.scala.figlet4s.unsafe.OptionsBuilderMixin$OptionsBuilderOps.buildOptions(OptionsBuilderMixin.scala:15)
[error] at com.colofabrix.scala.figlet4s.unsafe.OptionsBuilderMixin$OptionsBuilderOps.render(OptionsBuilderMixin.scala:32)
[error] at Test$.delayedEndpoint$Test$1(Test.scala:27)
[error] at Test$delayedInit$body.apply(Test.scala:8)
[error] at scala.Function0.apply$mcV$sp(Function0.scala:39)
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:39)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
[error] at scala.App.$anonfun$main$1$adapted(App.scala:80)
[error] at scala.collection.immutable.List.foreach(List.scala:431)
[error] at scala.App.main(App.scala:80)
[error] at scala.App.main$(App.scala:78)
[error] at Test$.main(Test.scala:8)
[error] at Test.main(Test.scala)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
As I wrote in #20, resources always use /
path separator, regardless of the OS path separators, thus treating resource paths as Path object is little erroneous. At the very list you'll want to do something like this in the end: .replaceAll(File.pathSeparator, "/")
.
OS type and version: Windows 10 21H1
JVM type and version: 11.0.13
Scala version: 2.12.13
Figlet4s version: 0.3.0
Consider the following simple test app:
import com.colofabrix.scala.figlet4s.unsafe._
import com.colofabrix.scala.figlet4s.options._
object Test extends App {
val text = "hello, world!"
val banner = Figlet4s.builder(text).render().asString()
println(banner)
}
with a simple build.sbt
:
name := "figlet4s-test-project"
version := "0.1"
scalaVersion := "2.12.13"
libraryDependencies += "com.colofabrix.scala" %% "figlet4s-core" % "0.3.0"
The project builds and runs fine in Linux, but crashes in Windows:
[info] done compiling
[info] running Test
[error] (run-main-0) com.colofabrix.scala.figlet4s.errors$FigletLoadingError
[error] com.colofabrix.scala.figlet4s.errors$FigletLoadingError
[error] at com.colofabrix.scala.figlet4s.errors$FigletLoadingError$.apply(errors.scala:69)
[error] at com.colofabrix.scala.figlet4s.core.Braket$.withResource(Braket.scala:28)
[error] at com.colofabrix.scala.figlet4s.core.FontFileReader$.readInternal(FontFileReader.scala:27)
[error] at com.colofabrix.scala.figlet4s.core.Figlet4sClient$.$anonfun$loadFontInternal$2(Figlet4sClient.scala:49)
[error] at cats.package$$anon$1.flatMap(package.scala:73)
[error] at com.colofabrix.scala.figlet4s.unsafe.package$$anon$1.flatMap(package.scala:69)
[error] at cats.FlatMap$Ops.flatMap(FlatMap.scala:229)
[error] at cats.FlatMap$Ops.flatMap$(FlatMap.scala:229)
[error] at cats.FlatMap$ToFlatMapOps$$anon$2.flatMap(FlatMap.scala:243)
[error] at com.colofabrix.scala.figlet4s.core.Figlet4sClient$.$anonfun$loadFontInternal$1(Figlet4sClient.scala:48)
[error] at cats.package$$anon$1.flatMap(package.scala:73)
[error] at com.colofabrix.scala.figlet4s.unsafe.package$$anon$1.flatMap(package.scala:69)
[error] at cats.FlatMap$Ops.flatMap(FlatMap.scala:229)
[error] at cats.FlatMap$Ops.flatMap$(FlatMap.scala:229)
[error] at cats.FlatMap$ToFlatMapOps$$anon$2.flatMap(FlatMap.scala:243)
[error] at com.colofabrix.scala.figlet4s.core.Figlet4sClient$.loadFontInternal(Figlet4sClient.scala:47)
[error] at com.colofabrix.scala.figlet4s.unsafe.Figlet4s$.loadFontInternal(Figlet4s.scala:36)
[error] at com.colofabrix.scala.figlet4s.unsafe.OptionsBuilderMixin$OptionsBuilderOps.$anonfun$options$1(OptionsBuilderMixin.scala:58)
[error] at scala.Option.getOrElse(Option.scala:189)
[error] at com.colofabrix.scala.figlet4s.unsafe.OptionsBuilderMixin$OptionsBuilderOps.options(OptionsBuilderMixin.scala:58)
[error] at com.colofabrix.scala.figlet4s.unsafe.OptionsBuilderMixin$OptionsBuilderOps.render(OptionsBuilderMixin.scala:32)
[error] at Test$.delayedEndpoint$Test$1(Test.scala:7)
[error] at Test$delayedInit$body.apply(Test.scala:4)
[error] at scala.Function0.apply$mcV$sp(Function0.scala:39)
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:39)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
[error] at scala.App.$anonfun$main$1$adapted(App.scala:80)
[error] at scala.collection.immutable.List.foreach(List.scala:431)
[error] at scala.App.main(App.scala:80)
[error] at scala.App.main$(App.scala:78)
[error] at Test$.main(Test.scala:4)
[error] at Test.main(Test.scala)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error] Caused by: java.lang.NullPointerException
[error] at java.base/java.io.Reader.<init>(Reader.java:167)
[error] at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:125)
[error] at scala.io.BufferedSource.reader(BufferedSource.scala:26)
[error] at scala.io.BufferedSource.bufferedReader(BufferedSource.scala:27)
[error] at com.colofabrix.scala.figlet4s.core.FontFileReader$.tapSource(FontFileReader.scala:43)
[error] at com.colofabrix.scala.figlet4s.core.FontFileReader$.$anonfun$readInternal$1(FontFileReader.scala:27)
[error] at com.colofabrix.scala.figlet4s.core.Braket$.withResource(Braket.scala:24)
[error] at com.colofabrix.scala.figlet4s.core.FontFileReader$.readInternal(FontFileReader.scala:27)
[error] at com.colofabrix.scala.figlet4s.core.Figlet4sClient$.$anonfun$loadFontInternal$2(Figlet4sClient.scala:49)
[error] at cats.package$$anon$1.flatMap(package.scala:73)
[error] at com.colofabrix.scala.figlet4s.unsafe.package$$anon$1.flatMap(package.scala:69)
[error] at cats.FlatMap$Ops.flatMap(FlatMap.scala:229)
[error] at cats.FlatMap$Ops.flatMap$(FlatMap.scala:229)
[error] at cats.FlatMap$ToFlatMapOps$$anon$2.flatMap(FlatMap.scala:243)
[error] at com.colofabrix.scala.figlet4s.core.Figlet4sClient$.$anonfun$loadFontInternal$1(Figlet4sClient.scala:48)
[error] at cats.package$$anon$1.flatMap(package.scala:73)
[error] at com.colofabrix.scala.figlet4s.unsafe.package$$anon$1.flatMap(package.scala:69)
[error] at cats.FlatMap$Ops.flatMap(FlatMap.scala:229)
[error] at cats.FlatMap$Ops.flatMap$(FlatMap.scala:229)
[error] at cats.FlatMap$ToFlatMapOps$$anon$2.flatMap(FlatMap.scala:243)
[error] at com.colofabrix.scala.figlet4s.core.Figlet4sClient$.loadFontInternal(Figlet4sClient.scala:47)
[error] at com.colofabrix.scala.figlet4s.unsafe.Figlet4s$.loadFontInternal(Figlet4s.scala:36)
[error] at com.colofabrix.scala.figlet4s.unsafe.OptionsBuilderMixin$OptionsBuilderOps.$anonfun$options$1(OptionsBuilderMixin.scala:58)
[error] at scala.Option.getOrElse(Option.scala:189)
[error] at com.colofabrix.scala.figlet4s.unsafe.OptionsBuilderMixin$OptionsBuilderOps.options(OptionsBuilderMixin.scala:58)
[error] at com.colofabrix.scala.figlet4s.unsafe.OptionsBuilderMixin$OptionsBuilderOps.render(OptionsBuilderMixin.scala:32)
[error] at Test$.delayedEndpoint$Test$1(Test.scala:7)
[error] at Test$delayedInit$body.apply(Test.scala:4)
[error] at scala.Function0.apply$mcV$sp(Function0.scala:39)
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:39)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
[error] at scala.App.$anonfun$main$1$adapted(App.scala:80)
[error] at scala.collection.immutable.List.foreach(List.scala:431)
[error] at scala.App.main(App.scala:80)
[error] at scala.App.main$(App.scala:78)
[error] at Test$.main(Test.scala:4)
[error] at Test.main(Test.scala)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error] stack trace is suppressed; run 'last Compile / bgRun' for the full output
[error] Nonzero exit code: 1
[error] (Compile / run) Nonzero exit code: 1
[error] Total time: 62 s (01:02), completed 30 Oct 2021, 0.09.15
As a user of the figlet4s library I would like to be able to load FLF fonts that have been saved as zip files
Figlet font files can be either normal text files or zipped text files and this different is reflected in their content rather than the file name (i.e. a zipped font still has extension .flf
). Figlet4s needs to be able to distinguish normal and zipped text files using only the content of the file itself.
See the figlet man page: https://linux.die.net/man/6/figlet
As a user of the figlet4s library I would like to be able to use figlet control files FLC
I have not tested much this feature in the original figlet but its definition can be found in the main standard: http://www.jave.de/figlet/figfont.html#controlfiles
Figlet4s should implement the behaviour described above and where there are doubts on the implementation it should behave as the original figlet does.
See the figlet man page: https://linux.die.net/man/6/figlet
Upgrade Scalafix to the latest version for the supported Scala versions.
When doing it the first time, I ran into several issues where the semanticdb is not loaded (I noticed it happens to test files only but I didn't double check it). This issue starts with Scalafix 0.9.28.
Keeping Scalafix to 0.9.28 prevents from upgrading Scala to the latest 2.13 and 2.12 versions. So, when Scalafix is fixed, upgrade also Scala.
Add sanity checks to all PRs on GitHub using Actions:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.