Skip to content

Commit

Permalink
Move Cohen project to new name Cohen3
Browse files Browse the repository at this point in the history
In order to avoid conflicts with the original project (in case that the author decides to support python 3), the init scripts and project name has benn moved from Cohen to Cohen3. Also sets new project links for github and pypi and bumped the version number to 0.8.0.
  • Loading branch information
opacam committed Aug 5, 2018
1 parent 92d886a commit 38a2ec0
Show file tree
Hide file tree
Showing 13 changed files with 147 additions and 126 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
language: python
python:
- '2.7'
- '3.5'
install:
- pip install .
script: nosetests
deploy:
provider: pypi
user: unintended
user: opacam
password:
secure: gQZE3O5sSfpn5t4lMHaaW+HEXDP/xqHMzIbN9lbJMwnmqNZuZIO4gZTWwlqY0XIWeMZLnmRr+pqNy2vQUuoaU1TWVeymGx4rnWEKGvg7V94kIbJOWiFu6Ag43fTkCBB90V/ZkZ8UK9E2aZw7kCNizhVSJO096VJdQ7ryVfTrZZQ=
secure:
on:
tags: true
repo: unintended/Cohen
repo: opacam/Cohen3
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
0.8.0 - Moves to python 3
------------------------------

General:
- Renames project from Cohen to Cohen3
- Migrates source code to python version 3
- Reformat, Cleanup and some PEP8 fixes
- Twisted >= 18.7.0 is now required
- Louie-latest is now required (instead of Louie)

0.7.3 - Fixes and improvements
------------------------------

Expand Down
1 change: 1 addition & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Copyright (c) <2018> <canellestudi@gmail.com>
Copyright (c) <2015> <unintended.github@gmail.com>
Copyright (c) <2006> <Frank Scholz/beebits.net>

Expand Down
40 changes: 20 additions & 20 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
Cohen
=====
Cohen3
======
Simple DLNA/UPnP Media Server

.. image:: http://img.shields.io/pypi/v/Cohen.svg?style=flat-square
:target: https://pypi.python.org/pypi/Cohen
.. image:: http://img.shields.io/pypi/v/Cohen3.svg?style=flat-square
:target: https://pypi.python.org/pypi/Cohen3

.. image:: http://img.shields.io/pypi/dm/Cohen.svg?style=flat-square
:target: https://pypi.python.org/pypi/Cohen
.. image:: http://img.shields.io/pypi/dm/Cohen3.svg?style=flat-square
:target: https://pypi.python.org/pypi/Cohen3

.. image:: http://img.shields.io/travis/unintended/Cohen.svg?style=flat-square
:target: http://travis-ci.org/unintended/Cohen
.. image:: http://img.shields.io/travis/opacam/Cohen3.svg?style=flat-square
:target: http://travis-ci.org/opacam/Cohen3


Overview
--------
Cohen is a DLNA/UPnP Media Server written in Python (v2),
Cohen3 is a DLNA/UPnP Media Server written in Python (v3),
providing several UPnP MediaServers and MediaRenderers
to make simple publishing and streaming different types of media content to your network.

Cohen is actually a highly simplified and refreshed version of
Cohen3 is actually a highly simplified and refreshed version of
`Coherence Framework <https://github.com/coherence-project/Coherence>`_ project by `Frank Scholz <mailto:dev@coherence-project.org>`_
which looks like no longer supported.

- Documentation: https://cohen.readthedocs.org/
- GitHub: https://github.com/unintended/Cohen
- Issue tracker: https://github.com/unintended/Cohen/issues
- PyPI: https://pypi.python.org/pypi/cohen
- Documentation: https://cohen3.readthedocs.org/
- GitHub: https://github.com/opacam/Cohen3
- Issue tracker: https://github.com/opacam/Cohen3/issues
- PyPI: https://pypi.python.org/pypi/cohen3
- Free software: MIT licence


Features
--------
Cohen is known to work with various clients
Cohen3 is known to work with various clients
- Sony Playstation 3/4
- XBox360/One
- Denon AV Receivers
Expand All @@ -49,33 +49,33 @@ And provides a lot of backends to fulfil your media streaming needs
Installation from source
------------------------
After downloading and extracting the archive or having done a git
clone, move into the freshly created 'Cohen' folder and install
clone, move into the freshly created 'Cohen3' folder and install
the files with::

$ sudo python ./setup.py install

This will copy the Python module files into your local Python package
folder and the cohen executable to ``/usr/local/bin/cohen``.
folder and the cohen executable to ``/usr/local/bin/cohen3``.


Quickstart
----------
To just export some files on your hard-disk fire up Cohen with
an UPnP MediaServer with a file-system backend enabled::

$ cohen --plugin=backend:FSStore,content:/path/to/your/media/files
$ cohen3 --plugin=backend:FSStore,content:/path/to/your/media/files

You can also configure cohen via a config file. Feel free to check our example ``misc/cohen.conf.example``.
The config file can be placed anywhere, cohen looks by default for
``$HOME/.cohen``, but you can pass the path via the commandline option
'-c' to it too::

$ cohen -c /path/to/config/file
$ cohen3 -c /path/to/config/file



Contributing
------------
Report bugs at https://github.com/unintended/Cohen/issues
Report bugs at https://github.com/opacam/Cohen3/issues

Feel free to fetch the repo and send your pull requests!
4 changes: 2 additions & 2 deletions bin/cohen → bin/cohen3
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
""" Cohen is a framework to host DLNA/UPnP devices
For more information about it and its available backends
point your browser to: https://cohen.readthedocs.org/
point your browser to: https://cohen3.readthedocs.org/
"""
import errno
import sys
Expand Down Expand Up @@ -49,7 +49,7 @@ def get_config_file():
if config_dir == '~':
config_dir = os.getcwd()

return os.path.join(config_dir, '.cohen')
return os.path.join(config_dir, '.cohen3')


def __opt_option(option, opt, value, parser):
Expand Down
6 changes: 3 additions & 3 deletions coherence/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import platform


__version_info__ = (0, 7, 3)
__version_info__ = (0, 8, 0)
__version__ = '.'.join(map(str, __version_info__))
__url__ = 'https://github.com/unintended/Cohen'
__service_name__ = 'Cohen'
__url__ = 'https://github.com/opacam/Cohen3'
__service_name__ = 'Cohen3'

SERVER_ID = ','.join([platform.system(),
platform.release(),
Expand Down
14 changes: 7 additions & 7 deletions docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ Command-Line Interface
SYNOPSIS
--------

``cohen`` <options> [--plugin=<BACKEND> [ , <PARAM_NAME> : <PARAM_VALUE> ] ...]
``cohen3`` <options> [--plugin=<BACKEND> [ , <PARAM_NAME> : <PARAM_VALUE> ] ...]

DESCRIPTION
-----------

Cohen is a Python DLNA/UPnP Media Server made to broadcast digital media content over your network.
Cohen3 is a Python DLNA/UPnP Media Server made to broadcast digital media content over your network.

The core of Cohen provides a (hopefully complete) implementation
of:
Expand Down Expand Up @@ -42,11 +42,11 @@ OPTIONS
EXAMPLES
--------

:cohen --plugin=backend\:FSStore,name\:MyCoherence:
:cohen3 --plugin=backend\:FSStore,name\:MyCoherence:
Start cohen activating the `FSStore` backend.

:cohen --plugin=backend\:MediaStore,medialocation\:$HOME/Music/,mediadb\:/tmp/media.db:
Start cohen activating the `MediaStore` backend with media
:cohen3 --plugin=backend\:MediaStore,medialocation\:$HOME/Music/,mediadb\:/tmp/media.db:
Start cohen3 activating the `MediaStore` backend with media
located in `$HOME/Music` and the media metadata store in
`/tmp/media.db`.

Expand All @@ -62,7 +62,7 @@ LastFMStore, AxisCamStore, YouTubeStore, TEDStore, IRadioStore, TwitchStore
FILES
-----

:$HOME/.cohen: default config file
:$HOME/.cohen3: default config file

ENVIRONMENT VARIABLES
---------------------
Expand All @@ -74,4 +74,4 @@ ENVIRONMENT VARIABLES
SEE ALSO
--------

Project Homepage https://github.com/unintended/Cohen
Project Homepage https://github.com/opacam/Cohen3
14 changes: 7 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Cohen documentation build configuration file, created by
# Cohen3 documentation build configuration file, created by
# sphinx-quickstart on Fri May 1 23:29:12 2015.
#
# This file is execfile()d with the current directory set to its
Expand Down Expand Up @@ -54,9 +54,9 @@
master_doc = 'index'

# General information about the project.
project = u'Cohen'
copyright = u'2015, unintended'
author = u'unintended'
project = 'Cohen3'
copyright = '2018, opacam'
author = 'opacam'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -111,7 +111,7 @@
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

github_project = 'unintended/Cohen'
github_project = 'opacam/Cohen3'


# -- Options for HTML output ----------------------------------------------
Expand Down Expand Up @@ -219,14 +219,14 @@
#html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = 'Cohendoc'
htmlhelp_basename = 'Cohen3doc'

# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('cli', 'Cohen', u'DLNA/UPnP Media Server', [author, "Frank Scholz"], 1)
('cli', 'Cohen3', 'DLNA/UPnP Media Server', [author, "unintended", "Frank Scholz"], 1)
]

# If true, show URL addresses after external links.
Expand Down
4 changes: 0 additions & 4 deletions docs/ext_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
"""

import re
import sys

from docutils import nodes
from docutils.transforms import Transform

GITHUB_ISSUE_URL = "https://github.com/{0}/issues/{1}"
GITHUB_USER_URL = "https://github.com/{1}"

if sys.version_info[0] == 2:
str = unicode


class GithubReferences(Transform):
default_priority = 999
Expand Down
30 changes: 18 additions & 12 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
Overview
--------
Cohen is a DLNA/UPnP Media Server written in Python,
providing several UPnP MediaServers and MediaRenderers
to make simple publishing and streaming different types of media content to your network.
Cohen3 is a DLNA/UPnP Media Server written in Python 3, providing several
UPnP MediaServers and MediaRenderers to make simple publishing and streaming
different types of media content to your network.

If you need the python 2 version you should take a look into the original project:
`Cohen Framework <https://github.com/unintended/cohen>`_ project managed by
the github user `unintended <mailto:unintended.github@gmail.com>`_

Cohen/Cohen3 are actually a highly simplified and refreshed versions of
`Coherence Framework <https://github.com/coherence-project/Coherence>`_
project by `Frank Scholz <mailto:dev@coherence-project.org>`_ which looks like
no longer supported.

Cohen is actually a highly simplified and refreshed version of
`Coherence Framework <https://github.com/coherence-project/Coherence>`_ project by `Frank Scholz <mailto:dev@coherence-project.org>`_
which looks like no longer supported.

- Latest release: |version| (:ref:`changelog`)
- GitHub: https://github.com/unintended/Cohen
- Issue tracker: https://github.com/unintended/Cohen/issues
- PyPI: https://pypi.python.org/pypi/cohen
- GitHub: https://github.com/opacam/Cohen3
- Issue tracker: https://github.com/opacam/Cohen3/issues
- PyPI: https://pypi.python.org/pypi/cohen3
- Free software: MIT licence


Expand All @@ -36,14 +42,14 @@ Quickstart
To just export some files on your hard-disk fire up Cohen with
an UPnP MediaServer with a file-system backend enabled::

$ cohen --plugin=backend:FSStore,content:/path/to/your/media/files
$ cohen3 --plugin=backend:FSStore,content:/path/to/your/media/files

You can also configure cohen via a config file. Feel free to check our example ``misc/cohen.conf.example``.
The config file can be placed anywhere, cohen looks by default for
``$HOME/.cohen``, but you can pass the path via the commandline option
``$HOME/.cohen3``, but you can pass the path via the commandline option
'-c' to it too::

$ cohen -c /path/to/config/file
$ cohen3 -c /path/to/config/file


Table of Contents
Expand Down
18 changes: 9 additions & 9 deletions misc/cohen-initscript.sh → misc/cohen3-initscript.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#!/bin/sh

### BEGIN INIT INFO
# Provides: cohen
# Provides: cohen3
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts or stops the cohen mediaserver daemon
# Short-Description: Starts or stops the cohen3 mediaserver daemon
# Description: Put a long description of the service here
### END INIT INFO

NAME=cohen
DAEMON=/usr/local/bin/$NAME
CONFIG=/usr/local/etc/cohen.conf
LOGFILE=/var/log/cohen.log
NAME=cohen3
DAEMON=/usr/local/bin/${NAME}
CONFIG=/usr/local/etc/${NAME}.conf
LOGFILE=/var/log/${NAME}.log
USER=nobody
DAEMON_OPTS=""
PIDFILE=/var/run/$NAME.pid
PIDFILE=/var/run/${NAME}.pid
STOP_TIMEOUT=30

# Add any command line options for daemon here
Expand All @@ -27,13 +27,13 @@ STOP_TIMEOUT=30

do_start () {
log_daemon_msg "Starting $NAME daemon"
start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user $USER --chuid $USER --startas $DAEMON -- -c $CONFIG -l $LOGFILE $DAEMON_OPTS
start-stop-daemon --start --background --pidfile ${PIDFILE} --make-pidfile --user ${USER} --chuid ${USER} --startas ${DAEMON} -- -c ${CONFIG} -l ${LOGFILE} ${DAEMON_OPTS}
log_end_msg $?
}

do_stop () {
log_daemon_msg "Stopping $NAME daemon"
start-stop-daemon --stop --pidfile $PIDFILE --retry $STOP_TIMEOUT
start-stop-daemon --stop --pidfile ${PIDFILE} --retry ${STOP_TIMEOUT}
log_end_msg $?
}

Expand Down
File renamed without changes.
Loading

0 comments on commit 38a2ec0

Please sign in to comment.