Giter VIP home page Giter VIP logo

needtoknow's People

Contributors

smattr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

bearbin

needtoknow's Issues

collections.Mapping deprecated

When running interactively, we currently get the following warning:

.../needtoknow/needtoknow.py:82: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  if not isinstance(conf, collections.Mapping):

Bad HTML diffs

One particular site that we're monitoring with the htmldiff feeder is producing diffs that are garbage. The content is a valid diff but the data being diffed looks like something binary being interpreted as text. Without any further investigation, my initial guess is that the content is being delivered compressed and we're misinterpreting the HTTP header. The site involved and the symptoms are viewable from current logs.

unique Content-IDs

We are embedding images in emails and then linking to them using Content-ID (CID) URLs. We use the index of the image in the email to construct the CID. Unfortunately, RFC 2111 has this to say about CIDs:

The Content-ID of a MIME body part is required to be globally unique.

I did not realize that "globally" here means across your entire message store (or even literally globally if you choose to take it that far). This is apparently an intentional feature to allow cross references in messages. It is a little bit crazy (displaying any email is O(n) in the number of emails you have) but apparently iOS's mail app chooses to implement it at its word.

As a result, on iOS you occasionally see the wrong image displayed in a needtoknow email. To get the right email you need to force quit mail to flush its cache. We should just fix this by using a hash or even a UUID for CIDs.

Relatedly, this also probably explains why loading inline images sometimes stalls indefinitely on iOS. Some more discussion:

Mailbox names not quoted nor encoded

imaplib doesn't handle the quoting or encoding of mailbox paths by itself, so we have to do it ourselves. This means at present needtoknow is not compatible with names including spaces or special characters. imap uses a nonstandard utf7 encoding for mailbox names, but there are a few encoders made by other people, e.g: https://github.com/MarechJ/py3_imap_utf7

I already implemented quoting in my fork, and I might do the encoding if I have a bit of spare time.

interactions with Power Nap

On a macOS machine, Power Nap results in stalling needtoknow. I haven't investigated what's going on and I don't know exactly what Power Nap does, but I suspect it's putting network sockets into some dormant state where reads block. Because we're not setting timeouts, perhaps this results in us stalling.

A few questions

  1. Will this project work with SMS Gateways? (ie, sending a text email to a phone number)
  2. Will this work with geojson (with a bit of modification) of is it too different from rss?

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.