Giter Club home page Giter Club logo

bbc-parser's Introduction

This is a very slow and thorough rewrite of the BBC parsing in Elkarte.

I have done this once or twice before with miserable results. Now, I am going to do it much thoroughly.

Each commit should pass all of the tests (as I write those tests). Not every commit will result in a faster parser, but the end result should be faster and better for resources. In the end, I hope to make it much more maintainable and more object oriented.

Long term, this should use preg_metch with offset capture and even an AST

preg_split() on any [$tag and [/$tag (itemcodes includes) and ]

in index.php, setting SAVE_TOP_RESULTS to true will result in it creating a csv file. To parse this CSV file, open TopResults.php

=== Changes

  • $no_autolink_tags no longer exists. It is now an attribute of the tag as "autolink"
  • you can get the bbc without loading parse_bbc(). Seperate loading from parsing
  • changed substr() == str to substr_compare(). Don't use strpos() when you want to do a substr_compare either
  • seperate construction of the parser from the execution more
  • replace substr() . substr() with substr_replace()
  • removed ftp:// autolinking and the [ftp] tag. Pointless to keep it

bbc-parser's People

Contributors

joshuaadickerson avatar spuds avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.