diff --git a/README.md b/README.md index bc213ce58..1cf2d7b5d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,15 @@ [![Documentation Status](http://readthedocs.org/projects/dsmr-reader/badge/?version=latest)](http://dsmr-reader.readthedocs.org/en/latest/?badge=latest) +# Screenshots + +## English +See [Read The Docs, in English](http://dsmr-reader.readthedocs.org/en/latest/screenshots.html). Screenshots also have a description regarding features displayed. + +## Dutch (Nederlands) +Zie [Read The Docs, in het Nederlands](http://dsmr-reader.readthedocs.org/nl/latest/screenshots.html). Bij elke screenshot staat een korte toelichting over de functionaliteiten. + + # Documentation ## English diff --git a/deploy.sh b/deploy.sh index 6d0fbceae..6abee6f02 100755 --- a/deploy.sh +++ b/deploy.sh @@ -20,13 +20,18 @@ echo "" echo " --- Merging/updating checkout." git merge FETCH_HEAD - echo "" echo "" echo " >>> Running post-deployment script. <<<" ./post-deploy.sh +echo "" +echo "" +echo " --- Now at version: " +python -c 'import dsmrreader ; print(dsmrreader.__version__)' + + echo "" echo "" echo " >>> Deployment complete. <<<" diff --git a/docs/_static/screenshots/archive.png b/docs/_static/screenshots/archive.png new file mode 100644 index 000000000..2b7f47cfe Binary files /dev/null and b/docs/_static/screenshots/archive.png differ diff --git a/docs/_static/screenshots/backupsettings.png b/docs/_static/screenshots/backupsettings.png new file mode 100644 index 000000000..694d84ce7 Binary files /dev/null and b/docs/_static/screenshots/backupsettings.png differ diff --git a/docs/_static/screenshots/compare.png b/docs/_static/screenshots/compare.png new file mode 100644 index 000000000..4410bdf4a Binary files /dev/null and b/docs/_static/screenshots/compare.png differ diff --git a/docs/_static/screenshots/configuration.png b/docs/_static/screenshots/configuration.png new file mode 100644 index 000000000..d8a4bee0a Binary files /dev/null and b/docs/_static/screenshots/configuration.png differ diff --git a/docs/_static/screenshots/dashboard.png b/docs/_static/screenshots/dashboard.png new file mode 100644 index 000000000..f91dff5f9 Binary files /dev/null and b/docs/_static/screenshots/dashboard.png differ diff --git a/docs/_static/screenshots/energysupplierprice.png b/docs/_static/screenshots/energysupplierprice.png new file mode 100644 index 000000000..234d30ac3 Binary files /dev/null and b/docs/_static/screenshots/energysupplierprice.png differ diff --git a/docs/_static/screenshots/export.png b/docs/_static/screenshots/export.png new file mode 100644 index 000000000..96fd85e66 Binary files /dev/null and b/docs/_static/screenshots/export.png differ diff --git a/docs/_static/screenshots/statistics.png b/docs/_static/screenshots/statistics.png new file mode 100644 index 000000000..be9b3883c Binary files /dev/null and b/docs/_static/screenshots/statistics.png differ diff --git a/docs/_static/screenshots/status.png b/docs/_static/screenshots/status.png new file mode 100644 index 000000000..363dc24c7 Binary files /dev/null and b/docs/_static/screenshots/status.png differ diff --git a/docs/_static/screenshots/trends.png b/docs/_static/screenshots/trends.png new file mode 100644 index 000000000..d431aea4b Binary files /dev/null and b/docs/_static/screenshots/trends.png differ diff --git a/docs/application.rst b/docs/application.rst index 5f13328a9..2acfe3fdf 100644 --- a/docs/application.rst +++ b/docs/application.rst @@ -3,6 +3,13 @@ Using the application ===================== +DSMR 2.x (legacy) +----------------- +Note: The application's default DSMR version used is 4.x. This version is also the default for any recent smart meters placed at your home. + +Make sure to alter this setting in the backend's configuration page to DSMR 2.x when required! + + Viewing the application ----------------------- Now it's time to view the application in your browser to check whether the GUI works as well. Just enter the ip address or hostname of your RaspberryPi in your browser. diff --git a/docs/changelog.rst b/docs/changelog.rst index 79a234f09..f3b71c937 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,17 @@ Changelog ========= +v1.1.0 - 2016-04-23 +^^^^^^^^^^^^^^^^^^^ +- Autorefresh dashboard (`#117 `_). +- Improve line graphs' visibility (`#111 `_). +- Easily add notes (`#110 `_). +- Export data points in CSV format (`#2 `_). +- Allow day/month/year comparison (`#94 `_). +- Docs: Add FAQ and generic application info (`#113 `_). +- Support for Iskra meter (DSMR 2.x) (`#120 `_). + + v1.0.1 - 2016-04-07 ^^^^^^^^^^^^^^^^^^^ - Update licence to OSI compatible one (`#119 `_). diff --git a/docs/credits.rst b/docs/credits.rst index 05ff86188..58a481adb 100644 --- a/docs/credits.rst +++ b/docs/credits.rst @@ -42,6 +42,7 @@ Testers & contributors - `Jeroen Peters `_ (`Github profile `_) - `Daniel ter Horst `_ (`Github profile `_) +- `Sander de Leeuw `_ (`Github profile `_) - `Gert Schaafsma `_ - `Bert-Jan Vos `_ diff --git a/docs/index.rst b/docs/index.rst index 6e4ed9ed9..d8d438fac 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,6 +5,7 @@ DSMR Reader's documentation :maxdepth: 2 intro + screenshots installation application changelog diff --git a/docs/intro.rst b/docs/intro.rst index 385df1334..64db3accf 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -16,4 +16,9 @@ I advise to only use this tool when you have basic Linux knowledge or have any i Github ------ -The project can be found here: https://github.com/dennissiemensma/dsmr-reader \ No newline at end of file +The project can be found here: https://github.com/dennissiemensma/dsmr-reader + + +Languages +--------- +The entire application and it's code is written in English. The entire interface however is also translated into Dutch and will be triggered depending on you browser's language preference. \ No newline at end of file diff --git a/docs/locale/nl/LC_MESSAGES/application.mo b/docs/locale/nl/LC_MESSAGES/application.mo index 056e9ce25..81b2303d8 100644 Binary files a/docs/locale/nl/LC_MESSAGES/application.mo and b/docs/locale/nl/LC_MESSAGES/application.mo differ diff --git a/docs/locale/nl/LC_MESSAGES/application.po b/docs/locale/nl/LC_MESSAGES/application.po index 589969111..f71f47d38 100644 --- a/docs/locale/nl/LC_MESSAGES/application.po +++ b/docs/locale/nl/LC_MESSAGES/application.po @@ -1,31 +1,53 @@ +# SOME DESCRIPTIVE TITLE. # Copyright (C) 2016, Dennis Siemensma # This file is distributed under the same license as the DSMR Reader # package. +# FIRST AUTHOR , 2016. # msgid "" msgstr "" "Project-Id-Version: DSMR Reader 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-30 22:43+0200\n" -"PO-Revision-Date: 2016-04-07 20:19+0100\n" +"POT-Creation-Date: 2016-04-23 17:07+0200\n" +"PO-Revision-Date: 2016-04-23 17:10+0100\n" "Last-Translator: Dennis Siemensma \n" "Language-Team: Dennis Siemensma \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.2.0\n" -"X-Generator: Poedit 1.5.4\n" "Language: nl\n" +"X-Generator: Poedit 1.5.4\n" #: ../../application.rst:4 msgid "Using the application" msgstr "De applicatie gebruiken" #: ../../application.rst:7 +msgid "DSMR 2.x (legacy)" +msgstr "DSMR 2.x (oude meters)" + +#: ../../application.rst:8 +msgid "" +"Note: The application's default DSMR version used is 4.x. This version is " +"also the default for any recent smart meters placed at your home." +msgstr "" +"N.B.: De standaard DSMR-versie die de applicatie gebruikt is DSMR 4.x. Dit " +"is namelijk de standaardversie voor nieuwe/recent geplaatste slimme meters." + +#: ../../application.rst:10 +msgid "" +"Make sure to alter this setting in the backend's configuration page to DSMR " +"2.x when required!" +msgstr "" +"Wanneer je een meter met DSMR 2.x hebt, zul je deze in het beheerderpaneel " +"onder ``dataloggerconfiguratie`` moet instellen." + +#: ../../application.rst:14 msgid "Viewing the application" msgstr "Bekijk applicatie" -#: ../../application.rst:8 +#: ../../application.rst:15 msgid "" "Now it's time to view the application in your browser to check whether the " "GUI works as well. Just enter the ip address or hostname of your RaspberryPi " @@ -34,7 +56,7 @@ msgstr "" "Dit is het moment om de applicatie te bekijken in je browser om te zien of " "alles naar behoren werkt. Vul het IP-adres van je RaspberryPi in je browser." -#: ../../application.rst:10 +#: ../../application.rst:17 msgid "" "Installed using a monitor attached to the RaspberryPi and don't know what " "address your device has? Just type ``ifconfig | grep addr`` and it should " @@ -44,7 +66,7 @@ msgstr "" "weet je het IP-adres niet? Typ in dat geval het volgende in en je krijgt het " "IP-adres te zien: ``ifconfig | grep addr``" -#: ../../application.rst:16 +#: ../../application.rst:23 msgid "" "In this example the ip address is ``192.168.178.150``. When possible you " "should assign a static ip address to your device in your router." @@ -52,11 +74,11 @@ msgstr "" "In dit voorbeeld is het IP-adres ``192.168.178.150``. Het is aan te raden om " "je apparaat een vast IP-adres te geven in je router." -#: ../../application.rst:20 +#: ../../application.rst:27 msgid "Reboot test" msgstr "Herstart-test" -#: ../../application.rst:21 +#: ../../application.rst:28 msgid "" "You surely want to ``reboot`` your device and check whether everything comes " "up automatically again with ``sudo supervisorctl status``. This will make " @@ -67,7 +89,7 @@ msgstr "" "supervisorctl status``. Dit zorgt ervoor dat je datalogger eventuele " "stroomstoringen overleeft (of wanneer je zelf de stroom eraf haalt)." -#: ../../application.rst:23 +#: ../../application.rst:30 msgid "" "Everything OK? Congratulations, this was the hardest part and now the fun " "begins by monitoring your energy consumption." @@ -75,11 +97,11 @@ msgstr "" "Alles gelukt? Gefeliciteerd! Dit was het lastigste gedeelte en nu kun je " "eindelijk gebruikmaken van de applicatie en je energieverbruik meten." -#: ../../application.rst:27 +#: ../../application.rst:34 msgid "Data preservation & backups" msgstr "Databehoud & backups" -#: ../../application.rst:28 +#: ../../application.rst:35 msgid "" "You **should (or must)** make sure to periodically BACKUP your data! It's " "one of the most common mistakes to skip or ignore this. Actually, it " @@ -94,11 +116,11 @@ msgstr "" "maand aan gegevens kwijt. Stel je voor dat je jaren met historische data " "kwijtraakt, zou zonde zijn!" -#: ../../application.rst:32 +#: ../../application.rst:39 msgid "The application will by default create a backup every night." msgstr "De applicatie maakt standaard zelf elke nacht een backup." -#: ../../application.rst:34 +#: ../../application.rst:41 msgid "" "However, as the data is still stored **locally** on your 'vulnerable' SD " "card, you should export it off your RaspberryPi." @@ -107,7 +129,7 @@ msgstr "" "(kwetsbare) SD-kaart. Daarom zul je de gegevens ook ergens anders moeten " "opslaan." -#: ../../application.rst:36 +#: ../../application.rst:43 msgid "" "There is an builtin option to have backups synced to your **Dropbox**, " "*without exposing your Dropbox account and your private files in it*." @@ -116,7 +138,7 @@ msgstr "" "uploaden. *Zonder dat de applicatie toegang tot je (privé) bestanden in je " "Dropbox-account heeft*." -#: ../../application.rst:38 +#: ../../application.rst:45 msgid "" "Please either use this service or manage offloading backups on your own (see " "below)." @@ -124,13 +146,13 @@ msgstr "" "Zorg ervoor dat je ofwel deze feature gebruikt ofwel zelf back-ups maakt en " "ze regelmatig ergens heen kopieert (zie hieronder)." -#: ../../application.rst:40 +#: ../../application.rst:47 msgid "You may also decide to run backups outside the application." msgstr "" "Je kunt er tevens voor kiezen om zelf backups buiten de applicatie om te " "maken." -#: ../../application.rst:42 +#: ../../application.rst:49 msgid "" "There are example backup scripts available in ``dsmrreader/provisioning/" "postgresql/psql-backup.sh`` for **PostgreSQL**, which I dump to a separately " @@ -141,7 +163,7 @@ msgstr "" "ik zelf om handmatig een back-up te maken naar een USB-stick die aan mijn " "RaspberryPi hangt." -#: ../../application.rst:44 +#: ../../application.rst:51 msgid "" "For **MySQL/MariaDB** you can use ``dsmrreader/provisioning/mysql/mysql-" "backup.sh``." @@ -149,7 +171,7 @@ msgstr "" "Voor **MySQL/MariaDB** kun je dit script gebruiken: ``dsmrreader/" "provisioning/mysql/mysql-backup.sh``." -#: ../../application.rst:46 +#: ../../application.rst:53 msgid "" "Make sure to schedule the backup scripts as cronjob and also verify that it " "actually works, by running ``run-parts -v /etc/cron.daily``." @@ -157,7 +179,7 @@ msgstr "" "Zorg ervoor dat je de back-ups via een 'daily cronjob' hebt ingepland en " "test dat door het volgende uit te voeren: ``run-parts -v /etc/cron.daily``." -#: ../../application.rst:48 +#: ../../application.rst:55 msgid "" "Also, check your free disk space once in a while. I will implement automatic " "cleanup settings later, allowing you to choose your own retention (for all " @@ -167,11 +189,11 @@ msgstr "" "mogelijkheid toevoegen om oude metingen (niet de dagtotalen) te verwijderen " "na een X-periode." -#: ../../application.rst:52 +#: ../../application.rst:59 msgid "Application updates (bug fixes & new features)" msgstr "Applicatie updates (bugfixes & nieuwe mogelijkheden)" -#: ../../application.rst:53 +#: ../../application.rst:60 msgid "" "The current setup is based on the 'latest' version of the application, " "called the `master` branch. I will add versions/releases later, possibly by " @@ -181,7 +203,7 @@ msgstr "" "applicatie, ook wel de `master` 'branch' genoemd. Waarschijnlijk voeg ik " "daadwerkelijke versies op een later moment toe." -#: ../../application.rst:55 +#: ../../application.rst:62 msgid "" "For now you can always update your application to the latest version by " "executing **deploy.sh**, located in the root of the project. Make sure to " @@ -194,39 +216,39 @@ msgstr "" "gebruiker. Het script zorgt dan voor de rest en haalt alles automatisch " "binnen::" -#: ../../application.rst:60 +#: ../../application.rst:67 msgid "Summary of deployment script steps:" msgstr "Overzicht van de stappen die het uitrol-script doet:" -#: ../../application.rst:62 +#: ../../application.rst:69 msgid "GIT pull (codebase update)." msgstr "GIT pull (codebase bijwerken)." -#: ../../application.rst:63 +#: ../../application.rst:70 msgid "PIP update requirements." msgstr "Update PIP afhankelijkheden." -#: ../../application.rst:64 +#: ../../application.rst:71 msgid "Apply any database migrations." msgstr "Past openstaande databasemigraties toe." -#: ../../application.rst:65 +#: ../../application.rst:72 msgid "Sync static files to Nginx folder." msgstr "Synchroniseert statische bestanden naar de Nginx map." -#: ../../application.rst:66 +#: ../../application.rst:73 msgid "Reload Gunicorn application server." msgstr "Herlaad Gunicorn applicatieserver." -#: ../../application.rst:67 +#: ../../application.rst:74 msgid "Clear any caches." msgstr "Leegt caches." -#: ../../application.rst:71 +#: ../../application.rst:78 msgid "Public webinterface warning" msgstr "Waarschuwing voor publiekelijke toegang" -#: ../../application.rst:72 +#: ../../application.rst:79 msgid "" "**NOTE**: If you expose your application to the outside world or a public " "network, you might want to take additional steps:" @@ -234,7 +256,7 @@ msgstr "" "**LET OP**: Wanneer je de applicatie koppelt aan het Internet wil je sowieso " "extra maatregelen nemen:" -#: ../../application.rst:74 +#: ../../application.rst:81 msgid "" "Please make sure to **alter** the ``SECRET_KEY`` setting in your " "``dsmrreader/settings.py``." @@ -242,7 +264,7 @@ msgstr "" "Zorg ervoor dat je de instelling ``SECRET_KEY`` wijzigt in het bestand " "``dsmrreader/settings.py``." -#: ../../application.rst:76 +#: ../../application.rst:83 msgid "" "Don't forget to run ``./post-deploy.sh`` in the project's root, which will " "force the application to gracefully reload itself and apply the new settings " @@ -252,7 +274,7 @@ msgstr "" "hoogste map van project), die ervoor zorgt dat de hele applicatie zichzelf " "herlaadt en daarmee de nieuwe instellingen per direct gebruikt." -#: ../../application.rst:78 +#: ../../application.rst:85 msgid "" "Install a firewall, such as ``ufw`` `UncomplicatedFirewall `_ and restrict traffic to port ``22`` " @@ -262,7 +284,7 @@ msgstr "" "ubuntu.com/UncomplicatedFirewall>`_) beperkt al het toegestane verkeer tot " "poort ``22`` (puur voor jezelf) en poort ``80``." -#: ../../application.rst:80 +#: ../../application.rst:87 msgid "" "You should also have Nginx restrict application access when exposing it to " "the Internet. Simply generate an htpasswd string `using one of the many " @@ -273,7 +295,7 @@ msgstr "" "tekenreeks via `een van de vele websites die dit voor je kunnen doen `_" -#: ../../application.rst:82 +#: ../../application.rst:89 msgid "" "It's safe to use them, **just make sure to NEVER enter personal " "credentials** there **used for other applications or personal accounts**." @@ -281,11 +303,11 @@ msgstr "" "Je kunt deze veilig gebruiken **zolang je maar NOOIT persoonlijke informatie " "of gegevens invoert die je ook op andere websites gebruikt**!" -#: ../../application.rst:84 +#: ../../application.rst:91 msgid "Paste the htpasswd string in ``/etc/nginx/htpasswd``." msgstr "Plak de htpasswd-tekenreeks in het bestand ``/etc/nginx/htpasswd``." -#: ../../application.rst:86 +#: ../../application.rst:93 msgid "" "Open the site's vhost in ``/etc/nginx/sites-enabled/dsmr-webinterface`` and " "**uncomment** the following lines (remove the ##)::" @@ -293,7 +315,7 @@ msgstr "" "Open de website's vhost in ``/etc/nginx/sites-enabled/dsmr-webinterface`` en " "schakel de volgende regels in (verwijder de ## tekens)::" -#: ../../application.rst:91 +#: ../../application.rst:98 msgid "" "Now make sure you didn't insert any typo's by running ``sudo service nginx " "configtest``" @@ -301,11 +323,11 @@ msgstr "" "Zorg ervoor dat je geen typefouten hebt gemaakt door te controleren met: " "``sudo service nginx configtest``" -#: ../../application.rst:92 +#: ../../application.rst:99 msgid "And reload with ``sudo service nginx reload``." msgstr "En herlaad vervolgens met ``sudo service nginx reload``." -#: ../../application.rst:94 +#: ../../application.rst:101 msgid "" "You should be prompted for login credentials the next time your browser " "accesses the application. For more information regarding this topic, see the " diff --git a/docs/locale/nl/LC_MESSAGES/changelog.po b/docs/locale/nl/LC_MESSAGES/changelog.po index f593698cc..e548d0a40 100644 --- a/docs/locale/nl/LC_MESSAGES/changelog.po +++ b/docs/locale/nl/LC_MESSAGES/changelog.po @@ -8,526 +8,529 @@ msgid "" msgstr "" "Project-Id-Version: DSMR Reader 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-04-07 21:57+0200\n" -"PO-Revision-Date: 2016-04-07 20:20+0100\n" +"POT-Creation-Date: 2016-04-23 17:05+0200\n" +"PO-Revision-Date: 2016-04-18 22:10+0100\n" "Last-Translator: Dennis Siemensma \n" "Language-Team: Dennis Siemensma \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.2.0\n" +"Language: nl\n" #: ../../changelog.rst:2 msgid "Changelog" msgstr "Wijzigingenoverzicht" #: ../../changelog.rst:5 -msgid "v1.0.1 - 2016-xx-xx" +msgid "v1.1.0 - 2016-xx-xx" msgstr "" #: ../../changelog.rst:6 msgid "" +"Autorefresh dashboard (`#117 `_)." +msgstr "" + +#: ../../changelog.rst:7 +msgid "" +"Improve line graphs' visibility (`#111 " +"`_)." +msgstr "" + +#: ../../changelog.rst:8 +msgid "" +"Easily add notes (`#110 `_)." +msgstr "" + +#: ../../changelog.rst:9 +msgid "" +"Export data points in CSV format (`#2 `_)." +msgstr "" + +#: ../../changelog.rst:10 +msgid "" +"Allow day/month/year comparison (`#94 `_)." +msgstr "" + +#: ../../changelog.rst:11 +msgid "" +"Docs: Add FAQ and generic application info (`#113 " +"`_)." +msgstr "" + +#: ../../changelog.rst:15 +msgid "v1.0.1 - 2016-04-07" +msgstr "" + +#: ../../changelog.rst:16 +msgid "" "Update licence to OSI compatible one (`#119 " "`_)." msgstr "" -#: ../../changelog.rst:10 +#: ../../changelog.rst:20 msgid "v1.0.0 - 2016-04-07" msgstr "" -#: ../../changelog.rst:11 +#: ../../changelog.rst:21 +msgid "First official stable release." +msgstr "Eerste officiële stabiele release." + +#: ../../changelog.rst:25 +msgid "[β] v0.1 (2015-10-29) to 0.16 (2016-04-06)" +msgstr "" + +#: ../../changelog.rst:26 +msgid "" +"All previous beta releases/changes have been combined to a single list " +"below:" +msgstr "" + +#: ../../changelog.rst:28 msgid "" "Move documentation to wiki or RTD (`#90 " "`_)." msgstr "" -#: ../../changelog.rst:12 +#: ../../changelog.rst:29 msgid "" "Translate README to Dutch (`#16 `_)." msgstr "" -#: ../../changelog.rst:13 +#: ../../changelog.rst:30 msgid "" "Delete (recent) history page (`#112 `_)." msgstr "" -#: ../../changelog.rst:14 +#: ../../changelog.rst:31 msgid "" "Display most recent temperature in dashboard (`#114 " "`_)." msgstr "" -#: ../../changelog.rst:15 +#: ../../changelog.rst:32 msgid "" "Upgrade Django to 1.8.12 (`#118 `_)." msgstr "" -#: ../../changelog.rst:19 -msgid "v0.16 (β) - 2016-03-28" -msgstr "" - -#: ../../changelog.rst:20 +#: ../../changelog.rst:34 msgid "" "Redesign trends page (`#97 `_)." msgstr "" -#: ../../changelog.rst:21 +#: ../../changelog.rst:35 msgid "" "Support for summer time (`#105 `_)." msgstr "" -#: ../../changelog.rst:22 +#: ../../changelog.rst:36 msgid "" "Support for Daylight Saving Time (DST) transition (`#104 " "`_)." msgstr "" -#: ../../changelog.rst:23 +#: ../../changelog.rst:37 msgid "" "Add (error) hints to status page (`#106 " "`_)." msgstr "" -#: ../../changelog.rst:24 +#: ../../changelog.rst:38 msgid "" "Keep track of version (`#108 `_)." msgstr "" -#: ../../changelog.rst:28 -msgid "v0.15 (β) - 2016-03-24" -msgstr "" - -#: ../../changelog.rst:29 +#: ../../changelog.rst:40 msgid "" "Django 1.8.11 released (`#82 `_)." msgstr "" -#: ../../changelog.rst:30 +#: ../../changelog.rst:41 msgid "" "Prevent tests from failing due to moment of execution (`#88 " "`_)." msgstr "" -#: ../../changelog.rst:31 +#: ../../changelog.rst:42 msgid "" "Statistics page meter positions are broken (`#93 " "`_)." msgstr "" -#: ../../changelog.rst:32 +#: ../../changelog.rst:43 msgid "" "Archive only shows graph untill 23:00 (11 pm) (`#77 " "`_)." msgstr "" -#: ../../changelog.rst:33 +#: ../../changelog.rst:44 msgid "" "Trends page crashes due to nullable fields average (`#100 " "`_)." msgstr "" -#: ../../changelog.rst:34 +#: ../../changelog.rst:45 msgid "" "Trends: Plot peak and off-peak relative to each other (`#99 " "`_)." msgstr "" -#: ../../changelog.rst:35 +#: ../../changelog.rst:46 msgid "" "Monitor requirements with requires.io (`#101 " "`_)." msgstr "" -#: ../../changelog.rst:36 +#: ../../changelog.rst:47 msgid "" "Terminology (`#41 `_)." msgstr "" -#: ../../changelog.rst:37 +#: ../../changelog.rst:48 msgid "" "Obsolete signals in dsmr_consumption (`#63 " "`_)." msgstr "" -#: ../../changelog.rst:38 +#: ../../changelog.rst:49 msgid "" "Individual app testing coverage (`#64 `_)." msgstr "" -#: ../../changelog.rst:39 +#: ../../changelog.rst:50 msgid "" "Support for extra devices on other M-bus (0-n:24.1) (`#92 " "`_)." msgstr "" -#: ../../changelog.rst:40 +#: ../../changelog.rst:51 msgid "" "Separate post-deployment commands (`#102 " "`_)." msgstr "" -#: ../../changelog.rst:44 -msgid "v0.14 (β) - 2016-03-13" -msgstr "" - -#: ../../changelog.rst:45 +#: ../../changelog.rst:53 msgid "" "Show exceptions in production (webinterface) (`#87 " "`_)." msgstr "" -#: ../../changelog.rst:46 +#: ../../changelog.rst:54 msgid "" "Keep Supervisor processes running (`#79 " "`_)." msgstr "" -#: ../../changelog.rst:47 +#: ../../changelog.rst:55 msgid "" "Hourly stats of 22:00:00+00 every day lack gas (`#78 " "`_)." msgstr "" -#: ../../changelog.rst:48 +#: ../../changelog.rst:56 msgid "" "Test Travis-CI with MySQL + MariaDB + PostgreSQL (`#54 " "`_)." msgstr "" -#: ../../changelog.rst:49 +#: ../../changelog.rst:57 msgid "" "PostgreSQL tests + nosetests + coverage failure: unrecognized " "configuration parameter \"foreign_key_checks\" (`#62 " "`_)." msgstr "" -#: ../../changelog.rst:50 +#: ../../changelog.rst:58 msgid "" "Performance check (`#83 `_)." msgstr "" -#: ../../changelog.rst:51 +#: ../../changelog.rst:59 msgid "" "Allow month & year archive (`#66 `_)." msgstr "" -#: ../../changelog.rst:52 +#: ../../changelog.rst:60 msgid "" "Graphs keep increasing height on tablet (`#89 " "`_)." msgstr "" -#: ../../changelog.rst:56 -msgid "v0.13 (β) - 2016-03-06" -msgstr "" - -#: ../../changelog.rst:57 +#: ../../changelog.rst:62 msgid "" "Delete StatsSettings(.track) settings model (`#71 " "`_)." msgstr "" -#: ../../changelog.rst:58 +#: ../../changelog.rst:63 msgid "" "Drop deprecated commands (`#22 `_)." msgstr "" -#: ../../changelog.rst:59 +#: ../../changelog.rst:64 msgid "" "Datalogger doesn't work properly with DSMR 4.2 (KAIFA-METER) (`#73 " "`_)." msgstr "" -#: ../../changelog.rst:60 +#: ../../changelog.rst:65 msgid "" "Dashboard month statistics costs does not add up (`#75 " "`_)." msgstr "" -#: ../../changelog.rst:61 +#: ../../changelog.rst:66 msgid "" "Log unhandled exceptions and errors (`#65 " "`_)." msgstr "" -#: ../../changelog.rst:62 +#: ../../changelog.rst:67 msgid "" "Datalogger crashes with IntegrityError because 'timestamp' is null (`#74 " "`_)." msgstr "" -#: ../../changelog.rst:63 +#: ../../changelog.rst:68 msgid "" "Trends are always shown in UTC (`#76 `_)." msgstr "" -#: ../../changelog.rst:64 +#: ../../changelog.rst:69 msgid "" "Squash migrations (`#31 `_)." msgstr "" -#: ../../changelog.rst:65 +#: ../../changelog.rst:70 msgid "" "Display 'electricity returned' graph in dashboard (`#81 " "`_)." msgstr "" -#: ../../changelog.rst:66 +#: ../../changelog.rst:71 msgid "" "Optional gas (and electricity returned) capabilities tracking (`#70 " "`_)." msgstr "" -#: ../../changelog.rst:67 +#: ../../changelog.rst:72 msgid "" "Add 'electricity returned' to trends page (`#84 " "`_)." msgstr "" -#: ../../changelog.rst:71 -msgid "v0.12 (β) - 2016-03-01" -msgstr "" - -#: ../../changelog.rst:72 +#: ../../changelog.rst:74 msgid "" "Archive: View past days details (`#61 `_)." msgstr "" -#: ../../changelog.rst:73 +#: ../../changelog.rst:75 msgid "" "Dashboard: Consumption total for current month (`#60 " "`_)." msgstr "" -#: ../../changelog.rst:74 +#: ../../changelog.rst:76 msgid "" "Check whether gas readings are optional (`#34 " "`_)." msgstr "" -#: ../../changelog.rst:75 +#: ../../changelog.rst:77 msgid "" "Django security releases issued: 1.8.10 (`#68 " "`_)." msgstr "" -#: ../../changelog.rst:76 +#: ../../changelog.rst:78 msgid "" "Notes display in archive (`#69 `_)." msgstr "" #: ../../changelog.rst:80 -msgid "v0.11 (β) - 2016-02-22" -msgstr "" - -#: ../../changelog.rst:81 msgid "" "Status page/alerts when features are disabled/unavailable (`#45 " "`_)." msgstr "" -#: ../../changelog.rst:82 +#: ../../changelog.rst:81 msgid "" "Integrate Travis CI (`#48 `_)." msgstr "" -#: ../../changelog.rst:83 +#: ../../changelog.rst:82 msgid "" "Testing coverage (`#38 `_)." msgstr "" -#: ../../changelog.rst:84 +#: ../../changelog.rst:83 msgid "" "Implement automatic backups & Dropbox cloud storage (`#44 " "`_)." msgstr "" -#: ../../changelog.rst:85 +#: ../../changelog.rst:84 msgid "" "Link code coverage service to repository (`#56 " "`_)." msgstr "" -#: ../../changelog.rst:86 +#: ../../changelog.rst:85 msgid "" "Explore timezone.localtime() as replacement for datetime.astimezone() " "(`#50 `_)." msgstr "" -#: ../../changelog.rst:87 +#: ../../changelog.rst:86 msgid "" "Align GasConsumption.read_at to represent the start of hour (`#40 " "`_)." msgstr "" -#: ../../changelog.rst:91 -msgid "v0.10 (β) - 2016-02-15" -msgstr "" - -#: ../../changelog.rst:92 +#: ../../changelog.rst:88 msgid "" "Cleanup unused static files (`#47 `_)." msgstr "" -#: ../../changelog.rst:93 +#: ../../changelog.rst:89 msgid "" "Investigated mysql_tzinfo_to_sql — Load the Time Zone Tables (`#35 " "`_)." msgstr "" -#: ../../changelog.rst:94 +#: ../../changelog.rst:90 msgid "" "Make additional DSMR data optional (`#46 " "`_)." msgstr "" -#: ../../changelog.rst:95 +#: ../../changelog.rst:91 msgid "" "Localize graph x-axis (`#42 `_)." msgstr "" -#: ../../changelog.rst:96 +#: ../../changelog.rst:92 msgid "" "Added graph formatting string to gettext file (`#42 " "`_)." msgstr "" -#: ../../changelog.rst:97 +#: ../../changelog.rst:93 msgid "" "Different colors for peak & off-peak electricity (`#52 " "`_)." msgstr "" -#: ../../changelog.rst:98 +#: ../../changelog.rst:94 msgid "" "Admin: Note widget (`#51 `_)." msgstr "" -#: ../../changelog.rst:99 +#: ../../changelog.rst:95 msgid "" "Allow GUI to run without data (`#26 `_)." msgstr "" -#: ../../changelog.rst:103 -msgid "v0.9 (β) - 2016-02-08" -msgstr "" - -#: ../../changelog.rst:104 +#: ../../changelog.rst:97 msgid "" "Moved project to GitHub (`#28 `_)." msgstr "" -#: ../../changelog.rst:105 +#: ../../changelog.rst:98 msgid "Added stdout to dsmr_backend to reflect progress." msgstr "" -#: ../../changelog.rst:106 +#: ../../changelog.rst:99 msgid "" "Restore note usage in GUI (`#39 `_)." msgstr "" -#: ../../changelog.rst:110 -msgid "v0.8 (β) - 2016-02-06" -msgstr "" - -#: ../../changelog.rst:111 +#: ../../changelog.rst:101 msgid "" "Store daily, weekly, monthly and yearly statistics (`#3 " "`_)." msgstr "" -#: ../../changelog.rst:112 +#: ../../changelog.rst:102 msgid "" "Improved Recent History page performance a bit. (as result of `#3 " "`_)" msgstr "" -#: ../../changelog.rst:113 +#: ../../changelog.rst:103 msgid "" "Updates ChartJS library tot 1.1, disposing django-chartjs plugin. Labels " "finally work! (as result of `#3 `_)" msgstr "" -#: ../../changelog.rst:114 +#: ../../changelog.rst:104 msgid "" "Added trends page. (as result of `#3 `_)" msgstr "" -#: ../../changelog.rst:118 -msgid "v0.7 (β) - 2016-02-04" -msgstr "" - -#: ../../changelog.rst:119 +#: ../../changelog.rst:106 msgid "" "Recent history setting: set range (`#29 " "`_)." msgstr "" -#: ../../changelog.rst:120 +#: ../../changelog.rst:107 msgid "" "Mock required for test: dsmr_weather.test_weather_tracking (`#32 " "`_)." msgstr "" -#: ../../changelog.rst:124 -msgid "v0.6 (β) - 2016-02-03" -msgstr "" - -#: ../../changelog.rst:125 +#: ../../changelog.rst:109 msgid "" "Massive refactoring: Separating apps & using signals (`#19 " "`_)." msgstr "" -#: ../../changelog.rst:126 +#: ../../changelog.rst:110 msgid "" "README update: Exit character for cu (`#27 " "`_, by Jeroen " "Peters)." msgstr "" -#: ../../changelog.rst:127 +#: ../../changelog.rst:111 msgid "Fixed untranslated strings in admin interface." msgstr "" -#: ../../changelog.rst:128 +#: ../../changelog.rst:112 msgid "Upgraded Django to 1.8.9." msgstr "" -#: ../../changelog.rst:132 -msgid "v0.5 (β) - 2016-01-16" -msgstr "" - -#: ../../changelog.rst:133 -msgid "First stable release." -msgstr "" - #~ msgid "v1.0.0 - 2016-xx-xx" #~ msgstr "" @@ -726,3 +729,45 @@ msgstr "" #~ msgid "README update: Exit character for cu (#27, by Jeroen Peters)." #~ msgstr "" +#~ msgid "v1.0.1 - 2016-xx-xx" +#~ msgstr "" + +#~ msgid "v0.16 (β) - 2016-03-28" +#~ msgstr "" + +#~ msgid "v0.15 (β) - 2016-03-24" +#~ msgstr "" + +#~ msgid "v0.14 (β) - 2016-03-13" +#~ msgstr "" + +#~ msgid "v0.13 (β) - 2016-03-06" +#~ msgstr "" + +#~ msgid "v0.12 (β) - 2016-03-01" +#~ msgstr "" + +#~ msgid "v0.11 (β) - 2016-02-22" +#~ msgstr "" + +#~ msgid "v0.10 (β) - 2016-02-15" +#~ msgstr "" + +#~ msgid "v0.9 (β) - 2016-02-08" +#~ msgstr "" + +#~ msgid "v0.8 (β) - 2016-02-06" +#~ msgstr "" + +#~ msgid "v0.7 (β) - 2016-02-04" +#~ msgstr "" + +#~ msgid "v0.6 (β) - 2016-02-03" +#~ msgstr "" + +#~ msgid "v0.5 (β) - 2016-01-16" +#~ msgstr "" + +#~ msgid "First stable release." +#~ msgstr "" + diff --git a/docs/locale/nl/LC_MESSAGES/credits.po b/docs/locale/nl/LC_MESSAGES/credits.po index 4d67264b4..0e274ea20 100644 --- a/docs/locale/nl/LC_MESSAGES/credits.po +++ b/docs/locale/nl/LC_MESSAGES/credits.po @@ -1,20 +1,21 @@ +# SOME DESCRIPTIVE TITLE. # Copyright (C) 2016, Dennis Siemensma # This file is distributed under the same license as the DSMR Reader # package. +# FIRST AUTHOR , 2016. # msgid "" msgstr "" "Project-Id-Version: DSMR Reader 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-30 22:43+0200\n" +"POT-Creation-Date: 2016-04-23 17:05+0200\n" "PO-Revision-Date: 2016-04-07 20:22+0100\n" "Last-Translator: Dennis Siemensma \n" "Language-Team: Dennis Siemensma \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.2.0\n" -"X-Generator: Poedit 1.5.4\n" "Language: nl\n" #: ../../credits.rst:2 @@ -26,9 +27,9 @@ msgid "" "Software used and contributers are listed below. Please note and respect " "their licences as well, if any apply." msgstr "" -"Alle gebruikte software en iedereen die bijgedragen heeft staat hieronder. " -"De externe software kan tevens onder licentie staan, zie daarvoor de " -"software zelf." +"Alle gebruikte software en iedereen die bijgedragen heeft staat " +"hieronder. De externe software kan tevens onder licentie staan, zie " +"daarvoor de software zelf." #: ../../credits.rst:6 msgid "Software" @@ -40,11 +41,11 @@ msgstr "`Raspbian `_" #: ../../credits.rst:10 msgid "" -"`Raspbian minimal unattended netinstaller `_" +"`Raspbian minimal unattended netinstaller `_" msgstr "" -"`Raspbian minimal unattended netinstaller `_" +"`Raspbian minimal unattended netinstaller `_" #: ../../credits.rst:12 msgid "`Django Project `_" @@ -72,11 +73,11 @@ msgstr "`PostgreSQL `_" #: ../../credits.rst:24 msgid "" -"`Director Responsive Admin `_" +"`Director Responsive Admin `_" msgstr "" -"`Director Responsive Admin `_" +"`Director Responsive Admin `_" #: ../../credits.rst:26 msgid "`Favicon `_" @@ -120,42 +121,50 @@ msgstr "" #: ../../credits.rst:44 msgid "" -"`Daniel ter Horst `_ (`Github " -"profile `_)" +"`Daniel ter Horst `_ (`Github" +" profile `_)" msgstr "" -"`Daniel ter Horst `_ (`Github " -"profile `_)" +"`Daniel ter Horst `_ (`Github" +" profile `_)" #: ../../credits.rst:45 +#, fuzzy +msgid "" +"`Sander de Leeuw `_" +" (`Github profile `_)" +msgstr "" +"`Jeroen Peters `_ (`Github " +"profile `_)" + +#: ../../credits.rst:46 msgid "`Gert Schaafsma `_" msgstr "`Gert Schaafsma `_" -#: ../../credits.rst:46 +#: ../../credits.rst:47 msgid "`Bert-Jan Vos `_" msgstr "`Bert-Jan Vos `_" -#: ../../credits.rst:50 +#: ../../credits.rst:51 msgid "DSMR help" msgstr "DSMR hulp" -#: ../../credits.rst:52 -msgid "" -"Dutch Smart Meter reading specifications, data cables, examples and hints:" -msgstr "" -"Dutch Smart Meter reading specifications, data cables, examples and hints:" +#: ../../credits.rst:53 +msgid "Dutch Smart Meter reading specifications, data cables, examples and hints:" +msgstr "Dutch Smart Meter reading specifications, data cables, examples and hints:" -#: ../../credits.rst:54 +#: ../../credits.rst:55 msgid "`Gé Janssen `_" msgstr "`Gé Janssen `_" -#: ../../credits.rst:56 +#: ../../credits.rst:57 msgid "" -"`Joost van der Linde `_" +"`Joost van der Linde " +"`_" msgstr "" -"`Joost van der Linde `_" +"`Joost van der Linde " +"`_" -#: ../../credits.rst:58 +#: ../../credits.rst:59 msgid "`SOS Solutions `_" msgstr "`SOS Solutions `_" + diff --git a/docs/locale/nl/LC_MESSAGES/intro.mo b/docs/locale/nl/LC_MESSAGES/intro.mo index d7115229a..3261b9b2e 100644 Binary files a/docs/locale/nl/LC_MESSAGES/intro.mo and b/docs/locale/nl/LC_MESSAGES/intro.mo differ diff --git a/docs/locale/nl/LC_MESSAGES/intro.po b/docs/locale/nl/LC_MESSAGES/intro.po index 8fb490b76..71478cebe 100644 --- a/docs/locale/nl/LC_MESSAGES/intro.po +++ b/docs/locale/nl/LC_MESSAGES/intro.po @@ -1,21 +1,23 @@ +# SOME DESCRIPTIVE TITLE. # Copyright (C) 2016, Dennis Siemensma # This file is distributed under the same license as the DSMR Reader # package. +# FIRST AUTHOR , 2016. # msgid "" msgstr "" "Project-Id-Version: DSMR Reader 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-30 22:43+0200\n" -"PO-Revision-Date: 2016-04-07 19:44+0100\n" +"POT-Creation-Date: 2016-04-18 22:09+0200\n" +"PO-Revision-Date: 2016-04-18 22:11+0100\n" "Last-Translator: Dennis Siemensma \n" "Language-Team: Dennis Siemensma \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.2.0\n" -"X-Generator: Poedit 1.5.4\n" "Language: nl\n" +"X-Generator: Poedit 1.5.4\n" #: ../../intro.rst:2 msgid "Introduction" @@ -81,3 +83,17 @@ msgid "" msgstr "" "Je kunt het project hier vinden: https://github.com/dennissiemensma/dsmr-" "reader" + +#: ../../intro.rst:23 +msgid "Languages" +msgstr "Talen" + +#: ../../intro.rst:24 +msgid "" +"The entire application and it's code is written in English. The entire " +"interface however is also translated into Dutch and will be triggered " +"depending on you browser's language preference." +msgstr "" +"De gehele applicatie, en bijbehorende code, is in het Engels geschreven. De " +"grafische interface is echter ook in het Nederlands beschikbaar. Deze wordt " +"getoond afhankelijk van de taalinstelling van je webbrowser." diff --git a/docs/locale/nl/LC_MESSAGES/licence.po b/docs/locale/nl/LC_MESSAGES/licence.po index 1ed2920ff..b4cd90691 100644 --- a/docs/locale/nl/LC_MESSAGES/licence.po +++ b/docs/locale/nl/LC_MESSAGES/licence.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: DSMR Reader 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-04-07 21:57+0200\n" +"POT-Creation-Date: 2016-04-18 22:09+0200\n" "PO-Revision-Date: 2016-04-07 21:57+0100\n" "Last-Translator: Dennis Siemensma \n" "Language-Team: Dennis Siemensma \n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.2.0\n" -"X-Generator: Poedit 1.5.4\n" +"Language: nl\n" #: ../../licence.rst:2 msgid "Licence (GNU GPLv3)" @@ -26,439 +26,923 @@ msgstr "Licentie (GNU GPLv3)" msgid "**Copyright (C) 2015/2016 Dennis Siemensma**" msgstr "" -#: ../../licence.rst:6 -msgid "GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007" +#: ../../licence.rst:7 +msgid "GNU GENERAL PUBLIC LICENSE" msgstr "" #: ../../licence.rst:9 -msgid "Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed." +msgid "GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007" msgstr "" -#: ../../licence.rst:13 -msgid "Preamble" +#: ../../licence.rst:12 +msgid "" +"Copyright (C) 2007 Free Software Foundation, Inc. " +"Everyone is permitted to copy and distribute verbatim copies of this " +"license document, but changing it is not allowed." msgstr "" -#: ../../licence.rst:15 -msgid "The GNU General Public License is a free, copyleft license for software and other kinds of works." +#: ../../licence.rst:17 +msgid "Preamble" msgstr "" -#: ../../licence.rst:18 -msgid "The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too." +#: ../../licence.rst:19 +msgid "" +"The GNU General Public License is a free, copyleft license for software " +"and other kinds of works." msgstr "" -#: ../../licence.rst:27 -msgid "When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things." +#: ../../licence.rst:22 +msgid "" +"The licenses for most software and other practical works are designed to " +"take away your freedom to share and change the works. By contrast, the " +"GNU General Public License is intended to guarantee your freedom to share" +" and change all versions of a program--to make sure it remains free " +"software for all its users. We, the Free Software Foundation, use the " +"GNU General Public License for most of our software; it applies also to " +"any other work released this way by its authors. You can apply it to " +"your programs, too." msgstr "" -#: ../../licence.rst:34 -msgid "To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others." +#: ../../licence.rst:31 +msgid "" +"When we speak of free software, we are referring to freedom, not price. " +"Our General Public Licenses are designed to make sure that you have the " +"freedom to distribute copies of free software (and charge for them if you" +" wish), that you receive source code or can get it if you want it, that " +"you can change the software or use pieces of it in new free programs, and" +" that you know you can do these things." msgstr "" -#: ../../licence.rst:39 -msgid "For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights." +#: ../../licence.rst:38 +msgid "" +"To protect your rights, we need to prevent others from denying you these " +"rights or asking you to surrender the rights. Therefore, you have " +"certain responsibilities if you distribute copies of the software, or if " +"you modify it: responsibilities to respect the freedom of others." msgstr "" -#: ../../licence.rst:45 -msgid "Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it." +#: ../../licence.rst:43 +msgid "" +"For example, if you distribute copies of such a program, whether gratis " +"or for a fee, you must pass on to the recipients the same freedoms that " +"you received. You must make sure that they, too, receive or can get the " +"source code. And you must show them these terms so they know their " +"rights." msgstr "" #: ../../licence.rst:49 -msgid "For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions." +msgid "" +"Developers that use the GNU GPL protect your rights with two steps: (1) " +"assert copyright on the software, and (2) offer you this License giving " +"you legal permission to copy, distribute and/or modify it." msgstr "" -#: ../../licence.rst:55 -msgid "Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users." +#: ../../licence.rst:53 +msgid "" +"For the developers' and authors' protection, the GPL clearly explains " +"that there is no warranty for this free software. For both users' and " +"authors' sake, the GPL requires that modified versions be marked as " +"changed, so that their problems will not be attributed erroneously to " +"authors of previous versions." msgstr "" -#: ../../licence.rst:66 -msgid "Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free." +#: ../../licence.rst:59 +msgid "" +"Some devices are designed to deny users access to install or run modified" +" versions of the software inside them, although the manufacturer can do " +"so. This is fundamentally incompatible with the aim of protecting users'" +" freedom to change the software. The systematic pattern of such abuse " +"occurs in the area of products for individuals to use, which is precisely" +" where it is most unacceptable. Therefore, we have designed this version" +" of the GPL to prohibit the practice for those products. If such " +"problems arise substantially in other domains, we stand ready to extend " +"this provision to those domains in future versions of the GPL, as needed " +"to protect the freedom of users." +msgstr "" + +#: ../../licence.rst:70 +msgid "" +"Finally, every program is threatened constantly by software patents. " +"States should not allow patents to restrict development and use of " +"software on general-purpose computers, but in those that do, we wish to " +"avoid the special danger that patents applied to a free program could " +"make it effectively proprietary. To prevent this, the GPL assures that " +"patents cannot be used to render the program non-free." msgstr "" -#: ../../licence.rst:73 -msgid "The precise terms and conditions for copying, distribution and modification follow." +#: ../../licence.rst:77 +msgid "" +"The precise terms and conditions for copying, distribution and " +"modification follow." msgstr "" -#: ../../licence.rst:76 +#: ../../licence.rst:81 msgid "TERMS AND CONDITIONS" msgstr "" -#: ../../licence.rst:78 -msgid "Definitions." +#: ../../licence.rst:84 +msgid "0. Definitions." msgstr "" -#: ../../licence.rst:80 +#: ../../licence.rst:86 msgid "\"This License\" refers to version 3 of the GNU General Public License." msgstr "" -#: ../../licence.rst:82 -msgid "\"Copyright\" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks." -msgstr "" - -#: ../../licence.rst:85 -msgid "\"The Program\" refers to any copyrightable work licensed under this License. Each licensee is addressed as \"you\". \"Licensees\" and \"recipients\" may be individuals or organizations." +#: ../../licence.rst:88 +msgid "" +"\"Copyright\" also means copyright-like laws that apply to other kinds of" +" works, such as semiconductor masks." msgstr "" -#: ../../licence.rst:89 -msgid "To \"modify\" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a \"modified version\" of the earlier work or a work \"based on\" the earlier work." +#: ../../licence.rst:91 +msgid "" +"\"The Program\" refers to any copyrightable work licensed under this " +"License. Each licensee is addressed as \"you\". \"Licensees\" and " +"\"recipients\" may be individuals or organizations." msgstr "" -#: ../../licence.rst:94 -msgid "A \"covered work\" means either the unmodified Program or a work based on the Program." +#: ../../licence.rst:95 +msgid "" +"To \"modify\" a work means to copy from or adapt all or part of the work " +"in a fashion requiring copyright permission, other than the making of an " +"exact copy. The resulting work is called a \"modified version\" of the " +"earlier work or a work \"based on\" the earlier work." msgstr "" -#: ../../licence.rst:97 -msgid "To \"propagate\" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well." +#: ../../licence.rst:100 +msgid "" +"A \"covered work\" means either the unmodified Program or a work based on" +" the Program." msgstr "" -#: ../../licence.rst:104 -msgid "To \"convey\" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying." +#: ../../licence.rst:103 +msgid "" +"To \"propagate\" a work means to do anything with it that, without " +"permission, would make you directly or secondarily liable for " +"infringement under applicable copyright law, except executing it on a " +"computer or modifying a private copy. Propagation includes copying, " +"distribution (with or without modification), making available to the " +"public, and in some countries other activities as well." msgstr "" -#: ../../licence.rst:108 -msgid "An interactive user interface displays \"Appropriate Legal Notices\" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion." +#: ../../licence.rst:110 +msgid "" +"To \"convey\" a work means any kind of propagation that enables other " +"parties to make or receive copies. Mere interaction with a user through " +"a computer network, with no transfer of a copy, is not conveying." msgstr "" -#: ../../licence.rst:117 -msgid "Source Code." +#: ../../licence.rst:114 +msgid "" +"An interactive user interface displays \"Appropriate Legal Notices\" to " +"the extent that it includes a convenient and prominently visible feature " +"that (1) displays an appropriate copyright notice, and (2) tells the user" +" that there is no warranty for the work (except to the extent that " +"warranties are provided), that licensees may convey the work under this " +"License, and how to view a copy of this License. If the interface " +"presents a list of user commands or options, such as a menu, a prominent " +"item in the list meets this criterion." msgstr "" -#: ../../licence.rst:119 -msgid "The \"source code\" for a work means the preferred form of the work for making modifications to it. \"Object code\" means any non-source form of a work." +#: ../../licence.rst:124 +msgid "1. Source Code." msgstr "" -#: ../../licence.rst:123 -msgid "A \"Standard Interface\" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language." +#: ../../licence.rst:126 +msgid "" +"The \"source code\" for a work means the preferred form of the work for " +"making modifications to it. \"Object code\" means any non-source form of" +" a work." msgstr "" -#: ../../licence.rst:128 -msgid "The \"System Libraries\" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A \"Major Component\", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it." +#: ../../licence.rst:130 +msgid "" +"A \"Standard Interface\" means an interface that either is an official " +"standard defined by a recognized standards body, or, in the case of " +"interfaces specified for a particular programming language, one that is " +"widely used among developers working in that language." msgstr "" -#: ../../licence.rst:139 -msgid "The \"Corresponding Source\" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work." +#: ../../licence.rst:135 +msgid "" +"The \"System Libraries\" of an executable work include anything, other " +"than the work as a whole, that (a) is included in the normal form of " +"packaging a Major Component, but which is not part of that Major " +"Component, and (b) serves only to enable use of the work with that Major " +"Component, or to implement a Standard Interface for which an " +"implementation is available to the public in source code form. A \"Major" +" Component\", in this context, means a major essential component (kernel," +" window system, and so on) of the specific operating system (if any) on " +"which the executable work runs, or a compiler used to produce the work, " +"or an object code interpreter used to run it." +msgstr "" + +#: ../../licence.rst:146 +msgid "" +"The \"Corresponding Source\" for a work in object code form means all the" +" source code needed to generate, install, and (for an executable work) " +"run the object code and to modify the work, including scripts to control " +"those activities. However, it does not include the work's System " +"Libraries, or general-purpose tools or generally available free programs " +"which are used unmodified in performing those activities but which are " +"not part of the work. For example, Corresponding Source includes " +"interface definition files associated with source files for the work, and" +" the source code for shared libraries and dynamically linked subprograms " +"that the work is specifically designed to require, such as by intimate " +"data communication or control flow between those subprograms and other " +"parts of the work." msgstr "" -#: ../../licence.rst:152 -msgid "The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source." +#: ../../licence.rst:159 +msgid "" +"The Corresponding Source need not include anything that users can " +"regenerate automatically from other parts of the Corresponding Source." msgstr "" -#: ../../licence.rst:156 +#: ../../licence.rst:163 msgid "The Corresponding Source for a work in source code form is that same work." msgstr "" -#: ../../licence.rst:159 -msgid "Basic Permissions." -msgstr "" - -#: ../../licence.rst:161 -msgid "All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law." +#: ../../licence.rst:167 +msgid "2. Basic Permissions." msgstr "" #: ../../licence.rst:169 -msgid "You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you." -msgstr "" - -#: ../../licence.rst:180 -msgid "Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary." -msgstr "" - -#: ../../licence.rst:184 -msgid "Protecting Users' Legal Rights From Anti-Circumvention Law." +msgid "" +"All rights granted under this License are granted for the term of " +"copyright on the Program, and are irrevocable provided the stated " +"conditions are met. This License explicitly affirms your unlimited " +"permission to run the unmodified Program. The output from running a " +"covered work is covered by this License only if the output, given its " +"content, constitutes a covered work. This License acknowledges your " +"rights of fair use or other equivalent, as provided by copyright law." msgstr "" -#: ../../licence.rst:186 -msgid "No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures." +#: ../../licence.rst:177 +msgid "" +"You may make, run and propagate covered works that you do not convey, " +"without conditions so long as your license otherwise remains in force. " +"You may convey covered works to others for the sole purpose of having " +"them make modifications exclusively for you, or provide you with " +"facilities for running those works, provided that you comply with the " +"terms of this License in conveying all material for which you do not " +"control copyright. Those thus making or running the covered works for " +"you must do so exclusively on your behalf, under your direction and " +"control, on terms that prohibit them from making any copies of your " +"copyrighted material outside their relationship with you." +msgstr "" + +#: ../../licence.rst:188 +msgid "" +"Conveying under any other circumstances is permitted solely under the " +"conditions stated below. Sublicensing is not allowed; section 10 makes " +"it unnecessary." msgstr "" -#: ../../licence.rst:192 -msgid "When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures." +#: ../../licence.rst:193 +msgid "3. Protecting Users' Legal Rights From Anti-Circumvention Law." msgstr "" -#: ../../licence.rst:200 -msgid "Conveying Verbatim Copies." +#: ../../licence.rst:195 +msgid "" +"No covered work shall be deemed part of an effective technological " +"measure under any applicable law fulfilling obligations under article 11 " +"of the WIPO copyright treaty adopted on 20 December 1996, or similar laws" +" prohibiting or restricting circumvention of such measures." msgstr "" -#: ../../licence.rst:202 -msgid "You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program." +#: ../../licence.rst:201 +msgid "" +"When you convey a covered work, you waive any legal power to forbid " +"circumvention of technological measures to the extent such circumvention " +"is effected by exercising rights under this License with respect to the " +"covered work, and you disclaim any intention to limit operation or " +"modification of the work as a means of enforcing, against the work's " +"users, your or third parties' legal rights to forbid circumvention of " +"technological measures." msgstr "" #: ../../licence.rst:210 -msgid "You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee." -msgstr "" - -#: ../../licence.rst:213 -msgid "Conveying Modified Source Versions." +msgid "4. Conveying Verbatim Copies." msgstr "" -#: ../../licence.rst:215 -msgid "You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:" +#: ../../licence.rst:212 +msgid "" +"You may convey verbatim copies of the Program's source code as you " +"receive it, in any medium, provided that you conspicuously and " +"appropriately publish on each copy an appropriate copyright notice; keep " +"intact all notices stating that this License and any non-permissive terms" +" added in accord with section 7 apply to the code; keep intact all " +"notices of the absence of any warranty; and give all recipients a copy of" +" this License along with the Program." msgstr "" -#: ../../licence.rst:219 -msgid "a) The work must carry prominent notices stating that you modified it, and giving a relevant date." +#: ../../licence.rst:220 +msgid "" +"You may charge any price or no price for each copy that you convey, and " +"you may offer support or warranty protection for a fee." msgstr "" -#: ../../licence.rst:222 -msgid "b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to \"keep intact all notices\"." +#: ../../licence.rst:224 +msgid "5. Conveying Modified Source Versions." msgstr "" -#: ../../licence.rst:227 -msgid "c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it." +#: ../../licence.rst:226 +msgid "" +"You may convey a work based on the Program, or the modifications to " +"produce it from the Program, in the form of source code under the terms " +"of section 4, provided that you also meet all of these conditions:" msgstr "" -#: ../../licence.rst:235 -msgid "d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so." +#: ../../licence.rst:230 +msgid "" +"a) The work must carry prominent notices stating that you modified it, " +"and giving a relevant date." msgstr "" -#: ../../licence.rst:240 -msgid "A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an \"aggregate\" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate." +#: ../../licence.rst:233 +msgid "" +"b) The work must carry prominent notices stating that it is released " +"under this License and any conditions added under section 7. This " +"requirement modifies the requirement in section 4 to \"keep intact all " +"notices\"." msgstr "" -#: ../../licence.rst:250 -msgid "Conveying Non-Source Forms." +#: ../../licence.rst:238 +msgid "" +"c) You must license the entire work, as a whole, under this License to " +"anyone who comes into possession of a copy. This License will therefore " +"apply, along with any applicable section 7 additional terms, to the whole" +" of the work, and all its parts, regardless of how they are packaged. " +"This License gives no permission to license the work in any other way, " +"but it does not invalidate such permission if you have separately " +"received it." msgstr "" -#: ../../licence.rst:252 -msgid "You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:" +#: ../../licence.rst:246 +msgid "" +"d) If the work has interactive user interfaces, each must display " +"Appropriate Legal Notices; however, if the Program has interactive " +"interfaces that do not display Appropriate Legal Notices, your work need " +"not make them do so." msgstr "" -#: ../../licence.rst:257 -msgid "a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange." +#: ../../licence.rst:251 +msgid "" +"A compilation of a covered work with other separate and independent " +"works, which are not by their nature extensions of the covered work, and " +"which are not combined with it such as to form a larger program, in or on" +" a volume of a storage or distribution medium, is called an \"aggregate\"" +" if the compilation and its resulting copyright are not used to limit the" +" access or legal rights of the compilation's users beyond what the " +"individual works permit. Inclusion of a covered work in an aggregate " +"does not cause this License to apply to the other parts of the aggregate." msgstr "" #: ../../licence.rst:262 -msgid "b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge." -msgstr "" - -#: ../../licence.rst:274 -msgid "c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b." -msgstr "" - -#: ../../licence.rst:280 -msgid "d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements." +msgid "6. Conveying Non-Source Forms." msgstr "" -#: ../../licence.rst:293 -msgid "e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d." -msgstr "" - -#: ../../licence.rst:298 -msgid "A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work." -msgstr "" - -#: ../../licence.rst:302 -msgid "A \"User Product\" is either (1) a \"consumer product\", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, \"normally used\" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product." +#: ../../licence.rst:264 +msgid "" +"You may convey a covered work in object code form under the terms of " +"sections 4 and 5, provided that you also convey the machine-readable " +"Corresponding Source under the terms of this License, in one of these " +"ways:" msgstr "" -#: ../../licence.rst:315 -msgid "\"Installation Information\" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made." +#: ../../licence.rst:269 +msgid "" +"a) Convey the object code in, or embodied in, a physical product " +"(including a physical distribution medium), accompanied by the " +"Corresponding Source fixed on a durable physical medium customarily used " +"for software interchange." msgstr "" -#: ../../licence.rst:323 -msgid "If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM)." +#: ../../licence.rst:274 +msgid "" +"b) Convey the object code in, or embodied in, a physical product " +"(including a physical distribution medium), accompanied by a written " +"offer, valid for at least three years and valid for as long as you offer " +"spare parts or customer support for that product model, to give anyone " +"who possesses the object code either (1) a copy of the Corresponding " +"Source for all the software in the product that is covered by this " +"License, on a durable physical medium customarily used for software " +"interchange, for a price no more than your reasonable cost of physically " +"performing this conveying of source, or (2) access to copy the " +"Corresponding Source from a network server at no charge." +msgstr "" + +#: ../../licence.rst:286 +msgid "" +"c) Convey individual copies of the object code with a copy of the written" +" offer to provide the Corresponding Source. This alternative is allowed " +"only occasionally and noncommercially, and only if you received the " +"object code with such an offer, in accord with subsection 6b." msgstr "" -#: ../../licence.rst:334 -msgid "The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network." +#: ../../licence.rst:292 +msgid "" +"d) Convey the object code by offering access from a designated place " +"(gratis or for a charge), and offer equivalent access to the " +"Corresponding Source in the same way through the same place at no further" +" charge. You need not require recipients to copy the Corresponding " +"Source along with the object code. If the place to copy the object code " +"is a network server, the Corresponding Source may be on a different " +"server (operated by you or a third party) that supports equivalent " +"copying facilities, provided you maintain clear directions next to the " +"object code saying where to find the Corresponding Source. Regardless of" +" what server hosts the Corresponding Source, you remain obligated to " +"ensure that it is available for as long as needed to satisfy these " +"requirements." +msgstr "" + +#: ../../licence.rst:305 +msgid "" +"e) Convey the object code using peer-to-peer transmission, provided you " +"inform other peers where the object code and Corresponding Source of the " +"work are being offered to the general public at no charge under " +"subsection 6d." msgstr "" -#: ../../licence.rst:342 -msgid "Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying." +#: ../../licence.rst:310 +msgid "" +"A separable portion of the object code, whose source code is excluded " +"from the Corresponding Source as a System Library, need not be included " +"in conveying the object code work." msgstr "" -#: ../../licence.rst:348 -msgid "Additional Terms." +#: ../../licence.rst:314 +msgid "" +"A \"User Product\" is either (1) a \"consumer product\", which means any " +"tangible personal property which is normally used for personal, family, " +"or household purposes, or (2) anything designed or sold for incorporation" +" into a dwelling. In determining whether a product is a consumer " +"product, doubtful cases shall be resolved in favor of coverage. For a " +"particular product received by a particular user, \"normally used\" " +"refers to a typical or common use of that class of product, regardless of" +" the status of the particular user or of the way in which the particular " +"user actually uses, or expects or is expected to use, the product. A " +"product is a consumer product regardless of whether the product has " +"substantial commercial, industrial or non-consumer uses, unless such uses" +" represent the only significant mode of use of the product." +msgstr "" + +#: ../../licence.rst:327 +msgid "" +"\"Installation Information\" for a User Product means any methods, " +"procedures, authorization keys, or other information required to install " +"and execute modified versions of a covered work in that User Product from" +" a modified version of its Corresponding Source. The information must " +"suffice to ensure that the continued functioning of the modified object " +"code is in no case prevented or interfered with solely because " +"modification has been made." msgstr "" -#: ../../licence.rst:350 -msgid "\"Additional permissions\" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions." +#: ../../licence.rst:335 +msgid "" +"If you convey an object code work under this section in, or with, or " +"specifically for use in, a User Product, and the conveying occurs as part" +" of a transaction in which the right of possession and use of the User " +"Product is transferred to the recipient in perpetuity or for a fixed term" +" (regardless of how the transaction is characterized), the Corresponding " +"Source conveyed under this section must be accompanied by the " +"Installation Information. But this requirement does not apply if neither" +" you nor any third party retains the ability to install modified object " +"code on the User Product (for example, the work has been installed in " +"ROM)." +msgstr "" + +#: ../../licence.rst:346 +msgid "" +"The requirement to provide Installation Information does not include a " +"requirement to continue to provide support service, warranty, or updates " +"for a work that has been modified or installed by the recipient, or for " +"the User Product in which it has been modified or installed. Access to a" +" network may be denied when the modification itself materially and " +"adversely affects the operation of the network or violates the rules and " +"protocols for communication across the network." msgstr "" -#: ../../licence.rst:359 -msgid "When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission." +#: ../../licence.rst:354 +msgid "" +"Corresponding Source conveyed, and Installation Information provided, in " +"accord with this section must be in a format that is publicly documented " +"(and with an implementation available to the public in source code form)," +" and must require no special password or key for unpacking, reading or " +"copying." msgstr "" -#: ../../licence.rst:366 -msgid "Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:" +#: ../../licence.rst:361 +msgid "7. Additional Terms." msgstr "" -#: ../../licence.rst:370 -msgid "a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or" +#: ../../licence.rst:363 +msgid "" +"\"Additional permissions\" are terms that supplement the terms of this " +"License by making exceptions from one or more of its conditions. " +"Additional permissions that are applicable to the entire Program shall be" +" treated as though they were included in this License, to the extent that" +" they are valid under applicable law. If additional permissions apply " +"only to part of the Program, that part may be used separately under those" +" permissions, but the entire Program remains governed by this License " +"without regard to the additional permissions." msgstr "" -#: ../../licence.rst:373 -msgid "b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or" +#: ../../licence.rst:372 +msgid "" +"When you convey a copy of a covered work, you may at your option remove " +"any additional permissions from that copy, or from any part of it. " +"(Additional permissions may be written to require their own removal in " +"certain cases when you modify the work.) You may place additional " +"permissions on material, added by you to a covered work, for which you " +"have or can give appropriate copyright permission." msgstr "" -#: ../../licence.rst:377 -msgid "c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or" +#: ../../licence.rst:379 +msgid "" +"Notwithstanding any other provision of this License, for material you add" +" to a covered work, you may (if authorized by the copyright holders of " +"that material) supplement the terms of this License with terms:" msgstr "" -#: ../../licence.rst:381 -msgid "d) Limiting the use for publicity purposes of names of licensors or authors of the material; or" +#: ../../licence.rst:383 +msgid "" +"a) Disclaiming warranty or limiting liability differently from the terms " +"of sections 15 and 16 of this License; or" msgstr "" -#: ../../licence.rst:384 -msgid "e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or" +#: ../../licence.rst:386 +msgid "" +"b) Requiring preservation of specified reasonable legal notices or author" +" attributions in that material or in the Appropriate Legal Notices " +"displayed by works containing it; or" msgstr "" -#: ../../licence.rst:387 -msgid "f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors." +#: ../../licence.rst:390 +msgid "" +"c) Prohibiting misrepresentation of the origin of that material, or " +"requiring that modified versions of such material be marked in reasonable" +" ways as different from the original version; or" msgstr "" -#: ../../licence.rst:393 -msgid "All other non-permissive additional terms are considered \"further restrictions\" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying." +#: ../../licence.rst:394 +msgid "" +"d) Limiting the use for publicity purposes of names of licensors or " +"authors of the material; or" msgstr "" -#: ../../licence.rst:403 -msgid "If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms." +#: ../../licence.rst:397 +msgid "" +"e) Declining to grant rights under trademark law for use of some trade " +"names, trademarks, or service marks; or" msgstr "" -#: ../../licence.rst:408 -msgid "Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way." +#: ../../licence.rst:400 +msgid "" +"f) Requiring indemnification of licensors and authors of that material by" +" anyone who conveys the material (or modified versions of it) with " +"contractual assumptions of liability to the recipient, for any liability " +"that these contractual assumptions directly impose on those licensors and" +" authors." msgstr "" -#: ../../licence.rst:412 -msgid "Termination." +#: ../../licence.rst:406 +msgid "" +"All other non-permissive additional terms are considered \"further " +"restrictions\" within the meaning of section 10. If the Program as you " +"received it, or any part of it, contains a notice stating that it is " +"governed by this License along with a term that is a further restriction," +" you may remove that term. If a license document contains a further " +"restriction but permits relicensing or conveying under this License, you " +"may add to a covered work material governed by the terms of that license " +"document, provided that the further restriction does not survive such " +"relicensing or conveying." +msgstr "" + +#: ../../licence.rst:416 +msgid "" +"If you add terms to a covered work in accord with this section, you must " +"place, in the relevant source files, a statement of the additional terms " +"that apply to those files, or a notice indicating where to find the " +"applicable terms." msgstr "" -#: ../../licence.rst:414 -msgid "You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11)." +#: ../../licence.rst:421 +msgid "" +"Additional terms, permissive or non-permissive, may be stated in the form" +" of a separately written license, or stated as exceptions; the above " +"requirements apply either way." msgstr "" -#: ../../licence.rst:420 -msgid "However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation." +#: ../../licence.rst:426 +msgid "8. Termination." msgstr "" -#: ../../licence.rst:427 -msgid "Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice." +#: ../../licence.rst:428 +msgid "" +"You may not propagate or modify a covered work except as expressly " +"provided under this License. Any attempt otherwise to propagate or " +"modify it is void, and will automatically terminate your rights under " +"this License (including any patent licenses granted under the third " +"paragraph of section 11)." msgstr "" #: ../../licence.rst:434 -msgid "Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10." -msgstr "" - -#: ../../licence.rst:440 -msgid "Acceptance Not Required for Having Copies." +msgid "" +"However, if you cease all violation of this License, then your license " +"from a particular copyright holder is reinstated (a) provisionally, " +"unless and until the copyright holder explicitly and finally terminates " +"your license, and (b) permanently, if the copyright holder fails to " +"notify you of the violation by some reasonable means prior to 60 days " +"after the cessation." msgstr "" -#: ../../licence.rst:442 -msgid "You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so." +#: ../../licence.rst:441 +msgid "" +"Moreover, your license from a particular copyright holder is reinstated " +"permanently if the copyright holder notifies you of the violation by some" +" reasonable means, this is the first time you have received notice of " +"violation of this License (for any work) from that copyright holder, and " +"you cure the violation prior to 30 days after your receipt of the notice." msgstr "" -#: ../../licence.rst:451 -msgid "Automatic Licensing of Downstream Recipients." +#: ../../licence.rst:448 +msgid "" +"Termination of your rights under this section does not terminate the " +"licenses of parties who have received copies or rights from you under " +"this License. If your rights have been terminated and not permanently " +"reinstated, you do not qualify to receive new licenses for the same " +"material under section 10." msgstr "" -#: ../../licence.rst:453 -msgid "Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License." +#: ../../licence.rst:455 +msgid "9. Acceptance Not Required for Having Copies." msgstr "" -#: ../../licence.rst:458 -msgid "An \"entity transaction\" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts." +#: ../../licence.rst:457 +msgid "" +"You are not required to accept this License in order to receive or run a " +"copy of the Program. Ancillary propagation of a covered work occurring " +"solely as a consequence of using peer-to-peer transmission to receive a " +"copy likewise does not require acceptance. However, nothing other than " +"this License grants you permission to propagate or modify any covered " +"work. These actions infringe copyright if you do not accept this " +"License. Therefore, by modifying or propagating a covered work, you " +"indicate your acceptance of this License to do so." msgstr "" -#: ../../licence.rst:468 -msgid "You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it." +#: ../../licence.rst:467 +msgid "10. Automatic Licensing of Downstream Recipients." msgstr "" -#: ../../licence.rst:476 -msgid "Patents." +#: ../../licence.rst:469 +msgid "" +"Each time you convey a covered work, the recipient automatically receives" +" a license from the original licensors, to run, modify and propagate that" +" work, subject to this License. You are not responsible for enforcing " +"compliance by third parties with this License." msgstr "" -#: ../../licence.rst:478 -msgid "A \"contributor\" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's \"contributor version\"." +#: ../../licence.rst:474 +msgid "" +"An \"entity transaction\" is a transaction transferring control of an " +"organization, or substantially all assets of one, or subdividing an " +"organization, or merging organizations. If propagation of a covered work" +" results from an entity transaction, each party to that transaction who " +"receives a copy of the work also receives whatever licenses to the work " +"the party's predecessor in interest had or could give under the previous " +"paragraph, plus a right to possession of the Corresponding Source of the " +"work from the predecessor in interest, if the predecessor has it or can " +"get it with reasonable efforts." +msgstr "" + +#: ../../licence.rst:484 +msgid "" +"You may not impose any further restrictions on the exercise of the rights" +" granted or affirmed under this License. For example, you may not impose" +" a license fee, royalty, or other charge for exercise of rights granted " +"under this License, and you may not initiate litigation (including a " +"cross-claim or counterclaim in a lawsuit) alleging that any patent claim " +"is infringed by making, using, selling, offering for sale, or importing " +"the Program or any portion of it." msgstr "" -#: ../../licence.rst:482 -msgid "A contributor's \"essential patent claims\" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, \"control\" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License." +#: ../../licence.rst:493 +msgid "11. Patents." msgstr "" -#: ../../licence.rst:492 -msgid "Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version." +#: ../../licence.rst:495 +msgid "" +"A \"contributor\" is a copyright holder who authorizes use under this " +"License of the Program or a work on which the Program is based. The work" +" thus licensed is called the contributor's \"contributor version\"." msgstr "" -#: ../../licence.rst:497 -msgid "In the following three paragraphs, a \"patent license\" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To \"grant\" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party." +#: ../../licence.rst:499 +msgid "" +"A contributor's \"essential patent claims\" are all patent claims owned " +"or controlled by the contributor, whether already acquired or hereafter " +"acquired, that would be infringed by some manner, permitted by this " +"License, of making, using, or selling its contributor version, but do not" +" include claims that would be infringed only as a consequence of further " +"modification of the contributor version. For purposes of this " +"definition, \"control\" includes the right to grant patent sublicenses in" +" a manner consistent with the requirements of this License." msgstr "" -#: ../../licence.rst:504 -msgid "If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. \"Knowingly relying\" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid." +#: ../../licence.rst:509 +msgid "" +"Each contributor grants you a non-exclusive, worldwide, royalty-free " +"patent license under the contributor's essential patent claims, to make, " +"use, sell, offer for sale, import and otherwise run, modify and propagate" +" the contents of its contributor version." msgstr "" -#: ../../licence.rst:518 -msgid "If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it." +#: ../../licence.rst:514 +msgid "" +"In the following three paragraphs, a \"patent license\" is any express " +"agreement or commitment, however denominated, not to enforce a patent " +"(such as an express permission to practice a patent or covenant not to " +"sue for patent infringement). To \"grant\" such a patent license to a " +"party means to make such an agreement or commitment not to enforce a " +"patent against the party." msgstr "" -#: ../../licence.rst:526 -msgid "A patent license is \"discriminatory\" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007." +#: ../../licence.rst:521 +msgid "" +"If you convey a covered work, knowingly relying on a patent license, and " +"the Corresponding Source of the work is not available for anyone to copy," +" free of charge and under the terms of this License, through a publicly " +"available network server or other readily accessible means, then you must" +" either (1) cause the Corresponding Source to be so available, or (2) " +"arrange to deprive yourself of the benefit of the patent license for this" +" particular work, or (3) arrange, in a manner consistent with the " +"requirements of this License, to extend the patent license to downstream " +"recipients. \"Knowingly relying\" means you have actual knowledge that, " +"but for the patent license, your conveying the covered work in a country," +" or your recipient's use of the covered work in a country, would infringe" +" one or more identifiable patents in that country that you have reason to" +" believe are valid." +msgstr "" + +#: ../../licence.rst:535 +msgid "" +"If, pursuant to or in connection with a single transaction or " +"arrangement, you convey, or propagate by procuring conveyance of, a " +"covered work, and grant a patent license to some of the parties receiving" +" the covered work authorizing them to use, propagate, modify or convey a " +"specific copy of the covered work, then the patent license you grant is " +"automatically extended to all recipients of the covered work and works " +"based on it." msgstr "" -#: ../../licence.rst:541 -msgid "Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law." +#: ../../licence.rst:543 +msgid "" +"A patent license is \"discriminatory\" if it does not include within the " +"scope of its coverage, prohibits the exercise of, or is conditioned on " +"the non-exercise of one or more of the rights that are specifically " +"granted under this License. You may not convey a covered work if you are" +" a party to an arrangement with a third party that is in the business of " +"distributing software, under which you make payment to the third party " +"based on the extent of your activity of conveying the work, and under " +"which the third party grants, to any of the parties who would receive the" +" covered work from you, a discriminatory patent license (a) in connection" +" with copies of the covered work conveyed by you (or copies made from " +"those copies), or (b) primarily for and in connection with specific " +"products or compilations that contain the covered work, unless you " +"entered into that arrangement, or that patent license was granted, prior " +"to 28 March 2007." +msgstr "" + +#: ../../licence.rst:558 +msgid "" +"Nothing in this License shall be construed as excluding or limiting any " +"implied license or other defenses to infringement that may otherwise be " +"available to you under applicable patent law." msgstr "" -#: ../../licence.rst:545 -msgid "No Surrender of Others' Freedom." +#: ../../licence.rst:563 +msgid "12. No Surrender of Others' Freedom." msgstr "" -#: ../../licence.rst:547 -msgid "If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program." +#: ../../licence.rst:565 +msgid "" +"If conditions are imposed on you (whether by court order, agreement or " +"otherwise) that contradict the conditions of this License, they do not " +"excuse you from the conditions of this License. If you cannot convey a " +"covered work so as to satisfy simultaneously your obligations under this " +"License and any other pertinent obligations, then as a consequence you " +"may not convey it at all. For example, if you agree to terms that " +"obligate you to collect a royalty for further conveying from those to " +"whom you convey the Program, the only way you could satisfy both those " +"terms and this License would be to refrain entirely from conveying the " +"Program." msgstr "" -#: ../../licence.rst:557 -msgid "Use with the GNU Affero General Public License." +#: ../../licence.rst:576 +msgid "13. Use with the GNU Affero General Public License." msgstr "" -#: ../../licence.rst:559 -msgid "Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such." +#: ../../licence.rst:578 +msgid "" +"Notwithstanding any other provision of this License, you have permission " +"to link or combine any covered work with a work licensed under version 3 " +"of the GNU Affero General Public License into a single combined work, and" +" to convey the resulting work. The terms of this License will continue " +"to apply to the part which is the covered work, but the special " +"requirements of the GNU Affero General Public License, section 13, " +"concerning interaction through a network will apply to the combination as" +" such." msgstr "" -#: ../../licence.rst:568 -msgid "Revised Versions of this License." +#: ../../licence.rst:588 +msgid "14. Revised Versions of this License." msgstr "" -#: ../../licence.rst:570 -msgid "The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns." +#: ../../licence.rst:590 +msgid "" +"The Free Software Foundation may publish revised and/or new versions of " +"the GNU General Public License from time to time. Such new versions will" +" be similar in spirit to the present version, but may differ in detail to" +" address new problems or concerns." msgstr "" -#: ../../licence.rst:575 -msgid "Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License \"or any later version\" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation." +#: ../../licence.rst:595 +msgid "" +"Each version is given a distinguishing version number. If the Program " +"specifies that a certain numbered version of the GNU General Public " +"License \"or any later version\" applies to it, you have the option of " +"following the terms and conditions either of that numbered version or of " +"any later version published by the Free Software Foundation. If the " +"Program does not specify a version number of the GNU General Public " +"License, you may choose any version ever published by the Free Software " +"Foundation." msgstr "" -#: ../../licence.rst:584 -msgid "If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program." +#: ../../licence.rst:604 +msgid "" +"If the Program specifies that a proxy can decide which future versions of" +" the GNU General Public License can be used, that proxy's public " +"statement of acceptance of a version permanently authorizes you to choose" +" that version for the Program." msgstr "" -#: ../../licence.rst:589 -msgid "Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version." +#: ../../licence.rst:609 +msgid "" +"Later license versions may give you additional or different permissions." +" However, no additional obligations are imposed on any author or " +"copyright holder as a result of your choosing to follow a later version." msgstr "" -#: ../../licence.rst:594 -msgid "Disclaimer of Warranty." +#: ../../licence.rst:615 +msgid "15. Disclaimer of Warranty." msgstr "" -#: ../../licence.rst:596 -msgid "THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION." +#: ../../licence.rst:617 +msgid "" +"THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY " +"APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT " +"HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT " +"WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT " +"LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A " +"PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF" +" THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME" +" THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION." msgstr "" -#: ../../licence.rst:605 -msgid "Limitation of Liability." +#: ../../licence.rst:627 +msgid "16. Limitation of Liability." msgstr "" -#: ../../licence.rst:607 -msgid "IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES." +#: ../../licence.rst:629 +msgid "" +"IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING " +"WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS" +" THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING " +"ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF " +"THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO " +"LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU" +" OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER " +"PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE " +"POSSIBILITY OF SUCH DAMAGES." msgstr "" -#: ../../licence.rst:617 -msgid "Interpretation of Sections 15 and 16." +#: ../../licence.rst:640 +msgid "17. Interpretation of Sections 15 and 16." msgstr "" -#: ../../licence.rst:619 -msgid "If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee." +#: ../../licence.rst:642 +msgid "" +"If the disclaimer of warranty and limitation of liability provided above " +"cannot be given local legal effect according to their terms, reviewing " +"courts shall apply local law that most closely approximates an absolute " +"waiver of all civil liability in connection with the Program, unless a " +"warranty or assumption of liability accompanies a copy of the Program in " +"return for a fee." msgstr "" -#: ../../licence.rst:626 +#: ../../licence.rst:649 msgid "END OF TERMS AND CONDITIONS" msgstr "" @@ -470,3 +954,58 @@ msgstr "" #~ msgid "Licence" #~ msgstr "Licentie" + +#~ msgid "Definitions." +#~ msgstr "" + +#~ msgid "Source Code." +#~ msgstr "" + +#~ msgid "Basic Permissions." +#~ msgstr "" + +#~ msgid "Protecting Users' Legal Rights From Anti-Circumvention Law." +#~ msgstr "" + +#~ msgid "Conveying Verbatim Copies." +#~ msgstr "" + +#~ msgid "Conveying Modified Source Versions." +#~ msgstr "" + +#~ msgid "Conveying Non-Source Forms." +#~ msgstr "" + +#~ msgid "Additional Terms." +#~ msgstr "" + +#~ msgid "Termination." +#~ msgstr "" + +#~ msgid "Acceptance Not Required for Having Copies." +#~ msgstr "" + +#~ msgid "Automatic Licensing of Downstream Recipients." +#~ msgstr "" + +#~ msgid "Patents." +#~ msgstr "" + +#~ msgid "No Surrender of Others' Freedom." +#~ msgstr "" + +#~ msgid "Use with the GNU Affero General Public License." +#~ msgstr "" + +#~ msgid "Revised Versions of this License." +#~ msgstr "" + +#~ msgid "Disclaimer of Warranty." +#~ msgstr "" + +#~ msgid "Limitation of Liability." +#~ msgstr "" + +#~ msgid "Interpretation of Sections 15 and 16." +#~ msgstr "" + diff --git a/docs/locale/nl/LC_MESSAGES/screenshots.mo b/docs/locale/nl/LC_MESSAGES/screenshots.mo new file mode 100644 index 000000000..5358c5cc6 Binary files /dev/null and b/docs/locale/nl/LC_MESSAGES/screenshots.mo differ diff --git a/docs/locale/nl/LC_MESSAGES/screenshots.po b/docs/locale/nl/LC_MESSAGES/screenshots.po new file mode 100644 index 000000000..1140b3b0f --- /dev/null +++ b/docs/locale/nl/LC_MESSAGES/screenshots.po @@ -0,0 +1,179 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2016, Dennis Siemensma +# This file is distributed under the same license as the DSMR Reader +# package. +# FIRST AUTHOR , 2016. +# +msgid "" +msgstr "" +"Project-Id-Version: DSMR Reader 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-18 22:09+0200\n" +"PO-Revision-Date: 2016-04-18 22:33+0100\n" +"Last-Translator: Dennis Siemensma \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.2.0\n" +"X-Generator: Poedit 1.5.4\n" +"Language: nl\n" + +#: ../../screenshots.rst:2 +msgid "Screenshots" +msgstr "Screenshots" + +#: ../../screenshots.rst:3 +msgid "" +"Below you can find some screenshots of the application. Please read the note " +"below regarding solar panels and support for them." +msgstr "" +"Hieronder staan enkele screenshots van de applicatie. Lees hieronder ook de " +"notitie met betrekking tot zonnepanelen en de ondersteuning daarvoor." + +#: ../../screenshots.rst:7 +msgid "Solar panels & electricity returned" +msgstr "Zonnepanelen & teruglevering electriciteit" + +#: ../../screenshots.rst:8 +msgid "" +"Note that **I do not have solar panels at home**, but the application " +"however **does support plotting any electricity returned**." +msgstr "" +"Wees ervan bewust dat **ik thuis geen zonnepanelen heb**, maar dat de " +"applicatie daar **wel ondersteuning voor heeft qua weergave teruglevering " +"elektriciteit**" + +#: ../../screenshots.rst:10 +msgid "" +"Therefor there aren't any graphs of them in the screenshots, but the users " +"who do have them, will have additional green graphs rendered in the " +"application." +msgstr "" +"Daarom staan er daarvan geen grafieken in deze screenshots, maar de " +"gebruikers die ze wel thuis hebben, zullen overal een extra groene grafiek " +"zien binnen de applicatie." + +#: ../../screenshots.rst:14 +msgid "Dashboard" +msgstr "Dashboard" + +#: ../../screenshots.rst:15 +msgid "" +"The dashboard displays the latest information regarding any consumption of " +"today and the current month so far." +msgstr "" +"Het dashboard weergeeft de meest recente informatie over je energieverbruik " +"van vandaag en de lopende maand tot nu toe." + +#: ../../screenshots.rst:23 +msgid "Archive" +msgstr "Archief" + +#: ../../screenshots.rst:24 +msgid "" +"The archive allows you to go back to any moment tracked. The data can be " +"plotted either on day, month or year level." +msgstr "" +"Het archief stelt je in staat om terug in de tijd te gaan naar elke moment " +"dat gemeten is met de applicatie. Gegevens kunnen getoond worden op " +"verschillende detailniveaus: per dag, per maand en per jaar." + +#: ../../screenshots.rst:32 +msgid "Trends" +msgstr "Trends" + +#: ../../screenshots.rst:33 +msgid "Trends are an average summary of your daily consumption and habits." +msgstr "Trends weergeven je gemiddelde energieverbruik en gewoontes." + +#: ../../screenshots.rst:41 +msgid "Statistics" +msgstr "Statistieken" + +#: ../../screenshots.rst:42 +msgid "" +"The statistics page will display the current state of your meter and the " +"energy prices currently apply (if any)." +msgstr "" +"De statistiekenpagina weergeeft de huidige staat van je slimme meter en de " +"huidige energietarieven (wanneer van toepassing)." + +#: ../../screenshots.rst:50 +msgid "Compare" +msgstr "Vergelijk" + +#: ../../screenshots.rst:51 +msgid "" +"This page allows you to compare two days, months or years tracked before." +msgstr "" +"Met deze pagina vergelijk je eenvoudig twee dagen, maanden of jaren met " +"elkaar." + +#: ../../screenshots.rst:59 +msgid "Status" +msgstr "Status" + +#: ../../screenshots.rst:60 +msgid "" +"The status page will show the 'health' of the application and any data " +"tracked. If there are any problems regarding data handling, they should be " +"indicated here." +msgstr "" +"De statuspagina weergeeft de 'gezondheid' van de applicatie en die van de " +"dataverwerking. Mochten er problemen zijn met het verzamelen van gegevens " +"dan zou dat hier zichtbaar moeten zijn." + +#: ../../screenshots.rst:68 +msgid "Export" +msgstr "Exporteren" + +#: ../../screenshots.rst:69 +msgid "" +"Want to export day totals or hourly data to Excel? This page allows you to " +"export the data in .CSV format." +msgstr "" +"Wil je alle dag- of uurtotalen exporteren om in Excel te bekijken? Dat kan " +"via deze pagina door ze te exporteren in .CSV-formaat." + +#: ../../screenshots.rst:77 +msgid "Configuration" +msgstr "Configuratie" + +#: ../../screenshots.rst:78 +msgid "" +"The application has quite some features, such are temperature tracking, " +"automated backups and Dropbox intergration. This page displays the status of " +"them all." +msgstr "" +"De applicatie heeft behoorlijk wat features, zoals buitentemperatuur " +"bijhouden, geautomatiseerde back-ups en Dropbox-integratie. Op deze pagina " +"kun je een overzicht vinden van alle instellingen." + +#: ../../screenshots.rst:86 +msgid "Settings" +msgstr "instellingen" + +#: ../../screenshots.rst:87 +msgid "" +"The project is written using Django and some of it's backend pages are " +"displayed below." +msgstr "" +"Het project is gemaakt met Django en hieronder staan enkele " +"beheerderspagina's daarvan." + +#: ../../screenshots.rst:89 +msgid "Here you may manage your energy prices:" +msgstr "Hier kun je je energieprijzen beheren:" + +#: ../../screenshots.rst:95 +msgid "This allows you to alter your backup settings:" +msgstr "Hiermee beheer je de instellingen voor je back-ups:" + +#: ../../screenshots.rst:101 +msgid "" +"There are several additional backend pages for the other configuration " +"options as well." +msgstr "" +"Er zijn nog diverse andere beheerpagina's beschikbaar voor de overige " +"configuratie-instellingen." diff --git a/docs/screenshots.rst b/docs/screenshots.rst new file mode 100644 index 000000000..b491ddf5e --- /dev/null +++ b/docs/screenshots.rst @@ -0,0 +1,101 @@ +Screenshots +=========== +Below you can find some screenshots of the application. Please read the note below regarding solar panels and support for them. + + +Solar panels & electricity returned +----------------------------------- +Note that **I do not have solar panels at home**, but the application however **does support plotting any electricity returned**. + +Therefor there aren't any graphs of them in the screenshots, but the users who do have them, will have additional green graphs rendered in the application. + + +Dashboard +--------- +The dashboard displays the latest information regarding any consumption of today and the current month so far. + +.. image:: _static/screenshots/dashboard.png + :target: _static/screenshots/dashboard.png + :alt: Dashboard + + +Archive +------- +The archive allows you to go back to any moment tracked. The data can be plotted either on day, month or year level. + +.. image:: _static/screenshots/archive.png + :target: _static/screenshots/archive.png + :alt: Archive + + +Trends +------ +Trends are an average summary of your daily consumption and habits. + +.. image:: _static/screenshots/trends.png + :target: _static/screenshots/trends.png + :alt: Trends + + +Statistics +---------- +The statistics page will display the current state of your meter and the energy prices currently apply (if any). + +.. image:: _static/screenshots/statistics.png + :target: _static/screenshots/statistics.png + :alt: Statistics + + +Compare +------- +This page allows you to compare two days, months or years tracked before. + +.. image:: _static/screenshots/compare.png + :target: _static/screenshots/compare.png + :alt: Compare + + +Status +------ +The status page will show the 'health' of the application and any data tracked. If there are any problems regarding data handling, they should be indicated here. + +.. image:: _static/screenshots/status.png + :target: _static/screenshots/status.png + :alt: Status + + +Export +------ +Want to export day totals or hourly data to Excel? This page allows you to export the data in .CSV format. + +.. image:: _static/screenshots/export.png + :target: _static/screenshots/export.png + :alt: Export + + +Configuration +------------- +The application has quite some features, such are temperature tracking, automated backups and Dropbox intergration. This page displays the status of them all. + +.. image:: _static/screenshots/configuration.png + :target: _static/screenshots/configuration.png + :alt: Configuration + + +Settings +-------- +The project is written using Django and some of it's backend pages are displayed below. + +Here you may manage your energy prices: + +.. image:: _static/screenshots/energysupplierprice.png + :target: _static/screenshots/energysupplierprice.png + :alt: Energy supplier price + +This allows you to alter your backup settings: + +.. image:: _static/screenshots/backupsettings.png + :target: _static/screenshots/backupsettings.png + :alt: Backup settings + +There are several additional backend pages for the other configuration options as well. \ No newline at end of file diff --git a/dsmr_datalogger/services.py b/dsmr_datalogger/services.py index 0c4665d1b..a7070e510 100644 --- a/dsmr_datalogger/services.py +++ b/dsmr_datalogger/services.py @@ -102,11 +102,36 @@ def _get_statistics_fields(): reading_fields.remove('id') return reading_fields + def _convert_legacy_dsmr_gas_line(parsed_reading, current_line, next_line): + """ Legacy support for DSMR 2.x gas. """ + legacy_gas_line = current_line + + if next_line.startswith('('): + legacy_gas_line = current_line + next_line + + legacy_gas_result = re.search( + r'[^(]+\((\d+)\)\(\d+\)\(\d+\)\(\d+\)\([0-9-.:]+\)\(m3\)\(([0-9.]+)\)', + legacy_gas_line + ) + gas_timestamp = legacy_gas_result.group(1) + + if timezone.now().dst() != timezone.timedelta(0): + gas_timestamp += 'S' + else: + gas_timestamp += 'W' + + parsed_reading['extra_device_timestamp'] = reading_timestamp_to_datetime( + string=gas_timestamp + ) + parsed_reading['extra_device_delivered'] = legacy_gas_result.group(2) + return parsed_reading + # Defaults all fields to NULL. parsed_reading = {k: None for k in _get_reading_fields() + _get_statistics_fields()} field_splitter = re.compile(r'([^(]+)\((.+)\)') + lines_read = data.split("\r\n") - for current_line in data.split("\n"): + for index, current_line in enumerate(lines_read): result = field_splitter.search(current_line) if not result: @@ -116,9 +141,15 @@ def _get_statistics_fields(): # M-bus (0-n:24.1) cannot identify the type of device, see issue #92. if code in ('0-2:24.2.1', '0-3:24.2.1', '0-4:24.2.1'): - # I really hope this will get 'fixed' in DSMR v4.2+ in the future. (: code = '0-1:24.2.1' + # DSMR 2.x emits gas readings in different format. + if code == '0-1:24.3.0': + parsed_reading = _convert_legacy_dsmr_gas_line( + parsed_reading, current_line, lines_read[index + 1] + ) + continue + try: field = DSMR_MAPPING[code] except KeyError: @@ -140,6 +171,10 @@ def _get_statistics_fields(): parsed_reading[field] = value + # Hack for DSMR 2.x legacy, which lacks timestamp info.. + if parsed_reading['timestamp'] is None: + parsed_reading['timestamp'] = timezone.now() + # Now we need to split reading & statistics. So we split the dict here. reading_kwargs = {k: parsed_reading[k] for k in _get_reading_fields()} new_reading = DsmrReading.objects.create(**reading_kwargs) diff --git a/dsmr_datalogger/tests/datalogger/test_error.py b/dsmr_datalogger/tests/datalogger/test_error.py index a08650b28..51eb13e30 100644 --- a/dsmr_datalogger/tests/datalogger/test_error.py +++ b/dsmr_datalogger/tests/datalogger/test_error.py @@ -12,39 +12,39 @@ def _dsmr_dummy_data(self): """ Returns INCOMPLETE telegram. """ return [ # We start halfway, forcing us to discard/ignore it. - "1-0:99.97.0(1)(0-0:96.7.19)(000101000001W)(2147483647*s)\n", - "1-0:32.32.0(00000)\n", - "1-0:32.36.0(00000)\n", - "0-0:96.13.1()\n", - "0-0:96.13.0()\n", - "1-0:31.7.0(000*A)\n", - "1-0:21.7.0(00.143*kW)\n", - "1-0:22.7.0(00.000*kW)\n", + "1-0:99.97.0(1)(0-0:96.7.19)(000101000001W)(2147483647*s)\r\n", + "1-0:32.32.0(00000)\r\n", + "1-0:32.36.0(00000)\r\n", + "0-0:96.13.1()\r\n", + "0-0:96.13.0()\r\n", + "1-0:31.7.0(000*A)\r\n", + "1-0:21.7.0(00.143*kW)\r\n", + "1-0:22.7.0(00.000*kW)\r\n", "!74B0\n", # 10 seconds later we should see this one. - "/KFM5KAIFA-METER\n", - "\n", - "1-3:0.2.8(42)\n", - "0-0:1.0.0(160303164347W)\n", - "0-0:96.1.1(*******************************)\n", - "1-0:1.8.1(001073.079*kWh)\n", - "1-0:1.8.2(001263.199*kWh)\n", - "1-0:2.8.1(000000.000*kWh)\n", - "1-0:2.8.2(000000.000*kWh)\n", - "0-0:96.14.0(0002)\n", - "1-0:1.7.0(00.143*kW)\n", - "1-0:2.7.0(00.000*kW)\n", - "0-0:96.7.21(00006)\n", - "0-0:96.7.9(00003)\n", - "1-0:99.97.0(1)(0-0:96.7.19)(000101000001W)(2147483647*s)\n", - "1-0:32.32.0(00000)\n", - "1-0:32.36.0(00000)\n", - "0-0:96.13.1()\n", - "0-0:96.13.0()\n", - "1-0:31.7.0(000*A)\n", - "1-0:21.7.0(00.143*kW)\n", - "1-0:22.7.0(00.000*kW)\n", + "/KFM5KAIFA-METER\r\n", + "\r\n", + "1-3:0.2.8(42)\r\n", + "0-0:1.0.0(160303164347W)\r\n", + "0-0:96.1.1(*******************************)\r\n", + "1-0:1.8.1(001073.079*kWh)\r\n", + "1-0:1.8.2(001263.199*kWh)\r\n", + "1-0:2.8.1(000000.000*kWh)\r\n", + "1-0:2.8.2(000000.000*kWh)\r\n", + "0-0:96.14.0(0002)\r\n", + "1-0:1.7.0(00.143*kW)\r\n", + "1-0:2.7.0(00.000*kW)\r\n", + "0-0:96.7.21(00006)\r\n", + "0-0:96.7.9(00003)\r\n", + "1-0:99.97.0(1)(0-0:96.7.19)(000101000001W)(2147483647*s)\r\n", + "1-0:32.32.0(00000)\r\n", + "1-0:32.36.0(00000)\r\n", + "0-0:96.13.1()\r\n", + "0-0:96.13.0()\r\n", + "1-0:31.7.0(000*A)\r\n", + "1-0:21.7.0(00.143*kW)\r\n", + "1-0:22.7.0(00.000*kW)\r\n", "!74B0\n", ] diff --git a/dsmr_datalogger/tests/datalogger/test_generic.py b/dsmr_datalogger/tests/datalogger/test_generic.py index 4582a38a1..bbf1f5388 100644 --- a/dsmr_datalogger/tests/datalogger/test_generic.py +++ b/dsmr_datalogger/tests/datalogger/test_generic.py @@ -67,44 +67,44 @@ def test_track_meter_statistics(self): datalogger_settings.save() fake_telegram = ''.join([ - "/XMX5LGBBFFB123456789\n", - "\n", - "1-3:0.2.8(40)\n", - "0-0:1.0.0(151110192959W)\n", - "0-0:96.1.1(xxxxxxxxxxxxx)\n", - "1-0:1.8.1(000510.747*kWh)\n", - "1-0:2.8.1(000000.123*kWh)\n", - "1-0:1.8.2(000500.013*kWh)\n", - "1-0:2.8.2(000123.456*kWh)\n", - "0-0:96.14.0(0001)\n", - "1-0:1.7.0(00.192*kW)\n", - "1-0:2.7.0(00.123*kW)\n", - "0-0:17.0.0(999.9*kW)\n", - "0-0:96.3.10(1)\n", - "0-0:96.7.21(00003)\n", - "0-0:96.7.9(00000)\n", - "1-0:99.97.0(0)(0-0:96.7.19)\n", - "1-0:32.32.0(00002)\n", - "1-0:52.32.0(00002)\n", - "1-0:72.32.0(00000)\n", - "1-0:32.36.0(00000)\n", - "1-0:52.36.0(00000)\n", - "1-0:72.36.0(00000)\n", - "0-0:96.13.1()\n", - "0-0:96.13.0()\n", - "1-0:31.7.0(000*A)\n", - "1-0:51.7.0(000*A)\n", - "1-0:71.7.0(001*A)\n", - "1-0:21.7.0(00.000*kW)\n", - "1-0:41.7.0(00.000*kW)\n", - "1-0:61.7.0(00.192*kW)\n", - "1-0:22.7.0(00.000*kW)\n", - "1-0:42.7.0(00.000*kW)\n", - "1-0:62.7.0(00.000*kW)\n", - "0-1:24.1.0(003)\n", - "0-1:96.1.0(xxxxxxxxxxxxx)\n", - "0-1:24.2.1(151110190000W)(00845.206*m3)\n", - "0-1:24.4.0(1)\n", + "/XMX5LGBBFFB123456789\r\n", + "\r\n", + "1-3:0.2.8(40)\r\n", + "0-0:1.0.0(151110192959W)\r\n", + "0-0:96.1.1(xxxxxxxxxxxxx)\r\n", + "1-0:1.8.1(000510.747*kWh)\r\n", + "1-0:2.8.1(000000.123*kWh)\r\n", + "1-0:1.8.2(000500.013*kWh)\r\n", + "1-0:2.8.2(000123.456*kWh)\r\n", + "0-0:96.14.0(0001)\r\n", + "1-0:1.7.0(00.192*kW)\r\n", + "1-0:2.7.0(00.123*kW)\r\n", + "0-0:17.0.0(999.9*kW)\r\n", + "0-0:96.3.10(1)\r\n", + "0-0:96.7.21(00003)\r\n", + "0-0:96.7.9(00000)\r\n", + "1-0:99.97.0(0)(0-0:96.7.19)\r\n", + "1-0:32.32.0(00002)\r\n", + "1-0:52.32.0(00002)\r\n", + "1-0:72.32.0(00000)\r\n", + "1-0:32.36.0(00000)\r\n", + "1-0:52.36.0(00000)\r\n", + "1-0:72.36.0(00000)\r\n", + "0-0:96.13.1()\r\n", + "0-0:96.13.0()\r\n", + "1-0:31.7.0(000*A)\r\n", + "1-0:51.7.0(000*A)\r\n", + "1-0:71.7.0(001*A)\r\n", + "1-0:21.7.0(00.000*kW)\r\n", + "1-0:41.7.0(00.000*kW)\r\n", + "1-0:61.7.0(00.192*kW)\r\n", + "1-0:22.7.0(00.000*kW)\r\n", + "1-0:42.7.0(00.000*kW)\r\n", + "1-0:62.7.0(00.000*kW)\r\n", + "0-1:24.1.0(003)\r\n", + "0-1:96.1.0(xxxxxxxxxxxxx)\r\n", + "0-1:24.2.1(151110190000W)(00845.206*m3)\r\n", + "0-1:24.4.0(1)\r\n", "!D19A\n", ]) @@ -131,32 +131,32 @@ def test_track_meter_statistics(self): def test_extra_devices_mbus_hack(self): """ Verify that the hack issue #92 is working. """ fake_telegram = [ - "/XMX5LGBBFFB123456789\n", - "\n", - "1-3:0.2.8(40)\n", - "0-0:1.0.0(151110192959W)\n", - "0-0:96.1.1(xxxxxxxxxxxxx)\n", - "1-0:1.8.1(000510.747*kWh)\n", - "1-0:2.8.1(000000.123*kWh)\n", - "1-0:1.8.2(000500.013*kWh)\n", - "1-0:2.8.2(000123.456*kWh)\n", - "0-0:96.14.0(0001)\n", - "1-0:1.7.0(00.192*kW)\n", - "1-0:2.7.0(00.123*kW)\n", - "0-0:17.0.0(999.9*kW)\n", - "0-0:96.3.10(1)\n", - "0-0:96.7.21(00003)\n", - "0-0:96.7.9(00000)\n", - "1-0:99.97.0(0)(0-0:96.7.19)\n", - "1-0:32.32.0(00002)\n", - "1-0:52.32.0(00002)\n", - "1-0:72.32.0(00000)\n", - "1-0:32.36.0(00000)\n", - "1-0:52.36.0(00000)\n", - "1-0:72.36.0(00000)\n", - "0-1:96.1.0(xxxxxxxxxxxxx)\n", - "0-1:24.2.1(151110190000W)(00845.206*m3)\n", - "0-1:24.4.0(1)\n", + "/XMX5LGBBFFB123456789\r\n", + "\r\n", + "1-3:0.2.8(40)\r\n", + "0-0:1.0.0(151110192959W)\r\n", + "0-0:96.1.1(xxxxxxxxxxxxx)\r\n", + "1-0:1.8.1(000510.747*kWh)\r\n", + "1-0:2.8.1(000000.123*kWh)\r\n", + "1-0:1.8.2(000500.013*kWh)\r\n", + "1-0:2.8.2(000123.456*kWh)\r\n", + "0-0:96.14.0(0001)\r\n", + "1-0:1.7.0(00.192*kW)\r\n", + "1-0:2.7.0(00.123*kW)\r\n", + "0-0:17.0.0(999.9*kW)\r\n", + "0-0:96.3.10(1)\r\n", + "0-0:96.7.21(00003)\r\n", + "0-0:96.7.9(00000)\r\n", + "1-0:99.97.0(0)(0-0:96.7.19)\r\n", + "1-0:32.32.0(00002)\r\n", + "1-0:52.32.0(00002)\r\n", + "1-0:72.32.0(00000)\r\n", + "1-0:32.36.0(00000)\r\n", + "1-0:52.36.0(00000)\r\n", + "1-0:72.36.0(00000)\r\n", + "0-1:96.1.0(xxxxxxxxxxxxx)\r\n", + "0-1:24.2.1(151110190000W)(00845.206*m3)\r\n", + "0-1:24.4.0(1)\r\n", "!D19A\n", ] self.assertFalse(DsmrReading.objects.exists()) @@ -165,8 +165,8 @@ def test_extra_devices_mbus_hack(self): # Alter extra device m-bus to 2, 3 and 4. for current_mbus in (2, 3, 4): - fake_telegram[-3] = "0-{}:24.2.1(151110190000W)(00845.206*m3)\n".format(current_mbus) - self.assertNotIn("0-1:24.2.1(151110190000W)(00845.206*m3)\n", fake_telegram) + fake_telegram[-3] = "0-{}:24.2.1(151110190000W)(00845.206*m3)\r\n".format(current_mbus) + self.assertNotIn("0-1:24.2.1(151110190000W)(00845.206*m3)\r\n", fake_telegram) dsmr_datalogger.services.telegram_to_reading(data=''.join(fake_telegram)) self.assertFalse(DsmrReading.objects.filter(extra_device_timestamp__isnull=True).exists()) diff --git a/dsmr_datalogger/tests/datalogger/test_iskra.py b/dsmr_datalogger/tests/datalogger/test_iskra.py new file mode 100644 index 000000000..5b454ee55 --- /dev/null +++ b/dsmr_datalogger/tests/datalogger/test_iskra.py @@ -0,0 +1,92 @@ +from unittest import mock +from datetime import datetime +from decimal import Decimal + +from django.test import TestCase +from django.utils import timezone +import pytz + +from dsmr_backend.tests.mixins import InterceptStdoutMixin +from dsmr_datalogger.models.reading import DsmrReading, MeterStatistics + + +class TestDatalogger(InterceptStdoutMixin, TestCase): + """ Test Iskra meter, unknown DSMR version. """ + + def _dsmr_dummy_data(self): + return [ + "/ISk5\2MT382-1003\r\n", + "\r\n", + "0-0:96.1.1(xxxxxxxxxxx)\r\n", + "1-0:1.8.1(01234.784*kWh)\r\n", + "1-0:1.8.2(04321.725*kWh)\r\n", + "1-0:2.8.1(00000.000*kWh)\r\n", + "1-0:2.8.2(00000.002*kWh)\r\n", + "0-0:96.14.0(0001)\r\n", + "1-0:1.7.0(0000.36*kW)\r\n", + "1-0:2.7.0(0000.00*kW)\r\n", + "0-0:17.0.0(0999.00*kW)\r\n", + "0-0:96.3.10(1)\r\n", + "0-0:96.13.1()\r\n", + "0-0:96.13.0()\r\n", + "0-1:24.1.0(3)\r\n", + "0-1:96.1.0(xxxxxxxxxxxx)\r\n", + "0-1:24.3.0(160410130000)(00)(60)(1)(0-1:24.2.1)(m3)\r\n", + "(07890.693)\r\n", + "0-1:24.4.0(1)\r\n", + "!", + ] + + @mock.patch('serial.Serial.open') + @mock.patch('serial.Serial.readline') + def _fake_dsmr_reading(self, serial_readline_mock, serial_open_mock): + """ Fake & process an DSMR vX telegram reading. """ + serial_open_mock.return_value = None + serial_readline_mock.side_effect = self._dsmr_dummy_data() + + self.assertFalse(DsmrReading.objects.exists()) + self._intercept_command_stdout('dsmr_datalogger') + self.assertTrue(DsmrReading.objects.exists()) + + def test_reading_creation(self): + """ Test whether dsmr_datalogger can insert a reading. """ + self.assertFalse(DsmrReading.objects.exists()) + self._fake_dsmr_reading() + self.assertTrue(DsmrReading.objects.exists()) + + @mock.patch('django.utils.timezone.now') + def test_reading_values(self, now_mock): + """ Test whether dsmr_datalogger reads the correct values. """ + now_mock.return_value = timezone.make_aware( + timezone.datetime(2016, 4, 10, hour=14, minute=30, second=15) + ) + + self._fake_dsmr_reading() + self.assertTrue(DsmrReading.objects.exists()) + reading = DsmrReading.objects.get() + self.assertEqual( + reading.timestamp, + datetime(2016, 4, 10, 12, 30, 15, tzinfo=pytz.UTC) + ) + self.assertEqual(reading.electricity_delivered_1, Decimal('1234.784')) + self.assertEqual(reading.electricity_returned_1, Decimal('0')) + self.assertEqual(reading.electricity_delivered_2, Decimal('4321.725')) + self.assertEqual(reading.electricity_returned_2, Decimal('0.002')) + self.assertEqual(reading.electricity_currently_delivered, Decimal('0.36')) + self.assertEqual(reading.electricity_currently_returned, Decimal('0')) + self.assertEqual( + reading.extra_device_timestamp, + datetime(2016, 4, 10, 11, 0, 0, tzinfo=pytz.UTC) + ) + self.assertEqual(reading.extra_device_delivered, Decimal('7890.693')) + + meter_statistics = MeterStatistics.get_solo() + self.assertEqual(meter_statistics.electricity_tariff, 1) + self.assertEqual(meter_statistics.power_failure_count, None) + self.assertEqual(meter_statistics.long_power_failure_count, None) + self.assertEqual(meter_statistics.voltage_sag_count_l1, None) + self.assertEqual(meter_statistics.voltage_sag_count_l2, None) + self.assertEqual(meter_statistics.voltage_sag_count_l3, None) + self.assertEqual(meter_statistics.voltage_swell_count_l1, None) + self.assertEqual(meter_statistics.voltage_swell_count_l2, None) + self.assertEqual(meter_statistics.voltage_swell_count_l3, None) diff --git a/dsmr_datalogger/tests/datalogger/test_kaifa_dsmr42.py b/dsmr_datalogger/tests/datalogger/test_kaifa_dsmr42.py index 92362e5d9..a4310f25c 100644 --- a/dsmr_datalogger/tests/datalogger/test_kaifa_dsmr42.py +++ b/dsmr_datalogger/tests/datalogger/test_kaifa_dsmr42.py @@ -14,28 +14,28 @@ class TestDatalogger(InterceptStdoutMixin, TestCase): def _dsmr_dummy_data(self): return [ - "/KFM5KAIFA-METER\n", - "\n", - "1-3:0.2.8(42)\n", - "0-0:1.0.0(160303164347W)\n", - "0-0:96.1.1(*******************************)\n", - "1-0:1.8.1(001073.079*kWh)\n", - "1-0:1.8.2(001263.199*kWh)\n", - "1-0:2.8.1(000000.000*kWh)\n", - "1-0:2.8.2(000000.000*kWh)\n", - "0-0:96.14.0(0002)\n", - "1-0:1.7.0(00.143*kW)\n", - "1-0:2.7.0(00.000*kW)\n", - "0-0:96.7.21(00006)\n", - "0-0:96.7.9(00003)\n", - "1-0:99.97.0(1)(0-0:96.7.19)(000101000001W)(2147483647*s)\n", - "1-0:32.32.0(00000)\n", - "1-0:32.36.0(00000)\n", - "0-0:96.13.1()\n", - "0-0:96.13.0()\n", - "1-0:31.7.0(000*A)\n", - "1-0:21.7.0(00.143*kW)\n", - "1-0:22.7.0(00.000*kW)\n", + "/KFM5KAIFA-METER\r\n", + "\r\n", + "1-3:0.2.8(42)\r\n", + "0-0:1.0.0(160303164347W)\r\n", + "0-0:96.1.1(*******************************)\r\n", + "1-0:1.8.1(001073.079*kWh)\r\n", + "1-0:1.8.2(001263.199*kWh)\r\n", + "1-0:2.8.1(000000.000*kWh)\r\n", + "1-0:2.8.2(000000.000*kWh)\r\n", + "0-0:96.14.0(0002)\r\n", + "1-0:1.7.0(00.143*kW)\r\n", + "1-0:2.7.0(00.000*kW)\r\n", + "0-0:96.7.21(00006)\r\n", + "0-0:96.7.9(00003)\r\n", + "1-0:99.97.0(1)(0-0:96.7.19)(000101000001W)(2147483647*s)\r\n", + "1-0:32.32.0(00000)\r\n", + "1-0:32.36.0(00000)\r\n", + "0-0:96.13.1()\r\n", + "0-0:96.13.0()\r\n", + "1-0:31.7.0(000*A)\r\n", + "1-0:21.7.0(00.143*kW)\r\n", + "1-0:22.7.0(00.000*kW)\r\n", "!74B0\n", ] diff --git a/dsmr_datalogger/tests/datalogger/test_landisgyr350_dsmr40.py b/dsmr_datalogger/tests/datalogger/test_landisgyr350_dsmr40.py index c02a874a1..7a91303fc 100644 --- a/dsmr_datalogger/tests/datalogger/test_landisgyr350_dsmr40.py +++ b/dsmr_datalogger/tests/datalogger/test_landisgyr350_dsmr40.py @@ -13,44 +13,44 @@ class TestDatalogger(InterceptStdoutMixin, TestCase): """ Test Landis+Gyr 350 DSMR v4.0. """ def _dsmr_dummy_data(self): return [ - "/XMX5LGBBFFB123456789\n", - "\n", - "1-3:0.2.8(40)\n", - "0-0:1.0.0(151110192959W)\n", - "0-0:96.1.1(xxxxxxxxxxxxx)\n", - "1-0:1.8.1(000510.747*kWh)\n", - "1-0:2.8.1(000000.123*kWh)\n", - "1-0:1.8.2(000500.013*kWh)\n", - "1-0:2.8.2(000123.456*kWh)\n", - "0-0:96.14.0(0001)\n", - "1-0:1.7.0(00.192*kW)\n", - "1-0:2.7.0(00.123*kW)\n", - "0-0:17.0.0(999.9*kW)\n", - "0-0:96.3.10(1)\n", - "0-0:96.7.21(00003)\n", - "0-0:96.7.9(00000)\n", - "1-0:99.97.0(0)(0-0:96.7.19)\n", - "1-0:32.32.0(00002)\n", - "1-0:52.32.0(00002)\n", - "1-0:72.32.0(00000)\n", - "1-0:32.36.0(00000)\n", - "1-0:52.36.0(00000)\n", - "1-0:72.36.0(00000)\n", - "0-0:96.13.1()\n", - "0-0:96.13.0()\n", - "1-0:31.7.0(000*A)\n", - "1-0:51.7.0(000*A)\n", - "1-0:71.7.0(001*A)\n", - "1-0:21.7.0(00.000*kW)\n", - "1-0:41.7.0(00.000*kW)\n", - "1-0:61.7.0(00.192*kW)\n", - "1-0:22.7.0(00.000*kW)\n", - "1-0:42.7.0(00.000*kW)\n", - "1-0:62.7.0(00.000*kW)\n", - "0-1:24.1.0(003)\n", - "0-1:96.1.0(xxxxxxxxxxxxx)\n", - "0-1:24.2.1(151110190000W)(00845.206*m3)\n", - "0-1:24.4.0(1)\n", + "/XMX5LGBBFFB123456789\r\n", + "\r\n", + "1-3:0.2.8(40)\r\n", + "0-0:1.0.0(151110192959W)\r\n", + "0-0:96.1.1(xxxxxxxxxxxxx)\r\n", + "1-0:1.8.1(000510.747*kWh)\r\n", + "1-0:2.8.1(000000.123*kWh)\r\n", + "1-0:1.8.2(000500.013*kWh)\r\n", + "1-0:2.8.2(000123.456*kWh)\r\n", + "0-0:96.14.0(0001)\r\n", + "1-0:1.7.0(00.192*kW)\r\n", + "1-0:2.7.0(00.123*kW)\r\n", + "0-0:17.0.0(999.9*kW)\r\n", + "0-0:96.3.10(1)\r\n", + "0-0:96.7.21(00003)\r\n", + "0-0:96.7.9(00000)\r\n", + "1-0:99.97.0(0)(0-0:96.7.19)\r\n", + "1-0:32.32.0(00002)\r\n", + "1-0:52.32.0(00002)\r\n", + "1-0:72.32.0(00000)\r\n", + "1-0:32.36.0(00000)\r\n", + "1-0:52.36.0(00000)\r\n", + "1-0:72.36.0(00000)\r\n", + "0-0:96.13.1()\r\n", + "0-0:96.13.0()\r\n", + "1-0:31.7.0(000*A)\r\n", + "1-0:51.7.0(000*A)\r\n", + "1-0:71.7.0(001*A)\r\n", + "1-0:21.7.0(00.000*kW)\r\n", + "1-0:41.7.0(00.000*kW)\r\n", + "1-0:61.7.0(00.192*kW)\r\n", + "1-0:22.7.0(00.000*kW)\r\n", + "1-0:42.7.0(00.000*kW)\r\n", + "1-0:62.7.0(00.000*kW)\r\n", + "0-1:24.1.0(003)\r\n", + "0-1:96.1.0(xxxxxxxxxxxxx)\r\n", + "0-1:24.2.1(151110190000W)(00845.206*m3)\r\n", + "0-1:24.4.0(1)\r\n", "!D19A\n", ] diff --git a/dsmr_datalogger/tests/datalogger/test_landisgyr350_dsmr42.py b/dsmr_datalogger/tests/datalogger/test_landisgyr350_dsmr42.py index 231865658..18d863757 100644 --- a/dsmr_datalogger/tests/datalogger/test_landisgyr350_dsmr42.py +++ b/dsmr_datalogger/tests/datalogger/test_landisgyr350_dsmr42.py @@ -14,41 +14,41 @@ class TestDatalogger(InterceptStdoutMixin, TestCase): def _dsmr_dummy_data(self): return [ - "/XMX5LGBBFFB123456789\n", - "\n", - "1-3:0.2.8(42)\n", - "0-0:1.0.0(160210203034W)\n", - "0-0:96.1.1(xxxxxxxxxxxxx)\n", - "1-0:1.8.1(000756.849*kWh)\n", - "1-0:2.8.1(000000.000*kWh)\n", - "1-0:1.8.2(000714.405*kWh)\n", - "1-0:2.8.2(000000.000*kWh)\n", - "0-0:96.14.0(0002)\n", - "1-0:1.7.0(00.111*kW)\n", - "1-0:2.7.0(00.000*kW)\n", - "0-0:96.7.21(00003)\n", - "0-0:96.7.9(00000)\n", - "1-0:99.97.0(0)(0-0:96.7.19)\n", - "1-0:32.32.0(00002)\n", - "1-0:52.32.0(00002)\n", - "1-0:72.32.0(00000)\n", - "1-0:32.36.0(00000)\n", - "1-0:52.36.0(00000)\n", - "1-0:72.36.0(00000)\n", - "0-0:96.13.1()\n", - "0-0:96.13.0()\n", - "1-0:31.7.0(000*A)\n", - "1-0:51.7.0(000*A)\n", - "1-0:71.7.0(001*A)\n", - "1-0:21.7.0(00.000*kW)\n", - "1-0:41.7.0(00.000*kW)\n", - "1-0:61.7.0(00.110*kW)\n", - "1-0:22.7.0(00.000*kW)\n", - "1-0:42.7.0(00.000*kW)\n", - "1-0:62.7.0(00.000*kW)\n", - "0-1:24.1.0(003)\n", - "0-1:96.1.0(xxxxxxxxxxxxx)\n", - "0-1:24.2.1(160210200000W)(01197.484*m3)\n", + "/XMX5LGBBFFB123456789\r\n", + "\r\n", + "1-3:0.2.8(42)\r\n", + "0-0:1.0.0(160210203034W)\r\n", + "0-0:96.1.1(xxxxxxxxxxxxx)\r\n", + "1-0:1.8.1(000756.849*kWh)\r\n", + "1-0:2.8.1(000000.000*kWh)\r\n", + "1-0:1.8.2(000714.405*kWh)\r\n", + "1-0:2.8.2(000000.000*kWh)\r\n", + "0-0:96.14.0(0002)\r\n", + "1-0:1.7.0(00.111*kW)\r\n", + "1-0:2.7.0(00.000*kW)\r\n", + "0-0:96.7.21(00003)\r\n", + "0-0:96.7.9(00000)\r\n", + "1-0:99.97.0(0)(0-0:96.7.19)\r\n", + "1-0:32.32.0(00002)\r\n", + "1-0:52.32.0(00002)\r\n", + "1-0:72.32.0(00000)\r\n", + "1-0:32.36.0(00000)\r\n", + "1-0:52.36.0(00000)\r\n", + "1-0:72.36.0(00000)\r\n", + "0-0:96.13.1()\r\n", + "0-0:96.13.0()\r\n", + "1-0:31.7.0(000*A)\r\n", + "1-0:51.7.0(000*A)\r\n", + "1-0:71.7.0(001*A)\r\n", + "1-0:21.7.0(00.000*kW)\r\n", + "1-0:41.7.0(00.000*kW)\r\n", + "1-0:61.7.0(00.110*kW)\r\n", + "1-0:22.7.0(00.000*kW)\r\n", + "1-0:42.7.0(00.000*kW)\r\n", + "1-0:62.7.0(00.000*kW)\r\n", + "0-1:24.1.0(003)\r\n", + "0-1:96.1.0(xxxxxxxxxxxxx)\r\n", + "0-1:24.2.1(160210200000W)(01197.484*m3)\r\n", "!AD8D\n", ] diff --git a/dsmr_datalogger/tests/datalogger/test_landisgyr350_other_dsmr42.py b/dsmr_datalogger/tests/datalogger/test_landisgyr350_other_dsmr42.py index 22fd6c242..181ff7cdf 100644 --- a/dsmr_datalogger/tests/datalogger/test_landisgyr350_other_dsmr42.py +++ b/dsmr_datalogger/tests/datalogger/test_landisgyr350_other_dsmr42.py @@ -14,31 +14,31 @@ class TestDatalogger(InterceptStdoutMixin, TestCase): def _dsmr_dummy_data(self): return [ - "/XMX5LGBBFFB231126481\n", - "\n", - "1-3:0.2.8(42)\n", - "0-0:1.0.0(160317221058W)\n", - "0-0:96.1.1(xxxxxxxxxxxxxx)\n", - "1-0:1.8.1(001255.252*kWh)\n", - "1-0:2.8.1(000000.000*kWh)\n", - "1-0:1.8.2(001284.838*kWh)\n", - "1-0:2.8.2(000000.000*kWh)\n", - "0-0:96.14.0(0002)\n", - "1-0:1.7.0(00.187*kW)\n", - "1-0:2.7.0(00.000*kW)\n", - "0-0:96.7.21(00008)\n", - "0-0:96.7.9(00000)\n", - "1-0:99.97.0(0)(0-0:96.7.19)\n", - "1-0:32.32.0(00000)\n", - "1-0:32.36.0(00000)\n", - "0-0:96.13.1()\n", - "0-0:96.13.0()\n", - "1-0:31.7.0(001*A)\n", - "1-0:21.7.0(00.187*kW)\n", - "1-0:22.7.0(00.000*kW)\n", - "0-2:24.1.0(003)\n", - "0-2:96.1.0(xxxxxxx)\n", - "0-2:24.2.1(160317220000W)(01438.997*m3)\n", + "/XMX5LGBBFFB231126481\r\n", + "\r\n", + "1-3:0.2.8(42)\r\n", + "0-0:1.0.0(160317221058W)\r\n", + "0-0:96.1.1(xxxxxxxxxxxxxx)\r\n", + "1-0:1.8.1(001255.252*kWh)\r\n", + "1-0:2.8.1(000000.000*kWh)\r\n", + "1-0:1.8.2(001284.838*kWh)\r\n", + "1-0:2.8.2(000000.000*kWh)\r\n", + "0-0:96.14.0(0002)\r\n", + "1-0:1.7.0(00.187*kW)\r\n", + "1-0:2.7.0(00.000*kW)\r\n", + "0-0:96.7.21(00008)\r\n", + "0-0:96.7.9(00000)\r\n", + "1-0:99.97.0(0)(0-0:96.7.19)\r\n", + "1-0:32.32.0(00000)\r\n", + "1-0:32.36.0(00000)\r\n", + "0-0:96.13.1()\r\n", + "0-0:96.13.0()\r\n", + "1-0:31.7.0(001*A)\r\n", + "1-0:21.7.0(00.187*kW)\r\n", + "1-0:22.7.0(00.000*kW)\r\n", + "0-2:24.1.0(003)\r\n", + "0-2:96.1.0(xxxxxxx)\r\n", + "0-2:24.2.1(160317220000W)(01438.997*m3)\r\n", "!D625\n", ] diff --git a/dsmr_frontend/context_processors/__init__.py b/dsmr_frontend/context_processors/__init__.py index ff4efea01..6d223dd1f 100644 --- a/dsmr_frontend/context_processors/__init__.py +++ b/dsmr_frontend/context_processors/__init__.py @@ -3,5 +3,6 @@ def version(request): return { - 'dsmr_version': settings.DSMR_VERSION + 'dsmr_version': settings.DSMR_VERSION, + 'LANGUAGE_CODE': request.LANGUAGE_CODE, } diff --git a/dsmr_frontend/forms.py b/dsmr_frontend/forms.py new file mode 100644 index 000000000..f5b13ccb5 --- /dev/null +++ b/dsmr_frontend/forms.py @@ -0,0 +1,20 @@ +from django import forms +from django.utils.translation import ugettext_lazy as _ + + +class ExportAsCsvForm(forms.Form): + DATA_TYPE_DAY = 'day' + DATA_TYPE_HOUR = 'hour' + DATA_TYPES = ( + (DATA_TYPE_DAY, _('Day')), + (DATA_TYPE_HOUR, _('Hour')), + ) + EXPORT_FORMAT_CSV = 'csv' + EXPORT_FORMATS = ( + (EXPORT_FORMAT_CSV, _('CSV')), + ) + + data_type = forms.ChoiceField(choices=DATA_TYPES) + start_date = forms.DateField() + end_date = forms.DateField() + export_format = forms.ChoiceField(choices=EXPORT_FORMATS) diff --git a/dsmr_frontend/services.py b/dsmr_frontend/services.py deleted file mode 100644 index b34e5e176..000000000 --- a/dsmr_frontend/services.py +++ /dev/null @@ -1,24 +0,0 @@ -from dsmr_consumption.models.consumption import ElectricityConsumption, GasConsumption -from dsmr_weather.models.reading import TemperatureReading -from dsmr_weather.models.settings import WeatherSettings - - -def get_capabilities(): - """ - Returns the capabilities of the data tracked, such as whether the meter supports gas readings or - if there have been any readings regarding electricity being returned. - """ - capabilities = { - # We rely on consumption because DSMR readings might be flushed in the future. - 'electricity': ElectricityConsumption.objects.exists(), - 'electricity_returned': ElectricityConsumption.objects.filter( - # We can not rely on meter positions, as the manufacturer sometimes initializes meters - # with testing data. So we just have to wait for the first power returned. - currently_returned__gt=0 - ).exists(), - 'gas': GasConsumption.objects.exists(), - 'weather': WeatherSettings.get_solo().track and TemperatureReading.objects.exists() - } - capabilities['any'] = any(capabilities.values()) - - return capabilities diff --git a/dsmr_frontend/templates/dsmr_frontend/archive.html b/dsmr_frontend/templates/dsmr_frontend/archive.html index f83a46fb7..1d420309d 100644 --- a/dsmr_frontend/templates/dsmr_frontend/archive.html +++ b/dsmr_frontend/templates/dsmr_frontend/archive.html @@ -3,7 +3,7 @@ {% load i18n %} {% block title %}{% trans "Archive" %}{% endblock %} -{% block header %}{% trans "Archive" %}   {% endblock %} +{% block header %}{% trans "Archive" %}   {% endblock %} {% block content %} @@ -147,12 +147,6 @@ g_datepicker_view_mode = 'years'; initialize_datepicker() }); - - $('#daterangepicker').on('changeDate', function(ev, picker) { - var selected_day = $('#daterangepicker').val(); - update_summary(selected_day); - update_graphs(selected_day); - }); }); /** @@ -210,7 +204,7 @@ function update_view(selected_date) { update_summary(selected_date); - update_graphs(selected_date) + update_graphs(selected_date); } /** @@ -269,7 +263,7 @@ datasets: [{ data: electricity1, label: "{% trans 'Electricity 1 (low tariff)' %}", - fillColor: "rgba(255,255,255,0.2)", + fillColor: "rgba(160,0,0,0.1)", strokeColor: "rgba(160,0,0,1)", pointColor: "rgba(160,0,0,1)", pointStrokeColor: "#fff", @@ -278,7 +272,7 @@ }, { data: electricity2, label: "{% trans 'Electricity 2 (high tariff)' %}", - fillColor: "rgba(255,255,255,0.2)", + fillColor: "rgba(255,0,0,0.1)", strokeColor: "rgba(255,0,0,1)", pointColor: "rgba(255,0,0,1)", pointStrokeColor: "#fff", @@ -306,7 +300,7 @@ datasets: [{ data: electricity1_returned, label: "{% trans 'Electricity 1 returned (low tariff)' %}", - fillColor: "rgba(255,255,255,0.2)", + fillColor: "rgba(200,200,100,0.1)", strokeColor: "rgba(200,200,100,1)", pointColor: "rgba(200,200,100,1)", pointStrokeColor: "#fff", @@ -315,7 +309,7 @@ }, { data: electricity2_returned, label: "{% trans 'Electricity 1 returned (high tariff)' %}", - fillColor: "rgba(255,255,255,0.2)", + fillColor: "rgba(39,194,76,0.1)", strokeColor: "rgba(39,194,76,1)", pointColor: "rgba(39,194,76,1)", pointStrokeColor: "#fff", @@ -343,7 +337,7 @@ datasets: [{ data: gas, label: "{% trans 'Gas' %}", - fillColor: "rgba(255,255,255,0.2)", + fillColor: "rgba(250,133,0,0.1)", strokeColor: "rgba(250,133,0,1)", pointColor: "rgba(250,133,0,1)", pointStrokeColor: "#fff", diff --git a/dsmr_frontend/templates/dsmr_frontend/base.html b/dsmr_frontend/templates/dsmr_frontend/base.html index f5240c0ed..c31d3179c 100644 --- a/dsmr_frontend/templates/dsmr_frontend/base.html +++ b/dsmr_frontend/templates/dsmr_frontend/base.html @@ -59,7 +59,7 @@ {% block header_right %}{% endblock %}
  • - + v{{ dsmr_version }}
  • @@ -80,12 +80,12 @@
  • - {% trans "Archive" %} + {% trans "Archive" %}
  • - {% trans "Trends" %} + {% trans "Trends" %}
  • @@ -93,6 +93,11 @@ {% trans "Statistics" %}
  • +
  • + + {% trans "Compare" %} + +
  •  
  • @@ -101,9 +106,17 @@ {% trans "Status" %} +
  • +   +
  • +
  • + + {% trans "Export data" %}   + +
  • - {% trans "Configuration" %} + {% trans "Configuration" %}  
  • @@ -115,7 +128,7 @@
    {% block content %}{% endblock %} -
    +
    “{% trans "DSMR reader" %}” {% trans "created by" %} Dennis Siemensma © 2015 - 2016 | {% trans "Theme created by" %} web-apps.ninja © 2015 diff --git a/dsmr_frontend/templates/dsmr_frontend/compare.html b/dsmr_frontend/templates/dsmr_frontend/compare.html new file mode 100644 index 000000000..a9fa1f514 --- /dev/null +++ b/dsmr_frontend/templates/dsmr_frontend/compare.html @@ -0,0 +1,417 @@ +{% extends "dsmr_frontend/base.html" %} +{% load humanize %} +{% load static %} +{% load i18n %} + +{% block title %}{% trans "Compare" %}{% endblock %} +{% block header %}{% trans "Compare" %}   {% endblock %} + +{% block content %} + +
    +{% if not capabilities.any %} + +{% endif %} + +{% if capabilities.any and start_date and end_date %} +
    +
    +
    +
    + {% blocktrans %}Select level of detail displayed{% endblocktrans %} +
    +
    +
    +
    + {% trans "Days" %}
    + +
    +
    + {% trans "Months" %}
    + +
    +
    + {% trans "Years" %}
    + +
    +
    +
    +
    +
    + +
    +
    +
    + {% blocktrans %}Base selection{% endblocktrans %} +
    +
    +
    +
    +
    +
    + +
    +
    +
    + {% blocktrans %}Compare with selection{% endblocktrans %} +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    +
    + + + + + + + +{% endif %} +
    +{% endblock %} + +{% block stylesheets %} +{{ block.super }} + +{% endblock %} + +{% block javascript %} + {{ block.super }} + {% get_current_language as LANGUAGE_CODE %} + + + + + + + + + +{% endblock %} \ No newline at end of file diff --git a/dsmr_frontend/templates/dsmr_frontend/dashboard.html b/dsmr_frontend/templates/dsmr_frontend/dashboard.html index 4ec1104a5..c743f9601 100644 --- a/dsmr_frontend/templates/dsmr_frontend/dashboard.html +++ b/dsmr_frontend/templates/dsmr_frontend/dashboard.html @@ -106,6 +106,12 @@
    {{ consumption.day }} + + + +   {% trans "Add note for today" %} + +
    @@ -241,6 +247,9 @@ {% if capabilities.weather %} render_temperature_chart(); {% endif %} + + /* Auto reload page. */ + setInterval(function(){ location.reload(); }, 10000); }); {% if capabilities.electricity %} @@ -251,7 +260,7 @@ datasets: [{ data: {{ electricity_y|safe }}, label: "{% trans 'Electricity' %}", - fillColor: "rgba(255,255,255,0.2)", + fillColor: "rgba(255,0,0,0.1)", strokeColor: "rgba(255,0,0,1)", pointColor: "rgba(255,0,0,1)", pointStrokeColor: "#fff", @@ -274,7 +283,7 @@ datasets: [{ data: {{ electricity_returned_y|safe }}, label: "{% trans 'Electricity returned' %}", - fillColor: "rgba(255,255,255,0.2)", + fillColor: "rgba(0,255,0,0.1)", strokeColor: "rgba(39,194,76,1)", pointColor: "rgba(39,194,76,1)", pointStrokeColor: "#fff", @@ -297,7 +306,7 @@ datasets: [{ data: {{ gas_y|safe }}, label: "{% trans 'Gas' %}", - fillColor: "rgba(255,255,255,0.2)", + fillColor: "rgba(250,133,0,0.1)", strokeColor: "rgba(250,133,0,1)", pointColor: "rgba(250,133,0,1)", pointStrokeColor: "#fff", @@ -320,7 +329,7 @@ datasets: [{ data: {{ temperature_y|safe }}, label: "{% trans 'Temperature' %}", - fillColor: "rgba(255,255,255,0.2)", + fillColor: "rgba(35,183,229,0.1)", strokeColor: "rgba(35,183,229,1)", pointColor: "rgba(35,183,229,1)", pointStrokeColor: "#fff", diff --git a/dsmr_frontend/templates/dsmr_frontend/export.html b/dsmr_frontend/templates/dsmr_frontend/export.html new file mode 100644 index 000000000..0337704b8 --- /dev/null +++ b/dsmr_frontend/templates/dsmr_frontend/export.html @@ -0,0 +1,140 @@ +{% extends "dsmr_frontend/base.html" %} +{% load humanize %} +{% load static %} +{% load i18n %} + +{% block title %}{% trans "Export data" %}{% endblock %} +{% block header %}{% trans "Export data" %}   {% endblock %} + +{% block content %} + +
    +{% if not capabilities.any %} + +{% endif %} + +
    + {% csrf_token %} +
    +
    +
    +
    +   {% trans "Select data type" %}
    + {% blocktrans %}Select the type of data you want to export.{% endblocktrans %} +
    +
    +
    + + + + + + + + +
      {% blocktrans %}Summary of each day. Contains electricity, gas and costs (if applicable).{% endblocktrans %}
      {% blocktrans %}Summary of each hour read. Contains electricity and gas (if applicable).{% endblocktrans %}
    +
    +
    +
    +
    + +
    +
    +
    +
    +   {% trans "Select date range start" %}
    + {% blocktrans %}Select starting day for export.{% endblocktrans %} +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +   {% trans "Select date range end" %}
    + {% blocktrans %}Select ending day for export.{% endblocktrans %} +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +   {% trans "Select export format" %}
    + {% blocktrans %}Choose a format the data will be exported in.{% endblocktrans %} +
    +
    + + + + + +
      {% blocktrans %}Exports the data in Comma Separated Format, which can be read by Excel.{% endblocktrans %}
    +
    +
    +
    +
    + +   Download export + + + +{% endblock %} + +{% block stylesheets %} +{{ block.super }} + +{% endblock %} + +{% block javascript %} + {{ block.super }} + {% get_current_language as LANGUAGE_CODE %} + + + + + + + +{% endblock %} \ No newline at end of file diff --git a/dsmr_frontend/templates/dsmr_frontend/fragments/archive-xhr-statistics.html b/dsmr_frontend/templates/dsmr_frontend/fragments/archive-xhr-statistics.html index 6974aa439..fc6616a55 100644 --- a/dsmr_frontend/templates/dsmr_frontend/fragments/archive-xhr-statistics.html +++ b/dsmr_frontend/templates/dsmr_frontend/fragments/archive-xhr-statistics.html @@ -5,6 +5,14 @@
    {{ title|unlocalize }} + + {% if selected_level == 'days' %} + + +   {% trans "Add note for this date" %} + + + {% endif %}
    diff --git a/dsmr_frontend/templates/dsmr_frontend/status.html b/dsmr_frontend/templates/dsmr_frontend/status.html index f5b7d67be..6bca65549 100644 --- a/dsmr_frontend/templates/dsmr_frontend/status.html +++ b/dsmr_frontend/templates/dsmr_frontend/status.html @@ -2,7 +2,6 @@ {% load humanize %} {% load static %} {% load i18n %} -{% load model_meta_info %} {% block title %}{% trans "Status" %}{% endblock %} {% block header %}{% trans "Status" %}   {% endblock %} @@ -20,7 +19,29 @@
    - {% trans "Readings" %}
    +   {% trans "DSMR-reader" %}
    +
    +
    +
    + + + + + + + + +
    {% trans "Current version" %} {% trans "DSMR-reader" %}v{{ dsmr_version }}
    {% trans "Changelog" %}{% trans 'View all releases' %}
    +
    +
    + + + +
    +
    +
    +
    +   {% trans "Readings" %}
    {% blocktrans %}Status regarding the latest data read from your meter.{% endblocktrans %}
    @@ -53,7 +74,7 @@
    - {% trans "Background" %}
    +   {% trans "Background" %}
    {% blocktrans %}Status regarding processing readings, making them visible in other pages and graphs.{% endblocktrans %}
    @@ -114,7 +135,7 @@
    - {% trans "Data availability" %}
    +   {% trans "Data availability" %}
    {% blocktrans %}Based on readings until this moment. Electricity usage should be always available. Gas usage and electricity return depend on your home situation.{% endblocktrans %}
    diff --git a/dsmr_frontend/templates/dsmr_frontend/trends.html b/dsmr_frontend/templates/dsmr_frontend/trends.html index f2d0970a5..b3256ba0b 100644 --- a/dsmr_frontend/templates/dsmr_frontend/trends.html +++ b/dsmr_frontend/templates/dsmr_frontend/trends.html @@ -4,7 +4,7 @@ {% load i18n %} {% block title %}{% trans "Trends" %}{% endblock %} -{% block header %}{% trans "Trends" %}   {% endblock %} +{% block header %}{% trans "Trends" %}   {% endblock %} {% block content %} diff --git a/dsmr_frontend/tests/test_webinterface.py b/dsmr_frontend/tests/test_webinterface.py index 32e65b9e6..918b0b32a 100644 --- a/dsmr_frontend/tests/test_webinterface.py +++ b/dsmr_frontend/tests/test_webinterface.py @@ -1,9 +1,11 @@ from unittest import mock import json +import io from django.test import TestCase, Client from django.utils import timezone, formats from django.core.urlresolvers import reverse +from django.contrib.auth.models import User from dsmr_consumption.models.consumption import ElectricityConsumption, GasConsumption from dsmr_consumption.models.settings import ConsumptionSettings @@ -13,6 +15,7 @@ from dsmr_stats.models.statistics import DayStatistics from dsmr_datalogger.models.reading import DsmrReading import dsmr_consumption.services +from dsmr_frontend.forms import ExportAsCsvForm class TestViews(TestCase): @@ -29,6 +32,7 @@ class TestViews(TestCase): def setUp(self): self.client = Client() + self.user = User.objects.create_user('testuser', 'unknown@localhost', 'passwd') dsmr_consumption.services.compact_all() def test_admin(self): @@ -179,6 +183,18 @@ def test_trends(self, now_mock): self.assertEqual(response.status_code, 200) self.assertFalse(response.context['capabilities']['electricity_returned']) + @mock.patch('django.utils.timezone.now') + def test_compare(self, now_mock): + """ Basicly the same view (context vars) as the archive view. """ + now_mock.return_value = timezone.make_aware( + timezone.datetime(2016, 1, 1) + ) + response = self.client.get( + reverse('{}:compare'.format(self.namespace)) + ) + self.assertEqual(response.status_code, 200) + self.assertIn('capabilities', response.context) + @mock.patch('django.utils.timezone.now') def test_status(self, now_mock): now_mock.return_value = timezone.make_aware( @@ -188,6 +204,7 @@ def test_status(self, now_mock): reverse('{}:status'.format(self.namespace)) ) self.assertEqual(response.status_code, 200) + self.assertIn('capabilities', response.context) self.assertIn('total_reading_count', response.context) self.assertIn('unprocessed_readings', response.context) @@ -202,14 +219,79 @@ def test_status(self, now_mock): if 'latest_gc' in response.context: self.assertIn('delta_since_latest_gc', response.context) + def test_export(self): + view_url = reverse('{}:export'.format(self.namespace)) + # Check login required. + response = self.client.get(view_url) + self.assertEqual(response.status_code, 302) + self.assertEqual( + response['Location'], 'http://testserver/admin/login/?next={}'.format(view_url) + ) + + # Login and retest + self.client.login(username='testuser', password='passwd') + response = self.client.get(view_url) + self.assertEqual(response.status_code, 200) + self.assertIn('start_date', response.context) + self.assertIn('end_date', response.context) + + def test_export_as_csv(self): + view_url = reverse('{}:export-as-csv'.format(self.namespace)) + post_data = { + 'data_type': ExportAsCsvForm.DATA_TYPE_DAY, + 'export_format': ExportAsCsvForm.EXPORT_FORMAT_CSV, + 'start_date': '2016-01-01', + 'end_date': '2016-02-01', + } + + # Check login required. + response = self.client.post(view_url) + self.assertEqual(response.status_code, 302) + self.assertEqual( + response['Location'], 'http://testserver/export/admin/login/?next={}'.format(view_url) + ) + + # Login and retest, without post data. + self.client.login(username='testuser', password='passwd') + response = self.client.post(view_url,) + self.assertEqual(response.status_code, 302) + self.assertEqual( + # Invalid form redirects to previous page. + response['Location'], 'http://testserver{}'.format( + reverse('{}:export'.format(self.namespace)) + ) + ) + + # Day export. + response = self.client.post(view_url, data=post_data) + self.assertEqual(response.status_code, 200) + io.BytesIO(b"".join(response.streaming_content)) # Force generator evaluation. + + # Hour export. + post_data['data_type'] = ExportAsCsvForm.DATA_TYPE_HOUR + response = self.client.post(view_url, data=post_data) + self.assertEqual(response.status_code, 200) + io.BytesIO(b"".join(response.streaming_content)) # Force generator evaluation. + @mock.patch('django.utils.timezone.now') def test_configuration(self, now_mock): now_mock.return_value = timezone.make_aware( timezone.datetime(2016, 1, 1) ) + + # Check login required. response = self.client.get( reverse('{}:configuration'.format(self.namespace)) ) + self.assertEqual(response.status_code, 302) + + # Login and retest + self.client.login(username='testuser', password='passwd') + response = self.client.get( + reverse('{}:configuration'.format(self.namespace)) + ) + + self.assertEqual(response.status_code, 200) self.assertIn('consumption_settings', response.context) self.assertIsInstance(response.context['consumption_settings'], ConsumptionSettings) diff --git a/dsmr_frontend/urls.py b/dsmr_frontend/urls.py index 773e8b910..36c72ab14 100644 --- a/dsmr_frontend/urls.py +++ b/dsmr_frontend/urls.py @@ -1,4 +1,5 @@ from django.views.decorators.cache import cache_page +from django.contrib.auth.decorators import login_required from django.conf import settings from django.conf.urls import url @@ -6,21 +7,40 @@ from dsmr_frontend.views.archive import Archive, ArchiveXhrSummary, ArchiveXhrGraphs from dsmr_frontend.views.statistics import Statistics from dsmr_frontend.views.trends import Trends +from dsmr_frontend.views.compare import Compare +from dsmr_frontend.views.export import Export, ExportAsCsv from dsmr_frontend.views.status import Status from dsmr_frontend.views.configuration import Configuration urlpatterns = [ + # Public views. url(r'^$', Dashboard.as_view(), name='dashboard'), url(r'^archive$', Archive.as_view(), name='archive'), - url(r'^archive/xhr/summary$', ArchiveXhrSummary.as_view(), name='archive-xhr-summary'), - url(r'^archive/xhr/graphs$', ArchiveXhrGraphs.as_view(), name='archive-xhr-graphs'), + url( + r'^archive/xhr/summary$', + ArchiveXhrSummary.as_view(), + name='archive-xhr-summary' + ), + url( + r'^archive/xhr/graphs$', + ArchiveXhrGraphs.as_view(), + name='archive-xhr-graphs' + ), url(r'^statistics$', Statistics.as_view(), name='statistics'), url( r'^trends$', cache_page(settings.CACHES['default']['TIMEOUT'])(Trends.as_view()), name='trends' ), + url(r'^compare$', Compare.as_view(), name='compare'), + + # Maintainance view. url(r'^status$', Status.as_view(), name='status'), - url(r'^configuration$', Configuration.as_view(), name='configuration'), + + # Views requiring authentication. + url(r'^export$', login_required(Export.as_view()), name='export'), + url(r'^export/csv$', login_required(ExportAsCsv.as_view()), name='export-as-csv'), + + url(r'^configuration$', login_required(Configuration.as_view()), name='configuration'), ] diff --git a/dsmr_frontend/views/archive.py b/dsmr_frontend/views/archive.py index ac653053a..a4e615657 100644 --- a/dsmr_frontend/views/archive.py +++ b/dsmr_frontend/views/archive.py @@ -72,6 +72,9 @@ def get_context_data(self, **kwargs): context_data['notes'] = Note.objects.filter(day=selected_datetime.date()) + context_data['selected_level'] = selected_level + context_data['selected_datetime'] = selected_datetime + context_data['django_date_format'] = 'DJANGO_DATE_FORMAT' return context_data diff --git a/dsmr_frontend/views/compare.py b/dsmr_frontend/views/compare.py new file mode 100644 index 000000000..a27d0ddf1 --- /dev/null +++ b/dsmr_frontend/views/compare.py @@ -0,0 +1,5 @@ +from dsmr_frontend.views.archive import Archive + + +class Compare(Archive): + template_name = 'dsmr_frontend/compare.html' diff --git a/dsmr_frontend/views/export.py b/dsmr_frontend/views/export.py new file mode 100644 index 000000000..2cf43a5b3 --- /dev/null +++ b/dsmr_frontend/views/export.py @@ -0,0 +1,115 @@ +import datetime +import csv + +from django.views.generic.base import TemplateView +from django.views.generic.edit import BaseFormView +from django.core.urlresolvers import reverse +from django.http.response import StreamingHttpResponse +from django.utils import timezone, formats +from django.shortcuts import redirect + +from dsmr_stats.models.statistics import DayStatistics, HourStatistics +from dsmr_frontend.forms import ExportAsCsvForm +import dsmr_backend.services +from decimal import Decimal + + +class Export(TemplateView): + template_name = 'dsmr_frontend/export.html' + + def get_context_data(self, **kwargs): + context_data = super(Export, self).get_context_data(**kwargs) + context_data['capabilities'] = dsmr_backend.services.get_capabilities() + + day_statistics = DayStatistics.objects.all().order_by('pk') + + try: + context_data['start_date'] = day_statistics[0].day + context_data['end_date'] = day_statistics.order_by('-pk')[0].day + except IndexError: + context_data['start_date'] = None + context_data['end_date'] = None + + context_data['datepicker_locale_format'] = formats.get_format('DSMR_DATEPICKER_LOCALE_FORMAT') + context_data['datepicker_date_format'] = 'DSMR_DATEPICKER_DATE_FORMAT' + return context_data + + +class ExportAsCsv(BaseFormView): + """ Exports the selected data in CSV format. """ + form_class = ExportAsCsvForm + + def form_invalid(self, form): + return redirect(reverse('frontend:export')) + + def form_valid(self, form): + start_date = form.cleaned_data['start_date'] + start_date = timezone.localtime(timezone.make_aware(timezone.datetime( + start_date.year, start_date.month, start_date.day + ))) + end_date = form.cleaned_data['end_date'] + end_date = timezone.localtime(timezone.make_aware(timezone.datetime( + end_date.year, end_date.month, end_date.day + ))) + data_type = form.cleaned_data['data_type'] + + if data_type == ExportAsCsvForm.DATA_TYPE_DAY: + source_data = DayStatistics.objects.filter( + day__gte=start_date.date(), day__lte=end_date.date() + ).order_by('day') + export_fields = [ + 'day', 'electricity1', 'electricity2', 'electricity1_returned', + 'electricity2_returned', 'gas', 'electricity1_cost', 'electricity2_cost', + 'gas_cost', 'total_cost' + ] + + else: # if data_type == ExportAsCsvForm.DATA_TYPE_HOUR: + source_data = HourStatistics.objects.filter( + hour_start__gte=start_date, hour_start__lte=end_date + ).order_by('hour_start') + export_fields = [ + 'hour_start', 'electricity1', 'electricity2', 'electricity1_returned', + 'electricity2_returned', 'gas' + ] + + # Direct copy from Django docs. + class Echo(object): + """ An object that implements just the write method of the file-like interface. """ + def write(self, value): + """ Write the value by returning it, instead of storing in a buffer. """ + return value + pseudo_buffer = Echo() + writer = csv.writer(pseudo_buffer) + response = StreamingHttpResponse( + ( + self._generate_csv_row(writer, source_data, export_fields) + ), + content_type='text/csv' + ) + attachment_name = 'dsmrreader-data-export---{}__{}__{}.csv'.format( + data_type, start_date.date(), end_date.date() + ) + response['Content-Disposition'] = 'attachment; filename="{}"'.format(attachment_name) + return response + + def _generate_csv_row(self, writer, data, fields): + yield writer.writerow(fields) + + for current_data in data: + yield writer.writerow([ + self._serialize_field( + getattr(current_data, current_field) + ) for current_field in fields + ]) + + raise StopIteration() + + def _serialize_field(self, data): + if isinstance(data, Decimal): + return float(data) + + elif isinstance(data, datetime.datetime): + return formats.date_format(data, 'DSMR_EXPORT_DATETIME_FORMAT') + + elif isinstance(data, datetime.date): + return formats.date_format(data, 'DSMR_DATEPICKER_DATE_FORMAT') diff --git a/dsmr_stats/admin.py b/dsmr_stats/admin.py index 36844218b..4bf446bde 100644 --- a/dsmr_stats/admin.py +++ b/dsmr_stats/admin.py @@ -11,3 +11,12 @@ class NoteAdmin(admin.ModelAdmin): formfield_overrides = { models.CharField: {'widget': widgets.Textarea}, } + + def get_form(self, request, obj=None, **kwargs): + form = super(NoteAdmin, self).get_form(request, obj, **kwargs) + day = request.GET.get('day') + + if day: + form.base_fields['day'].initial = day + + return form diff --git a/dsmrreader/__init__.py b/dsmrreader/__init__.py index 2cbc5fff7..38048dbad 100644 --- a/dsmrreader/__init__.py +++ b/dsmrreader/__init__.py @@ -17,6 +17,6 @@ from django.utils.version import get_version -VERSION = (1, 0, 1, 'final', 0) +VERSION = (1, 1, 0, 'final', 0) __version__ = get_version(VERSION) diff --git a/dsmrreader/config/base.py b/dsmrreader/config/base.py index 1e46a3861..3f0aca0e1 100644 --- a/dsmrreader/config/base.py +++ b/dsmrreader/config/base.py @@ -100,6 +100,7 @@ WSGI_APPLICATION = 'dsmrreader.wsgi.application' +LOGIN_URL = 'admin/login/' # Database # https://docs.djangoproject.com/en/1.8/ref/settings/#databases diff --git a/dsmrreader/formats/en/formats.py b/dsmrreader/formats/en/formats.py index 063956037..3a7a64bae 100644 --- a/dsmrreader/formats/en/formats.py +++ b/dsmrreader/formats/en/formats.py @@ -7,3 +7,7 @@ DSMR_DATEPICKER_LOCALE_FORMAT = 'mm/dd/yyyy' DSMR_DATEPICKER_DATE_FORMAT = 'm/d/Y' DSMR_DATEPICKER_MONTH = 'F Y' + +DSMR_EXPORT_DATETIME_FORMAT = 'Y-m-d H:i:s' + +DJANGO_DATE_FORMAT = 'Y-m-d' diff --git a/dsmrreader/formats/nl/formats.py b/dsmrreader/formats/nl/formats.py index 3f6951fa7..b35622298 100644 --- a/dsmrreader/formats/nl/formats.py +++ b/dsmrreader/formats/nl/formats.py @@ -7,3 +7,7 @@ DSMR_DATEPICKER_LOCALE_FORMAT = 'dd-mm-yyyy' DSMR_DATEPICKER_DATE_FORMAT = 'd-m-Y' DSMR_DATEPICKER_MONTH = 'F Y' + +DSMR_EXPORT_DATETIME_FORMAT = 'd-m-Y H:i:s' + +DJANGO_DATE_FORMAT = 'd-m-Y' diff --git a/dsmrreader/locales/nl/LC_MESSAGES/django.mo b/dsmrreader/locales/nl/LC_MESSAGES/django.mo index c92bd7987..8f69edaa5 100644 Binary files a/dsmrreader/locales/nl/LC_MESSAGES/django.mo and b/dsmrreader/locales/nl/LC_MESSAGES/django.mo differ diff --git a/dsmrreader/locales/nl/LC_MESSAGES/django.po b/dsmrreader/locales/nl/LC_MESSAGES/django.po index 870b61d78..7f3b78949 100644 --- a/dsmrreader/locales/nl/LC_MESSAGES/django.po +++ b/dsmrreader/locales/nl/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: DSMR Reader\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-04-06 23:55+0200\n" -"PO-Revision-Date: 2016-03-28 17:52+0100\n" +"POT-Creation-Date: 2016-04-18 20:05+0200\n" +"PO-Revision-Date: 2016-04-18 19:57+0100\n" "Last-Translator: Dennis Siemensma \n" "Language-Team: Dennis Siemensma \n" "Language: nl\n" @@ -252,6 +252,15 @@ msgstr "Dataloggerconfiguratie" msgid "Frontend" msgstr "Weergave" +msgid "Day" +msgstr "Dag" + +msgid "Hour" +msgstr "Uur" + +msgid "CSV" +msgstr "CSV" + msgid "Clears the entire cache." msgstr "Gooit de volledige cache leeg." @@ -327,9 +336,18 @@ msgstr "Trends" msgid "Statistics" msgstr "Statistieken" +msgid "Compare" +msgstr "Vergelijk" + msgid "Status" msgstr "Status" +msgid "Export data" +msgstr "Exporteer gegevens" + +msgid "Authentication required" +msgstr "Inloggen vereist" + msgid "Configuration" msgstr "Configuratie" @@ -345,6 +363,15 @@ msgstr "Bekijk repository op Github" msgid "Theme created by" msgstr "Thema gemaakt door" +msgid "No data found. Please make sure the datalogger is up and running and the backend process is running as well." +msgstr "Geen gegevens gevonden. Zorg ervoor dat de datalogger draait, samen met het achtergrondproces." + +msgid "Base selection" +msgstr "Basisselectie" + +msgid "Compare with selection" +msgstr "Te vergelijken selectie" + msgid "All settings" msgstr "Alle instellingen" @@ -357,9 +384,6 @@ msgstr "Watt" msgid "m3" msgstr "m3" -msgid "No data found. Please make sure the datalogger is up and running and the backend process is running as well." -msgstr "Geen gegevens gevonden. Zorg ervoor dat de datalogger draait, samen met het achtergrondproces." - msgid "This month" msgstr "Huidige maand" @@ -381,6 +405,9 @@ msgstr "Kosten" msgid "Total" msgstr "Totaal" +msgid "Add note for today" +msgstr "Voeg notitie toe voor vandaag" + msgid "Recent electricity consumed (watt)" msgstr "Recent elektriciteitsverbruik (Watt)" @@ -399,6 +426,51 @@ msgstr "Elektriciteit" msgid "Temperature" msgstr "Temperatuur" +msgid "Select data type" +msgstr "Selecteer gegevenstype" + +msgid "Select the type of data you want to export." +msgstr "Selecteer het soort gegevens dat je wil exporteren." + +msgid "Day totals" +msgstr "Dagtotalen" + +msgid "Summary of each day. Contains electricity, gas and costs (if applicable)." +msgstr "Samenvatting van elke dag. Bevat electriciteit, gas en gemaakte kosten (wanneer van toepassing)." + +msgid "Hour totals" +msgstr "Uurtotalen" + +msgid "Summary of each hour read. Contains electricity and gas (if applicable)." +msgstr "Samenvatting van elk uur. Bevat electriciteit en gas (wanneer van toepassing)." + +msgid "Select date range start" +msgstr "Selecteer startdatum" + +msgid "Select starting day for export." +msgstr "Selecteer startdatum voor export." + +msgid "Select date range end" +msgstr "Selecteer einddatum" + +msgid "Select ending day for export." +msgstr "Selecteer einddatum voor export." + +msgid "Select export format" +msgstr "Selecteer export formaat" + +msgid "Choose a format the data will be exported in." +msgstr "Kies een formaat waarin de data geëxporteerd wordt." + +msgid "Excel (.CSV)" +msgstr "Excel (.CSV)" + +msgid "Exports the data in Comma Separated Format, which can be read by Excel." +msgstr "Exporteert de gegevens in komma gescheiden formaat, die in te lezen is door Excel." + +msgid "Add note for this date" +msgstr "Voeg notitie toe voor deze datum" + msgid "Energy price" msgstr "Energieprijs" @@ -435,6 +507,21 @@ msgstr "Gas (per m3)" msgid "No energy supplier prices found for today. Enable this feature in consumption settings to view prices." msgstr "Geen energieprijzen voor vandaag gevonden. Schakel dit in bij de verbruiksinstellingen om de prijzen weer te geven." +msgid "DSMR-reader" +msgstr "DSMR-reader" + +msgid "Current version" +msgstr "Huidige versie" + +msgid "View current release" +msgstr "Bekijk huidige versie" + +msgid "Changelog" +msgstr "Wijzigingenoverzicht" + +msgid "View all releases" +msgstr "Bekijk alle versies" + msgid "Readings" msgstr "Metingen" @@ -520,9 +607,6 @@ msgstr "Electriciteitsverbruik piek- en daltarief (afgelopen maand)" msgid "Trend & statistics" msgstr "Trends & statistieken" -msgid "Day" -msgstr "Dag" - msgid "Note" msgstr "Notitie" @@ -712,6 +796,24 @@ msgstr "Nederlands" msgid "English" msgstr "Engels" +#~ msgid "Deploy" +#~ msgstr "Uitrollen" + +#~ msgid "Updating/deploying DSMR-reader" +#~ msgstr "Bezig met bijwerken/uitrollen van DSMR-reader" + +#~ msgid "Please note that this may take a while, depending on your device..." +#~ msgstr "Dit kan enige tijd in beslag nemen, afhankelijk van de snelheid van je apparaat..." + +#~ msgid "Info regarding the version of this application. Automatic updates are not available (mostly due to privacy reasons), but you should be able to update manually." +#~ msgstr "Versie-informatie. Automatische updates zijn niet mogelijk, voornamelijk wegens privacy-overwegingen, maar je kun wel handmatig bijwerken naar een nieuwere versie." + +#~ msgid "Updates" +#~ msgstr "Updates" + +#~ msgid "Check for updates" +#~ msgstr "Controleer op updates" + #~ msgid "Last week" #~ msgstr "Afgelopen week" @@ -805,9 +907,6 @@ msgstr "Engels" #~ msgid "Recent electricity delivered (watt)" #~ msgstr "Recent elektriciteitsverbruik (Watt)" -#~ msgid "Select day" -#~ msgstr "Selecteer dag" - #~ msgid "Daily cost in the past %(days_ago)s days" #~ msgstr "Dagelijkse kosten in de afgelopen %(days_ago)s dagen"