Skip to content

Twitter Text Libraries: Rust implementation

License

Notifications You must be signed in to change notification settings

sayrer/twitter-text

 
 

Repository files navigation

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

About

Twitter Text Libraries: Rust implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 39.7%
  • HTML 24.8%
  • Java 10.2%
  • Ruby 10.0%
  • Objective-C 4.7%
  • Rust 4.5%
  • Other 6.1%