pokelyzer icon indicating copy to clipboard operation
pokelyzer copied to clipboard

Export data from Pokeminer

Open ferazambuja opened this issue 8 years ago • 2 comments

Just pulled a request where I added encounter_id and time_till_hidden. It's extremely simple and close to 10 lines of code.

Until the solution for the webhook comes this would be a nice temporary fix.

ferazambuja avatar Aug 03 '16 01:08 ferazambuja

Hmm, not seeing the pull request...

Brideau avatar Aug 03 '16 01:08 Brideau

I'm not sure how to convert encounter_id to base64 on python. Encounter_id is too big for SQLite to handle. I'm not that great of a programmer. Can you look at db.py? Just add:

line 43
    @staticmethod
    def _make_key(sighting):
        return (
            sighting.pokemon_id,
            sighting.spawn_id,
            sighting.normalized_timestamp,
            sighting.lat,
            sighting.lon,
            sighting.encounter_id,
            sighting.time_till_hidden_ms,
        )
line 77
class Sighting(Base):
    __tablename__ = 'sightings'

    id = Column(Integer, primary_key=True)
    pokemon_id = Column(Integer)
    spawn_id = Column(String(32))
    expire_timestamp = Column(Integer)
    normalized_timestamp = Column(Integer)
    lat = Column(String(16))
    lon = Column(String(16))
    encounter_id = Column(String(32))
    time_till_hidden_ms = Column(Integer)

ferazambuja avatar Aug 03 '16 02:08 ferazambuja