Coder Social home page Coder Social logo

Comments (6)

xxyzz avatar xxyzz commented on August 25, 2024

I don't know how this feature is enabled, the sqlite file looks exactly the same. There is a show_spoilers_default column in the book_metedata table but set it to 0 doesn't have any effect.

from worddumb.

Phobooky avatar Phobooky commented on August 25, 2024

This X-Ray file has been created with the X-Ray Plugin. It was deprecated but I updated it for my use. I didn't published it because yet because it was only in Spanish and then I discovered your that is better. But you can see in this plugin how it is created. I'II try to investigate a little too.

from worddumb.

Phobooky avatar Phobooky commented on August 25, 2024

The only strange thing that the "x-ray plugin" does when going through the code quickly, is that it sorts the list of entities. I don't know why it does it:

def fill_entity(self, log):
    '''Writes entity table'''
    entity_data = []
    sortedList = []
    for entity in self._entity_data.keys():
        original_label = self._entity_data[entity]['original_label']
        entity_id = str(self._entity_data[entity]['entity_id'])
        entity_type = str(self._entity_data[entity]['type'])
        count = str(self._entity_data[entity]['mentions'])
        has_info_card = '1' if self._entity_data[entity]['description'] else '0'
        entity_data.append((entity_id, original_label, None, entity_type, count, has_info_card))
        sortedList.append((original_label, self._entity_data[entity]['entity_id'], self._entity_data[entity]['mentions']))

    self._db_writer.insert_into_entity(entity_data)
    log(StatusInfo.F_XRAY_DBWRITER_ENTITIES)
    sortedList = sorted(sortedList, key=lambda entity: entity[2], reverse=True)
    i = 0
    while i < len(sortedList):
        log(StatusInfo.F_XRAY_DBWRITER_ENTITIE_DETAIL.format(sortedList[i][0], 
        sortedList[i][1], sortedList[i][2]))  
        i += 1

from worddumb.

Phobooky avatar Phobooky commented on August 25, 2024

Suggestion: In the X-Ray from the other source, the characters with spoiler protection appears as "PERSON". In yours the characters appear as: Source: Kindle Shop or Wikipedia, never as PERSON.

from worddumb.

xxyzz avatar xxyzz commented on August 25, 2024

Maybe it requires has_excerpts to be 1. To be frank, I'm not interested in the spoiler and excerpt feature, I don't think they are very helpful for reading books.

The source can only be None, Wikipedia or Fandom, it can't be Kindle Store.

from worddumb.

Phobooky avatar Phobooky commented on August 25, 2024

Don't worry. If you don't think it could be usefull, it is not a problem for me to close the issue. I only want to help you. Sorry. Perhaps you're right.

from worddumb.

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.