
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
h1. AutoExcerpt
pre. [sudo] gem install auto_excerpt
Creates excerpts of html formatted text.
pre. AutoExcerpt.new("This is some fancy html formatted text homie", {:words => 5}) # => "This is some fancy html..."
h3. Features
h3. Options
@:characters@ The number of characters to display from the text. Default: 150 (does not need to be set to 0 if you choose another option)
If you need to be 100% accurate in your character count, then remove the @:ending@
pre. AutoExcerpt.new("
@:words@, @:sentences@, @:paragraphs@ The number of [which] to display from the text.
@:ending@ The text that will be displayed at the end of the excerpt when generating the excerpt by length or words. Set to @nil@ if you don't want it. Default: "..."
pre. AutoExcerpt.new("This is cool stuff man!", :ending => ". Srsly!", :words => 3) # => "This is cool. Srsly!"
@:strip_html@ Strips HTML tags from the excerpt that is displayed. Default: false
@:allowed_tags@ If using @:strip_html@ then this setting will allow the listed tags to be shown. default: []
pre. AutoExcerpt.new("
This is some formatted html
", {:strip_html => true, :allowed_tags => %w(p em)}) # => "This is some formatted html
"@:strip_paragraphs@ Strip all paragraph tags from the html. Default: false
@:skip_words@, @:skip_sentences@, @:skip_paragraphs@ The number of [which] to skip at the beginning of the html when returned. Default: 0
h3. Command Line
new: v0.7.1 Run @auto_excerpt@ from the command line with all of the options shown above! @$ auto_excerpt --words 10 "
Some html string
"@h2. Help out on Github!
h2. Credits
This is based on the rss_auto_excerpt plugin for Textpattern by the great "Rob Sable":http://www.wilshireone.com.
h3. Copyright
Copyright (c) 2010 Kabari Hendrick. See LICENSE for details.
FAQs
Unknown package
We found that auto_excerpt demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.