Git Product home page Git Product logo

discourse2nntp's Introduction

Discourse NNTP proxy

Dependencies

  • Twisted Python
  • iso8601
  • pyopenssl

Running

python discourse2nntp.py api_host api_key api_username

discourse2nntp's People

Contributors

kaali avatar

Stargazers

Petteri Valkonen avatar

Watchers

James Cloos avatar  avatar

Forkers

akojo

discourse2nntp's Issues

Bulk fetch posts

Now every single post is fetched invidually, Discourse API supports bulk requests.

Detect post updates

Now when a post is in memory, it will not be updated even when it's edited in Discourse.

HEAD message-id is broken

CLIENT: HEAD <xxx>
SERVER: 501 command syntax error
Unhandled Error
Traceback (most recent call last):
  File "/Users/kaali/.virtualenvs/discoursenntp/lib/python2.7/site-packages/twisted/internet/tcp.py", line 215, in doRead
    return self._dataReceived(data)
  File "/Users/kaali/.virtualenvs/discoursenntp/lib/python2.7/site-packages/twisted/internet/tcp.py", line 221, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "/Users/kaali/.virtualenvs/discoursenntp/lib/python2.7/site-packages/twisted/protocols/basic.py", line 571, in dataReceived
    why = self.lineReceived(line)
  File "discourse2nntp.py", line 359, in lineReceived
    nntp.NNTPServer.lineReceived(self, line)
--- <exception caught here> ---
  File "/Users/kaali/.virtualenvs/discoursenntp/lib/python2.7/site-packages/twisted/news/nntp.py", line 538, in lineReceived
    func(*parts)
  File "/Users/kaali/.virtualenvs/discoursenntp/lib/python2.7/site-packages/twisted/news/nntp.py", line 846, in do_HEAD
    defer = self.articleWork(article, 'HEAD', self.factory.backend.headRequest)
  File "/Users/kaali/.virtualenvs/discoursenntp/lib/python2.7/site-packages/twisted/news/nntp.py", line 791, in articleWork
    return func(self.currentGroup, index = None, id = article)
exceptions.TypeError: headRequest() got an unexpected keyword argument 'id'

Fix timezone support

At the moment messages will have incorrect time as timezones are not really supported.

Reduce topic fetches

We don't know if a topic has been updated or not, so we fetch all the topics always.

Fix terminology

Topics, articles and posts are used interchangeably, which is wrong.

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.