diff --git a/.style.yapf b/.style.yapf new file mode 100644 index 000000000..03ac89877 --- /dev/null +++ b/.style.yapf @@ -0,0 +1,7 @@ +[style] +based_on_style = pep8 +spaces_before_comment = 2 +split_before_logical_operator = true +each_dict_entry_on_separate_line = true +coalesce_brackets = false +indent_dictionary_value = true \ No newline at end of file diff --git a/LICENSES b/LICENSES index 9888fd05b..f9652eb6b 100644 --- a/LICENSES +++ b/LICENSES @@ -63,8 +63,9 @@ otherwise. - static/themes/default/icons/tahoe.png :: [[https://github.com/thekishanraval/Logos][GPLv3+]] - static/themes/default/icons/transmission.png :: [[https://transmissionbt.com/][GPL]] - static/themes/default/icons/ttrss.png :: [[https://tt-rss.org/gitlab/fox/tt-rss][GPL]] -- static/themes/default/img/f-droid.png :: [[https://commons.wikimedia.org/wiki/File%3AGet_it_on_F-Droid_(material_design).svg][GPLv3]] -- static/themes/default/img/google-play.png :: [[https://upload.wikimedia.org/wikipedia/commons/c/cd/Get_it_on_Google_play.svg][Public Domain]] -- static/themes/default/img/debian.png :: [[https://commons.wikimedia.org/wiki/File:Debian_logo-black.png][GPL3+/CC-BY-SA]] -- static/themes/default/img/apple.png :: [[https://thenounproject.com/icon/1203053/download/color/000000/png][CC BY 3.0 US]] -- static/themes/default/img/windows.png :: [[https://thenounproject.com/icon/1206946/download/color/000000/png][CC BY 3.0 US]] +- static/themes/default/icons/f-droid.png :: [[https://commons.wikimedia.org/wiki/File%3AGet_it_on_F-Droid_(material_design).svg][GPLv3]] +- static/themes/default/icons/google-play.png :: [[https://upload.wikimedia.org/wikipedia/commons/c/cd/Get_it_on_Google_play.svg][Public Domain]] +- static/themes/default/icons/app-store.png :: [[https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Download_on_the_App_Store_Badge.svg/500px-Download_on_the_App_Store_Badge.svg.png][Public Domain]] +- static/themes/default/icons/apple.png :: [[https://thenounproject.com/icon/1203053/download/color/000000/png][CC BY 3.0 US]] +- static/themes/default/icons/windows.png :: [[https://thenounproject.com/icon/1206946/download/color/000000/png][CC BY 3.0 US]] +- static/themes/default/icons/gnu-linux.png :: [[https://upload.wikimedia.org/wikipedia/commons/9/95/Tux-icon-mono.svg][Public Domain]] diff --git a/plinth/modules/deluge/manifest.py b/plinth/modules/deluge/manifest.py index 3306ecb7b..cb2d542c6 100644 --- a/plinth/modules/deluge/manifest.py +++ b/plinth/modules/deluge/manifest.py @@ -17,18 +17,17 @@ from django.utils.translation import ugettext_lazy as _ -clients = [ - { - 'name': _('Deluge'), - 'description': _('Bittorrent client written in Python/PyGTK '), - 'platforms': [ - { - 'type': 'web', - 'relative_path': '/deluge' - }, - { - 'type': 'apt', - 'os': 'Debian', - 'package_name': 'deluge' - }] +clients = [{ + 'name': + _('Deluge'), + 'description': + _('Bittorrent client written in Python/PyGTK '), + 'platforms': [{ + 'type': 'web', + 'relative_path': '/deluge' + }, { + 'type': 'package', + 'format': 'deb', + 'name': 'deluge', }] +}] diff --git a/plinth/modules/minetest/manifest.py b/plinth/modules/minetest/manifest.py index 394c21461..1ef242008 100644 --- a/plinth/modules/minetest/manifest.py +++ b/plinth/modules/minetest/manifest.py @@ -17,37 +17,32 @@ from django.utils.translation import ugettext_lazy as _ -clients = [ - { - 'name': _('Minetest'), - 'platforms': [ - { - 'type': 'download', - 'os': 'Windows(64-bit)', - 'os_version': 'XP, Vista, >=7', - 'url': 'https://github.com/minetest/minetest/releases' - '/download/0.4.16/minetest-0.4.16-win64.zip ' - }, - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', - 'fully_qualified_name': 'net.minetest.minetest', - 'url': 'https://play.google.com/store/apps/details?id=net' - '.minetest.minetest ' - }, - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'fdroid_store', - 'fully_qualified_name': 'net.minetest.minetest', - 'url': 'https://f-droid.org/packages/net.minetest.minetest/ ' - }, - { - 'type': 'apt', - 'os': 'Debian', - 'package_name': 'minetest' - } - ] - } -] +clients = [{ + 'name': + _('Minetest'), + 'platforms': [{ + 'type': 'download', + 'os': 'Windows', + 'arch': 'amd64', + 'os_version': 'XP, Vista, >=7', + 'url': 'https://github.com/minetest/minetest/releases' + '/download/0.4.16/minetest-0.4.16-win64.zip ' + }, { + 'type': 'store', + 'os': 'Android', + 'store_name': 'google_play_store', + 'fully_qualified_name': 'net.minetest.minetest', + 'url': 'https://play.google.com/store/apps/details?id=net' + '.minetest.minetest ' + }, { + 'type': 'store', + 'os': 'Android', + 'store_name': 'fdroid_store', + 'fully_qualified_name': 'net.minetest.minetest', + 'url': 'https://f-droid.org/packages/net.minetest.minetest/ ' + }, { + 'type': 'package', + 'format': 'deb', + 'name': 'minetest' + }] +}] diff --git a/plinth/modules/mumble/manifest.py b/plinth/modules/mumble/manifest.py index 5661773c4..3056cd9f5 100644 --- a/plinth/modules/mumble/manifest.py +++ b/plinth/modules/mumble/manifest.py @@ -17,73 +17,63 @@ from django.utils.translation import ugettext_lazy as _ -clients = [ - { - 'name': _('Mumble'), - 'platforms': [ - { - 'type': 'download', - 'os': 'Windows(32-bit)', - 'url': 'https://github.com/mumble-voip/mumble/releases' - '/download/1.2.19/mumble-1.2.19.msi ' - }, - { - 'type': 'download', - 'os': 'Windows(64-bit)', - 'url': 'https://dl.mumble.info/mumble-1.3.0~2569~gd196a4b' - '~snapshot.winx64.msi ' - }, - { - 'type': 'download', - 'os': 'macOS', - 'url': 'https://github.com/mumble-voip/mumble/releases' - '/download/1.2.19/Mumble-1.2.19.dmg ' - }, - { - 'type': 'apt', - 'os': 'Debian', - 'package_name': 'mumble' - }, - { - 'type': 'store', - 'os': 'iOS', - 'os_version': '>=8.0', - 'store_name': 'apple_store', - 'url': 'https://itunes.apple.com/us/app/mumble/id443472808' - } - ] - }, - { - 'name': _('Plumble'), - 'platforms': [ - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', - 'url': 'https://play.google.com/store/apps/details?id=com' - '.morlunk.mumbleclient.free ', - 'fully_qualified_name': 'com.morlunk.mumbleclient' - }, - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'fdroid_store', - 'url': 'https://play.google.com/store/apps/details?id=com' - '.morlunk.mumbleclient.free ', - 'fully_qualified_name': 'com.morlunk.mumbleclient' - } - ] - }, - { - 'name': _('Mumblefly'), - 'platforms': [ - { - 'type': 'store', - 'os': 'iOS', - 'os_version': '>=7.0', - 'store_name': 'apple_store', - 'url': 'https://itunes.apple.com/dk/app/mumblefy/id858752232' - } - ] - } -] +clients = [{ + 'name': + _('Mumble'), + 'platforms': [{ + 'type': 'download', + 'os': 'Windows', + 'arch': 'i386', + 'url': 'https://github.com/mumble-voip/mumble/releases' + '/download/1.2.19/mumble-1.2.19.msi ' + }, { + 'type': 'download', + 'os': 'Windows(64-bit)', + 'arch': 'amd64', + 'url': 'https://dl.mumble.info/mumble-1.3.0~2569~gd196a4b' + '~snapshot.winx64.msi ' + }, { + 'type': 'download', + 'os': 'macOS', + 'url': 'https://github.com/mumble-voip/mumble/releases' + '/download/1.2.19/Mumble-1.2.19.dmg ' + }, { + 'type': 'package', + 'format': 'deb', + 'name': 'mumble' + }, { + 'type': 'store', + 'os': 'iOS', + 'os_version': '>=8.0', + 'store_name': 'apple_store', + 'url': 'https://itunes.apple.com/us/app/mumble/id443472808' + }] +}, { + 'name': + _('Plumble'), + 'platforms': [{ + 'type': 'store', + 'os': 'Android', + 'store_name': 'google_play_store', + 'url': 'https://play.google.com/store/apps/details?id=com' + '.morlunk.mumbleclient.free ', + 'fully_qualified_name': 'com.morlunk.mumbleclient' + }, { + 'type': 'store', + 'os': 'Android', + 'store_name': 'fdroid_store', + 'url': 'https://play.google.com/store/apps/details?id=com' + '.morlunk.mumbleclient.free ', + 'fully_qualified_name': 'com.morlunk.mumbleclient' + }] +}, { + 'name': + _('Mumblefly'), + 'platforms': [{ + 'type': 'store', + 'os': 'iOS', + 'os_version': '>=7.0', + 'store_name': 'apple_store', + 'url': 'https://itunes.apple.com/dk/app/mumblefy/id858752232' + }] +}] diff --git a/plinth/modules/repro/manifest.py b/plinth/modules/repro/manifest.py index d3022d4cc..6f1490a13 100644 --- a/plinth/modules/repro/manifest.py +++ b/plinth/modules/repro/manifest.py @@ -17,73 +17,58 @@ from django.utils.translation import ugettext_lazy as _ -clients = [ - { - 'name': _('Jitsi Meet'), - 'description': _('Jitsi is a set of open-source projects that allows ' - 'you to easily build and deploy secure ' - 'videoconferencing solutions. At the heart of Jitsi ' - 'are Jitsi Videobridge and Jitsi Meet, which let you ' - 'have conferences on the internet, while other ' - 'projects in the community enable other features ' - 'such as audio, dial-in, recording, ' - 'and simulcasting.'), - 'platforms': [ - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', - 'fully_qualified_name': 'org.jitsi.meet', - 'url': 'https://play.google.com/store/apps/details?id=org' - '.jitsi.meet ' - }, - { - 'type': 'store', - 'os': 'iOS', - 'store_name': 'apple_store', - 'url': 'https://itunes.apple.com/in/app/jitsi-meet/id1165103905' - }, - { - 'type': 'download', - 'os': 'Linux', - 'url': 'https://download.jitsi.org/jitsi/debian/' - }, - { - 'type': 'dnf', - 'os': 'Linux', - 'package_name': 'jitsi' - }, - { - 'type': 'download', - 'os': 'macOS', - 'url': 'https://download.jitsi.org/jitsi/macosx/jitsi-latest' - '.dmg ' - }, - { - 'type': 'download', - 'os': 'Windows', - 'url': 'https://download.jitsi.org/jitsi/windows/jitsi-latest' - '-x86.exe ' - }, - { - 'type': 'download', - 'os': 'macOS', - 'url': 'https://download.jitsi.org/jitsi/macosx/jitsi-latest' - '.dmg ' - } - ] - }, - { - 'name': _('CSipSimple'), - 'platforms': [ - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', - 'fully_qualified_name': 'com.csipsimple', - 'url': 'https://play.google.com/store/apps/details?id=com' - '.csipsimple ' - } - ] - } -] +clients = [{ + 'name': + _('Jitsi Meet'), + 'description': + _('Jitsi is a set of open-source projects that allows ' + 'you to easily build and deploy secure ' + 'videoconferencing solutions. At the heart of Jitsi ' + 'are Jitsi Videobridge and Jitsi Meet, which let you ' + 'have conferences on the internet, while other ' + 'projects in the community enable other features ' + 'such as audio, dial-in, recording, ' + 'and simulcasting.'), + 'platforms': [{ + 'type': 'store', + 'os': 'Android', + 'store_name': 'google_play_store', + 'fully_qualified_name': 'org.jitsi.meet', + 'url': 'https://play.google.com/store/apps/details?id=org' + '.jitsi.meet ' + }, { + 'type': 'store', + 'os': 'iOS', + 'store_name': 'apple_store', + 'url': 'https://itunes.apple.com/in/app/jitsi-meet/id1165103905' + }, { + 'type': 'download', + 'os': 'GNU/Linux', + 'url': 'https://download.jitsi.org/jitsi/debian/' + }, { + 'type': 'package', + 'format': 'deb', + 'name': 'jitsi' + }, { + 'type': 'download', + 'os': 'macOS', + 'url': 'https://download.jitsi.org/jitsi/macosx/jitsi-latest' + '.dmg ' + }, { + 'type': 'download', + 'os': 'Windows', + 'url': 'https://download.jitsi.org/jitsi/windows/jitsi-latest' + '-x86.exe ' + }] +}, { + 'name': + _('CSipSimple'), + 'platforms': [{ + 'type': 'store', + 'os': 'Android', + 'store_name': 'google_play_store', + 'fully_qualified_name': 'com.csipsimple', + 'url': 'https://play.google.com/store/apps/details?id=com' + '.csipsimple ' + }] +}] diff --git a/plinth/modules/syncthing/__init__.py b/plinth/modules/syncthing/__init__.py index da667460e..b1aa02ce4 100644 --- a/plinth/modules/syncthing/__init__.py +++ b/plinth/modules/syncthing/__init__.py @@ -67,7 +67,8 @@ service = None def init(): """Intialize the module.""" menu = main_menu.get('apps') - menu.add_urlname(name, 'glyphicon-refresh', 'syncthing:index', short_description) + menu.add_urlname(name, 'glyphicon-refresh', + 'syncthing:index', short_description) global service setup_helper = globals()['setup_helper'] diff --git a/plinth/modules/syncthing/manifest.py b/plinth/modules/syncthing/manifest.py index 15ba3d943..da00f1545 100644 --- a/plinth/modules/syncthing/manifest.py +++ b/plinth/modules/syncthing/manifest.py @@ -17,45 +17,79 @@ from django.utils.translation import ugettext_lazy as _ -clients = [ - { - 'name': _('Syncthing'), - 'platforms': [ - { - 'type': 'download', - 'os': 'Debian', - 'url': 'https://apt.syncthing.net/', - }, - { - 'type': 'download', - 'os': 'macOS', - 'url': 'https://github.com/syncthing/syncthing/releases' - }, - { - 'type': 'download', - 'os': 'Windows', - 'url': 'https://github.com/syncthing/syncthing/releases' - }, - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', - 'fully_qualified_name': 'com.nutomic.syncthingandroid', - 'url': 'https://play.google.com/store/apps/details?id=com' - '.nutomic.syncthingandroid ' - }, - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'fdroid_store', - 'fully_qualified_name': 'com.nutomic.syncthingandroid', - 'url': 'https://f-droid.org/packages/com.nutomic' - '.syncthingandroid/ ' - }, - { - 'type': 'web', - 'relative_url': '/syncthing' - } - ] - } -] +metadata = { + 'syncthing': { + 'version': '0.14.39', + 'android-package-id': 'com.nutomic.syncthingandroid', + }, +} + +clients = [{ + 'name': + _('Syncthing'), + 'platforms': [{ + 'type': 'package', + 'format': 'deb', + 'name': 'syncthing', + }, { + 'type': 'package', + 'format': 'homebrew', + 'name': 'syncthing', + }, { + 'type': + 'download', + 'os': + 'all', + 'url': + 'https://github.com/syncthing/syncthing/releases/tag/v{}' + .format(metadata['syncthing']['version']) + }, { + 'type': 'download', + 'os': 'GNU/Linux', + 'arch': 'amd64', + 'url': 'https://github.com/syncthing/syncthing/releases/' + 'download/v{0}/syncthing-linux-amd64-v{0}.tar.gz' + .format(metadata['syncthing']['version']), + }, { + 'type': 'download', + 'os': 'macOS', + 'arch': 'amd64', + 'url': 'https://github.com/syncthing/syncthing/releases/' + 'download/v{0}/syncthing-macosx-amd64-v{0}.tar.gz' + .format(metadata['syncthing']['version']), + }, { + 'type': 'download', + 'os': 'Windows', + 'arch': 'amd64', + 'url': 'https://github.com/syncthing/syncthing/releases/' + 'download/v{0}/syncthing-windows-amd64-v{0}.zip' + .format(metadata['syncthing']['version']), + }, { + 'type': + 'store', + 'os': + 'Android', + 'store_name': + 'google_play_store', + 'fully_qualified_name': + 'com.nutomic.syncthingandroid', + 'url': + 'https://play.google.com/store/apps/details?id={}' + .format(metadata['syncthing']['android-package-id']) + }, { + 'type': + 'store', + 'os': + 'Android', + 'store_name': + 'fdroid_store', + 'fully_qualified_name': + 'com.nutomic.syncthingandroid', + 'url': + 'https://f-droid.org/packages/{}' + .format(metadata['syncthing']['android-package-id']) + }, { + 'type': 'web', + 'relative_url': '/syncthing' + }] +}] diff --git a/plinth/templates/clients.html b/plinth/templates/clients.html index d17b37dec..213fb4f12 100644 --- a/plinth/templates/clients.html +++ b/plinth/templates/clients.html @@ -18,28 +18,41 @@ {% endcomment %} {% load i18n %} +{% load plinth_extras %} {% if module.clients %} + + +
{% trans "Web Clients" %}:
{% trans "Desktop Clients" %}:
{% trans "Mobile Clients" %}: