Browse Source

feat: add GUI

pull/106/head
Jérôme Deuchnord 5 years ago
parent
commit
0f0f166766
No known key found for this signature in database GPG Key ID: 72F9D1A7272D53DD
12 changed files with 381 additions and 237 deletions
  1. +46
    -20
      Makefile
  2. +131
    -122
      Pipfile.lock
  3. BIN
      build/distrib/darwin/dmg-background.png
  4. BIN
      build/distrib/darwin/dmg-background.xcf
  5. BIN
      build/distrib/darwin/dmg.icns
  6. BIN
      build/distrib/darwin/icon-white.icns
  7. +1
    -1
      build/distrib/darwin/launch-kosmorro.sh
  8. BIN
      build/distrib/darwin/path2594.png
  9. +66
    -59
      kosmorrolib/gui/mainwindow.py
  10. +9
    -9
      kosmorrolib/gui/panel.py
  11. +125
    -24
      kosmorrolib/locales/messages.pot
  12. +3
    -2
      kosmorrolib/main.py

+ 46
- 20
Makefile View File

@@ -56,29 +56,55 @@ finish-release: env
@echo -e "\e[1mVersion \e[36m$$RELEASE_NUMBER\e[39m successfully tagged!"
@echo -e "Invoke \e[33mgit push origin master features v$$RELEASE_NUMBER\e[39m to finish."

distapp = dist/Kosmorro.app
distrib-mac: env
@if [ -e $(distapp) ]; then echo "Deleting the existing app."; rm -rf $(distapp); fi

mkdir -p "$(distapp)/Contents/MacOS" "$(distapp)/Contents/Resources"
distmacapp = dist/Kosmorro.app
dist-mac-app: env
@if [ -e $(distmacapp) ]; then echo "Deleting the existing app."; rm -rf $(distmacapp); fi
mkdir -p "$(distmacapp)/Contents/MacOS" "$(distmacapp)/Contents/Resources"

# Add application files
cp "kosmorro" "$(distapp)/Contents/MacOS/kosmorro"
cp -r "kosmorrolib" "$(distapp)/Contents/MacOS/kosmorrolib"
cp "Pipfile" "$(distapp)/Contents/MacOS/Pipfile"
cp "Pipfile.lock" "$(distapp)/Contents/MacOS/Pipfile.lock"
cp "kosmorro" "$(distmacapp)/Contents/MacOS/kosmorro"
cp -r "kosmorrolib" "$(distmacapp)/Contents/MacOS/kosmorrolib"
cp "Pipfile" "$(distmacapp)/Contents/MacOS/Pipfile"
cp "Pipfile.lock" "$(distmacapp)/Contents/MacOS/Pipfile.lock"

# Install dependencies
cd $(distapp)/Contents/MacOS && PIPENV_VENV_IN_PROJECT=1 pipenv sync
cd $(distapp)/Contents/MacOS && source .venv/bin/activate && pip install wxPython

# Add Mac-specific files
cp "build/distrib/darwin/Info.plist" "$(distapp)/Contents/Info.plist"
cp "build/distrib/darwin/launch-kosmorro.sh" "$(distapp)/Contents/MacOS/launch-kosmorro"
cp "build/distrib/darwin/icon.icns" "$(distapp)/Contents/Resources/icon.icns"
cd $(distmacapp)/Contents/MacOS && PIPENV_VENV_IN_PROJECT=1 pipenv sync
cd $(distmacapp)/Contents/MacOS && source .venv/bin/activate && pip install wxPython latex

sed "s/{{app_version}}/$$RELEASE_NUMBER/" "build/distrib/darwin/Info.plist" > "$(distapp)/Contents/Info.plist"
# Add Python binaries and remove the links in the virtualenv
cp -r "$$(dirname $$(realpath $$(which python3)))/.." $(distmacapp)/Contents/MacOS/python
rm $(distmacapp)/Contents/MacOS/.venv/bin/python{,3,3.9}

chmod +x "$(distapp)/Contents/MacOS/launch-kosmorro"

echo "Application created."
# Add Mac-specific files
cp "build/distrib/darwin/Info.plist" "$(distmacapp)/Contents/Info.plist"
cp "build/distrib/darwin/launch-kosmorro.sh" "$(distmacapp)/Contents/MacOS/launch-kosmorro"
cp "build/distrib/darwin/icon.icns" "$(distmacapp)/Contents/Resources/icon.icns"

sed "s/{{app_version}}/$$RELEASE_NUMBER/" "build/distrib/darwin/Info.plist" > "$(distmacapp)/Contents/Info.plist"
chmod +x "$(distmacapp)/Contents/MacOS/launch-kosmorro"

# Clean package
rm "$(distmacapp)/Contents/MacOS/Pipfile" "$(distmacapp)/Contents/MacOS/Pipfile.lock"

@echo "Application created."

distmacdmg = dist/Kosmorro.dmg
dist-mac-dmg: dist-mac-app
@if [ -e $(distmacdmg) ]; then echo "Deleting the existing DMG."; rm -rf $(distmacdmg); fi
mkdir -p "$(distmacapp)/Contents/MacOS"
mkdir -p dist/dmg
cp -r $(distmacapp) dist/dmg
create-dmg --volname "Kosmorro installer" \
--volicon build/distrib/darwin/dmg.icns \
--background build/distrib/darwin/dmg-background.png \
--icon-size 72 \
--icon Kosmorro.app 140 120 \
--window-size 640 365 \
--app-drop-link 475 120 \
--eula LICENSE.md \
$(distmacdmg) \
dist/dmg

rm -rf dist/dmg

dist: dist-mac-dmg

+ 131
- 122
Pipfile.lock View File

@@ -18,10 +18,10 @@
"default": {
"certifi": {
"hashes": [
"sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3",
"sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41"
"sha256:1f422849db327d534e3d0c5f02a263458c3955ec0aae4ff09b95f195c59f4edd",
"sha256:f05def092c44fbf25834a51509ef6e631dc19765ab8a57b4e7ab85531f0a9cf4"
],
"version": "==2020.6.20"
"version": "==2020.11.8"
},
"data": {
"hashes": [
@@ -52,9 +52,9 @@
},
"jplephem": {
"hashes": [
"sha256:316aa8ebb6d13fd2158c06b2709bcde382d04bf63bb1e48d0bce89937088c6e3"
"sha256:e0017de1a45015b247faa8d15ebf35d2014abe949135f3703a3252adb96e43b1"
],
"version": "==2.14"
"version": "==2.15"
},
"latex": {
"hashes": [
@@ -65,35 +65,43 @@
},
"numpy": {
"hashes": [
"sha256:082f8d4dd69b6b688f64f509b91d482362124986d98dc7dc5f5e9f9b9c3bb983",
"sha256:1bc0145999e8cb8aed9d4e65dd8b139adf1919e521177f198529687dbf613065",
"sha256:309cbcfaa103fc9a33ec16d2d62569d541b79f828c382556ff072442226d1968",
"sha256:3673c8b2b29077f1b7b3a848794f8e11f401ba0b71c49fbd26fb40b71788b132",
"sha256:480fdd4dbda4dd6b638d3863da3be82873bba6d32d1fc12ea1b8486ac7b8d129",
"sha256:56ef7f56470c24bb67fb43dae442e946a6ce172f97c69f8d067ff8550cf782ff",
"sha256:5a936fd51049541d86ccdeef2833cc89a18e4d3808fe58a8abeb802665c5af93",
"sha256:5b6885c12784a27e957294b60f97e8b5b4174c7504665333c5e94fbf41ae5d6a",
"sha256:667c07063940e934287993366ad5f56766bc009017b4a0fe91dbd07960d0aba7",
"sha256:7ed448ff4eaffeb01094959b19cbaf998ecdee9ef9932381420d514e446601cd",
"sha256:8343bf67c72e09cfabfab55ad4a43ce3f6bf6e6ced7acf70f45ded9ebb425055",
"sha256:92feb989b47f83ebef246adabc7ff3b9a59ac30601c3f6819f8913458610bdcc",
"sha256:935c27ae2760c21cd7354402546f6be21d3d0c806fffe967f745d5f2de5005a7",
"sha256:aaf42a04b472d12515debc621c31cf16c215e332242e7a9f56403d814c744624",
"sha256:b12e639378c741add21fbffd16ba5ad25c0a1a17cf2b6fe4288feeb65144f35b",
"sha256:b1cca51512299841bf69add3b75361779962f9cee7d9ee3bb446d5982e925b69",
"sha256:b8456987b637232602ceb4d663cb34106f7eb780e247d51a260b84760fd8f491",
"sha256:b9792b0ac0130b277536ab8944e7b754c69560dac0415dd4b2dbd16b902c8954",
"sha256:c9591886fc9cbe5532d5df85cb8e0cc3b44ba8ce4367bd4cf1b93dc19713da72",
"sha256:cf1347450c0b7644ea142712619533553f02ef23f92f781312f6a3553d031fc7",
"sha256:de8b4a9b56255797cbddb93281ed92acbc510fb7b15df3f01bd28f46ebc4edae",
"sha256:e1b1dc0372f530f26a03578ac75d5e51b3868b9b76cd2facba4c9ee0eb252ab1",
"sha256:e45f8e981a0ab47103181773cc0a54e650b2aef8c7b6cd07405d0fa8d869444a",
"sha256:e4f6d3c53911a9d103d8ec9518190e52a8b945bab021745af4939cfc7c0d4a9e",
"sha256:ed8a311493cf5480a2ebc597d1e177231984c818a86875126cfd004241a73c3e",
"sha256:ef71a1d4fd4858596ae80ad1ec76404ad29701f8ca7cdcebc50300178db14dfc"
"sha256:08308c38e44cc926bdfce99498b21eec1f848d24c302519e64203a8da99a97db",
"sha256:09c12096d843b90eafd01ea1b3307e78ddd47a55855ad402b157b6c4862197ce",
"sha256:13d166f77d6dc02c0a73c1101dd87fdf01339febec1030bd810dcd53fff3b0f1",
"sha256:141ec3a3300ab89c7f2b0775289954d193cc8edb621ea05f99db9cb181530512",
"sha256:16c1b388cc31a9baa06d91a19366fb99ddbe1c7b205293ed072211ee5bac1ed2",
"sha256:18bed2bcb39e3f758296584337966e68d2d5ba6aab7e038688ad53c8f889f757",
"sha256:1aeef46a13e51931c0b1cf8ae1168b4a55ecd282e6688fdb0a948cc5a1d5afb9",
"sha256:27d3f3b9e3406579a8af3a9f262f5339005dd25e0ecf3cf1559ff8a49ed5cbf2",
"sha256:2a2740aa9733d2e5b2dfb33639d98a64c3b0f24765fed86b0fd2aec07f6a0a08",
"sha256:4377e10b874e653fe96985c05feed2225c912e328c8a26541f7fc600fb9c637b",
"sha256:448ebb1b3bf64c0267d6b09a7cba26b5ae61b6d2dbabff7c91b660c7eccf2bdb",
"sha256:50e86c076611212ca62e5a59f518edafe0c0730f7d9195fec718da1a5c2bb1fc",
"sha256:5734bdc0342aba9dfc6f04920988140fb41234db42381cf7ccba64169f9fe7ac",
"sha256:64324f64f90a9e4ef732be0928be853eee378fd6a01be21a0a8469c4f2682c83",
"sha256:6ae6c680f3ebf1cf7ad1d7748868b39d9f900836df774c453c11c5440bc15b36",
"sha256:6d7593a705d662be5bfe24111af14763016765f43cb6923ed86223f965f52387",
"sha256:8cac8790a6b1ddf88640a9267ee67b1aee7a57dfa2d2dd33999d080bc8ee3a0f",
"sha256:8ece138c3a16db8c1ad38f52eb32be6086cc72f403150a79336eb2045723a1ad",
"sha256:9eeb7d1d04b117ac0d38719915ae169aa6b61fca227b0b7d198d43728f0c879c",
"sha256:a09f98011236a419ee3f49cedc9ef27d7a1651df07810ae430a6b06576e0b414",
"sha256:a5d897c14513590a85774180be713f692df6fa8ecf6483e561a6d47309566f37",
"sha256:ad6f2ff5b1989a4899bf89800a671d71b1612e5ff40866d1f4d8bcf48d4e5764",
"sha256:c42c4b73121caf0ed6cd795512c9c09c52a7287b04d105d112068c1736d7c753",
"sha256:cb1017eec5257e9ac6209ac172058c430e834d5d2bc21961dceeb79d111e5909",
"sha256:d6c7bb82883680e168b55b49c70af29b84b84abb161cbac2800e8fcb6f2109b6",
"sha256:e452dc66e08a4ce642a961f134814258a082832c78c90351b75c41ad16f79f63",
"sha256:e5b6ed0f0b42317050c88022349d994fe72bfe35f5908617512cd8c8ef9da2a9",
"sha256:e9b30d4bd69498fc0c3fe9db5f62fffbb06b8eb9321f92cc970f2969be5e3949",
"sha256:ec149b90019852266fec2341ce1db513b843e496d5a8e8cdb5ced1923a92faab",
"sha256:edb01671b3caae1ca00881686003d16c2209e07b7ef8b7639f1867852b948f7c",
"sha256:f0d3929fe88ee1c155129ecd82f981b8856c5d97bcb0d5f23e9b4242e79d1de3",
"sha256:f29454410db6ef8126c83bd3c968d143304633d45dc57b51252afbd79d700893",
"sha256:fe45becb4c2f72a0907c1d0246ea6449fe7a9e2293bb0e11c4e9a32bb0930a15",
"sha256:fedbd128668ead37f33917820b704784aff695e0019309ad446a6d0b065b57e4"
],
"index": "pypi",
"version": "==1.19.1"
"version": "==1.19.4"
},
"python-dateutil": {
"hashes": [
@@ -105,38 +113,38 @@
},
"sgp4": {
"hashes": [
"sha256:3595466fbd006dec08aaf84025fcf98377287694ca5a96d4369f61e300744beb",
"sha256:3629144383a525e6a46125077c7620ca633295c6d67c20c1e1a412aa5512d024",
"sha256:379d64fcc5f7f501a3df429862f023a8c8e3d6d49da93b2dde850339479eb3e3",
"sha256:3e40984940b9bd85d5f9213c3afd44f5c2e0a1615971512076a272786f7c3fbb",
"sha256:40a518f33654e433e96b10e94faca54f3843d25586b590203acddccf10af5aae",
"sha256:42afce00a42bd3c0d0167d13372ab0690ba29d48aa12cbb6bd100d97dea8c4ef",
"sha256:447d46d96819cf29d3abb14b740f9ecb254d5f564b3f08340fea1644b842f481",
"sha256:591798c1017f3aab50a676a12f351d24b14d09861cf5e6123ad47941e42551b8",
"sha256:5fa559d1e00feecfe14e02569acc172b82c0f92860e590cd008e288ebfae7704",
"sha256:642055353eade320e95a4eac38451ed915cfdff1656800d4d33fd31e4e6cf0b4",
"sha256:73ca97c6e12377d010b0a8dfb836d7039bae29d570ccd947b21f8e24f3f7a47c",
"sha256:7df35d8fb617fe582706cc8fb3d142005cfd31904956e4ce9b4e995562bacc36",
"sha256:85a4f15bdf0c32a7531c10eb0bd1a13aa5ba750e8796dc767bb620a8249ed26b",
"sha256:88365525c398453af32dd27c3bbe53fb8748fe0e1ada0495456cb144d4d17aeb",
"sha256:96dd1ca30860b7cdca466277dd250247b723624501a78b690d53726d8162ea2e",
"sha256:9e18bbeb53fd10b20826bcd304e15811b6831bdc6df2730951245f694df6da40",
"sha256:a3fe5ed891ed76cb3e1bdb67fc6d88a52fc4d24b7d092f36d5a25f9a8905f80e",
"sha256:a82018f2725fee2b6b8244946a164a7dc6eb71e80e0f82e8a561c0368884ce37",
"sha256:ab6b35bab23ab9b238991e043b0dc438c266edfd23d2719903cb75220d7322ff",
"sha256:aea5039f2011de16f2f7eb4f5093375df920a45f6e4f613a02ec1b326cb79f97",
"sha256:b56b4d1ee1406514a5cbcf883fce4147533b27f517df63c2cca95cbbb58c5364",
"sha256:ba66b758540ae35843e79f81385795d2696a91e1a97e75c71c9d62d576946e16",
"sha256:bf1dd7e82f6b411bad6c017606a01f4f4521b8209244298145eeba4c2ef71eee",
"sha256:c4d3d5916806395ac5f16a1bfdde9802c7b39eb214e42ef078a804b8d5905bee",
"sha256:d4b6ea6be73fb4ec7766d30f5c867c8c7e965bfa7bd423b3a5d6f7b41274b77e",
"sha256:d768760496dace4f8faa6b85be52133160a33f5123406d7a4bb52a7d17950f7a",
"sha256:d7e786175e59c0cdd6d3749610c943825556f6be5d8f925e46c6a8b86d9f5b67",
"sha256:e666126642a0cddc1d55d7f15cad1fbf89539df317db74bc3eee675e84752108",
"sha256:e6c55d465b7571756b0e91bf9eb316bf021a519bccc0d0c9526178a7988df1f5",
"sha256:f59c75c22eb852cb961a6a9518fcaaa2c4a61e3cfd2899f0b2502c84d5ad3b01"
],
"version": "==2.12"
"sha256:005f8517fcbde7af42229f1e0effde7f797d96eb210e471c474791c3aaf5aadf",
"sha256:047757aa85357b2deec06a00bd098806639dac4bd16a10a2ea406cc9bc9a8f7e",
"sha256:0847397cf8a563b9cc4625d96365301225f52fcfb2ce889a30f95113ad6a010a",
"sha256:0a43ce0451c0f1a8023848f672b56d7b02b0c9747d73031b55c26f67500a70e7",
"sha256:10e64adf473f1f4c72ea6dc7f6817364545a6163388e72bb8f63ddd9ff7a911b",
"sha256:1e91f64a9d0f42855082b028419d06e8e20a857e0d3eeb64a138b74f394321f5",
"sha256:1ef02cbb37100c67b0b8b156613fd09ce1a97d2b5361c201f6b157ec954569e0",
"sha256:1fa7b3f55c9e00f2526b30ff2293526c353856bfb157c71332ec70db536906ba",
"sha256:28f3c51eec209518d502bb5f3b0de5306efd0cd40e48321c036692c6041ea496",
"sha256:2bfbb35d2216b36b6b1b5c6e15630839b9eea5c15b26893f05f27f51fbc92360",
"sha256:3acdbbb5de380b587c66fc59e26e635668c74661da1b731007aece8506d1e279",
"sha256:43720e8e20dcbf3ac60cda41171d6fcc7692d685bd6374d171f7849299d03c52",
"sha256:46b3457db278faf85c4fce58de690a88370d5fd5d701406082f4041c2fc94221",
"sha256:5d9683f28f8d5d8a1856e985aa9fdde017aa7a2b2f29e24d9726d59d23b4f351",
"sha256:6267c27560f09a20913abde97d945d3334591436e8130bbb21ae02e0d4758b98",
"sha256:8471b183198d649266d22f61704840fea0ad499b38fd95228c38438faf9584d2",
"sha256:8b3ced831b321cd5a018bb134e4d4ba2b10fc73c20a48c74b006c0a73eb91622",
"sha256:8db7be3b810907bbdeaa57c84824fe0fda0090be42b40ab149665cfdb625919a",
"sha256:950489e6287b8d3fd8fa47446455fcb3c6a231eec15e49ff06467b9ce61454b9",
"sha256:a96282c862bbd746e9395f80430488f5283cc3179c1b697fdc014d786fd97e06",
"sha256:b49360be32bae8afb30bce4153f80d290bcf0975a3bf41991c3e473a949971a6",
"sha256:b5d814dee570bb2bf6938dd511019245dc8d3e3bcb58488461ce2efd747f578d",
"sha256:bb371f39e72472f48f24061198bb6523d3d796e140d7bbc5ccae049afd5cc66f",
"sha256:c9346b69e9ee1ec53222d32557da8ad422a394f7a3675773c850aa22df60995e",
"sha256:cd3bdbc10df1a914b3c015fd4212923357a8a0691d448fb1339d6b97d439ecc6",
"sha256:d46bc7f38ae7d13982875d5cf44c8f343f56538b49b0ab9c038e9d24365e80dd",
"sha256:e2b2321df9f3465acf50ea67e8c6559c97b26762682469308564a631ee454f9a",
"sha256:e549dbf6cb9b328358deca1390e65dbdb07b69d80a06323162921975ee90ec00",
"sha256:edd3b77630e2bc52ba203c7d578837b9ed353d8d5b8d716c776a37fd0dfcc08b",
"sha256:f35f01d2fbb4bf07da35c44057ca334b014d728893b233afec8149341307ce35"
],
"version": "==2.13"
},
"shutilwhich": {
"hashes": [
@@ -154,10 +162,10 @@
},
"skyfield": {
"hashes": [
"sha256:485ec6825730f4ad61f2698f288da00b48409546e2e524f9213910dbaa3a588c"
"sha256:68316a9e151b32d9664fc0073436a2fbdeff1b12d5d81a4a2108480f1788ce35"
],
"index": "pypi",
"version": "==1.26"
"version": "==1.31"
},
"tabulate": {
"hashes": [
@@ -192,18 +200,18 @@
},
"babel": {
"hashes": [
"sha256:1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38",
"sha256:d670ea0b10f8b723672d3a6abeb87b565b244da220d76b4dba1b66269ec152d4"
"sha256:9d35c22fcc79893c3ecc85ac4a56cde1ecf3f19c540bba0922308a6c06ca6fa5",
"sha256:da031ab54472314f210b0adcff1588ee5d1d1d0ba4dbd07b94dba82bde791e05"
],
"index": "pypi",
"version": "==2.8.0"
"version": "==2.9.0"
},
"certifi": {
"hashes": [
"sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3",
"sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41"
"sha256:1f422849db327d534e3d0c5f02a263458c3955ec0aae4ff09b95f195c59f4edd",
"sha256:f05def092c44fbf25834a51509ef6e631dc19765ab8a57b4e7ab85531f0a9cf4"
],
"version": "==2020.6.20"
"version": "==2020.11.8"
},
"chardet": {
"hashes": [
@@ -230,43 +238,43 @@
},
"coverage": {
"hashes": [
"sha256:098a703d913be6fbd146a8c50cc76513d726b022d170e5e98dc56d958fd592fb",
"sha256:16042dc7f8e632e0dcd5206a5095ebd18cb1d005f4c89694f7f8aafd96dd43a3",
"sha256:1adb6be0dcef0cf9434619d3b892772fdb48e793300f9d762e480e043bd8e716",
"sha256:27ca5a2bc04d68f0776f2cdcb8bbd508bbe430a7bf9c02315cd05fb1d86d0034",
"sha256:28f42dc5172ebdc32622a2c3f7ead1b836cdbf253569ae5673f499e35db0bac3",
"sha256:2fcc8b58953d74d199a1a4d633df8146f0ac36c4e720b4a1997e9b6327af43a8",
"sha256:304fbe451698373dc6653772c72c5d5e883a4aadaf20343592a7abb2e643dae0",
"sha256:30bc103587e0d3df9e52cd9da1dd915265a22fad0b72afe54daf840c984b564f",
"sha256:40f70f81be4d34f8d491e55936904db5c527b0711b2a46513641a5729783c2e4",
"sha256:4186fc95c9febeab5681bc3248553d5ec8c2999b8424d4fc3a39c9cba5796962",
"sha256:46794c815e56f1431c66d81943fa90721bb858375fb36e5903697d5eef88627d",
"sha256:4869ab1c1ed33953bb2433ce7b894a28d724b7aa76c19b11e2878034a4e4680b",
"sha256:4f6428b55d2916a69f8d6453e48a505c07b2245653b0aa9f0dee38785939f5e4",
"sha256:52f185ffd3291196dc1aae506b42e178a592b0b60a8610b108e6ad892cfc1bb3",
"sha256:538f2fd5eb64366f37c97fdb3077d665fa946d2b6d95447622292f38407f9258",
"sha256:64c4f340338c68c463f1b56e3f2f0423f7b17ba6c3febae80b81f0e093077f59",
"sha256:675192fca634f0df69af3493a48224f211f8db4e84452b08d5fcebb9167adb01",
"sha256:700997b77cfab016533b3e7dbc03b71d33ee4df1d79f2463a318ca0263fc29dd",
"sha256:8505e614c983834239f865da2dd336dcf9d72776b951d5dfa5ac36b987726e1b",
"sha256:962c44070c281d86398aeb8f64e1bf37816a4dfc6f4c0f114756b14fc575621d",
"sha256:9e536783a5acee79a9b308be97d3952b662748c4037b6a24cbb339dc7ed8eb89",
"sha256:9ea749fd447ce7fb1ac71f7616371f04054d969d412d37611716721931e36efd",
"sha256:a34cb28e0747ea15e82d13e14de606747e9e484fb28d63c999483f5d5188e89b",
"sha256:a3ee9c793ffefe2944d3a2bd928a0e436cd0ac2d9e3723152d6fd5398838ce7d",
"sha256:aab75d99f3f2874733946a7648ce87a50019eb90baef931698f96b76b6769a46",
"sha256:b1ed2bdb27b4c9fc87058a1cb751c4df8752002143ed393899edb82b131e0546",
"sha256:b360d8fd88d2bad01cb953d81fd2edd4be539df7bfec41e8753fe9f4456a5082",
"sha256:b8f58c7db64d8f27078cbf2a4391af6aa4e4767cc08b37555c4ae064b8558d9b",
"sha256:c1bbb628ed5192124889b51204de27c575b3ffc05a5a91307e7640eff1d48da4",
"sha256:c2ff24df02a125b7b346c4c9078c8936da06964cc2d276292c357d64378158f8",
"sha256:c890728a93fffd0407d7d37c1e6083ff3f9f211c83b4316fae3778417eab9811",
"sha256:c96472b8ca5dc135fb0aa62f79b033f02aa434fb03a8b190600a5ae4102df1fd",
"sha256:ce7866f29d3025b5b34c2e944e66ebef0d92e4a4f2463f7266daa03a1332a651",
"sha256:e26c993bd4b220429d4ec8c1468eca445a4064a61c74ca08da7429af9bc53bb0"
"sha256:0203acd33d2298e19b57451ebb0bed0ab0c602e5cf5a818591b4918b1f97d516",
"sha256:0f313707cdecd5cd3e217fc68c78a960b616604b559e9ea60cc16795c4304259",
"sha256:1c6703094c81fa55b816f5ae542c6ffc625fec769f22b053adb42ad712d086c9",
"sha256:1d44bb3a652fed01f1f2c10d5477956116e9b391320c94d36c6bf13b088a1097",
"sha256:280baa8ec489c4f542f8940f9c4c2181f0306a8ee1a54eceba071a449fb870a0",
"sha256:29a6272fec10623fcbe158fdf9abc7a5fa032048ac1d8631f14b50fbfc10d17f",
"sha256:2b31f46bf7b31e6aa690d4c7a3d51bb262438c6dcb0d528adde446531d0d3bb7",
"sha256:2d43af2be93ffbad25dd959899b5b809618a496926146ce98ee0b23683f8c51c",
"sha256:381ead10b9b9af5f64646cd27107fb27b614ee7040bb1226f9c07ba96625cbb5",
"sha256:47a11bdbd8ada9b7ee628596f9d97fbd3851bd9999d398e9436bd67376dbece7",
"sha256:4d6a42744139a7fa5b46a264874a781e8694bb32f1d76d8137b68138686f1729",
"sha256:50691e744714856f03a86df3e2bff847c2acede4c191f9a1da38f088df342978",
"sha256:530cc8aaf11cc2ac7430f3614b04645662ef20c348dce4167c22d99bec3480e9",
"sha256:582ddfbe712025448206a5bc45855d16c2e491c2dd102ee9a2841418ac1c629f",
"sha256:63808c30b41f3bbf65e29f7280bf793c79f54fb807057de7e5238ffc7cc4d7b9",
"sha256:71b69bd716698fa62cd97137d6f2fdf49f534decb23a2c6fc80813e8b7be6822",
"sha256:7858847f2d84bf6e64c7f66498e851c54de8ea06a6f96a32a1d192d846734418",
"sha256:78e93cc3571fd928a39c0b26767c986188a4118edc67bc0695bc7a284da22e82",
"sha256:7f43286f13d91a34fadf61ae252a51a130223c52bfefb50310d5b2deb062cf0f",
"sha256:86e9f8cd4b0cdd57b4ae71a9c186717daa4c5a99f3238a8723f416256e0b064d",
"sha256:8f264ba2701b8c9f815b272ad568d555ef98dfe1576802ab3149c3629a9f2221",
"sha256:9342dd70a1e151684727c9c91ea003b2fb33523bf19385d4554f7897ca0141d4",
"sha256:9361de40701666b034c59ad9e317bae95c973b9ff92513dd0eced11c6adf2e21",
"sha256:9669179786254a2e7e57f0ecf224e978471491d660aaca833f845b72a2df3709",
"sha256:aac1ba0a253e17889550ddb1b60a2063f7474155465577caa2a3b131224cfd54",
"sha256:aef72eae10b5e3116bac6957de1df4d75909fc76d1499a53fb6387434b6bcd8d",
"sha256:bd3166bb3b111e76a4f8e2980fa1addf2920a4ca9b2b8ca36a3bc3dedc618270",
"sha256:c1b78fb9700fc961f53386ad2fd86d87091e06ede5d118b8a50dea285a071c24",
"sha256:c3888a051226e676e383de03bf49eb633cd39fc829516e5334e69b8d81aae751",
"sha256:c5f17ad25d2c1286436761b462e22b5020d83316f8e8fcb5deb2b3151f8f1d3a",
"sha256:c851b35fc078389bc16b915a0a7c1d5923e12e2c5aeec58c52f4aa8085ac8237",
"sha256:cb7df71de0af56000115eafd000b867d1261f786b5eebd88a0ca6360cccfaca7",
"sha256:cedb2f9e1f990918ea061f28a0f0077a07702e3819602d3507e2ff98c8d20636",
"sha256:e8caf961e1b1a945db76f1b5fa9c91498d15f545ac0ababbe575cfab185d3bd8"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'",
"version": "==5.2.1"
"version": "==5.3"
},
"coveralls": {
"hashes": [
@@ -292,11 +300,11 @@
},
"isort": {
"hashes": [
"sha256:60a1b97e33f61243d12647aaaa3e6cc6778f5eb9f42997650f1cc975b6008750",
"sha256:d488ba1c5a2db721669cc180180d5acf84ebdc5af7827f7aaeaa75f73cf0e2b8"
"sha256:dcab1d98b469a12a1a624ead220584391648790275560e1a43e54c5dceae65e7",
"sha256:dcaeec1b5f0eca77faea2a35ab790b4f3680ff75590bfcb7145986905aab2f58"
],
"markers": "python_version >= '3.6' and python_version < '4.0'",
"version": "==5.4.2"
"version": "==5.6.4"
},
"lazy-object-proxy": {
"hashes": [
@@ -350,10 +358,10 @@
},
"pytz": {
"hashes": [
"sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed",
"sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048"
"sha256:3e6b7dd2d1e0a59084bcee14a17af60c5c562cdc16d828e8eba2e683d3a7e268",
"sha256:5c55e189b682d420be27c6995ba6edce0c0a77dd67bfbe2ae6607134d5851ffd"
],
"version": "==2020.1"
"version": "==2020.4"
},
"pyyaml": {
"hashes": [
@@ -373,11 +381,11 @@
},
"requests": {
"hashes": [
"sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b",
"sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898"
"sha256:7f1a0b932f4a60a1a65caa4263921bb7d9ee911957e0ae4a23a6dd08185ad5f8",
"sha256:e786fa28d8c9154e6a4de5d46a1d921b8749f8b74e28bde23768e5e16eece998"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
"version": "==2.24.0"
"version": "==2.25.0"
},
"six": {
"hashes": [
@@ -389,10 +397,11 @@
},
"toml": {
"hashes": [
"sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f",
"sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88"
"sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b",
"sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"
],
"version": "==0.10.1"
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"version": "==0.10.2"
},
"unittest-data-provider": {
"hashes": [
@@ -403,11 +412,11 @@
},
"urllib3": {
"hashes": [
"sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a",
"sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461"
"sha256:19188f96923873c92ccb987120ec4acaa12f0461fa9ce5d3d0772bc965a39e08",
"sha256:d8ff90d979214d7b4f8ce956e80f4028fc6860e4431f731ea4a8c08f23f99473"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'",
"version": "==1.25.10"
"version": "==1.26.2"
},
"wrapt": {
"hashes": [


BIN
build/distrib/darwin/dmg-background.png View File

Before After
Width: 853  |  Height: 427  |  Size: 521 KiB

BIN
build/distrib/darwin/dmg-background.xcf View File


BIN
build/distrib/darwin/dmg.icns View File


BIN
build/distrib/darwin/icon-white.icns View File


+ 1
- 1
build/distrib/darwin/launch-kosmorro.sh View File

@@ -4,4 +4,4 @@
cd $(dirname "$0")

source .venv/bin/activate
.venv/bin/python kosmorro --gui
./python/bin/python3 kosmorro --gui

BIN
build/distrib/darwin/path2594.png View File

Before After
Width: 196  |  Height: 65  |  Size: 21 KiB

+ 66
- 59
kosmorrolib/gui/mainwindow.py View File

@@ -1,4 +1,7 @@
import wx
try:
import wx
except ModuleNotFoundError:
raise ImportError('Module wxPython missing')

import platform
from typing import Union
@@ -16,7 +19,9 @@ from ..version import VERSION
from ..dumper import PdfDumper
from ..i18n import _

MIN_SIZE = wx.Size(700, 0)
OS_DARWIN = 'Darwin'
WINDOW_TITLE = 'Kosmorro'
MIN_SIZE = wx.Size(700, 200) if platform.system() != OS_DARWIN else wx.Size(700, 160)

# Events definitions

@@ -98,14 +103,16 @@ class MainWindow(wx.Frame):
events: [Event]
moon_phase: Union[None, MoonPhase]

_progress_bar: wx.Gauge

def __init__(self):
super(MainWindow, self).__init__(None, title='Kosmorro',
style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER)
super(MainWindow, self).__init__(None, title=WINDOW_TITLE,
style=wx.DEFAULT_FRAME_STYLE & ~(wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))

self.export_path = None
self.config_panel = panel.ConfigPanel(self)
self.Bind(panel.EVT_COMPUTE_BUTTON, self.compute)
self.Bind(panel.EVT_EXPORT_BUTTON, self.export)
self.Bind(panel.EVT_EXPORT_BUTTON, self.export_button_clicked)

self.result_presenter = panel.ResultPanel(self)

@@ -113,32 +120,25 @@ class MainWindow(wx.Frame):
self.sizer.AddMany([(self.config_panel, 0, wx.EXPAND | wx.ALL, 5),
(self.result_presenter, 0, wx.EXPAND | wx.ALL, 5)])

self.SetSizer(self.sizer)
self.SetMinSize(MIN_SIZE)

self.make_menu_bar()
self.make_status_bar()
self._progress_bar.Hide()

self.SetSizer(self.sizer)
self.resize(center=True)

def make_status_bar(self):
status_bar = self.CreateStatusBar()
status_bar.SetFieldsCount(2)
status_bar.SetStatusWidths([-2, -1])
self.progress_bar = wx.Gauge(status_bar, -1, style=wx.GA_HORIZONTAL | wx.GA_SMOOTH)
self._progress_bar = wx.Gauge(status_bar, -1, style=wx.GA_HORIZONTAL | wx.GA_SMOOTH)
rect = status_bar.GetFieldRect(1)
self.progress_bar.SetPosition((rect.x + 2, rect.y + 2))
self.progress_bar.SetSize((rect.width - 4, rect.height - 4))
self._progress_bar.SetPosition((rect.x + 2, rect.y + 2))
self._progress_bar.SetSize((rect.width - 4, rect.height - 4))
self.result_presenter.Hide()

self.SetMinSize(MIN_SIZE)

self.Fit()
self.Center()
self.progress_bar.Hide()

def resize(self, width: int, height: int, center: bool = False):
self.resize(wx.Size(width, height), center)

def resize(self, size: wx.Size, center: bool = False):
self.Size = size
if center:
self.Center()

def resize(self, center: bool = False):
self.Fit()
if center:
@@ -147,7 +147,7 @@ class MainWindow(wx.Frame):
def make_menu_bar(self):
menu_bar = wx.MenuBar()

if platform.system() != 'Darwin':
if platform.system() != OS_DARWIN:
# "Application" menu
app_menu = wx.Menu()
exit_item = app_menu.Append(wx.ID_EXIT)
@@ -194,8 +194,8 @@ class MainWindow(wx.Frame):
self.SetCursor(wx.Cursor(wx.CURSOR_WAIT))

self.SetStatusText(_('Computing…'))
self.progress_bar.SetValue(0)
self.progress_bar.Show()
self._progress_bar.SetValue(0)
self._progress_bar.Show()

thread_moon_phase = MoonPhaseComputer(self, self.config_panel.compute_date)
thread_ephemerides = EphemeridesComputer(self, self.config_panel.compute_date, self.config_panel.position,
@@ -212,11 +212,11 @@ class MainWindow(wx.Frame):
thread_ephemerides.start()
else:
self.ephemerides = []
self.progress_bar.SetValue(50)
self._progress_bar.SetValue(50)

thread_events.start()

def export(self, __):
def export_button_clicked(self, __):
self.export_path = self.get_export_file_path()
if self.export_path is None:
self.SetStatusText('Aborted.')
@@ -226,58 +226,65 @@ class MainWindow(wx.Frame):

def on_moon_phase_computed(self, event):
self.moon_phase = event.value
self.progress_bar.SetValue(self.progress_bar.GetValue() + 10)
self._progress_bar.SetValue(self._progress_bar.GetValue() + 10)

if self.is_all_computed():
self.show_results()
self.process_results()

def on_ephemerides_computed(self, event):
self.ephemerides = event.value
self.progress_bar.SetValue(self.progress_bar.GetValue() + 50)
self._progress_bar.SetValue(self._progress_bar.GetValue() + 50)

if self.is_all_computed():
self.show_results()
self.process_results()

def on_events_computed(self, event):
self.events = event.value
self.progress_bar.SetValue(self.progress_bar.GetValue() + 40)
self._progress_bar.SetValue(self._progress_bar.GetValue() + 40)

if self.is_all_computed():
self.config_panel.enable_buttons()
self.SetStatusText('')
self.progress_bar.Hide()
self.SetCursor(wx.Cursor(wx.CURSOR_ARROW))

if self.export_path is not None:
ephemerides = self.ephemerides if len(self.ephemerides) > 0 else None
dumper = PdfDumper(date=self.config_panel.compute_date, ephemerides=ephemerides,
events=self.events, moon_phase=self.moon_phase, timezone=self.config_panel.timezone,
show_graph=True)

try:
with open(self.export_path, 'wb') as file:
file.write(dumper.to_string())
self.SetStatusText(_('PDF export saved in "{path}"!').format(path=self.export_path))
except UnavailableFeatureError as error:
wx.MessageDialog(self, error.msg, caption=_('Error while exporting your document'),
style=wx.OK | wx.ICON_ERROR).ShowModal()
finally:
self.export_path = None

return
self.process_results()

def is_all_computed(self) -> bool:
return self.moon_phase is not None and \
self.ephemerides is not None and \
self.events is not None

def process_results(self):
self.config_panel.enable_buttons()
self.SetStatusText('')
self._progress_bar.Hide()
self.SetCursor(wx.Cursor(wx.CURSOR_ARROW))

if self.export_path is not None:
self.export()
else:
self.show_results()
self.result_presenter.Show()
self.resize(center=True)

def is_all_computed(self) -> bool:
return self.moon_phase is not None and self.ephemerides is not None and self.events is not None
def export(self, dumper_class = PdfDumper):
ephemerides = self.ephemerides if len(self.ephemerides) > 0 else None
dumper = dumper_class(date=self.config_panel.compute_date, ephemerides=ephemerides,
events=self.events, moon_phase=self.moon_phase, timezone=self.config_panel.timezone,
show_graph=True)

try:
with open(self.export_path, 'wb') as file:
file.write(dumper.to_string())
self.SetStatusText(_('PDF export saved in "{path}"!').format(path=self.export_path))
except UnavailableFeatureError as error:
wx.MessageDialog(self, error.msg, caption=_('Error while exporting your document'),
style=wx.OK | wx.ICON_ERROR).ShowModal()
finally:
self.export_path = None

def show_results(self):
self.result_presenter.moon_phase = self.moon_phase
self.result_presenter.ephemerides = self.ephemerides
self.result_presenter.events = self.events

self.result_presenter.render()
self.result_presenter.Show()
self.resize(center=True)

def get_export_file_path(self) -> Union[None, str]:
dialog = wx.FileDialog(parent=self, message=_('Please select an export file location'),


+ 9
- 9
kosmorrolib/gui/panel.py View File

@@ -53,8 +53,8 @@ class ConfigPanel(wx.Panel):
self._timezone_spin = wx.SpinCtrl(self, min=-23, max=23, value=str(timezone))
self.Bind(wx.EVT_SPINCTRL, self.timezone_changed, self._timezone_spin)

sizer = wx.FlexGridSizer(2, 5, 5)
sizer.AddGrowableCol(1, 1)
params_sizer = wx.FlexGridSizer(2, 5, 5)
params_sizer.AddGrowableCol(1, 1)

self._compute_button = wx.Button(self, label=_('&Compute'))
self._export_button = wx.Button(self, label=_('E&xport PDF…'))
@@ -62,17 +62,17 @@ class ConfigPanel(wx.Panel):
self.Bind(wx.EVT_BUTTON, self.compute_button_clicked, self._compute_button)
self.Bind(wx.EVT_BUTTON, self.export_button_clicked, self._export_button)

sizer.AddMany([(self._position_checkbox, 0, wx.EXPAND),
(self._position_change_btn, 0, wx.EXPAND),
(date_lbl, 0, wx.EXPAND),
(self._date_picker, 0, wx.EXPAND),
(timezone_lbl, 0, wx.EXPAND),
(self._timezone_spin, 0, wx.EXPAND)])
params_sizer.AddMany([(self._position_checkbox, 0, wx.EXPAND),
(self._position_change_btn, 0, wx.EXPAND),
(date_lbl, 0, wx.EXPAND),
(self._date_picker, 0, wx.EXPAND),
(timezone_lbl, 0, wx.EXPAND),
(self._timezone_spin, 0, wx.EXPAND)])

main_sizer = wx.FlexGridSizer(3, 5, 5)
main_sizer.AddGrowableCol(0, 2)

main_sizer.AddMany([(sizer, 0, wx.EXPAND),
main_sizer.AddMany([(params_sizer, 0, wx.EXPAND),
(self._compute_button, 0, wx.EXPAND),
(self._export_button, 0, wx.EXPAND)])



+ 125
- 24
kosmorrolib/locales/messages.pot View File

@@ -8,20 +8,20 @@ msgid ""
msgstr ""
"Project-Id-Version: kosmorro 0.8.1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-06-07 11:13+0200\n"
"POT-Creation-Date: 2020-11-18 21:56+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Generated-By: Babel 2.9.0\n"

#: kosmorrolib/core.py:101
msgid "The date {date} is not valid: {error}"
msgstr ""

#: kosmorrolib/core.py:117
#: kosmorrolib/core.py:119
msgid ""
"The date {date} does not match the required YYYY-MM-DD format or the "
"offset format."
@@ -140,14 +140,17 @@ msgid "Object"
msgstr ""

#: kosmorrolib/dumper.py:143 kosmorrolib/dumper.py:230
#: kosmorrolib/gui/panel.py:183
msgid "Rise time"
msgstr ""

#: kosmorrolib/dumper.py:144 kosmorrolib/dumper.py:231
#: kosmorrolib/gui/panel.py:184
msgid "Culmination time"
msgstr ""

#: kosmorrolib/dumper.py:145 kosmorrolib/dumper.py:232
#: kosmorrolib/gui/panel.py:185
msgid "Set time"
msgstr ""

@@ -159,7 +162,7 @@ msgstr ""
msgid "Moon phase:"
msgstr ""

#: kosmorrolib/dumper.py:163
#: kosmorrolib/dumper.py:163 kosmorrolib/gui/panel.py:156
msgid "{next_moon_phase} on {next_moon_phase_date} at {next_moon_phase_time}"
msgstr ""

@@ -220,106 +223,204 @@ msgstr ""
msgid "{hours}:{minutes}"
msgstr ""

#: kosmorrolib/main.py:61
#: kosmorrolib/main.py:66
msgid ""
"Save the planet and paper!\n"
"Consider printing you PDF document only if really necessary, and use the "
"other side of the sheet."
msgstr ""

#: kosmorrolib/main.py:65
#: kosmorrolib/main.py:70
msgid ""
"PDF output will not contain the ephemerides, because you didn't provide "
"the observation coordinate."
msgstr ""

#: kosmorrolib/main.py:90
#: kosmorrolib/main.py:95
msgid "Could not save the output in \"{path}\": {error}"
msgstr ""

#: kosmorrolib/main.py:95
#: kosmorrolib/main.py:100
msgid "Selected output format needs an output file (--output)."
msgstr ""

#: kosmorrolib/main.py:112
#: kosmorrolib/main.py:117
msgid "Moon phase can only be displayed between {min_date} and {max_date}"
msgstr ""

#: kosmorrolib/main.py:134
#: kosmorrolib/main.py:139
msgid "Running on Python {python_version}"
msgstr ""

#: kosmorrolib/main.py:140
#: kosmorrolib/main.py:145
msgid "Do you really want to clear Kosmorro's cache? [yN] "
msgstr ""

#: kosmorrolib/main.py:147
#: kosmorrolib/main.py:152
msgid "Answer did not match expected options, cache not cleared."
msgstr ""

#: kosmorrolib/main.py:156
#: kosmorrolib/main.py:170
msgid ""
"Compute the ephemerides and the events for a given date, at a given "
"position on Earth."
msgstr ""

#: kosmorrolib/main.py:158
#: kosmorrolib/main.py:172
msgid ""
"By default, only the events will be computed for today ({date}).\n"
"To compute also the ephemerides, latitude and longitude arguments are "
"needed."
msgstr ""

#: kosmorrolib/main.py:163
#: kosmorrolib/main.py:177
msgid "Show the program version"
msgstr ""

#: kosmorrolib/main.py:165
#: kosmorrolib/main.py:179
msgid "Open Kosmorro's GUI"
msgstr ""

#: kosmorrolib/main.py:181
msgid "Delete all the files Kosmorro stored in the cache."
msgstr ""

#: kosmorrolib/main.py:167
#: kosmorrolib/main.py:183
msgid "The format under which the information have to be output"
msgstr ""

#: kosmorrolib/main.py:169
#: kosmorrolib/main.py:185
msgid ""
"The observer's latitude on Earth. Can also be set in the "
"KOSMORRO_LATITUDE environment variable."
msgstr ""

#: kosmorrolib/main.py:172
#: kosmorrolib/main.py:188
msgid ""
"The observer's longitude on Earth. Can also be set in the "
"KOSMORRO_LONGITUDE environment variable."
msgstr ""

#: kosmorrolib/main.py:175
#: kosmorrolib/main.py:191
msgid ""
"The date for which the ephemerides must be computed (in the YYYY-MM-DD "
"format), or as an interval in the \"[+-]YyMmDd\" format (with Y, M, and D"
" numbers). Defaults to the current date ({default_date})"
msgstr ""

#: kosmorrolib/main.py:180
#: kosmorrolib/main.py:196
msgid ""
"The timezone to display the hours in (e.g. 2 for UTC+2 or -3 for UTC-3). "
"Can also be set in the KOSMORRO_TIMEZONE environment variable."
msgstr ""

#: kosmorrolib/main.py:183
#: kosmorrolib/main.py:199
msgid "Disable the colors in the console."
msgstr ""

#: kosmorrolib/main.py:185
#: kosmorrolib/main.py:201
msgid ""
"A file to export the output to. If not given, the standard output is "
"used. This argument is needed for PDF format."
msgstr ""

#: kosmorrolib/main.py:188
#: kosmorrolib/main.py:204
msgid ""
"Do not generate a graph to represent the rise and set times in the PDF "
"format."
msgstr ""

#: kosmorrolib/gui/mainwindow.py:159
msgid "&Application"
msgstr ""

#: kosmorrolib/gui/mainwindow.py:160
msgid "&Help"
msgstr ""

#: kosmorrolib/gui/mainwindow.py:176
msgid ""
"This is a free software licensed under the GNU Affero General Public "
"License."
msgstr ""

#: kosmorrolib/gui/mainwindow.py:180
msgid "Close"
msgstr ""

#: kosmorrolib/gui/mainwindow.py:181
msgid "Website"
msgstr ""

#: kosmorrolib/gui/mainwindow.py:196
msgid "Computing…"
msgstr ""

#: kosmorrolib/gui/mainwindow.py:273
msgid "PDF export saved in \"{path}\"!"
msgstr ""

#: kosmorrolib/gui/mainwindow.py:275
msgid "Error while exporting your document"
msgstr ""

#: kosmorrolib/gui/mainwindow.py:290
msgid "Please select an export file location"
msgstr ""

#: kosmorrolib/gui/panel.py:37
msgid "Position:"
msgstr ""

#: kosmorrolib/gui/panel.py:40
msgid "Change the position"
msgstr ""

#: kosmorrolib/gui/panel.py:47
msgid "Date:"
msgstr ""

#: kosmorrolib/gui/panel.py:52
msgid "Timezone:"
msgstr ""

#: kosmorrolib/gui/panel.py:59
msgid "&Compute"
msgstr ""

#: kosmorrolib/gui/panel.py:60
msgid "E&xport PDF…"
msgstr ""

#: kosmorrolib/gui/panel.py:82
msgid "Unknown"
msgstr ""

#: kosmorrolib/gui/panel.py:232
msgid "- {event_time}: {event_description}"
msgstr ""

#: kosmorrolib/gui/panel.py:239
msgid "No events for this day."
msgstr ""

#: kosmorrolib/gui/positionwindow.py:11
msgid "Set position"
msgstr ""

#: kosmorrolib/gui/positionwindow.py:14
msgid "Latitude:"
msgstr ""

#: kosmorrolib/gui/positionwindow.py:19
msgid "Longitude:"
msgstr ""

#: kosmorrolib/gui/positionwindow.py:24
msgid "OK"
msgstr ""

#: kosmorrolib/gui/positionwindow.py:25
msgid "Cancel"
msgstr ""


+ 3
- 2
kosmorrolib/main.py View File

@@ -36,7 +36,7 @@ from .version import VERSION

try:
from .gui import mainwindow
except ModuleNotFoundError:
except ImportError:
mainwindow = None


@@ -157,7 +157,8 @@ def clear_cache() -> bool:

def open_gui() -> bool:
if mainwindow is None:
print("Starting Kosmorro's GUI requires you to install wxPython.")
print("Starting Kosmorro's GUI requires you to install wxPython.\n"
"Please check the documentation at http://kosmorro.space for more information.")
return False

return mainwindow.start()


Loading…
Cancel
Save