Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Visual effects for Textual, a TerminalTextEffects wrapper.
textualeffects
is a library that provides Textual bindings for the excellent TerminalTextEffects visual effects library.
There are two widgets available in textualeffects
, EffectLabel
and SplashScreen
.
An EffectLabel
widget that can be used to display text with a visual effect.
from textual.app import App, ComposeResult
from textualeffects.effects import EffectType
from textualeffects.widgets import EffectLabel
text=("Hello World! " * 5 + "\n") * 10,
effect: EffectType = "Spotlights"
config = {
"search_duration": 500,
"spotlight_count": 3,
}
class TextualEffect(App):
def compose(self) -> ComposeResult:
label = EffectLabel(text, effect=effect, config=config)
label.styles.border = ("heavy", "green")
yield label
if __name__ == "__main__":
app = TextualEffect()
app.run()
A SplashScreen
widget that can be used to display a splash screen based on ModalScreen
with a visual effect. Once the effect is complete, the splash screen will be dismissed. The user can also dismiss the splash screen by pressing the ESC key.
from textual.app import App, ComposeResult
from textual.widgets import TextArea
from textualeffects.effects import EffectType
from textualeffects.widgets import SplashScreen
effect: EffectType = "Spotlights"
config = {
"search_duration": 100,
"spotlight_count": 3,
}
class SplashEffect(App):
def on_mount(self) -> None:
text = ("Hello World! " * 5 + "\n") * 10
self.push_screen(SplashScreen(text, effect=effect, config=config))
def compose(self) -> ComposeResult:
yield TextArea(("Main content" * 5 + "\n") * 10)
if __name__ == "__main__":
app = SplashEffect()
app.run()
Both widgets accept the following arguments:
text
: The text to display.effect
: The visual effect to apply to the text. Available effects are exposed through the EffectType
type.config
: A dictionary of configuration options for the effect. The available options depend on the effect. Detailed information on the available options can be found in the TerminalTextEffects documentation.For convenience, when an effect has run its course, the EffectLabel
and SplashScreen
widgets will emit a EffectLabel.EffectFinished
event.
You can listen for this event to perform any actions:
@on(EffectLabel.EffectFinished)
def do_stuff(self, message: EffectLabel.EffectFinished) -> None:
...
This project is licensed under the MIT License.
FAQs
Visual effects for Textual, a TermincalTextEffects wrapper.
We found that textualeffects demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.