1 unstable release

0.1.0 Mar 11, 2019
Download history 25/week @ 2019-11-30 50/week @ 2019-12-07 22/week @ 2019-12-14 17/week @ 2019-12-21 1/week @ 2019-12-28 19/week @ 2020-01-04 24/week @ 2020-01-11 24/week @ 2020-01-18 20/week @ 2020-01-25 33/week @ 2020-02-01 19/week @ 2020-02-08 25/week @ 2020-02-15 44/week @ 2020-02-22 47/week @ 2020-02-29 49/week @ 2020-03-07 78/week @ 2020-03-14

139 downloads per month
Used in opendatash_twitter_notifier

Apache-2.0

150KB
5K SLoC

PSL Assertion 3.5K SLoC // 0.0% comments Razor 1K SLoC // 0.1% comments Rust 212 SLoC // 0.0% comments

twitter-text in Rust

This repo is a Rust implementation of twitter-text. All aspects of tweet text are parsed by a Pest PEG grammar, with the exception of URL length and character weighting. See the parser directory for the grammar. Procedural validation for URL lengths and character weights is performed by the Extractor code.

To run the tests, install Rust, and then try this in the terminal:

> cargo build
> cargo test

The original Twitter README content is below.

twitter-text

This repo is a collection of libraries and conformance tests to standardize parsing of Tweet text. It synchronizes development, testing, creating issues, and pull requests for twitter-text's implementations and specification. These libraries are responsible for determining the quantity of characters in a Tweet and identifying and linking any url, @username, #hashtag, or $cashtag.

See implementations and conformance in this repo below:

Copyright and License

Copyright 2012-2018 Twitter, Inc and other contributors

Copyright 2019 Robert Sayre

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

Dependencies

~3.5MB
~93K SLoC