Package: zopyx.smartprintng.server
zopyx.smartprintng.serverzopyx.smartprintng.serveris a Pyramid based server implementation
and implements the server side functionality of the Produce & Publish platform.
It is know as theProduce & Publish Server.RequirementsPython 2.6, 2.7 (no Python 3 support)Installationcreate anvirtualenvenvironment (Python 2.6) - either within your
current (empty) directory or by letting virtualenv create one for you.
(easy_install virtualenvifvirtualenvis not available on your system):virtualenv --no-site-packages .or:virtualenv --no-site-packages smartprintnginstall the SmartPrintNG server:bin/easy_install zopyx.smartprintng.servercreate aserver.iniconfiguration file (and change it according to your needs):[DEFAULT]
debug = true

[app:main]
use = egg:zopyx.smartprintng.server#app
reload_templates = true
debug_authorization = false
debug_notfound = false

[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 6543start the server (in foreground):bin/pserve server.inior start it in background:bin/pserve server.ini  --daemonUpgradingFor upgrading an existing SmartPrintNG server you should try the following inside
your virtualenv environment:bin/easy_install -U zopyx.smartprintng.server
bin/easy_install -U zopyx.convert2XMLRPC APIThe SmartPrintNG server exposes several methods through XMLRPC:def convertZIP(auth_token, zip_archive, converter_name):
    """ 'zip_archive' is ZIP archive (encoded as base-64 byte string).
        The archive must contain exactly *one* HTML file to be converted
        including all related resources like stylesheets and images.
        All files must be stored flat within the archive (no subfolders).
        All references to externals resources like the 'src' attribute
        of the IMG tag or references to the stylesheet(s) must use
        relative paths. The method returns the converted output file
        also as base64-encoded ZIP archive.
    """

def convertZIPEmail(auth_token, context, zip_archive, converter_name='pdf-prince',
                    sender=None, recipient=None, subject=None, body=None):
    """ Similar to convertZIP() except that this method will send the
        converted output document to a recipient by email. 'subject' and
        'body' parameters *must* be utf-8 encoded.
    """

def availableConverters():
    """ Returns a list of available converter names on the
        SmartPrintNG backend.
    """

def authenticate(username, password):
    """ Log into the server. Returns an auth_token. authenticate()
        must be called before calling any of the methods above.
    """

def ping():
    """ says 'pong' - or something similar """Email configurationFor using the email support through theconvertZIPEmail()the email server must be
configured through a dedicated configuration file. Anemail.inimay look like this:[mail]
hostname = smtp.gmail.com
username = some_username
password = some_password
force_tls = False
no_tls = FalseYou have to pass the name of the email configuration file topservewhen starting
then server:bin/pserve server.ini mail_config=/path/to/email.iniSource codehttps://github.com/zopyx/zopyx.smartprintng.server/Bug trackerhttps://github.com/zopyx/zopyx.smartprintng.server/issuesSupportSupport for Produce & Publish Server is currently only available on a project basis.ContactZOPYX LimitedHundskapfklinge 33D-72074 Tuebingen, Germanyinfo@zopyx.comwww.zopyx.comChangelog1.1.2 (2012/10/14)documentation updated1.1.1 (2012/02/03)better self-test page (more text, some images)updated dependencies1.1.0 (2011/08/22)compatibility with Pyramid 1.11.0.1 (2011/01/30)compatibility with Pyramid 1.0b3+1.0.0 (2011/01/16)final releasefixed test fixtures0.7.1 (2011/01/10)pinned pyramid_xmlrpc 0.10.7.0 (2010/12/11)converted to Pyramid0.6.7 (2010/07/18)adjusted company name0.6.6 (2010/05/15)include conversion result into ZIP file0.6.5 (2010/02/04)fixed racing condition in cleanup code0.6.4 (2009/12/25)minor fixesdocumentation cleanup0.6.3 (2009/11/29)compatiblity with BFG 1.20.6.1 (2009/10/04)fixed bug in code for cleaning up the spool_directory0.6.0 (2009/09/15)authentication and authorization support0.5.2 (2009/09/05)adjusted to newest zopyx.convert2 version0.6.0 (2009/09/15)added authentication and authorization support0.5.2 (2009/09/05)adjusted to newest zopyx.convert2 version0.5.1 (2009/08/01)added convertZIPandRedirect() methodadded deliver() methodmoved base.ServerCore to models.pydelivered files must be younger than ‘delivery_max_age’ secondscleanup codeinternal refactoringmore tests0.5.0 (2009/07/23)now requires Python 2.60.4.3 (2009/07/22)removed most of the ZCML configurationtests, tests, tests0.4.2 (2009/07/19)switching back to zope.sendmailimplemented asynchronous mail delivery on top of zope.sendmail0.4.1 (2009/07/19)using repoze.sendmail0.4.0 (2009/07/19)added convertZIPEmail() API0.3.4 (2009/07/13)updated documentation0.3.3 (2009/07/12)fix for missing BASE tag within HTML files0.3.2 (2009/07/12)better logging0.3.1 (2009/07/08)disabled check for maximum size of the request within
parse_xmlrpc_request() since 8MB is too small for us0.3.0 (2009/07/06)switched to repoze.bfg0.2.0 (2009/07/06)improved handling of temporary directories0.1.2 (2009/07/05)improved handling of temporary directories0.1.1 (2009/07/05)improved logging and error handling0.1 (2009/07/05)Initial release