Giter Club home page Giter Club logo

Comments (8)

andreskrey avatar andreskrey commented on August 21, 2024

What do you mean? Which classes do you want to clean and why?

from readability.php.

topotru avatar topotru commented on August 21, 2024

I mean this method

public function _cleanClasses($node)

wich appeared after the last release. It clears original css-classes.
I suggest to introduce new config option and check it here
$this->_cleanClasses($article);

// by default can be set to true
if ($this->configuration->getCleanClasses())  {
    $this->_cleanClasses($article);
}

from readability.php.

andreskrey avatar andreskrey commented on August 21, 2024

Alright, now I get you. What would be the purpose of making this optional? I think the library's ultimate functionality is to return the cleanest text possible. Why'd you want to keep the original classes which would point to inexistent styles?

from readability.php.

topotru avatar topotru commented on August 21, 2024

Sometimes the result may be unsatisfactory, and I rely on these classes when post-processing the result.
I can create some rules for thу concrete url-sources, relying on css classes and ids of the original html.

from readability.php.

topotru avatar topotru commented on August 21, 2024

I clean out these classes myself, in any case, but a little later, after processing additional rules.

from readability.php.

andreskrey avatar andreskrey commented on August 21, 2024

Mmmm, I understand. Can you provide an example for an "unsatisfactoy result"? As I always answered to this type of requests, I prefer to create a more intelligent algorithm rather than giving the user a framework to tweak the functionality.

from readability.php.

topotru avatar topotru commented on August 21, 2024

Yeah. I'll do it some later.
Maybe it will be betted to submit a failing test case )

But this config option will not interfere in any way - it will give more flexibility )

from readability.php.

andreskrey avatar andreskrey commented on August 21, 2024

I get what you mean, but this kind of changes allows everyone to request something to tweak the intended functionality. Thanks for understanding. Will wait for your failing test case :)

from readability.php.

Related Issues (20)

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.