Skip to content

Commit

Permalink
Merge branch 'release/4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
goodbadwolf committed Jul 13, 2016
2 parents 209c458 + a6945d9 commit c894183
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 99 deletions.
2 changes: 1 addition & 1 deletion librarian/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '4.0rc2'
__version__ = '4.0'
__author__ = 'Outernet Inc <[email protected]>'
2 changes: 1 addition & 1 deletion librarian/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ ignored_paths =
[emergency]

# Path to emrgency reset token file
file =
file = /etc/librarian.emergency

[notifications]
# Automatically delete notifications that are older than ``default_expiry`` and
Expand Down
2 changes: 2 additions & 0 deletions librarian/data/meta/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def __init__(self, data, db, cache):
self._cache = cache
# unpack data
self._path = data['path']
if self._path:
self._path = os.path.normpath(self._path)
self._parent_path = os.path.dirname(self._path)
self._type = data['type']
self._mime_type = data['mime_type']
Expand Down
99 changes: 99 additions & 0 deletions librarian/data/tuner_presets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
from collections import namedtuple

from bottle_utils.i18n import lazy_gettext as _


__all__ = ('LBAND', 'KUBAND', 'L_PRESETS', 'KU_PREETS', 'PRESETS')


Preset = namedtuple('Preset', ('label', 'index', 'values'))

LBAND = 'l'
KUBAND = 'ku'

L_PRESETS = [
# Translators, name of the L-band tuner preset covering most of the world
Preset(_('Global'), 1, {
'frequency': '1545.525',
'uncertainty': '4000',
'symbolrate': '8400',
'sample_rate': '1',
'rf_filter': '0.2',
'descrambler': True,
# Translators, used as coverage area of a transponder
'coverage': _('Europe, Africa, Asia'),
}),
# Translators, name of the L-band tuner preset covering the Americas
Preset(_('Americas'), 2, {
'frequency': '1539.8725',
'uncertainty': '4000',
'symbolrate': '4200',
'sample_rate': '1',
'rf_filter': '0.2',
'descrambler': True,
# Translators, used as coverage area of a transponder
'coverage': _('North and South America'),
}),
]

KU_PRESETS = [
Preset('Galaxy 19 (97.0W)', 1, {
'frequency': '11929',
'symbolrate': '22000',
'polarization': 'v',
'delivery': 'DVB-S',
'modulation': 'QPSK',
# Translators, used as coverage area of a transponder
'coverage': _('North America'),
}),
Preset('Hotbird 13 (13.0E)', 2, {
'frequency': '11471',
'symbolrate': '27500',
'polarization': 'v',
'delivery': 'DVB-S',
'modulation': 'QPSK',
# Translators, used as coverage area of a transponder
'coverage': _('Europe, North Africa'),
}),
Preset('Intelsat 20 (68.5E)', 3, {
'frequency': '12522',
'symbolrate': '27500',
'polarization': 'v',
'delivery': 'DVB-S',
'modulation': 'QPSK',
# Translators, used as coverage area of a transponder
'coverage': _('North and West Europe, Subsaharan Africa'),
}),
Preset('AsiaSat 5 C-band (100.5E)', 4, {
'frequency': '3960',
'symbolrate': '30000',
'polarization': 'h',
'delivery': 'DVB-S',
'modulation': 'QPSK',
# Translators, used as coverage area of a transponder
'coverage': _('Middle East, Asia, Australia'),
}),
Preset('Eutelsat (113.0W)', 5, {
'frequency': '12089',
'symbolrate': '11719',
'polarization': 'h',
'delivery': 'DVB-S',
'modulation': 'QPSK',
# Translators, used as coverage area of a transponder
'coverage': _('North, Middle, and South America'),
}),
Preset('ABS-2 (74.9E)', 6, {
'frequency': '11734',
'symbolrate': '44000',
'polarization': 'h',
'delivery': 'DVB-S',
'modulation': 'QPSK',
# Translators, used as coverage area of a transponder
'coverage': _('India'),
}),
]

PRESETS = {
LBAND: L_PRESETS,
KUBAND: KU_PRESETS,
}
96 changes: 3 additions & 93 deletions librarian/helpers/ondd.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@

from ..core.exts import ext_container as exts
from ..core.contrib.templates.decorators import template_helper
from ..data.tuner_presets import LBAND, KUBAND, L_PRESETS, KU_PRESETS, PRESETS

LBAND = 'l'
KUBAND = 'ku'

#: The key in the application settings JSON file that contains the tuner params
SETTINGS_KEYS = {
'l': 'ondd_l',
'ku': 'ondd'
LBAND: 'ondd_l',
KUBAND: 'ondd'
}

DELIVERY = (
Expand Down Expand Up @@ -61,95 +60,6 @@
('0.4', '40%')
)

Preset = namedtuple('Preset', ('label', 'index', 'values'))

L_PRESETS = [
# Translators, name of the L-band tuner preset covering most of the world
Preset(_('Global'), 1, {
'frequency': '1545.525',
'uncertainty': '4000',
'symbolrate': '8400',
'sample_rate': '1',
'rf_filter': '0.2',
'descrambler': True,
# Translators, used as coverage area of a transponder
'coverage': _('Europe, Africa, Asia'),
}),
# Translators, name of the L-band tuner preset covering the Americas
Preset(_('Americas'), 2, {
'frequency': '1539.8725',
'uncertainty': '4000',
'symbolrate': '4200',
'sample_rate': '1',
'rf_filter': '0.2',
'descrambler': True,
# Translators, used as coverage area of a transponder
'coverage': _('North and South America'),
}),
]

KU_PRESETS = [
Preset('Galaxy 19 (97.0W)', 1, {
'frequency': '11929',
'symbolrate': '22000',
'polarization': 'v',
'delivery': 'DVB-S',
'modulation': 'QPSK',
# Translators, used as coverage area of a transponder
'coverage': _('North America'),
}),
Preset('Hotbird 13 (13.0E)', 2, {
'frequency': '11471',
'symbolrate': '27500',
'polarization': 'v',
'delivery': 'DVB-S',
'modulation': 'QPSK',
# Translators, used as coverage area of a transponder
'coverage': _('Europe, North Africa'),
}),
Preset('Intelsat 20 (68.5E)', 3, {
'frequency': '12522',
'symbolrate': '27500',
'polarization': 'v',
'delivery': 'DVB-S',
'modulation': 'QPSK',
# Translators, used as coverage area of a transponder
'coverage': _('North and West Europe, Subsaharan Africa'),
}),
Preset('AsiaSat 5 C-band (100.5E)', 4, {
'frequency': '3960',
'symbolrate': '30000',
'polarization': 'h',
'delivery': 'DVB-S',
'modulation': 'QPSK',
# Translators, used as coverage area of a transponder
'coverage': _('Middle East, Asia, Australia'),
}),
Preset('Eutelsat (113.0W)', 5, {
'frequency': '12089',
'symbolrate': '11719',
'polarization': 'h',
'delivery': 'DVB-S',
'modulation': 'QPSK',
# Translators, used as coverage area of a transponder
'coverage': _('North, Middle, and South America'),
}),
Preset('ABS-2 (74.9E)', 6, {
'frequency': '11734',
'symbolrate': '44000',
'polarization': 'h',
'delivery': 'DVB-S',
'modulation': 'QPSK',
# Translators, used as coverage area of a transponder
'coverage': _('India'),
}),
]

PRESETS = {
LBAND: L_PRESETS,
KUBAND: KU_PRESETS,
}


class DemodRestartError(Exception):
""" Raised when demodulator cannot be restarted """
Expand Down
1 change: 0 additions & 1 deletion librarian/routes/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class EmergencyReset(CSRFRouteMixin, RedirectRouteMixin, XHRPartialFormRoute):
template_name = 'auth/emergency_reset'
partial_template_name = 'auth/_emergency_reset'
form_factory = EmergencyResetForm
exclude_plugins = ['session_plugin']

def read_token_file(self):
token_path = self.config.get('emergency.file', '')
Expand Down
2 changes: 1 addition & 1 deletion librarian/views/errors/404.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ ${_('Page not found')}

<%block name="error_message">
<p class="single">${_('The page you were looking for could not be found')}</p>
<% link = '<a href="{url}">{target}</a>'.format(url=redirect_url, target=_("main page")) %>
<% link = u'<a href="{url}">{target}</a>'.format(url=redirect_url, target=_("main page")) %>
<p class="single">${_("You will be redirected to {target} in {seconds} seconds.").format(seconds=REDIRECT_DELAY, target=link)}</p>
</%block>
2 changes: 1 addition & 1 deletion librarian/views/filemanager/_main.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def get_views(facet_types):
%>
<a class="views-tabs-strip-tab ${'views-tabs-tab-current' if is_current else ''}" href="${view_url}" role="tab" data-view="${name}">
<span class="icon icon-${icon}"></span>
<span class="views-tabs-tab-label label">${_(label)}</span>
<span class="views-tabs-tab-label label">${label}</span>
</a>
% endfor
</nav>
Expand Down
2 changes: 1 addition & 1 deletion librarian/views/ui/feedback.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ ${page_title}
<span class="icon icon-${icon}"></span>
</div>
<p class="feedback-main">${message}</p>
<% link = '<a href="{url}">{target}</a>'.format(url=aesc(redirect_url), target=esc(redirect_target)) %>
<% link = u'<a href="{url}">{target}</a>'.format(url=aesc(redirect_url), target=esc(redirect_target)) %>
<p class="feedback-sub">${_("You'll be taken to {target} in {seconds} seconds.").format(seconds=REDIRECT_DELAY, target=link)}</p>
</div>

0 comments on commit c894183

Please sign in to comment.