Compare commits
605 Commits
unstable
...
notificati
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e6e72c0a1 | |||
| 63def5530f | |||
| c206a40e62 | |||
| 2889923940 | |||
| 3deabdbf36 | |||
| 89c8e6a194 | |||
| 19a5216373 | |||
| f274ba9caa | |||
| 5a36db2366 | |||
| 9003d3c738 | |||
| d06a32311e | |||
| 63fb0e0ff9 | |||
| 4e14801db6 | |||
| 926db6007a | |||
| cf0e001cfc | |||
| ee6370bb0b | |||
| 33ba50a7b4 | |||
| 29e8b00656 | |||
| ff175c0c8f | |||
| a015593971 | |||
| fdbf42ad1a | |||
| 61583447b6 | |||
| 33ab63c1bc | |||
| 5b3a013766 | |||
| 69f8b79fc4 | |||
| 60d283f931 | |||
| f41dd51dc7 | |||
| a7173adc22 | |||
| bbef34d125 | |||
| 277b10b155 | |||
| 6a69d4eaac | |||
| 4d3c1cacc9 | |||
| 2ed26bc8d9 | |||
| 52e55a24fa | |||
| 98b85435ac | |||
| 3903c5630f | |||
| ac7ef77a8d | |||
| c80ca295c6 | |||
| 19a9c305ce | |||
| dca7b4a694 | |||
| 357d18fbe0 | |||
| 251623acf0 | |||
| 4caa5a6ab0 | |||
| d1b11c0630 | |||
| 36b25e1c9f | |||
| 6a2407a07c | |||
| cd623065e7 | |||
| 2b462bfecb | |||
| 9353ea93c1 | |||
| 853cce4a66 | |||
| 2d944b276c | |||
| b4299ef066 | |||
| 64799d2e14 | |||
| ead54fce3f | |||
| ae93efb17a | |||
| d95dfb18fd | |||
| 4e3c397ce5 | |||
| 4e6126405f | |||
| 8cdec543e1 | |||
| 4810cbe138 | |||
| 8ec7fbb49e | |||
| 7d52ed8802 | |||
| 9d44d063eb | |||
| d5eb9ed478 | |||
| 40afb6cdc2 | |||
| 74234476ab | |||
| 82c71a3bd8 | |||
| 5161e1c045 | |||
| 40052dbf3f | |||
| e73d92754e | |||
| 6df1b80941 | |||
| a9e5963b74 | |||
| 95671966cd | |||
| a8ce7216e1 | |||
| 5c6829165b | |||
| 91eebfd895 | |||
| 72cc04342f | |||
| 75267294f9 | |||
| f81d302c9a | |||
| c3ab0406e4 | |||
| fdcaf4e596 | |||
| ca7b3eff29 | |||
| f1eb640564 | |||
| 194ca2d380 | |||
| 976e90f0a0 | |||
| 2c836f473d | |||
| f834b6046e | |||
| e6087f3818 | |||
| 20c3df6be2 | |||
| b914e4b548 | |||
| f336489609 | |||
| 4ce2e88568 | |||
| a917a6a9cd | |||
| a01eabea91 | |||
| 605f0da751 | |||
| 6bd0c10ef2 | |||
| a9032602bf | |||
| 8c03601bd2 | |||
| afc4c0ca1f | |||
| e0ee8a7040 | |||
| e32336aff8 | |||
| 0edbba5625 | |||
| eec5350926 | |||
| 20f0b3f782 | |||
| 5cf4128c49 | |||
| 47768acf5c | |||
| f88d2177c3 | |||
| 9373f10d68 | |||
| 4f3bb6ac93 | |||
| 5f224a077c | |||
| 14cdeb0b5a | |||
| b02137c216 | |||
| 7c90103af4 | |||
| 903af03d15 | |||
| b57ca4d207 | |||
| 2fe58941ea | |||
| 04f734bebe | |||
| a0d43ebe0e | |||
| 6d80dce66d | |||
| 3d765dd701 | |||
| 2b42c64160 | |||
| 7928131112 | |||
| 9cb1f9647c | |||
| 6d6daa60b6 | |||
| 81a454c29c | |||
| 6f245d9b7f | |||
| 05c001067e | |||
| fea57a4034 | |||
| 00eebf9260 | |||
| cde18c8d35 | |||
| 0b2c3fa96e | |||
| 8f631cfe4b | |||
| f10b25c07f | |||
| 77a959fe29 | |||
| d8db111d30 | |||
| c2811f2818 | |||
| b258a3ff9c | |||
| 02029d22b0 | |||
| 1f7f1c170d | |||
| a13a4a5695 | |||
| 0b9dcaa8f1 | |||
| 9c7030f80e | |||
| d8112550f5 | |||
| 4eb662d314 | |||
| 8e06ffc3b1 | |||
| 98c5c052de | |||
| 95fe0c9516 | |||
| 2908b1449c | |||
| 454b461e89 | |||
| 0a8d2ad233 | |||
| 35e34e44ee | |||
| b6ce1f62e0 | |||
| 55eaa85979 | |||
| b3f5c532dd | |||
| 0821565a75 | |||
| d187ad43f3 | |||
| b5aff6a8eb | |||
| a6291b3ee2 | |||
| f1f86e04e6 | |||
| 06898ca0af | |||
| 305f8317fe | |||
| d7d13dd523 | |||
| 84dd9dbcea | |||
| a345fa8874 | |||
| 5780d3ca21 | |||
| 4c220cbb36 | |||
| 942f9296a0 | |||
| fb50f2783f | |||
| a50ddd25b2 | |||
| 4b6d5a86b2 | |||
| fbada0c4be | |||
| 6a8459cc4e | |||
| fce9e9a73f | |||
| 8ab3c937b6 | |||
| f8e431cc2e | |||
| 3f7c069ce0 | |||
| 21895d307b | |||
| 38b0eec741 | |||
| 2496f19bee | |||
| 21932dc329 | |||
| 35fc287d55 | |||
| 3a3623859b | |||
| f623e78bdc | |||
| 2bcc14888c | |||
| 7bee6cf1ea | |||
| eea264a099 | |||
| b99d872c53 | |||
| f09d1b5da1 | |||
| 9e3ff74b98 | |||
| 2e64e31a8f | |||
| 150f9d6c08 | |||
| a6565aae53 | |||
| ac268c0672 | |||
| 94902c661f | |||
| 0a90e1fe4a | |||
| 9f1a09689f | |||
| af68d9b0cf | |||
| d75b7de20b | |||
| f968e618ac | |||
| fb9717a00f | |||
| 0acdf41fa3 | |||
| f5fddd0369 | |||
| 660f801afd | |||
| da66118d20 | |||
| 93d1de941c | |||
| 94106a11c0 | |||
| 76f0ee3ef0 | |||
| 712792ac9f | |||
| 56424cf0d1 | |||
| 9230bd8115 | |||
| ab0d34599f | |||
| 0c4ee6a033 | |||
| f5b80b6e63 | |||
| 63f4a8310e | |||
| 53176a9a26 | |||
| 8422243465 | |||
| 91317b7a41 | |||
| cbcc6f812a | |||
| a53a3d595c | |||
| d741035707 | |||
| bab02110b0 | |||
| 1db4e10dc8 | |||
| d6a87bc426 | |||
| d8096a3695 | |||
| 0927695261 | |||
| 97380e9833 | |||
| 2c64581a2c | |||
| 05a00e8ce0 | |||
| d056bd0bd2 | |||
| fa187be88a | |||
| 357ccca819 | |||
| 993f49c0a0 | |||
| 3b180cda83 | |||
| 1a877bbfa1 | |||
| c3bbd75c65 | |||
| 03a6e537b8 | |||
| 401a1480d6 | |||
| 5c75b2cb38 | |||
| 2137043c8c | |||
| a919f51fc0 | |||
| 16d85a5a41 | |||
| 0ccf46456a | |||
| 2f20961395 | |||
| f3318e0dd0 | |||
| 7843090907 | |||
| 29ceca055e | |||
| 076f64788a | |||
| b9dca52e52 | |||
| 2ac306ec15 | |||
| 999bfae344 | |||
| 0994743fd8 | |||
| 8b0070efd4 | |||
| 82ed352c1d | |||
| 2a975123fc | |||
| 5d6a66dcac | |||
| 8c1197e8e1 | |||
| 6db4ba7082 | |||
| 609bccefe1 | |||
| ff35e480f2 | |||
| b32ccb48be | |||
| db6c6de8e9 | |||
| 6f69fe2545 | |||
| 05a4491bb2 | |||
| 27334858c9 | |||
| a8bdfef271 | |||
| b59d64682e | |||
| d3d4add5a2 | |||
| fa4dd48955 | |||
| dce50b226f | |||
| a0aa04e036 | |||
| 2670bb8f6d | |||
| b0642aafb7 | |||
| 3901a2a281 | |||
| 2403881a7c | |||
| 758907a660 | |||
| 70a511a141 | |||
| 86aa453093 | |||
| be6fb7bd75 | |||
| 0ab5b873f1 | |||
| 06dbc71a1d | |||
| a51b25208f | |||
| cb00ff7c5d | |||
| 43b762dd2a | |||
| ba40b74230 | |||
| da9425228e | |||
| 2ba4233ac7 | |||
| 1545bf39ee | |||
| ff4496be24 | |||
| bf7e602e4a | |||
| a66430c255 | |||
| 689d7bf0a9 | |||
| 6d1417ab73 | |||
| a60edfdd37 | |||
| a28c088c06 | |||
| acb57bffb4 | |||
| 35c2e07261 | |||
| 14a2313e5f | |||
| 1f75ba41cf | |||
| 77109fd3cc | |||
| 21570ea5ec | |||
| 2b8ed2192b | |||
| 1e5cf55521 | |||
| 87db7ddd98 | |||
| 09d7bd4fae | |||
| 38e56254ff | |||
| c5246e73ca | |||
| 120da86904 | |||
| 02f1ab0e4a | |||
| 9465cf03ac | |||
| 7168b874aa | |||
| 67f2eec4eb | |||
| 50a23afe7a | |||
| d57c07affd | |||
| d5c975d0b6 | |||
| febf9f2c3e | |||
| cfadede201 | |||
| 9988c4daf6 | |||
| 6b4feb3b91 | |||
| b4625335b6 | |||
| 0d7bae5be8 | |||
| 11b4aaad6e | |||
| 589a7da53b | |||
| 71ce8597e5 | |||
| 7ef1ba10a9 | |||
| b8df7e9603 | |||
| 73d2d4a95d | |||
| 0f68d2d0fc | |||
| 9083fc65d4 | |||
| 9604869639 | |||
| 0c0238ee20 | |||
| 0763168367 | |||
| 9490952d6c | |||
| 9a576d70e4 | |||
| 0530b450ce | |||
| 17e90c4761 | |||
| 200d476462 | |||
| e7d1044716 | |||
| 44df84e286 | |||
| f8738c64b7 | |||
| fdfeb2a90b | |||
| 2804400910 | |||
| 9d2fc5bc6e | |||
| 536aea6c48 | |||
| c64ca0c814 | |||
| 86c9ac93d5 | |||
| e1f25475b1 | |||
| 6cd4b6c549 | |||
| 81f7a5f25b | |||
| a10064c205 | |||
| f1b9be44f4 | |||
| 14ca2b6687 | |||
| e78dacd029 | |||
| 87b420e21e | |||
| da3374a484 | |||
| b151eed4b6 | |||
| f0513c19b8 | |||
| ee0219b39a | |||
| a93d334b1f | |||
| 59803d547c | |||
| 8dcee29952 | |||
| 53d5a09fb4 | |||
| acdfae1608 | |||
| 4442931dd4 | |||
| 1aeab0aef5 | |||
| e9600fa5ec | |||
| 42a5b67386 | |||
| 58e6940bad | |||
| 3b685fe164 | |||
| a531e8ee19 | |||
| a51a1458be | |||
| f029b9034d | |||
| 7c1766825b | |||
| 8ac2fa3334 | |||
| 6c64246ca8 | |||
| 57968875f0 | |||
| 009b1cddcd | |||
| 8f52ae6f0c | |||
| 54247b8b90 | |||
| 762fa93c23 | |||
| 2e025ebf20 | |||
| 833c089a27 | |||
| a410c2a2f6 | |||
| fae791ff71 | |||
| 729b410d63 | |||
| b9bb17dd69 | |||
| 03286a44b9 | |||
| 1cff350fed | |||
| f191ed42da | |||
| 46ba62d346 | |||
| dd07501c5c | |||
| 68e48205f3 | |||
| 3aaeafbfc0 | |||
| a34e9637fe | |||
| 4af259ffed | |||
| 6165b80147 | |||
| 33fd9c1b4d | |||
| c442aac0a9 | |||
| 081f51dfd2 | |||
| 27b6d068ed | |||
| b4adf42644 | |||
| 527d4670d4 | |||
| 17c6b7d282 | |||
| 2a729ffcc2 | |||
| 3ffbf556f2 | |||
| 5f04ac3bee | |||
| bd05860f11 | |||
| 3887dce508 | |||
| 651b66198f | |||
| 77fac967bc | |||
| c8375ca138 | |||
| 34c5824255 | |||
| abcbbe9ae2 | |||
| fb06df8578 | |||
| d71721ab87 | |||
| 93e6cd36a7 | |||
| ca3873f055 | |||
| ba14699dfb | |||
| e3dae698d9 | |||
| b8eee58b01 | |||
| 344d2f3dac | |||
| bc863a3345 | |||
| 6ffe47b2d8 | |||
| 30ecfd4370 | |||
| 48e3e39514 | |||
| 909fd9d68c | |||
| b9ccc083ae | |||
| 42549d9bb9 | |||
| ce93a83305 | |||
| 08f6e5d3d9 | |||
| dfa597f2d0 | |||
| ea917c470e | |||
| 945f310eae | |||
| ea005587de | |||
| eb545f3763 | |||
| 378d373a04 | |||
| 6bcbc655ed | |||
| 8bea1859c8 | |||
| 8b10bf7242 | |||
| 3949ae5185 | |||
| ac2b9c6a1e | |||
| 126ec7a881 | |||
| 90999fc3d6 | |||
| 9d2615c221 | |||
| 28d5c2d5d7 | |||
| d250d3dcb6 | |||
| 207e38e619 | |||
| 61084d6526 | |||
| ea15edd45c | |||
| 4c118e161b | |||
| 4430aff718 | |||
| 5cd8e8a834 | |||
| 20a01c8c52 | |||
| 0a5822e64e | |||
| 977dcb7dc3 | |||
| 9296ef5333 | |||
| 49c96963f8 | |||
| 934744362f | |||
| e1b79af4a5 | |||
| 9b89612edb | |||
| 196a965aea | |||
| aad538ecfc | |||
| 1c51225277 | |||
| 766879d47c | |||
| d52a7ae08c | |||
| 803a84638e | |||
| d163cd60f5 | |||
| ec895f3e12 | |||
| 41c9bcc6ce | |||
| 325db8ab3c | |||
| f31a7b736b | |||
| c2c79ca9ec | |||
| 0e96ed1519 | |||
| d43f5f5320 | |||
| 4b51126239 | |||
| a21d0f8a73 | |||
| 0e83d1e39f | |||
| bb500779d9 | |||
| 815bd4b49e | |||
| 619595fd65 | |||
| 127207414c | |||
| ba72e80279 | |||
| 4b5d271ab4 | |||
| 7f2956e47a | |||
| 36a199946e | |||
| d79f29d237 | |||
| 0d440fafa7 | |||
| 353a487ded | |||
| a0c4ad6af4 | |||
| f16576c03c | |||
| 0144a5787a | |||
| ed624f5bf1 | |||
| 2699feada5 | |||
| 1affb38cd5 | |||
| 2feb5bc6ff | |||
| 2f175f5529 | |||
| cf4971a6c4 | |||
| 65e253a538 | |||
| 5f010b68af | |||
| e04d098527 | |||
| 24b5e279db | |||
| 26f4c0bcff | |||
| b82c94bf51 | |||
| 6f9a5ce8d2 | |||
| e0eb0eefce | |||
| 641921537b | |||
| 52f892f35f | |||
| 15e4c19f04 | |||
| cca89f9260 | |||
| bbee451f2c | |||
| 51f7daba6c | |||
| 7fa35f18e4 | |||
| 217765254d | |||
| c747be2743 | |||
| 2d60e2b461 | |||
| 69cd540329 | |||
| ad57be052e | |||
| 5cded5f27c | |||
| 39d1663fa1 | |||
| 6ddea35dec | |||
| f3e8a3024f | |||
| 7d35facdaf | |||
| 7ba24f7a54 | |||
| feb3215745 | |||
| ba5d734a05 | |||
| bb26d45f1d | |||
| 1a79e7149c | |||
| 4bdd2b3894 | |||
| 5d804b2d8e | |||
| 4a83edf3bc | |||
| d0de4ac677 | |||
| 49530b8d0c | |||
| 3aa5a27268 | |||
| 88518338f1 | |||
| 965f14e249 | |||
| c91e04b4d8 | |||
| 8fa8267e04 | |||
| 73fa9532b5 | |||
| 04102677f2 | |||
| 331636b9f4 | |||
| 8c1d9c3fe2 | |||
| c655e23cb3 | |||
| 26b78eecf6 | |||
| 08484d9807 | |||
| 13b19fec75 | |||
| 6fb70a5b32 | |||
| 317aea7492 | |||
| 0936ae6fb6 | |||
| 6bf29a45db | |||
| b00668e758 | |||
| 6941f26e97 | |||
| 71a15a24bc | |||
| 964ff00520 | |||
| 856b2527e3 | |||
| 92158f2496 | |||
| 2a5a184662 | |||
| d45bfb0eeb | |||
| 314a615b68 | |||
| e77276ae52 | |||
| 72348008a2 | |||
| 3e43f67ee2 | |||
| d1fd6d1861 | |||
| c7743fccb9 | |||
| ee75c6a53d | |||
| fc637e553c | |||
| fc76b3929b | |||
| 0e83c7368d | |||
| 0b8e1a1a0d | |||
| 6d6a801a01 | |||
| ba2ba9bc58 | |||
| 268138d726 | |||
| 7fe615a7ee | |||
| d4fa723155 | |||
| ae5ec93b53 | |||
| ead1f186f0 | |||
| 2c6704ae9e | |||
| e2a2758f6d | |||
| 3973b57413 | |||
| f1ce4b834a | |||
| 69346bfaa1 | |||
| 9df49c354b | |||
| 444d506359 | |||
| 65815113d5 | |||
| 53196b5dda | |||
| 03f73564da | |||
| 9fd845c424 | |||
| f079907a9e | |||
| ee308fb5aa | |||
| 4900b67882 | |||
| 4ae167e461 | |||
| 4491a600f3 | |||
| c8927e0b60 | |||
| 50355abdda | |||
| f190b7651e | |||
| 38c394581c | |||
| 00d7cf48af | |||
| 740ae124f9 | |||
| 17977d2a88 | |||
| ed29923d2e | |||
| 6228e7229b | |||
| 677f92af68 | |||
| ce43d8b30e | |||
| 09470e85ce | |||
| bab896aba1 | |||
| 519381684d | |||
| a66b35190f |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
*.py.bak
|
||||
*.pyc
|
||||
*~
|
||||
src/config/
|
||||
|
||||
111
.gitlab-ci.yml
Normal file
111
.gitlab-ci.yml
Normal file
@@ -0,0 +1,111 @@
|
||||
# Jobs to build the two channels in Socializer.
|
||||
variables:
|
||||
PYTHON3: "C:\\python37\\python.exe"
|
||||
PYINSTALLER: "C:\\python37\\scripts\\pyinstaller.exe"
|
||||
PYTHON2: "C:\\python27\\python.exe"
|
||||
NSIS: "C:\\nsis\\makensis.exe"
|
||||
|
||||
test_py3:
|
||||
stage: test
|
||||
tags:
|
||||
- windows10
|
||||
before_script:
|
||||
- '%PYTHON3% -V'
|
||||
- '%PYTHON3% -m pip install --upgrade pip'
|
||||
- '%PYTHON3% -m pip install --upgrade -r requirements.txt'
|
||||
only:
|
||||
- schedules
|
||||
script:
|
||||
- cd src
|
||||
- '%PYTHON3% -m coverage run run_tests.py'
|
||||
- '%PYTHON3% -m coverage report --omit="test*"'
|
||||
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
|
||||
|
||||
documentation:
|
||||
type: deploy
|
||||
tags:
|
||||
- windows10
|
||||
before_script:
|
||||
- '%PYTHON3% -v'
|
||||
script:
|
||||
- copy changelog.md doc\changelog.md
|
||||
- cd doc
|
||||
- '%PYTHON2% documentation_importer.py'
|
||||
- cd ..\src
|
||||
- '%PYTHON2% ..\doc\generator.py'
|
||||
- 'move documentation ..\'
|
||||
only:
|
||||
- master
|
||||
artifacts:
|
||||
paths:
|
||||
- documentation
|
||||
name: socializer_documentation
|
||||
expire_in: 1 day
|
||||
|
||||
alpha_python3:
|
||||
type: deploy
|
||||
tags:
|
||||
- windows10
|
||||
before_script:
|
||||
- '%PYTHON3% -v'
|
||||
- '%PYTHON3% -m pip install --upgrade pip'
|
||||
- '%PYTHON3% -m pip install --upgrade -r requirements.txt'
|
||||
- '%PYTHON3% -m pip uninstall enum34 -y'
|
||||
script:
|
||||
- copy changelog.md doc\changelog.md
|
||||
- cd doc
|
||||
- '%PYTHON2% documentation_importer.py'
|
||||
- cd ..\src
|
||||
- '%PYTHON2% ..\doc\generator.py'
|
||||
- '%PYTHON3% write_version_data.py'
|
||||
- '%PYINSTALLER% main.spec'
|
||||
- cd ..
|
||||
- cd scripts
|
||||
- '%PYTHON3% prepare_zipversion.py'
|
||||
- call genpot_interface.bat
|
||||
- call genpot_doc.bat
|
||||
- cd ..
|
||||
- move src\socializer.zip socializer.zip
|
||||
- move scripts\socializer.pot socializer.pot
|
||||
- move scripts\socializer-documentation.pot socializer-documentation.pot
|
||||
only:
|
||||
- schedules
|
||||
artifacts:
|
||||
paths:
|
||||
- socializer.zip
|
||||
- socializer.pot
|
||||
- socializer-documentation.pot
|
||||
name: socializer_py3
|
||||
expire_in: 1 day
|
||||
|
||||
stable:
|
||||
type: deploy
|
||||
tags:
|
||||
- windows
|
||||
before_script:
|
||||
- '%PYTHON3% -v'
|
||||
- '%PYTHON3% -m pip install --upgrade pip'
|
||||
- '%PYTHON3% -m pip install --upgrade -r requirements.txt'
|
||||
- '%PYTHON3% -m pip uninstall enum34 -y'
|
||||
script:
|
||||
- copy changelog.md doc\changelog.md
|
||||
- cd doc
|
||||
- '%PYTHON2% documentation_importer.py'
|
||||
- cd ..\src
|
||||
- '%PYTHON2% ..\doc\generator.py'
|
||||
- '%PYTHON3% write_version_data.py'
|
||||
- '%PYINSTALLER% main.spec'
|
||||
- '%NSIS% installer.nsi'
|
||||
- cd ..
|
||||
- move src\socializer* .
|
||||
- cd scripts
|
||||
- '%PYTHON3% prepare_zipversion.py'
|
||||
- cd ..
|
||||
- move src\socializer.zip socializer.zip
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
paths:
|
||||
- socializer.zip
|
||||
- "socializer_*"
|
||||
name: socializer
|
||||
35
README.md
35
README.md
@@ -1,43 +1,28 @@
|
||||
# socializer
|
||||
|
||||
[](https://code.manuelcortez.net/manuelcortez/socializer/commits/master)
|
||||
|
||||
> Note: this project has two different main repositories. [Here is the official repository, hosted in my Gitlab Instance,](https://code.manuelcortez.net/manuelcortez/socializer) [Here is a mirror repository hosted in GitHub.](https://github.com/manuelcortez/socializer) Github repository will accept pull requests and issues reported by github users, while Gitlab's repository will provide the wiki, documentation, and support for user reported issues.
|
||||
|
||||
A desktop application for handling [vk.com](http://vk.com) in an easy way.
|
||||
|
||||
## weekly builds
|
||||
[See Socializer's website](http://socializer.su)
|
||||
|
||||
Socializer's functionality is far to be perfect, in fact there are lots of methods of the VK API that this application doesn't support right now, but if you are curious enough, and you want to help by giving me your impressions and making tests for fixing bugs, you can download the last source code, compiled as an application. This is the weekly build of socializer. This version is only for testing purposes, never think that it can be used for everyday use. This version does not include any documentation, Only the changelog, because it's build with an authomatic process. This weekly build is built every week, depending in the updates that the repository has receibed.
|
||||
## dependencies not installed by PIP
|
||||
|
||||
Before downloading, take in to account the following: This source code is completely experimental. The current functionality in this application is not very useful. If you decide to use nightly build versions, take into account that this doesn't work as an application for everyday use yet.
|
||||
For other dependencies, do pip install --upgrade -r requirements.txt
|
||||
|
||||
Version: 2016.05.25
|
||||
Build date: May 25 2016
|
||||
[Download socializer weekly build](https://github.com/manuelcortez/socializer/blob/master/nightly/socializer-nightly-build.zip?raw=true)
|
||||
|
||||
I have started this effort as an open source project on Feb 13, 2016. Pull requests and bug reports are welcome. Socializer is not a definitive name for this project, it could be changed in future.
|
||||
|
||||
## dependencies
|
||||
|
||||
* [Python,](http://python.org) version 2.7.11
|
||||
* [wxPython](http://www.wxpython.org) for Python 2.7, version 3.0.2.0
|
||||
* [Python windows extensions (pywin32)](http://www.sourceforge.net/projects/pywin32/) for python 2.7, build 220
|
||||
* [PyEnchant,](http://pythonhosted.org/pyenchant/) version 1.6.6.
|
||||
* [VK API bindings for Python](https://github.com/dimka665/vk) (already included in the SRC directory)
|
||||
* pypubsub
|
||||
* configobj
|
||||
* requests-oauthlib
|
||||
* future
|
||||
* arrow==0.6
|
||||
* microsofttranslator
|
||||
* [Pandoc](http://pandoc.org/installing.html) for generating the changelog.
|
||||
* [Python,](http://python.org) version 3.7.2
|
||||
|
||||
## Documentation
|
||||
|
||||
I am trying to write an updated manual for socializer. It can be found in the documentation folder once the program zip file is uncompressed, or in the manual.md file (in markdown). The idea of this manual is to be updated as socializer receives new features or improvements.
|
||||
|
||||
A copy of the English version of the manual can be read here: [Manual in the socializer's wiki](https://github.com/manuelcortez/socializer/wiki/manual)
|
||||
A copy of the English version of the manual can be read here: [Manual in the socializer's wiki](https://code.manuelcortez.net/manuelcortez/socializer/wikis/manual)
|
||||
|
||||
## Contributing
|
||||
|
||||
If you are interested in this project, you can help it by [translating this program](https://github.com/manuelcortez/socializer/wiki/translate) into your native language and give more people the possibility of using it. Thank you in advance!
|
||||
If you are interested in this project, you can help it by [translating this program](https://code.manuelcortez.net/manuelcortez/socializer/wikis/translate) into your native language and give more people the possibility of using it. Thank you in advance!
|
||||
|
||||
## contact
|
||||
|
||||
|
||||
214
changelog.md
214
changelog.md
@@ -1,13 +1,214 @@
|
||||
% Changelog
|
||||
# Changelog
|
||||
|
||||
## Changes for the current build ()
|
||||
## News in this version
|
||||
|
||||
### New additions
|
||||
|
||||
* Socializer is now more tolerant to internet issues. When attempting to create a wall post, comment, topic or send a chat message, if the data is unable to be posted to VK, socializer will allow you to try to post it again, giving you the opportunity to edit or copy the text of the post in case you want to save it for later.
|
||||
* Switching accounts is now supported in socializer. In the application menu, there is an option called "manage accounts" which allows you to add or remove an account. Socializer will take changes after a restart of the application. In case of having multiple accounts, every time Socializer starts, you will see a dialog from where is possible to choose the account for logging in.
|
||||
* when selecting multiple audio files in audio buffers, multiple actions can be performed in all items, these actions are present in the contextual menu of the buffer (namely play, add/remove from the library and move to a different playlist). This means you can select all the audios you want and Socializer will perform the selected options in all items, making it a bit easier to operate with multiple songs.
|
||||
* Now it is possible to like and see who liked a comment when displaying it individually. This applies to comments in wall posts and topics.
|
||||
* Now it is possible to choose how many items Socializer will load in conversation buffers, from the General tab in the preferences dialog. The default value is 50 items, and the maximum value is 200.
|
||||
* There is a new tab called buffer settings, in the preferences dialog. Settings related to how many items should be loaded in certain buffer types have been moved to this tab, so it will separate better the configuration options in the application.
|
||||
* Added management of the Blacklist on VK. Users can be blocked from people buffers (friends, online, or any buffer inside friend requests). You can access the blacklist from the application menu, located in the menu bar. From there, you can unblock any previously blocked user.
|
||||
* In the new timeline dialog, it is possible to create video buffers by selecting the "video" radio button as buffer type.
|
||||
|
||||
### bugfixes
|
||||
|
||||
* Fixed an error that was causing socializer to not update the "Online friends" buffer if chat notifications were disabled.
|
||||
* Fixed an error that was making Socializer unable to attach audio files from the computer, if the file does not include correct ID3 TAGS.
|
||||
* Fixed a traceback that was being logged when attempting to load an image but cancel the dialog for attaching it.
|
||||
* Fixed an error that was making Socializer to fail when loading the newsfeed buffer, thus not loading any other buffers. This error was caused due to VK sending a new object type representing push subscriptions. The item is ignored by Socializer so it will not break the newsfeed buffer anymore.
|
||||
* Fixed an error that was making the status bar to not fit the full size of the Window. This was cutting the messages placed on it, now, all messages are displayed properly again.
|
||||
* fixed an unhandled condition when playing a song and voice message at the same time, that was potentially making Socializer to stop loading certain buffers.
|
||||
* fixed an error that was making socializer unable to parse video data, thus video buffers were impossible to be loaded.
|
||||
|
||||
### Changes
|
||||
|
||||
* Less confidential user data will be send to the logs, so it will be much safer to pass logs publicly.
|
||||
* automatic update checks will be disabled if using socializer from the source code.
|
||||
* it is possible to post in an user's wall by using the post button located next to the user, in people buffers. This applies only to online users and list of friends.
|
||||
* When displaying a profile, information about mobile and home phone is displayed in the basic information tab.
|
||||
* In wall posts, all comments, including replies, will be displayed in the same list. Before, you had to open a comment to read its replies. When a new comment is posted by the current user, the list of comments will be reloaded and new additions will be fetched and sorted properly.
|
||||
|
||||
## changes in Versions 0.21 and 0.22 (14.07.2019)
|
||||
|
||||
### New additions
|
||||
|
||||
* Added "post in groups" feature. In order to do so, you need to load the posts for the group where you want to send something. Once loaded, go to the post button in the group's wall and select whether you want to post in the group's behalf or as yourself.
|
||||
* In all audio buffers, it is possible to select individual tracks to be played together. In order to do so, you need to press space to start the selection of items. When selected, the item will emit a sound to indicate the change. Press space in all items you want to select/unselect. When you're focusing an already selected item it will play a sound to indicate that it is already selected. Once you're done with your selection, pressing enter in the list of tracks will start the playback of the list of items you have selected. This is a very experimental feature. More actions can be supported based in this selection method if it proves to be useful.
|
||||
* In conversation buffers, it is possible to display and open wall posts sent as attachments in messages.
|
||||
* In people buffers, it is possible to create a new timeline by using the context menu while focusing an user. This method will create the buffer for the selected user, as opposed to creating the buffer from the menu bar, where you have to type the username or find it in a list.
|
||||
|
||||
### bugfixes
|
||||
|
||||
* Fixed an error with two factor authentication in the recent socializer version. Now it works reliably again.
|
||||
* Fixed an error when trying to attach a photo to a wall post. The error was fixed in the [vk_api](https://github.com/python273/vk_api) module and the fix was sent to the developer of the library, so he will be able to merge it in the next version. In the meantime, socializer already includes the fix for this method, so you can upload photos to wall posts normally.
|
||||
* Fixed an error retrieving some group information for the current session.
|
||||
* When posting in a topic, links will be posted properly.
|
||||
|
||||
|
||||
### Changes
|
||||
|
||||
* the audio player module has received some improvements:
|
||||
- When there is something being played, the label of the "play" button, located in all audio buffers, will change automatically to "pause". When pressed, it will pause the song instead of starting the playback again since the beginning.
|
||||
- The last change will work also in the dialog for displaying audio information. Now it's possible to play and pause an audio from such dialog.
|
||||
- When playing a voice message, if a song is playing already socializer will decrease the volume so you can hear the voice message well enough. Some seconds after the message has finished, the song's volume will be restored.
|
||||
* In audio buffers, you will play the focused audio when pressing enter in the item, instead of opening the audio information dialog.
|
||||
* Removed some old keystrokes in socializer buffers due to better alternatives. The reason for this change is that currently you don't need to be focusing an item in a buffer for being able to use the alternative keystrokes, which makes those a better implementation.
|
||||
- Control+Enter and control+Shift+Enter: superseeded by Control+P for playing (and pausing) the currently focused audio.
|
||||
- F5 and F6: superseeded by Alt+down and up arrows for modifying volume.
|
||||
|
||||
## changes in version 0.20 (25.04.2019)
|
||||
|
||||
### New additions
|
||||
|
||||
* For users with multiple soundcards, there is a new tab in the preferences dialogue of Socializer, called sound. From there, you can define which soundcard will be used for input and output. [#25,](https://code.manuelcortez.net/manuelcortez/socializer/issues/25)
|
||||
* the audio player can seek positions in the currently playing track. You can use the menu items (located in the main menu) or use the new available keystrokes dedicated to the actions. Seeking will be made in 5 second intervals.
|
||||
* Alt+Shift+Left arrow: Seek 5 seconds backwards.
|
||||
* Alt+Shift+Right arrow: Seek 5 seconds forwards.
|
||||
* it is possible to select the language used in socializer from the preferences dialog. When changing the language, the application must be restarted for the changes to take effect.
|
||||
* A new option, called open in vk.com, has been added in the context menu for almost all objects (items in home timeline, walls, documents, people, group topics and in buffers for conversations). This option will open the selected item in the VK website.
|
||||
* when opening the list of friends added by an user, you can display the context menu from an item on the list and view the user profile, open it in VK.com, among other actions. [#8,](https://code.manuelcortez.net/manuelcortez/socializer/issues/8)
|
||||
* When displaying a post, if you press enter in the button indicating how many people liked or shared the post, Socializer will display the listt of people who have liked or shared it. You can use the context menu in the list to do certain actions. [#38,](https://code.manuelcortez.net/manuelcortez/socializer/issues/38)
|
||||
* it is possible to retrieve more items for conversation buffers. Due to API limitations, it is possible to load up to the last 600 messages for every conversation. Take into account that the process of loading more items takes some time. You will hear a message when the process is done.
|
||||
* It is possible to delete entire conversations from the buffer's tree, by using the menu key and selecting "delete conversation". The conversation will be removed from VK.
|
||||
* When loading a topic in a group, socializer will display the latest 100 messages. In order to load more messages, you will find a button that will load the previous 100 messages present in the topic, or the amount of messages not loaded yet.
|
||||
|
||||
### bugfixes
|
||||
|
||||
* All spelling dictionaries are included by default for the following languages: Russian, English, German, French, italian, Polish, spanish and Turkish. Before, some dictionaries were missing and the spelling checker was failing.
|
||||
* Fixed an error in the default configuration template used for new sessions in the application. This error was making Socializer to fail when loading any conversation buffer.
|
||||
* Fixed an error in the algorithm to detect friends disconnecting from VK. This problem was interrupting the connection with the chat server every time it was happening, thus chat server's connection should be more reliable now.
|
||||
* The audio player should behave better in situations where a song is interrupted. Before, if you pressed "next song" while the currently playing sound was interrupted due to internet connection issues, two or more songs were played at the same time.
|
||||
* The bug reporting feature works normally again.
|
||||
|
||||
### Changes
|
||||
|
||||
* Updated method for accessing audio files due to the latest changes on VK apps.
|
||||
* When changing volume of the playing audio, it will decrease or increase the volume by 2% instead of 5%.
|
||||
* Read confirmations will be sent to VK as soon as you read the message. Before, read confirmations were being sent every 3 minutes to the social network.
|
||||
|
||||
## Changes in version 0.19 (13.03.2019)
|
||||
|
||||
* Added a new buffer called documents. When loading the buffer, it will contain all documents owned by the current user. The context menu of any item will allow you to download the document to your computer or remove it from VK.
|
||||
* A new buffer, called online, has been added in the friends section. It contains friends currently connected to VK. Items in this buffer will be added as soon as new friends are online in the social network, and will be removed when friends are offline. This buffer needs a lot of testing. Please report any possible inconsistency on this method.
|
||||
* Added new options to open the config and logs folder, these options are located in the help menu and may be useful during error reporting.
|
||||
* Added experimental support to "subscribers" buffer, inside frienship requests. This shows friend requests that have been declined by the current user.
|
||||
* the message when an user is typing in conversation buffers will be announced only if the socializer window is focused.
|
||||
* In "my audios" buffer, there is a button that allows a direct audio upload from your computer. The audio will be placed in your library.
|
||||
* Added experimental support to user and community polls:
|
||||
* If the poll is already closed or the user has send a vote to the poll previously, it will display only the results of the poll.
|
||||
* Otherwise it will display a dialog from where the user can vote in the current poll.
|
||||
* Fixed an error in Socializer that was making it unable to detect unread messages properly.
|
||||
* Socializer should save all tracebacks directly to error.log instead of displaying an error message during exit. ([#27,](https://code.manuelcortez.net/manuelcortez/socializer/issues/27))
|
||||
* When displaying user profiles, fixed an error where a married person without specifing relation partner would cause an error in the program. ([#29,](https://code.manuelcortez.net/manuelcortez/socializer/issues/29))
|
||||
* Socializer will load all conversations during startup, not only conversations with unread messages.
|
||||
* Added new global keystrokes, available in the main window.
|
||||
* Alt + up/down arrows: Increase / decrease volume.
|
||||
* Alt + Left/down arrows: Play previous and next song if playing an audios buffer.
|
||||
* Control + P: Play/pause.
|
||||
* control+Shift+P: Play all.
|
||||
* Fixed an error in the audio player that was skipping the first track if you were in the last song and pressed "play next" in the menu bar or via the keystroke.
|
||||
* Chats with unread messages will be placed at the top of the chats section. When a chat buffer receives a new message, socializer will move the buffer to the first position in the chats list. This should make easier for everyone to determine which chats contain unread items. ([#24,](https://code.manuelcortez.net/manuelcortez/socializer/issues/24))
|
||||
* In dialogs for displaying posts and comments, and also in the two edit boxes present in chat buffers, it is possible to select all by pressing Control+A.
|
||||
* Now it is possible to remove friends directly from the friends buffer. There is a new option for this purpose in the context menu for the focused friend. After being removed, the person will be placed in the subscribers buffer.
|
||||
* Deleted posts will display an error message when trying to view details about those. Before, the dialog was created and left blank.
|
||||
* Improvements in audio features present in Socializer:
|
||||
* The audio search feature has received improvements: Now it is possible to indicate wether the search will be performed by title or artist, and select to sort the results by duration, popularity or date of addition to VK.
|
||||
* Now it is possible to create and delete audio albums again.
|
||||
* Fixed errors when moving songs to albums. Now everything works as expected.
|
||||
* Added documents to the list of supported files when adding attachments to a wall post or private message.
|
||||
* It is possible to enable or disable proxy from the preferences dialog. The application must be restarted for this change to take effect.
|
||||
* Fixed an error that was making Socializer unable to display the changelog properly, when opened from the help menu. ([#21](https://code.manuelcortez.net/manuelcortez/socializer/issues/21))
|
||||
* When receiving chat messages and in some other situations, socializer will display all characters properly. Before, usernames were rendered using the internal code VK uses for them, and some unicode characters were displaying their HTML representation.
|
||||
* It is possible to retrieve previous items for the home buffer and walls (current user's wall and any other timeline):
|
||||
* For the home buffer, only a limited amount of items (around 700) can be loaded, supposedly due to VK API limits.
|
||||
* For walls, all posts should be possible to be loaded, however, testing with walls containing more than 2000 posts are not performed yet.
|
||||
* Added improvements to groups:
|
||||
* It is possible to load topics, audios, videos and documents for a group. In order to do so, you need to go to the group buffer and press the menu key, or right mouse click, in the tree item representing the group. New buffers will be created inside the current group's buffer.
|
||||
* You can create or delete all buffers for groups by pressing the menu key or right mouse click in the "communities" buffer.
|
||||
* There is support for group topics. When opening them, they will be displayed as a list of posts. You can like or reply to such posts, as well as adding new posts in the topic.
|
||||
* Authentication errors should be handled gracefully by the application:
|
||||
* When there is a password change, Socializer must be reauthorized again. An error message will indicate this if the user forgot to do that. After the error, the app will be restarted, prompting the user to introduce the new data for authorizing the application.
|
||||
* If the user introduced incorrect or invalid data, Socializer will display an error and prompt the user again for valid information.
|
||||
* If there is a connection problem when opening Socializer, it will display an error and inform the user about the issue.
|
||||
|
||||
## Changes in version 0.18 (21.01.2019)
|
||||
|
||||
* Changed authentication tokens in Socializer. It is mandatory to download a fresh copy of socializer and start a new configuration for your account.
|
||||
* Stable versions of Socializer are built with Python 3. Previous versions are built with Python 2, however support for Python 2 will be dropped very soon.
|
||||
* There is an installer file for Socializer, available in our downloads page. Installed version of Socializer will be more confortable for some people.
|
||||
* For users from countries where VK is not allowed, Socializer includes a proxy to bypass country restrictions. The first time you start socializer, it will ask you whether you need a proxy or not. It is suggested to use a proxy only if you need it.
|
||||
* Now it is possible to post in someone else's wall. When viewing a timeline of an user, the "post" button will post in his/her wall. To post in your own wall, you'll need to go to the newsfeed or your own wall and press the post button.
|
||||
* If you are not allowed to post in someone's wall, the post button will not be visible.
|
||||
* A new option for deleting wall posts has been added to the context menu in newsfeed and walls (current user's wall and timelines). This option will be visible only if the current user is allowed to delete the focused post.
|
||||
* Socializer will be able to handle all users correctly. Before, if an user that was not present in the local storage system was needed, the program was displaying "no specified user". ([#17,](https://code.manuelcortez.net/manuelcortez/socializer/issues/17))
|
||||
* It is possible to use user domains (short names for users) to create timelines. Just write @username and the program will create the needed timeline, regardless if the user is present in your friend list. ([#18,](https://code.manuelcortez.net/manuelcortez/socializer/issues/18))
|
||||
* When displaying someone's profile, the dialog should be loaded dramatically faster than before. A message will be spoken when all data of the profile is loaded.
|
||||
* When opening a timeline, if the current user is not allowed to do it, an error message should be displayed and the buffer will not be created. Before the buffer was partially created in the main window. ([#22.](https://code.manuelcortez.net/manuelcortez/socializer/issues/22))
|
||||
* Added basic support to handle group chats. At the current moment it is possible to receive and reply to chat messages only. Chat groups will be placed inside the conversations section. ([#23.](https://code.manuelcortez.net/manuelcortez/socializer/issues/23))
|
||||
* It is possible to delete a conversation buffer from the buffer menu. Deleting a conversation will only dismiss the buffer, no data is deleted at VK.
|
||||
* During the first start of Socializer, an invitation will be shown to join the Socializer's group in case the current user is not already a member.
|
||||
* It is possible to see how many people has read a wall post when showing it in the dialog. ([#28.](https://code.manuelcortez.net/manuelcortez/socializer/issues/28))
|
||||
* A new tab has been added to the preferences dialog. From the new section, it is possible to control whether socializer should create buffers for the first 1000 audio albums, video albums and communities when starting.
|
||||
* Added functionality regarding comments in wall posts:
|
||||
* when reading a post, you can press enter in any comment to display a dialog from where it is possible to view attachments, translate, check spelling or reply to the thread. If there are replies made to this comment, these will be visible in a section called replies. Pressing enter in a reply will also open the same dialog.
|
||||
* A new "replies" field has been added to the comments' list.
|
||||
* When writing a comment, it is possible to do the same actions available for a post (translate, spell checking and adding attachments).
|
||||
|
||||
## Changes in version 0.17 (01.01.2019)
|
||||
|
||||
* Added support for Two factor authentication (2FA). ([#13,](https://code.manuelcortez.net/manuelcortez/socializer/issues/13))
|
||||
* Added update channels in socializer. You can subscribe to the "stable" or "alpha" channel from the preferences dialog and you will receive updates published for those:
|
||||
* The stable channel will have releases every month, approximately, and is the channel where the code will be more tested and with less bugs. All support and help will be provided for the stable versions only.
|
||||
* The alpha channel will have releases every time a change is added to socializer, it may even include several releases in the same day, but we will try to release only a new version every day. Support will not be provided for alpha versions, as they will be used to test the latest code in the application.
|
||||
* Now it is possible to send voice messages from socializer. Voice messages are available from the "add" button in any conversation buffer.
|
||||
* tokens generated by socializer will never expire. ([#3,](https://code.manuelcortez.net/manuelcortez/socializer/issues/3))
|
||||
* In order to use all methods available in VK, socializer will use tokens of kate mobile for Android. It means you may receive an email by saying that you've authorised Kate for accessing your account from an Android device.
|
||||
* Audio albums are loaded correctly.
|
||||
* It is possible to play audios added by friends appearing in the news feed.
|
||||
* Adding and removing an audio file to your library works.
|
||||
* Unread messages will play a sound when focused.
|
||||
* Unread messages will be marked as read when user focuses them.
|
||||
* Socializer will handle restricted audio tracks. Restricted songs are not allowed to be played in the user's country. Before, playing a restricted track was generating an exception and playback could not resume. Now, playing an audio track will display an error notification.
|
||||
* Fixed an error when people were trying to open a post in an empty buffer, or accessing the menu when there are no posts in the buffer.
|
||||
* Now Socializer will not send a notification every 5 minutes.
|
||||
* the chat widget now is a multiline text control. It means it is possible to add a new line by pressing shift+Enter, and send the message by pressing enter.
|
||||
* Socializer should handle connection errors when loading items in buffers and retry in 2 minutes. Also, connection errors in the chat server are handled and chat should be able to reconnect by itself.
|
||||
* When trying to add an audio or video to an album, if the current user does not have any album, it will display an error instead of a traceback.
|
||||
* Added popular and suggested songs. This will not work when using alternative tokens.
|
||||
* Now it is possible to update the status message, located in your profile.
|
||||
* Now it is possible to upload an audio from your computer when adding attachments in a wall post. When adding attachments to a post or message in a conversation, you will have two options: upload from your computer and add a file from your VK profile.
|
||||
* Updated Russian translation: thanks to Дарья Ратникова.
|
||||
* Fixed some conditions, especially when rendering items in feeds, that were making the client to crash.
|
||||
* new versions will include documentation and changelog.
|
||||
* A new option for reporting issues directly from the help menu has been added. Issues will be publicly available in the [Project Issues page](https://code.manuelcortez.net/manuelcortez/socializer/issues)
|
||||
|
||||
## Changes in version 0.16 (13.12.2018)
|
||||
|
||||
* Added two more buffers: "Pending requests" and "I follow", located in the people buffer, under "friendship requests".
|
||||
* Added an experimental photo viewer. Will show options for displaying the next and previous photo if the current post contains multiple images. Fullscreen button still doesn't work.
|
||||
* Improved the chat features present in the application. Read documentation to get a full understanding about how it works now.
|
||||
* Added video management (my videos, video albums and video search). For playing videos, you will be redirected to a website in your browser due to the VK'S policy.
|
||||
* Added a setting that allows you to specify if you want socializer to load images when you are opening posts. It could be useful for slow connections or those who don't want images to be loaded.
|
||||
* Added basic tagging for users in posts and comments. You can tag only people in your friends buffer.
|
||||
* Added a basic user profile viewer.
|
||||
* Added support for listening voice messages in chats. Currently it is not possible to send them.
|
||||
* Fixed an error that was making Socializer unable to display chat history properly. It was showing the first 200 items in a conversation instead the last 200 items. Now chat will be displayed accordingly.
|
||||
* Changed the chat history widget from list of items to a read only text box, similar to how it was displayed in skype. Now the widget should be fully visible and messages will work in the same way.
|
||||
* It is possible to play songs sent in a chat message by opening them from the attachments panel.
|
||||
* Reimplemented most of the audio playback methods (audio albums buffer still not working).
|
||||
* Added some notifications and chat notifications when friends are online and offline. Most notifications can be configured from settings.
|
||||
|
||||
## Changes in build 2016.07.08 (08/07/2016)
|
||||
|
||||
* Removed platform from "last seen" column in the friends list as it could cause some problems and it was being not so exact.
|
||||
* Now deleted audios are not parsed and displayed as "audio removed from library". They are silently ignored.
|
||||
* It's possible to open a friends timeline for others.
|
||||
* Fixed some strange bugs in the built version.
|
||||
* Deactivated accounts will not cause problems in friends lists. They will be displayed as deactivated, wich means that it'll be impossible to interact with those accounts.
|
||||
* When opened, the client will set online for the user account, it'll inform VK that this user is currently online. This parameter will be updated every 15 minutes, as stated in the API documentation. When exiting, Socializer will try to set the account as offline. Friends and other people could use this parameter to see if you are using VK in the moment.
|
||||
* When opened, the client will set online for the user account, it'll inform VK that this user is currently online. This parameter will be updated every 15 minutes, as stated in the API documentation.
|
||||
* When opened, socializer will try to create chat buffers for all unread messages.
|
||||
* Update some information on certain posts when an item is selected. For example, update the date of a post.
|
||||
* Read messages will be marked as read in the social network, so it'll cause that your friends could see that you have read the message and socializer will not load chat buffers with read messages at startup.
|
||||
@@ -18,6 +219,8 @@
|
||||
* Albums will be empty at startup. In order to get the album's audios, you'll have to navigate to the album and press the button "load". It'll load the needed information for displaying and playing the added songs
|
||||
* If the config is invalid (for example you changed email or phone in the VK site and didn't changed that in Socializer, or just entered invalid credentials), the program will display an error with instructions for fixing the problem.
|
||||
* Now is possible to press enter in the password or email/phone field and it'll do the action of the OK button.
|
||||
* If you have set russian as the main language in the VK site, you'll see names in genitive and instrumental cases in certain phrases.
|
||||
* Updated russian and spanish translations.
|
||||
|
||||
## Changes on build 2016.05.25
|
||||
|
||||
@@ -42,7 +245,4 @@
|
||||
* Added more options in the search audio dialog. Now users could use more parameters and searches will be more precise.
|
||||
* Added a new attachments' list. When a post is opened, this list will show up if there are attachments in the current post (attachments are audio, photos, video and links). You will be able to interact with the supported data (at the moment only photos, videos, audio and links are supported, more will be added in future).
|
||||
* Added a changelog file which could be opened from the help menu.
|
||||
* Added a preferences dialogue and a new application menu in the menu bar. From this dialogue you can change the number of items to be loaded for every buffer.
|
||||
|
||||
---
|
||||
© 2016, manuel cortéz.
|
||||
* Added a preferences dialogue and a new application menu in the menu bar. From this dialogue you can change the number of items to be loaded for every buffer.
|
||||
@@ -1,2 +0,0 @@
|
||||
Manuel E. Cortéz
|
||||
Valeria K
|
||||
@@ -2,7 +2,7 @@
|
||||
""" This script converts the hold documentation (saved in markdown files) in a python file with a list of strings to translate it using gettext."""
|
||||
|
||||
def prepare_documentation_in_file(fileSource, fileDest):
|
||||
""" This takes documentation written in a markdown file and put all the contents in a python file, to create a internationalized documentation.
|
||||
""" This takes documentation written in a markdown file and put all the contents in a python file, to create a translatable documentation.
|
||||
@fileSource str: A markdown(.md) file.
|
||||
@fileDest str: A file where this will put the new strings"""
|
||||
|
||||
@@ -18,11 +18,10 @@ def prepare_documentation_in_file(fileSource, fileDest):
|
||||
newvar = "_(u\"\"\"%s\"\"\"),\n" % (i[:-1])
|
||||
else:
|
||||
newvar = "_(u\"\"\"%s\"\"\"),\n" % (i)
|
||||
# print i[-1:]
|
||||
f2.write(newvar)
|
||||
f1.close()
|
||||
f2.write("]")
|
||||
f2.close()
|
||||
|
||||
|
||||
prepare_documentation_in_file("manual.md", "strings.py")
|
||||
prepare_documentation_in_file("manual.md", "strings.py")
|
||||
prepare_documentation_in_file("changelog.md", "changelog.py")
|
||||
@@ -1,20 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import markdown
|
||||
import os
|
||||
import shutil
|
||||
from codecs import open as _open
|
||||
import languageHandler
|
||||
languageHandler.setLanguage("en")
|
||||
import documentation_importer
|
||||
import strings
|
||||
import changelog
|
||||
|
||||
# the list of supported language codes of TW Blue
|
||||
languages = ["en", "es"]
|
||||
# the list of supported language codes
|
||||
languages = ["en", "ru", "es"]
|
||||
|
||||
def generate_document(language):
|
||||
import strings
|
||||
def generate_document(language, document_type="documentation"):
|
||||
reload(languageHandler)
|
||||
languageHandler.setLanguage(language)
|
||||
reload(strings)
|
||||
markdown_file = markdown.markdown("\n".join(strings.documentation[1:]), extensions=["markdown.extensions.toc"])
|
||||
if document_type == "documentation":
|
||||
translation_file = "socializer-documentation"
|
||||
languageHandler.setLanguage(language, translation_file)
|
||||
reload(strings)
|
||||
markdown_file = markdown.markdown("\n".join(strings.documentation[1:]), extensions=["markdown.extensions.toc"])
|
||||
title = strings.documentation[0][1:]
|
||||
filename = "manual.html"
|
||||
elif document_type == "changelog":
|
||||
translation_file = "socializer-documentation"
|
||||
languageHandler.setLanguage(language, translation_file)
|
||||
reload(changelog)
|
||||
markdown_file = markdown.markdown("\n".join(changelog.documentation[1:]), extensions=["markdown.extensions.toc"])
|
||||
title = changelog.documentation[0][1:]
|
||||
filename = "changelog.html"
|
||||
first_html_block = """<!doctype html>
|
||||
<html lang="%s">
|
||||
<head>
|
||||
@@ -23,20 +35,25 @@ def generate_document(language):
|
||||
</head>
|
||||
<body>
|
||||
<header><h1>%s</h1></header>
|
||||
""" % (language, strings.documentation[0], strings.documentation[0])
|
||||
""" % (language, title, title)
|
||||
first_html_block = first_html_block+ markdown_file
|
||||
first_html_block = first_html_block + "\n</body>\n</html>"
|
||||
if not os.path.exists(language):
|
||||
os.mkdir(language)
|
||||
mdfile = _open("%s/manual.html" % language, "w", encoding="utf-8")
|
||||
if not os.path.exists(os.path.join("documentation", language)):
|
||||
os.mkdir(os.path.join("documentation", language))
|
||||
mdfile = _open(os.path.join("documentation", language, filename), "w", encoding="utf-8")
|
||||
mdfile.write(first_html_block)
|
||||
mdfile.close()
|
||||
|
||||
def create_documentation():
|
||||
print("Creating documentation in the supported languages...\n")
|
||||
if not os.path.exists("documentation"):
|
||||
os.mkdir("documentation")
|
||||
if os.path.exists(os.path.join("documentation", "license.txt")) == False:
|
||||
shutil.copy(os.path.join("..", "license.txt"), os.path.join("documentation", "license.txt"))
|
||||
for i in languages:
|
||||
print("Creating documentation for: %s" % (i,))
|
||||
generate_document(i)
|
||||
generate_document(i, "changelog")
|
||||
print("Done")
|
||||
|
||||
create_documentation()
|
||||
@@ -80,7 +80,7 @@ def getAvailableLanguages():
|
||||
"""
|
||||
#Make a list of all the locales found in NVDA's locale dir
|
||||
l=[x for x in os.listdir("locales") if not x.startswith('.')]
|
||||
l=[x for x in l if os.path.isfile('locales/%s/LC_MESSAGES/socializer-doc.mo' % x)]
|
||||
l=[x for x in l if os.path.isfile('locales/%s/LC_MESSAGES/twblue-documentation.mo' % x)]
|
||||
#Make sure that en (english) is in the list as it may not have any locale files, but is default
|
||||
if 'en' not in l:
|
||||
l.append('en')
|
||||
@@ -117,7 +117,7 @@ def makePgettext(translations):
|
||||
return unicode(message)
|
||||
return pgettext
|
||||
|
||||
def setLanguage(lang):
|
||||
def setLanguage(lang, translation_file="socializer-documentation"):
|
||||
system = platform.system()
|
||||
global curLang
|
||||
try:
|
||||
@@ -127,10 +127,10 @@ def setLanguage(lang):
|
||||
localeName=locale.windows_locale[windowsLCID]
|
||||
else:
|
||||
localeName=locale.getlocale()[0]
|
||||
trans=gettext.translation('socializer-doc', localedir="locales", languages=[localeName])
|
||||
trans=gettext.translation(translation_file, localedir="locales", languages=[localeName])
|
||||
curLang=localeName
|
||||
else:
|
||||
trans=gettext.translation("socializer-doc", localedir="locales", languages=[lang])
|
||||
trans=gettext.translation(translation_file, localedir="locales", languages=[lang])
|
||||
curLang=lang
|
||||
localeChanged=False
|
||||
#Try setting Python's locale to lang
|
||||
@@ -150,7 +150,7 @@ def setLanguage(lang):
|
||||
LCID=localeNameToWindowsLCID(lang)
|
||||
ctypes.windll.kernel32.SetThreadLocale(LCID)
|
||||
except IOError:
|
||||
trans=gettext.translation("socializer-doc",fallback=True)
|
||||
trans=gettext.translation(translation_file,fallback=True)
|
||||
curLang="en"
|
||||
trans.install(unicode=True)
|
||||
# Install our pgettext function.
|
||||
|
||||
222
doc/manual.md
222
doc/manual.md
@@ -1,105 +1,185 @@
|
||||
socializer's manual
|
||||
# Socializer's manual
|
||||
|
||||
## Introduction
|
||||
|
||||
Socializer is an application to use [VK.com](https://vk.com) in an easy and accessible way with minimal CPU resource usage. Socializer will allow you to interact with the VK social network by giving you access to the most relevant features such as:
|
||||
|
||||
* Basic post creation in your wall (including photos).
|
||||
* Audio addition, removal, download and search.
|
||||
* audio albums management (create, delete and add audios).
|
||||
* Supports two factor authentication (2FA).
|
||||
* Post creation in user and community walls.
|
||||
* audio support.
|
||||
* Post comments.
|
||||
* like, unlike and repost other's posts.
|
||||
* Open other's timelines so you could track someone's friends, posts or audio files.
|
||||
* Open other's timelines so you could track their friends, posts, audio or video files.
|
||||
* Basic chat features.
|
||||
|
||||
Note: When new features are added to socializer they will be added to this section.
|
||||
## Usage
|
||||
|
||||
## Running
|
||||
In order to use socializer, you must have an account in the [VK](https://vk.com) website. The process for registering an account is very accessible and is not covered in this manual. In the documentation, it is assumed you have a registered account on VK and you are able to sign in in the website by providing your phone number or email address, and a password. You will require this data for signing in the application later.
|
||||
|
||||
If you are using a built version, unzip the file in a new directory with no special characters, and open the socializer.exe file. If you haven't configured your VK account, you will see a dialogue, just press yes and a new dialogue will prompt for an user email or phone number and the password for your account. Take into account that the provided information will be saved in a config file as plain text. This application will need your information for renegotiating the access token when it expires.
|
||||
## authorising the application
|
||||
|
||||
Note: Every time you grant access to socializer, probably You will receive an email from VK by telling you that someone has accessed to your account. It means that a new token has been negotiated between VK and socializer by using an authomatic process, you should ignore those advices, unless you receive an email when you are not logged in VK with socializer or other application. You can see your authorised applications in the configuration section in the VK website. New tokens are renegotiated every 24 hours.
|
||||
First of all, it's necessary to authorise the application so it can access your VK account and act on your behalf. The authorisation process is quite simple, and will be required only once. In order to start the authorisation process, you just need to run the executable file called "socializer.exe" (on some computers it will appear only as socializer, depending if windows explorer is set to display file extensions or not). You may like to place a Windows shortcut in your desktop for an easier access to the application.
|
||||
|
||||
If this is the first time you have launched socializer, you will see a message asking you whether socializer should connect through a proxy server, already configured in the application, or use the system network settings. This allows people from countries where VK is blocked to use the social network without having to look for a proxy server themselves. It is highly adviced to use the proxy server only if you are in need of it.
|
||||
|
||||
After the proxy message, you will see a new message dialog asking you to proceed with the account authorisation process. It consists in providing the authentication data you normally use to sign in VK. It is very important to know that this data will be stored in a folder called config, located in the same folder where the socializer files are. Your config folder is a very important storage for your authentication data, so you must be sure you never will share it with anyone, mostly because your data is stored as plain text (this will be fixed in a future release and your data will be properly encrypted). Socializer will need your authentication data for acting in your behalf and offering you a better experience that what it could do with a simple access token. You must provide your phone number or email address in the first text box, and your password in the second. When pressing OK, your data will be saved and the application will start to retrieve all the required information for showing your buffers. If you have two factor authentication configured in your account, you will see an additional dialog where you have to type the code provided by VK via SMS.
|
||||
|
||||
It is worth saying that whenever you change your password in the VK website, you will need to authorize Socializer again. When you open socializer after changing your password, you will see a message informing you of the problem and the application will be restarted, allowing you to write your new data and start the authorization again.
|
||||
|
||||
Once started, the application will start loading your data (posts, audio files, conversations, friends). When done, it will show you a notification indicating that the program is ready.
|
||||
|
||||
## General concepts
|
||||
|
||||
Before starting to describe Socializer's usage, we'll explain some concepts that will be used extensively throughout this manual.
|
||||
|
||||
### Buffer
|
||||
|
||||
A buffer is a list of items that will manage the data which arrives from VK, after being processed by the application. When you configure your account on Socializer and start it, many buffers are created. Each of them may contain some of the items which this program works with: Newsfeed posts, wall posts, audio and video files, documents, friendship requests and conversations. According to the buffer you are focusing, you will be able to do different actions with these items.
|
||||
|
||||
All buffers will be updated in one of the following ways:
|
||||
|
||||
* Periodically: Most buffers containing posts, audio or video files and people, will be updated periodically to reflect the new additions to them. Updates will be every 2 minutes for every buffer, so if you posted something and did not see the post in the buffer, you may need to wait a moment. There is an option, located in the buffer menu on the menu bar, which allows you to trigger a manual update in the current buffer.
|
||||
* Real time: Conversation buffers will be updated every time someone sends a message to you. When an user sends you a message, if there is not a conversation buffer created to receive the message, a new conversation buffer will be opened automatically and the message will be placed on it. If you already have an opened conversation for the user sending the message, the message will be placed at the end of the buffer. A different sound will indicate whether a new conversation has been opened or an existing buffer gets updated. Socializer will sort conversation buffers by placing buffers with unread messages at the top of the conversations section. When a buffer gets a new message, it will be moved automatically to the first place in the conversations category.
|
||||
|
||||
### item
|
||||
|
||||
An item is an element representing some data provided by VK. Items are separated in buffers which stores items of the same type: Audio buffers will contain only audio files, wall buffers will be full of wall posts. The only exception to this rule is the newsfeed buffer, which can contain different kind of items. Actions are available in a per-item basis, allowing certain items to be treated differently than others and showing different dialogs, depending in the kind of data VK sends for them. All items show a menu with their available actions by focusing them in the list and pressing the menu key or a right mouse click.
|
||||
|
||||
The following is a brief description of the kind of items socializer can work with, and what actions are available for those.
|
||||
|
||||
* Newsfeed post: It represents a post displayed in your "home" page on VK. It may contain a variety of information based in what you or your friends do. A newsfeed item may contain information about new audios added to your friend's library, new people added to friends, wall posts, reposts and new photos added. Depending on the kind of data VK has supplied, the item can open a dialog showing information about the post, a list displaying the people added to friends, or a dialog displaying information for every audio added to library. If a wall post contains a long message, only the first 140 characters will be displayed. You can open the post to read the full message in the dialog. Available options for this item are different depending in the information the item contains. You can open or view the profile of the user that generated the item, like, dislike or add a comment to a post.
|
||||
* Wall post: Represents a post in an user's wall. This post will be similar to wall posts displayed in the newsfeed. If a wall post contains a long message, only the first 140 characters will be displayed. You can open the post to read the full message in the dialog. When opened (by pressing enter or the open option in the associated menu), it will show a dialogue where you can read the message, see how many times the post has been viewed by other users, interact with attachment files (by searching the list and pressing enter in the focused attachment to open it), see the photos included in the post, read information related to likes and times the post has been shared, read and reply to comments. Additionally, you can share the post, indicate you like it, or add a comment. You can cycle through every item in the dialog by pressing tab.
|
||||
* Audio: It represents an audio uploaded to the VK'S platform. Actions available for this item are opening the audio in a dialog, add or remove it from your library, move the audio to a playlist, and play it. When opened, it will be displayed in a dialog allowing you to read the title of the song, artist name, duration and a few buttons: play, add or remove from your library and download. You can control playback of audio items from the buffer by using the player menu on the menu bar or the corresponding keyboard shortcuts. Additionally, it is possible to select multiple audios in the same buffer to perform specific actions on them, such as play, remove or add the selected audios to a playlist. In order to select multiple audios, press the spacebar in every audio item you want to select. You will hear a sound when an item is selected, and when you focus a selected audio. When you're done, press enter to play all the selected audios or use the context menu to see available actions. All actions will be applied in the selected audios.
|
||||
* Video: It represents a video uploaded to the VK'S platform. Actions available for this item are opening the video in your default web browser and move it to a video album. When opened, it will open a web browser and play the video automatically due to VK limitations in access to video files.
|
||||
* person: It contains information about a VK user, this item is present in all buffers under the "people" category. Actions available for this item are view user profile, send message and create a timeline, which is a special buffer to track all posts, friends, audios or videos owned by the user. When opened, it will display the profile of this user in a dialog and will provide actions to send a message to the user, or view other sections of her/his profile.
|
||||
* Message: A message appears only in conversation buffers and represents a chat message. It may include a list of attached files that will be displayed in a separated list. You can tab to that list (from the history) and press enter in the attached file you want to open. Chat items are marked as read automatically as soon as they are focused.
|
||||
|
||||
## Main interface
|
||||
|
||||
If you have used [TWBlue](https://github.com/manuelcortez/twblue) before, the socializer's interface is quite similar. Once you have authorised your account, you will see a window with the following elements:
|
||||
The graphical user interface of Socializer consists of a window containing:
|
||||
|
||||
* A tree view at the left of the window, where you will see the list of buffers. These buffers are divided in three categories, posts, music and people. You could expand each category for seeing the child buffers. There are some additional buffers, timelines and chats, wich will be filled with timelines for your friends or with chats, when you start or receive a chat session.
|
||||
* A button for making a post to your wall.
|
||||
* In audio buffers, Two buttons: Play and play all.
|
||||
* In audio album buffers, a button for loading music. By default, albums are empty, you have to press the load button for getting the album's items.
|
||||
* A list where you will see the posts for the currently selected buffer.
|
||||
* In people buffers, like the friends buffer, a button for sending a message to your friends. Pressing that button will cause a chat buffer to be created.
|
||||
* A status bar where the program will put some useful information about what it's doing at the moment.
|
||||
* And a menu bar.
|
||||
* a menu bar accomodating five menus (application, Me, buffer, player and help),
|
||||
* One tree view, where you can press the menu key or right mouse click to display a context menu which contains actions you can apply in the selected buffer,
|
||||
* One list of items, which also accepts the menu key to display actions available for the selected item,
|
||||
* Some buttons, depending which is the focused buffer.
|
||||
|
||||
When socializer starts, it will try to load your news items, wall, audios (your audios, recommended and populars) and friends. At the moment there are only a few supported actions for these items:
|
||||
The actions that are available for every item will be described later.
|
||||
|
||||
* Audio files: You can play the currently selected song, view the song's details (including lyrics, if available), add or remove from your library, and download it to a desired place in your hard drive. You can find audio files in your news feed or in your own audios buffers. You can find audios as post's attachments. You can create an audios timeline for displaying other's audios.
|
||||
* News feed's post: In your news feed buffer, you can press return in any post and socializer will open a new dialogue which can be different, depending in the kind of post you are when the return key was pressed. For example it will open the post if you are focusing a "normal" post, a list of people if you are in a post wich indicates that someone has added friends, an audio displayer if you are in a post wich indicates that someone has added an audio, etc.
|
||||
* Wall posts: It will show the post in a dialogue so you could interact with its attachments, view and post comments, or like/unlike/share the post.
|
||||
* You can send a message to someone by pressing the send message button in the buffer where you are, if available. Deactivated accounts cannot receive messages.
|
||||
In summary, the GUI contains two core components. These are the controls you will find while pressing the Tab key within the program's interface, and the different elements present on the menu bar.
|
||||
|
||||
### Making a post
|
||||
### Buttons in the application
|
||||
|
||||
When you press the post button, a new dialogue will show up. This dialogue allows you to post something in your wall. In this dialogue you have to write a message. You can translate your message and fix your spelling mistakes. Also you can post an URL address, socializer will try to add it as an attachment, so you will not have to worry about this. When you're ready, just press the send button and it'll be done.
|
||||
* Post: this button opens up a dialogue box to write a post in the wall of the focused user. For example, if you are in the "my wall" buffer you will send a post to your own wall, but if you are in an user timeline the post will be sent to the owner of the timeline. You can upload an attachment by pressing the "attach" button and choosing between uploading a photo, audio file or document in the dialog which will appear, check spelling or translate your message by selecting one of the available buttons in the dialogue box. In addition, you can tag a friend in your post by pressing the corresponding button for that purpose. Also it is possible to configure the privacy settings for your post by allowing all users or just your friends to read it. Press the send button to send the post.
|
||||
* Load buffer: Some buffers are created but not loaded in VK. These special buffers need to be loaded manually by pressing the load button. Once loaded, this kind of buffers will behave in the same way other buffers do. Examples of these buffers are audio and video albums, community walls, and the current user's documents
|
||||
* Play: In audio buffers, plays the focused song. In video buffers, this button will open a web browser for playing the focused video, due to a limitation VK placed to third party developers with videos.
|
||||
* Play all: In audio buffers, play all songs starting from the focused buffer, until the last item in the list.
|
||||
* Send message: Send a message to a friend, which will open a conversation buffer if it does not exist already. Conversation buffers contain a full conversation, accommodating chat messages, between the current user and someone else. You can type your message in the provided box and press enter to send it to your friend. Additionally, You can upload an attachment by pressing the "attach" button and choosing between uploading a photo, audio file or record a voice message in the dialog which will appear, and open attachments sent in the focused message by pressing tab and finding them in the attachments list.
|
||||
|
||||
If you want to add some photos, you can press the attach button, then press the kind of attachment you want to add. After this, select the file you want to add and you will see it in the list, once processed. When you are done with attachments, press the OK button, and continue with your post. When you are ready, press the send button. Your post could take some time to be published, depending in the amount of files you have added, but it should be displayed in your wall and newsfeed as soon as it is posted.
|
||||
Bear in mind that buttons will appear according to which actions are possible on the list you are browsing.
|
||||
|
||||
### Working with posts in news feed
|
||||
## Menus
|
||||
|
||||
You can press the return key in any post in your news feed for opening a new dialogue with some information. The information and dialogue will be different if you are viewing a friendship's notification (when someone has added some friends), an audio file, or a regular post.
|
||||
|
||||
If you open a regular post in your newsfeed, you will be able to see the comments in a list, indicate if you do like or dislike the post, repost or add a new comment. If the post has some attachments, you'll find a list populated with them, you can press return in an attachment to execute its default action, wich will be different depending on the kind of attachment that you are viewing.
|
||||
|
||||
For friend notifications, you can only view the new added friends in a list and there are some kind of posts that aren't handled. It should be improved.
|
||||
|
||||
Additionally, you can press the menu Key or the right click for displaying a menu with some quick actions available for the post you are focusing. These actions are different for every post type.
|
||||
|
||||
### Working with songs
|
||||
|
||||
Note: the following applies to audio timelines too.
|
||||
|
||||
If you want to play or view audio's details, you'll have to navigate to the tree view, and, using the down arrow, look for "my audios", "populars" or "Recommendations". You will see two more buttons, play and play all. The play button will play the currently selected audio, and the play all button will play audios in the current buffer, starting with the current selected item. You can go to the song's list, look for a desired song and press the play button, or Ctrl+return, which is a keyboard shorcut. Take in to account that there are some keyboard shorcuts that only work in the list of items.
|
||||
|
||||
You can play audio from any buffer, just press ctrl+return for making the audio playback possible.
|
||||
|
||||
If someone has added multiple audios at once to his library, you will see something like this in your newsfeed: "(friend) has added 4 audios: audio 1, audio2, audio3 and audio4". You can press return in the post for opening the audio's details dialogue, where you will be able to see a list with these audios. By default the first detected song is selected, which means that you could read its details by pressing tab, download or add it to your library. If you change the audio in the list, the information will be updated and you will see details and actions will take effect in the new selected audio.
|
||||
|
||||
When an audio file is playing, you can press f5 and f6 for decreasing and increasing volume, respectively, or control+shift+return for play/pause.
|
||||
|
||||
If you want to see some details for the selected audio file, you can do it by pressing the return key. You will be able to read some useful information (title, artist, duration and the lyric, if available). Also you will be able to download the song to your hard drive, you have to press the download button in the details' dialogue.
|
||||
|
||||
When the download starts, you can close the details dialogue and check the status bar in the main window for seeing the current progress.
|
||||
|
||||
Additionally, you can search for audios by using the menu bar, in the buffer menu, select search, then audio. It will display a dialog where you have to set your search preferences.
|
||||
|
||||
If you press the menu key, you will see a menu where you will be able to do some actions, for example, add the audio to an album, or add/remove the song from your library.
|
||||
|
||||
## menu Bar
|
||||
|
||||
You can go to the menu bar by pressing ALT. Right now, there are three menus, application, buffer and help:
|
||||
Visually, Towards the top of the main application window, A menu bar can be found which contains many of the same functions as listed in the previous section, together with some additional items. To access the menu bar, press the alt key. You will find five menus listed: application, Me, buffer, player and help. This section describes the items on each one of them.
|
||||
|
||||
### Application menu
|
||||
|
||||
* Create. Here you can create some things in VK. The only supported item at this moment is the audio album.
|
||||
* Delete: Removes items from the VK servers. The only supported item here is the audio album.
|
||||
* you can set your preferences by opening the preferences dialog located in this menu.
|
||||
* Create: opens a menu where you can create a new album. At the moment, only audio and video albums are supported.
|
||||
* Delete: opens a menu where you can delete an already existing album owned by yourself. Only audio and video albums are supported at this time.
|
||||
* blacklist: Opens a dialog which allows you to manage blocked people on VK.
|
||||
* Manage accounts: Opens up a dialogue from where you are able to add or delete an account in socializer. If you have more than an account, you will be asked at startup for the account you want to use in the application. You can use an account at once, but it is possible to have multiple accounts and switch between them by restarting the application.
|
||||
* Preferences: Opens a dialogue which lets you configure settings for the entire application.
|
||||
|
||||
### Me menu
|
||||
|
||||
* Profile: Opens a menu with several options to do in your profile:
|
||||
* View profile: Displays your profile in a dialog in the application.
|
||||
* Open in browser: Redirects you to your profile in vk.com.
|
||||
* Set status message: Opens up a dialog where you can write your status message. The status message is displayed in your profile and can contain up to 140 characters.
|
||||
|
||||
### Buffer menu
|
||||
|
||||
* new timeline: This option allows you to create a new timeline. This kind of buffers is capable of download all posts in an user's profile.
|
||||
* search: This submenu allows you to create a new buffer, at the moment, you can create only a kind of buffer, an audio search. The audio search will be located in the music category and will have the last 299 results of your query.
|
||||
* Update current buffer: perform an update operation in the selected buffer, which will retrieve the new items.
|
||||
* Load previous items: Get the previous items for the currently focused buffer.
|
||||
* Remove buffer: Tries to remove the current buffer. Default buffers can't be removed.
|
||||
* New timeline: Lets you open an user's timeline by choosing the user in a dialog box. You can choose which items you want to track: wall posts, videos, friends or audio items. It is created when you press enter. If you invoke this option relative to a user that has no items of the kind you specified, the operation will fail. If you try creating an existing timeline the program will warn you and will not create it again.
|
||||
* Search: Shows a menu where you can search for audios or videos on VK. Search results will be created in a new buffer inside "music" or "videos".
|
||||
* Update buffer: Performs a manual update operation in the buffer, which will retrieve all new items present in the social network since the last update.
|
||||
* Load previous items: This allows more items to be loaded for the specified buffer. Bear in mind that not all buffers support this setting.
|
||||
* Remove buffer: dismisses the list you're on, if possible.
|
||||
|
||||
The help menu is self explanatory.
|
||||
### Player menu
|
||||
|
||||
## Contributing
|
||||
* Play: Plays the currently focused audio item, if the current buffer contains audio files. If not, plays the focused audio in the "my music" buffer.
|
||||
* Play all: Plays all audio items in the current buffer or the "my music" buffer, starting by the currently focused audio item until the last audio in the list.
|
||||
* Stop: Stops audio playback.
|
||||
* Previous: Plays the previous audio in the buffer or the last item in the list, if the current audio was the first on the buffer.
|
||||
* Next: Plays the Next audio in the buffer or the first item in the list, if the current audio was the last on the buffer.
|
||||
* Shuffle: Plays all audios in the current buffer or the "my music" buffer shuffled.
|
||||
* Volume up: Increases volume by 5%.
|
||||
* Volume down: decreases volume by 5%.
|
||||
* Mute: Mutes audio playback, setting volume to 0%.
|
||||
|
||||
If you notice some errors in this document, or features that are not documented yet, you can suggest those changes by contacting me (more information can be find in the following section).
|
||||
### help menu
|
||||
|
||||
## contact
|
||||
* About Socializer: shows the credits of the program.
|
||||
* Documentation: opens up this file, where you can read some useful program concepts.
|
||||
* Check for updates: every time you open the program it automatically checks for new versions. If an update is available, it will ask you if you want to download the update. If you accept, the updating process will commence. When complete, Socializer will be restarted. This item checks for new updates without having to restart the application.
|
||||
* Changelog: opens up a document with the list of changes from the current version to the earliest.
|
||||
* Open logs directory: Opens windows explorer in the logs directory, useful to include your logs in a bug report.
|
||||
* Open config directory: Opens Windows explorer in your config directory.
|
||||
* Report an error: opens up a dialogue box to report a bug by completing a small number of fields. Pressing enter will send the report. If the operation doesn't succeed the program will display a warning.
|
||||
|
||||
If you have questions, don't esitate to contact me in [Twitter,](https://twitter.com/manuelcortez00) or sending me an email to manuel(at)manuelcortez(dot)net. Just replace the words in parentheses with the original signs.
|
||||
## Keyboard shortcuts
|
||||
|
||||
Socializer includes some keyboard shortcuts, available from any buffer. Here you have the list of the available shortcuts:
|
||||
|
||||
* Enter: Execute the default action for the focused item. It may be opening a post, view friends added by someone else, view audio details or opening an user profile. You need to be in the items list for using this key.
|
||||
* Alt+Up/down: Increase and decrease audio volume by 5%.
|
||||
* Control+P: Play/pause. If this is the firt time you press this keystroke, it will automatically play all items present in the focused buffer or in your audios.
|
||||
* control+Shift+P: Play all audio tracks. If the currently focused buffer does not contain audio items, it will play all items present in your audios buffer.
|
||||
* Alt+Left: Play the previous song.
|
||||
* Alt+Right: Play the next song.
|
||||
|
||||
## configuration
|
||||
|
||||
As described above, this application has a preferences dialogue accessible under the application menu. Here you have a brief description of the settings present in this dialogue.
|
||||
|
||||
### General tab
|
||||
|
||||
* Language: allows you to switch the interface language for socializer. The application must be restarted after changing the language.
|
||||
* Load images in posts: Allows you to specify whether you want socializer to display all images when opening a post, or not. This can be useful for people with slow connections or not needing images.
|
||||
* Use proxy: for countries where Vk is blocked by the internet providers, this settings allows socializer to connect via a proxy server already included in the application.
|
||||
* Update channel: allows you to specify how often you will receive updates for the program. There are two update channels available: Alpha channel, which contains unstable versions of the application and gets updates almost dayly, and stable, which contain tested and more stable versions of the program, but gets updates once in a month, approximately.
|
||||
|
||||
### Buffer settings tab
|
||||
|
||||
* Number of items to load for newsfeed and wall buffers: Allows you to specify how many items should be retrieved from VK in the newsfeed buffer and when opening walls for other users. Default is 50 items, and maximum is 100.
|
||||
* Number of items to load in video buffers: Allows you to specify how many items should be retrieved from VK in video buffers. Default is 50, maximum value is 200.
|
||||
* Number of items to load in conversation buffers: allows you to specify how many messages Socializer will retrieve when loading a conversation. Default is 50, maximum value is 200.
|
||||
|
||||
### Chat settings tab
|
||||
|
||||
* Show notifications when users are online/offline: These two checkboxes allows you to specify if you want socializer to notify you when someone is connected or disconnected in the VK network.
|
||||
* Notification type: This setting allows you to specify the notification type you prefer to use in socializer. The options are native and custom. Native notifications send a system notification every time someone is online or offline, while custom notifications play a sound and announce the notification in the screen reader only.
|
||||
|
||||
### Optional buffers tab
|
||||
|
||||
This section allows you to specify which buffers should be precreated every time socializer starts. This kind of buffers, namely audio playlists, video albums and communities, have a special way of being created. When a buffer of the previously mentioned types is created, the buffer is added to the corresponding section but no data is loaded from VK. In order to load the data for one of these buffers you have to press the load button present in the buffer. From this tab you can mark and unmark the buffers Socializer will create when it starts. By default, buffers for audio playlists, video albums and communities are not created automatically when Socializer starts.
|
||||
|
||||
## License and source code
|
||||
|
||||
Socializer is free software, licensed under the GNU GPL license, either version 2 or, at your option, any later version. You can view the license in the file named license.txt, or online at <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>.
|
||||
|
||||
The source code of the program is available at <https://code.manuelcortez.net/manuelcortez/socializer>.
|
||||
|
||||
## Contact
|
||||
|
||||
If you still have questions after reading this document, if you wish to collaborate to the project in some other way, or if you simply want to get in touch with the team, [join the Socializer's community in VK.](https://vk.com/socializer.club) You can also visit [The project website.](http://socializer.su)
|
||||
|
||||
## Credits
|
||||
|
||||
Socializer is developed and maintained by [Manuel Cortez.](https://manuelcortez.net)
|
||||
|
||||
We would also like to thank the translators of Socializer, who have allowed the spreading of the application.
|
||||
|
||||
* English: Manuel Cortéz.
|
||||
* Russian: Дарья Ратникова.
|
||||
|
||||
Special thanks to Дарья Ратникова, as she also manages the Socializer's community in VK, translates the website and the documentation into Russian.
|
||||
138
doc/strings.py
138
doc/strings.py
@@ -1,67 +1,95 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
documentation = [
|
||||
_(u"""socializer's manual """),
|
||||
_(u"""Socializer's manual """),
|
||||
"",_(u"""## Introduction"""),
|
||||
"",_(u"""Socializer is an application to use [VK.com](https://vk.com) in an easy and accessible way with minimal CPU resource usage. Socializer will allow you to interact with the VK social network by giving you access to the most relevant features such as:"""),
|
||||
"",_(u"""* Basic post creation in your wall (including photos)."""),
|
||||
_(u"""* Audio addition, removal, download and search."""),
|
||||
_(u"""* audio albums management (create, delete and add audios)."""),
|
||||
_(u"""* (limited) audio support. (*)"""),
|
||||
_(u"""* Post comments."""),
|
||||
_(u"""* like, unlike and repost other's posts."""),
|
||||
_(u"""* Open other's timelines so you could track someone's friends, posts or audio files."""),
|
||||
_(u"""* Open other's timelines so you could track their friends, posts or audio files."""),
|
||||
_(u"""* Basic chat features."""),
|
||||
"",_(u"""Note: When new features are added to socializer they will be added to this section."""),
|
||||
"",_(u"""## Running"""),
|
||||
"",_(u"""If you are using a built version, unzip the file in a new directory with no special characters, and open the socializer.exe file. If you haven't configured your VK account, you will see a dialogue, just press yes and a new dialogue will prompt for an user email or phone number and the password for your account. Take into account that the provided information will be saved in a config file as plain text. This application will need your information for renegotiating the access token when it expires."""),
|
||||
"",_(u"""Note: Every time you grant access to socializer, probably You will receive an email from VK by telling you that someone has accessed to your account. It means that a new token has been negotiated between VK and socializer by using an authomatic process, you should ignore those advices, unless you receive an email when you are not logged in VK with socializer or other application. You can see your authorised applications in the configuration section in the VK website. New tokens are renegotiated every 24 hours."""),
|
||||
"",_(u"""\* Audio support in socializer is limited due to the restrictions VK has decided to apply for third party applications on december 2016."""),
|
||||
"",_(u"""## Usage"""),
|
||||
"",_(u"""In order to use socializer, you must have an account in the [VK](https://vk.com) website. The process for registering an account is very accessible and is not covered in this manual. In the documentation, it is assumed you have a registered account on VK and you are able to sign in in the website by providing your phone number or email address, and a password. You will require this data for signing in the application later."""),
|
||||
"",_(u"""## authorising the application"""),
|
||||
"",_(u"""First of all, it's necessary to authorise the application so it can access your VK account and act on your behalf. The authorisation process is quite simple, and will be required only once. In order to start the authorisation process, you just need to run the executable file called "socializer.exe" (on some computers it will appear only as socializer, depending if windows explorer is set to display file extensions or not). You may like to place a Windows shortcut in your desktop for an easier access to the application."""),
|
||||
"",_(u"""If this is the first time you have launched socializer, you will see a message dialog asking you to proceed with the account authorisation process. It consists in providing the authentication data you normally use to sign in VK. It is very important to know that this data will be stored in a folder called config, located in the same folder where are the socializer files. Your config folder is a very important storage for your authentication data, so you must be sure you never will share it with anyone, mostly because your data is stored as plain text (this will be fixed in a future release and your data will be properly encrypted). Socializer will need your authentication data for acting in your behalf and offering you a better experience that what it could do with a simple access token. You must provide your phone number or email address in the first text box, and your password in the second. When pressing OK, your data will be saved and the application will start to retrieve all the required information for showing your buffers."""),
|
||||
"",_(u"""Once started, the application will start loading your data (posts, audio files, conversations, friends). When done, it will show you a notification indicating that the program is ready."""),
|
||||
"",_(u"""## General concepts"""),
|
||||
"",_(u"""Before starting to describe Socializer's usage, we'll explain some concepts that will be used extensively throughout this manual."""),
|
||||
"",_(u"""### Buffer"""),
|
||||
"",_(u"""A buffer is a list of items that will manage the data which arrives from VK, after being processed by the application. When you configure your account on Socializer and start it, many buffers are created. Each of them may contain some of the items which this program works with: Newsfeed posts, wall posts, audio and video files, friendship requests and conversations. According to the buffer you are focusing, you will be able to do different actions with these items."""),
|
||||
"",_(u"""All buffers will be updated in one of the following ways:"""),
|
||||
"",_(u"""* Periodically: Most buffers containing posts, audio or video files and people, will be updated periodically to reflect the new additions to them. Updates will be every 2 minutes for every buffer, so if you posted something and did not see the post in the buffer, you may need to wait a moment. There is an option, located in the buffer menu on the menu bar, which allows you to trigger a manual update in the current buffer."""),
|
||||
_(u"""* Real time: Conversation buffers will be updated every time someone sends a message to you. When an user sends you a message, if there is not a conversation buffer created to receive the message, a new conversation buffer will be opened automatically and the message will be placed on it. If you already have an opened conversation for the user sending the message, the message will be placed at the end of the buffer. A different sound will indicate whether a new conversation has been opened or an existing buffer gets updated."""),
|
||||
"",_(u"""### item"""),
|
||||
"",_(u"""An item is an element representing some data provided by VK. Items are separated in buffers which stores items of the same type: Audio buffers will contain only audio files, wall buffers will be full of wall posts. The only exception to this rule is the newsfeed buffer, which can contain different kind of items. Actions are available in a per-item basis, allowing certain items to be treated differently than others and showing different dialogs, depending in the kind of data VK sends for them. All items show a menu with their available actions by focusing them in the list and pressing the menu key or a right mouse click."""),
|
||||
"",_(u"""The following is a brief description of the kind of items socializer can work with, and what actions are available for those."""),
|
||||
"",_(u"""* Newsfeed post: It represents a post displayed in your "home" page on VK. It may contain a variety of information based in what you or your friends do. A newsfeed item may contain information about new audios added to your friend's library, new people added to friends, wall posts, reposts and new photos added. Depending on the kind of data VK has supplied, the item can open a dialog showing information about the post, a list displaying the people added to friends, or a dialog displaying information for every audio added to library. Take into account that it is not possible to play an audio item from the newsfeed buffer due to limits placed by VK, however, you may add it to your library and play it from your "my music" folder. If a wall post contains a long message, the first 140 characters will be displayed only. You can open the post to read the full message in the dialog. Available options for this item are different depending in the information the item contains. You can open or view the profile of the user that generated the item, like, dislike or add a comment to a post."""),
|
||||
_(u"""* Wall post: Represent a post in an user's wall. This posts will be similar to wall posts displayed in the newsfeed. If a wall post contains a long message, the first 140 characters will be displayed only. You can open the post to read the full message in the dialog. When opened (by pressing enter or the open option in the associated menu), it will show a dialogue where you can read the message, see and interact with attachment files (by searching the list and pressing enter in the focused attachment to open it), see the photos included in the post, read information related to likes and times the post has been shared, and read all comments. Additionally, you can share the post, indicate you like it, or add a comment. You can cycle through every item in the dialog by pressing tab."""),
|
||||
_(u"""* Audio: It represent an audio uploaded to the VK'S platform. Actions available for this item are only opening the audio in a dialog and play it due to limitations in access to audio features. When opened, it will be displayed in a dialog allowing you to read the title of the song, artist name, duration and a few buttons: play and download. You can control playback of audio items from the buffer by using the player menu on the menu bar."""),
|
||||
_(u"""* Video: It represent a video uploaded to the VK'S platform. Actions available for this item are opening the video in your default web browser and move it to a video album. When opened, it will open a web browser and play the video automatically due to VK limitations in access to video files."""),
|
||||
_(u"""* person: It contains information about a VK user, this item is present in all buffers under the "people" category. Actions available for this item are view user profile, send message and create a timeline, which is a special buffer to track all posts, friends or audios owned by the user. When opened, it will display the profile of this user in a dialog and will provide actions to send a message to the user, or view other sections of her/his profile."""),
|
||||
_(u"""* Message: A message appears only in conversation buffers and represents a chat message. It may include a list of attached files that will be displayed in a separated list. You can tab to that list (from the history) and press enter in the attached file you want to open. Chat items are marked as read automatically as soon as they are focused."""),
|
||||
"",_(u"""## Main interface"""),
|
||||
"",_(u"""If you have used [TWBlue](https://github.com/manuelcortez/twblue) before, the socializer's interface is quite similar. Once you have authorised your account, you will see a window with the following elements:"""),
|
||||
"",_(u"""* A tree view at the left of the window, where you will see the list of buffers. These buffers are divided in three categories, posts, music and people. You could expand each category for seeing the child buffers. There are some additional buffers, timelines and chats, wich will be filled with timelines for your friends or with chats, when you start or receive a chat session."""),
|
||||
_(u"""* A button for making a post to your wall."""),
|
||||
_(u"""* In audio buffers, Two buttons: Play and play all."""),
|
||||
_(u"""* In audio album buffers, a button for loading music. By default, albums are empty, you have to press the load button for getting the album's items."""),
|
||||
_(u"""* A list where you will see the posts for the currently selected buffer."""),
|
||||
_(u"""* In people buffers, like the friends buffer, a button for sending a message to your friends. Pressing that button will cause a chat buffer to be created."""),
|
||||
_(u"""* A status bar where the program will put some useful information about what it's doing at the moment."""),
|
||||
_(u"""* And a menu bar."""),
|
||||
"",_(u"""When socializer starts, it will try to load your news items, wall, audios (your audios, recommended and populars) and friends. At the moment there are only a few supported actions for these items:"""),
|
||||
"",_(u"""* Audio files: You can play the currently selected song, view the song's details (including lyrics, if available), add or remove from your library, and download it to a desired place in your hard drive. You can find audio files in your news feed or in your own audios buffers. You can find audios as post's attachments. You can create an audios timeline for displaying other's audios."""),
|
||||
_(u"""* News feed's post: In your news feed buffer, you can press return in any post and socializer will open a new dialogue which can be different, depending in the kind of post you are when the return key was pressed. For example it will open the post if you are focusing a "normal" post, a list of people if you are in a post wich indicates that someone has added friends, an audio displayer if you are in a post wich indicates that someone has added an audio, etc."""),
|
||||
_(u"""* Wall posts: It will show the post in a dialogue so you could interact with its attachments, view and post comments, or like/unlike/share the post."""),
|
||||
_(u"""* You can send a message to someone by pressing the send message button in the buffer where you are, if available. Deactivated accounts cannot receive messages."""),
|
||||
"",_(u"""### Making a post"""),
|
||||
"",_(u"""When you press the post button, a new dialogue will show up. This dialogue allows you to post something in your wall. In this dialogue you have to write a message. You can translate your message and fix your spelling mistakes. Also you can post an URL address, socializer will try to add it as an attachment, so you will not have to worry about this. When you're ready, just press the send button and it'll be done."""),
|
||||
"",_(u"""If you want to add some photos, you can press the attach button, then press the kind of attachment you want to add. After this, select the file you want to add and you will see it in the list, once processed. When you are done with attachments, press the OK button, and continue with your post. When you are ready, press the send button. Your post could take some time to be published, depending in the amount of files you have added, but it should be displayed in your wall and newsfeed as soon as it is posted."""),
|
||||
"",_(u"""### Working with posts in news feed"""),
|
||||
"",_(u"""You can press the return key in any post in your news feed for opening a new dialogue with some information. The information and dialogue will be different if you are viewing a friendship's notification (when someone has added some friends), an audio file, or a regular post."""),
|
||||
"",_(u"""If you open a regular post in your newsfeed, you will be able to see the comments in a list, indicate if you do like or dislike the post, repost or add a new comment. If the post has some attachments, you'll find a list populated with them, you can press return in an attachment to execute its default action, wich will be different depending on the kind of attachment that you are viewing."""),
|
||||
"",_(u"""For friend notifications, you can only view the new added friends in a list and there are some kind of posts that aren't handled. It should be improved."""),
|
||||
"",_(u"""Additionally, you can press the menu Key or the right click for displaying a menu with some quick actions available for the post you are focusing. These actions are different for every post type."""),
|
||||
"",_(u"""### Working with songs"""),
|
||||
"",_(u"""Note: the following applies to audio timelines too."""),
|
||||
"",_(u"""If you want to play or view audio's details, you'll have to navigate to the tree view, and, using the down arrow, look for "my audios", "populars" or "Recommendations". You will see two more buttons, play and play all. The play button will play the currently selected audio, and the play all button will play audios in the current buffer, starting with the current selected item. You can go to the song's list, look for a desired song and press the play button, or Ctrl+return, which is a keyboard shorcut. Take in to account that there are some keyboard shorcuts that only work in the list of items."""),
|
||||
"",_(u"""You can play audio from any buffer, just press ctrl+return for making the audio playback possible."""),
|
||||
"",_(u"""If someone has added multiple audios at once to his library, you will see something like this in your newsfeed: "(friend) has added 4 audios: audio 1, audio2, audio3 and audio4". You can press return in the post for opening the audio's details dialogue, where you will be able to see a list with these audios. By default the first detected song is selected, which means that you could read its details by pressing tab, download or add it to your library. If you change the audio in the list, the information will be updated and you will see details and actions will take effect in the new selected audio."""),
|
||||
"",_(u"""When an audio file is playing, you can press f5 and f6 for decreasing and increasing volume, respectively, or control+shift+return for play/pause."""),
|
||||
"",_(u"""If you want to see some details for the selected audio file, you can do it by pressing the return key. You will be able to read some useful information (title, artist, duration and the lyric, if available). Also you will be able to download the song to your hard drive, you have to press the download button in the details' dialogue."""),
|
||||
"",_(u"""When the download starts, you can close the details dialogue and check the status bar in the main window for seeing the current progress."""),
|
||||
"",_(u"""Additionally, you can search for audios by using the menu bar, in the buffer menu, select search, then audio. It will display a dialog where you have to set your search preferences."""),
|
||||
"",_(u"""If you press the menu key, you will see a menu where you will be able to do some actions, for example, add the audio to an album, or add/remove the song from your library."""),
|
||||
"",_(u"""## menu Bar"""),
|
||||
"",_(u"""You can go to the menu bar by pressing ALT. Right now, there are three menus, application, buffer and help:"""),
|
||||
"",_(u"""The graphical user interface of Socializer consists of a window containing:"""),
|
||||
"",_(u"""* a menu bar accomodating five menus (application, Me, buffer, player and help),"""),
|
||||
_(u"""* One tree view,"""),
|
||||
_(u"""* One list of items"""),
|
||||
_(u"""* Some buttons, depending which is the focused buffer."""),
|
||||
"",_(u"""The actions that are available for every item will be described later."""),
|
||||
"",_(u"""In summary, the GUI contains two core components. These are the controls you will find while pressing the Tab key within the program's interface, and the different elements present on the menu bar."""),
|
||||
"",_(u"""### Buttons in the application"""),
|
||||
"",_(u"""* Post: this button opens up a dialogue box to write a post in your wall. For the moment, only posting in your own wall is supported. You can upload a picture by pressing the "attach" button and the photo button in the dialog which will appear, check spelling or translate your message by selecting one of the available buttons in the dialogue box. In addition, you can tag a friend in your post by pressing the corresponding button for that purpose. Also it is possible to configure the privacy settings for your post by allowing all users or just your friends to read it. Press the send button to send the post."""),
|
||||
_(u"""* Play: In audio buffers, plays the focused song. In video buffers, this button will open a web browser for playing the focused video, due to a limitation VK placed to third party developers with videos."""),
|
||||
_(u"""* Play all: In audio buffers, play all songs starting from the focused buffer, until the last item in the list."""),
|
||||
_(u"""* Send message: Send a message to a friend, which will open a conversation buffer if it does not exist already. Conversation buffers contain a full conversation, accommodating chat messages, between the current user and someone else. You can type your message in the provided box and press enter to send it to your friend. Additionally, you can add an attachment (for the moment, only attaching an audio file from your library is supported) and open attachments sent in the focused message by pressing tab and finding them in the attachments list."""),
|
||||
"",_(u"""Bear in mind that buttons will appear according to which actions are possible on the list you are browsing."""),
|
||||
"",_(u"""## Menus"""),
|
||||
"",_(u"""Visually, Towards the top of the main application window, can be found a menu bar which contains many of the same functions as listed in the previous section, together with some additional items. To access the menu bar, press the alt key. You will find five menus listed: application, Me, buffer, player and help. This section describes the items on each one of them."""),
|
||||
"",_(u"""### Application menu"""),
|
||||
"",_(u"""* Create. Here you can create some things in VK. The only supported item at this moment is the audio album."""),
|
||||
_(u"""* Delete: Removes items from the VK servers. The only supported item here is the audio album."""),
|
||||
_(u"""* you can set your preferences by opening the preferences dialog located in this menu."""),
|
||||
"",_(u"""* Create: opens a menu where you can create a new album. At the moment, only video albums are supported."""),
|
||||
_(u"""* Delete: opens a menu where you can delete an already existing album owned by yourself. Only video albums are supported at this time."""),
|
||||
_(u"""* Preferences: Opens a dialogue which lets you configure settings for the entire application."""),
|
||||
"",_(u"""### Me menu"""),
|
||||
"",_(u"""* Profile: Opens a menu with several options to do in your profile:"""),
|
||||
_(u""" * View profile: Displays your profile in a dialog in the application."""),
|
||||
_(u""" * Open in browser: Redirects you to your profile in vk.com."""),
|
||||
"",_(u"""### Buffer menu"""),
|
||||
"",_(u"""* new timeline: This option allows you to create a new timeline. This kind of buffers is capable of download all posts in an user's profile."""),
|
||||
_(u"""* search: This submenu allows you to create a new buffer, at the moment, you can create only a kind of buffer, an audio search. The audio search will be located in the music category and will have the last 299 results of your query."""),
|
||||
_(u"""* Update current buffer: perform an update operation in the selected buffer, which will retrieve the new items."""),
|
||||
_(u"""* Load previous items: Get the previous items for the currently focused buffer."""),
|
||||
_(u"""* Remove buffer: Tries to remove the current buffer. Default buffers can't be removed."""),
|
||||
"",_(u"""The help menu is self explanatory."""),
|
||||
"",_(u"""## Contributing"""),
|
||||
"",_(u"""If you notice some errors in this document, or features that are not documented yet, you can suggest those changes by contacting me (more information can be find in the following section)."""),
|
||||
"",_(u"""## contact"""),
|
||||
"",_(u"""If you have questions, don't esitate to contact me in [Twitter,](https://twitter.com/manuelcortez00) or sending me an email to manuel(at)manuelcortez(dot)net. Just replace the words in parentheses with the original signs."""),
|
||||
"",_(u"""* New timeline: Lets you open a user's timeline by choosing the user in a dialog box. You can choose which items you want to track: wall posts, friends or audio items. It is created when you press enter. If you invoke this option relative to a user that has no items of the kind you specified, the operation will fail. If you try creating an existing timeline the program will warn you and will not create it again."""),
|
||||
_(u"""* Search: Shows a menu where you can search for audios or videos on VK. Search results will be created in a new buffer inside "music" or "videos"."""),
|
||||
_(u"""* Update buffer: Performs a manual update operation in the buffer, which will retrieve all new items present in the social network since the last update."""),
|
||||
_(u"""* Load previous items: This allows more items to be loaded for the specified buffer. Bear in mind that not all buffers support this setting."""),
|
||||
_(u"""* Destroy: dismisses the list you're on, if possible."""),
|
||||
"",_(u"""### Player menu"""),
|
||||
"",_(u"""* Play: Plays the currently focused audio item, if the current buffer contains audio files. If not, plays the focused audio in the "my music" buffer."""),
|
||||
_(u"""* Play all: Plays all audio items in the current buffer or the "my music" buffer, starting by the currently focused audio item until the last audio in the list."""),
|
||||
_(u"""* Stop: Stops audio playback."""),
|
||||
_(u"""* Previous: Plays the previous audio in the buffer or the last item in the list, if the current audio was the first on the buffer."""),
|
||||
_(u"""* Next: Plays the Next audio in the buffer or the first item in the list, if the current audio was the last on the buffer."""),
|
||||
_(u"""* Shuffle: Plays all audios in the current buffer or the "my music" buffer shuffled."""),
|
||||
_(u"""* Volume up: Increases volume by 5%."""),
|
||||
_(u"""* Volume down: decreases volume by 5%."""),
|
||||
_(u"""* Mute: Mutes audio playback, setting volume to 0%."""),
|
||||
"",_(u"""### help menu"""),
|
||||
"",_(u"""* About Socializer: shows the credits of the program."""),
|
||||
_(u"""* Documentation: opens up this file, where you can read some useful program concepts."""),
|
||||
_(u"""* Check for updates: every time you open the program it automatically checks for new versions. If an update is available, it will ask you if you want to download the update. If you accept, the updating process will commence. When complete, Socializer will be restarted. This item checks for new updates without having to restart the application."""),
|
||||
_(u"""* Changelog: opens up a document with the list of changes from the current version to the earliest."""),
|
||||
"",_(u"""## Keyboard shortcuts"""),
|
||||
"",_(u"""## configuration"""),
|
||||
"",_(u"""### The general tab"""),
|
||||
"",_(u"""### The chats tab"""),
|
||||
"",_(u"""## License and source code"""),
|
||||
"",_(u"""Socializer is free software, licensed under the GNU GPL license, either version 2 or, at your option, any later version. You can view the license in the file named license.txt, or online at <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>."""),
|
||||
"",_(u"""The source code of the program is available at <https://code.manuelcortez.net/manuelcortez/socializer>."""),
|
||||
"",_(u"""## Contact"""),
|
||||
"",_(u"""If you still have questions after reading this document, if you wish to collaborate to the project in some other way, or if you simply want to get in touch with the application developer, follow the VK account of [Manuel Cortez.](https://vk.com/manuelcortez) You can also visit [The project website.](https://manuelcortez.net/socializer)"""),
|
||||
"",_(u"""## Credits"""),
|
||||
"",_(u"""Socializer is developed and mantained by [Manuel Cortez,](https://manuelcortez.net) with contributions by [Anibal Hernandez](https://dragodark.com)"""),
|
||||
"",_(u"""We would also like to thank the translators of Socializer, who have allowed the spreading of the application."""),
|
||||
"",_(u"""* English: Manuel Cortéz."""),
|
||||
_(u"""* Spanish: Manuel Cortéz."""),
|
||||
_(u"""* Russian: Valeria K."""),
|
||||
]
|
||||
@@ -1,14 +0,0 @@
|
||||
#! /usr/bin/env python# -*- coding: iso-8859-1 -*-
|
||||
import shutil
|
||||
|
||||
def create_build():
|
||||
os.chdir("../src")
|
||||
print "Current path is {0}".format(os.getcwd())
|
||||
subprocess.call(["C:\python27x86\python.exe", "setup.py", "py2exe"])
|
||||
|
||||
def create_archive():
|
||||
print "Creating zip archive..."
|
||||
shutil.make_archive("socializer-nightly-build", "zip", "socializer")
|
||||
shutil.rmtree("socializer")
|
||||
|
||||
create_archive()
|
||||
Binary file not shown.
26
requirements.txt
Normal file
26
requirements.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
# Stay in wxPython 4.0.3 because 4.0.4 has some regressions in accessibility related components.
|
||||
wxpython==4.0.3
|
||||
pywin32
|
||||
pyenchant
|
||||
markdown
|
||||
# For the moment we will use the modified vk_api version that does not try to include enum34 and
|
||||
# already fixed the caption for wall uploaded photos.
|
||||
# Hopefully I can uncomment this in the near future when my changes will get merged upstream.
|
||||
#vk_api
|
||||
bs4
|
||||
configobj
|
||||
pypubsub
|
||||
requests-oauthlib
|
||||
future
|
||||
arrow
|
||||
backports.functools_lru_cache
|
||||
yandex.translate
|
||||
mutagen
|
||||
mock
|
||||
# forked repositories previously found at http://q-continuum.net
|
||||
git+https://code.manuelcortez.net/manuelcortez/libloader
|
||||
git+https://code.manuelcortez.net/manuelcortez/platform_utils
|
||||
git+https://github.com/chrisnorman7/sound_lib
|
||||
git+https://code.manuelcortez.net/manuelcortez/accessible_output2
|
||||
# Modified vk_api.
|
||||
git+https://github.com/manuelcortez/vk_api
|
||||
@@ -2,6 +2,6 @@
|
||||
echo Generating file list..
|
||||
dir ..\src\*.py /L /B /S > %TEMP%\listfile.txt
|
||||
echo Generating .POT file...
|
||||
xgettext --language=Python -o socializer.pot --keyword=_ -d socializer -f %TEMP%\listfile.txt -c --no-location --no-wrap
|
||||
xgettext --language=Python --from-code=utf-8 -o socializer.pot --keyword=_ -d socializer -f %TEMP%\listfile.txt -c --no-location --no-wrap
|
||||
del %TEMP%\listfile.txt
|
||||
echo Done.
|
||||
|
||||
20
scripts/prepare_zipversion.py
Normal file
20
scripts/prepare_zipversion.py
Normal file
@@ -0,0 +1,20 @@
|
||||
#! /usr/bin/env python# -*- coding: iso-8859-1 -*-
|
||||
import shutil
|
||||
import os
|
||||
import sys
|
||||
|
||||
def create_archive():
|
||||
os.chdir("..\\src")
|
||||
print("Creating zip archive...")
|
||||
if sys.version[0] == "3":
|
||||
folder = "dist/main"
|
||||
else:
|
||||
folder = "dist"
|
||||
shutil.make_archive("socializer", "zip", folder)
|
||||
# if os.path.exists("dist"):
|
||||
# shutil.rmtree("dist")
|
||||
if os.path.exists("build"):
|
||||
shutil.rmtree("build")
|
||||
os.chdir("..\\scripts")
|
||||
|
||||
create_archive()
|
||||
@@ -8,19 +8,325 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-06-29 13:33-0500\n"
|
||||
"POT-Creation-Date: 2019-01-19 10:28-0600\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"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
msgid "# Changelog"
|
||||
msgstr ""
|
||||
|
||||
msgid "## changes in this version"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Changed authentication tokens in Socializer. It is mandatory to download a fresh copy of socializer and start a new configuration for your account."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Stable versions of Socializer are built with Python 3. Previous versions are built with Python 2, however support for Python 2 will be dropped very soon."
|
||||
msgstr ""
|
||||
|
||||
msgid "* There is an installer file for Socializer, available in our downloads page. Installed version of Socializer will be more confortable for some people."
|
||||
msgstr ""
|
||||
|
||||
msgid "* For users from countries where VK is not allowed, Socializer includes a proxy to bypass country restrictions. The first time you start socializer, it will ask you whether you need a proxy or not. It is suggested to use a proxy only if you need it."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Now it is possible to post in someone else's wall. When viewing a timeline of an user, the \"post\" button will post in his/her wall. To post in your own wall, you'll need to go to the newsfeed or your own wall and press the post button."
|
||||
msgstr ""
|
||||
|
||||
msgid "* If you are not allowed to post in someone's wall, the post button will not be visible."
|
||||
msgstr ""
|
||||
|
||||
msgid "* A new option for deleting wall posts has been added to the context menu in newsfeed and walls (current user's wall and timelines). This option will be visible only if the current user is allowed to delete the focused post."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Socializer will be able to handle all users correctly. Before, if an user that was not present in the local storage system was needed, the program was displaying \"no specified user\". ([#17,](https://code.manuelcortez.net/manuelcortez/socializer/issues/17))"
|
||||
msgstr ""
|
||||
|
||||
msgid "* It is possible to use user domains (short names for users) to create timelines. Just write @username and the program will create the needed timeline, regardless if the user is present in your friend list. ([#18,](https://code.manuelcortez.net/manuelcortez/socializer/issues/18))"
|
||||
msgstr ""
|
||||
|
||||
msgid "* When displaying someone's profile, the dialog should be loaded dramatically faster than before. A message will be spoken when all data of the profile is loaded."
|
||||
msgstr ""
|
||||
|
||||
msgid "* When opening a timeline, if the current user is not allowed to do it, an error message should be displayed and the buffer will not be created. Before the buffer was partially created in the main window. ([#22.](https://code.manuelcortez.net/manuelcortez/socializer/issues/22))"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added basic support to handle group chats. At the current moment it is possible to receive and reply to chat messages only. Chat groups will be placed inside the conversations section. ([#23.](https://code.manuelcortez.net/manuelcortez/socializer/issues/23))"
|
||||
msgstr ""
|
||||
|
||||
msgid "* It is possible to delete a conversation buffer from the buffer menu. Deleting a conversation will only dismiss the buffer, no data is deleted at VK."
|
||||
msgstr ""
|
||||
|
||||
msgid "* During the first start of Socializer, an invitation will be shown to join the Socializer's group in case the current user is not already a member."
|
||||
msgstr ""
|
||||
|
||||
msgid "* It is possible to see how many people has read a wall post when showing it in the dialog. ([#28.](https://code.manuelcortez.net/manuelcortez/socializer/issues/28))"
|
||||
msgstr ""
|
||||
|
||||
msgid "* A new tab has been added to the preferences dialog. From the new section, it is possible to control whether socializer should create buffers for the first 1000 audio albums, video albums and communities when starting."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added functionality regarding comments in wall posts:"
|
||||
msgstr ""
|
||||
|
||||
msgid " * when reading a post, you can press enter in any comment to display a dialog from where it is possible to view attachments, translate, check spelling or reply to the thread. If there are replies made to this comment, these will be visible in a section called replies. Pressing enter in a reply will also open the same dialog."
|
||||
msgstr ""
|
||||
|
||||
msgid " * A new \"replies\" field has been added to the comments' list."
|
||||
msgstr ""
|
||||
|
||||
msgid " * When writing a comment, it is possible to do the same actions available for a post (translate, spell checking and adding attachments)."
|
||||
msgstr ""
|
||||
|
||||
msgid "## Changes in version 0.17 (01.01.2019)"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added support for Two factor authentication (2FA). ([#13,](https://code.manuelcortez.net/manuelcortez/socializer/issues/13))"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added update channels in socializer. You can subscribe to the \"stable\" or \"alpha\" channel from the preferences dialog and you will receive updates published for those:"
|
||||
msgstr ""
|
||||
|
||||
msgid " * The stable channel will have releases every month, approximately, and is the channel where the code will be more tested and with less bugs. All support and help will be provided for the stable versions only."
|
||||
msgstr ""
|
||||
|
||||
msgid " * The alpha channel will have releases every time a change is added to socializer, it may even include several releases in the same day, but we will try to release only a new version every day. Support will not be provided for alpha versions, as they will be used to test the latest code in the application."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Now it is possible to send voice messages from socializer. Voice messages are available from the \"add\" button in any conversation buffer."
|
||||
msgstr ""
|
||||
|
||||
msgid "* tokens generated by socializer will never expire. ([#3,](https://code.manuelcortez.net/manuelcortez/socializer/issues/3))"
|
||||
msgstr ""
|
||||
|
||||
msgid "* In order to use all methods available in VK, socializer will use tokens of kate mobile for Android. It means you may receive an email by saying that you've authorised Kate for accessing your account from an Android device."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Audio albums are loaded correctly."
|
||||
msgstr ""
|
||||
|
||||
msgid "* It is possible to play audios added by friends appearing in the news feed."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Adding and removing an audio file to your library works."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Unread messages will play a sound when focused."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Unread messages will be marked as read when user focuses them."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Socializer will handle restricted audio tracks. Restricted songs are not allowed to be played in the user's country. Before, playing a restricted track was generating an exception and playback could not resume. Now, playing an audio track will display an error notification."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Fixed an error when people were trying to open a post in an empty buffer, or accessing the menu when there are no posts in the buffer."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Now Socializer will not send a notification every 5 minutes."
|
||||
msgstr ""
|
||||
|
||||
msgid "* the chat widget now is a multiline text control. It means it is possible to add a new line by pressing shift+Enter, and send the message by pressing enter."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Socializer should handle connection errors when loading items in buffers and retry in 2 minutes. Also, connection errors in the chat server are handled and chat should be able to reconnect by itself."
|
||||
msgstr ""
|
||||
|
||||
msgid "* When trying to add an audio or video to an album, if the current user does not have any album, it will display an error instead of a traceback."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added popular and suggested songs. This will not work when using alternative tokens."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Now it is possible to update the status message, located in your profile."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Now it is possible to upload an audio from your computer when adding attachments in a wall post. When adding attachments to a post or message in a conversation, you will have two options: upload from your computer and add a file from your VK profile."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Updated Russian translation: thanks to Дарья Ратникова."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Fixed some conditions, especially when rendering items in feeds, that were making the client to crash."
|
||||
msgstr ""
|
||||
|
||||
msgid "* new versions will include documentation and changelog."
|
||||
msgstr ""
|
||||
|
||||
msgid "* A new option for reporting issues directly from the help menu has been added. Issues will be publicly available in the [Project Issues page](https://code.manuelcortez.net/manuelcortez/socializer/issues)"
|
||||
msgstr ""
|
||||
|
||||
msgid "## Changes in version 0.16 (13.12.2018)"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added two more buffers: \"Pending requests\" and \"I follow\", located in the people buffer, under \"friendship requests\"."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added an experimental photo viewer. Will show options for displaying the next and previous photo if the current post contains multiple images. Fullscreen button still doesn't work."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Improved the chat features present in the application. Read documentation to get a full understanding about how it works now."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added video management (my videos, video albums and video search). For playing videos, you will be redirected to a website in your browser due to the VK'S policy."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added a setting that allows you to specify if you want socializer to load images when you are opening posts. It could be useful for slow connections or those who don't want images to be loaded."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added basic tagging for users in posts and comments. You can tag only people in your friends buffer."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added a basic user profile viewer."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added support for listening voice messages in chats. Currently it is not possible to send them."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Fixed an error that was making Socializer unable to display chat history properly. It was showing the first 200 items in a conversation instead the last 200 items. Now chat will be displayed accordingly."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Changed the chat history widget from list of items to a read only text box, similar to how it was displayed in skype. Now the widget should be fully visible and messages will work in the same way."
|
||||
msgstr ""
|
||||
|
||||
msgid "* It is possible to play songs sent in a chat message by opening them from the attachments panel."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Reimplemented most of the audio playback methods (audio albums buffer still not working)."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added some notifications and chat notifications when friends are online and offline. Most notifications can be configured from settings."
|
||||
msgstr ""
|
||||
|
||||
msgid "## Changes in build 2016.07.08 (08/07/2016)"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Removed platform from \"last seen\" column in the friends list as it could cause some problems and it was being not so exact."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Now deleted audios are not parsed and displayed as \"audio removed from library\". They are silently ignored."
|
||||
msgstr ""
|
||||
|
||||
msgid "* It's possible to open a friends timeline for others."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Fixed some strange bugs in the built version."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Deactivated accounts will not cause problems in friends lists. They will be displayed as deactivated, wich means that it'll be impossible to interact with those accounts."
|
||||
msgstr ""
|
||||
|
||||
msgid "* When opened, the client will set online for the user account, it'll inform VK that this user is currently online. This parameter will be updated every 15 minutes, as stated in the API documentation."
|
||||
msgstr ""
|
||||
|
||||
msgid "* When opened, socializer will try to create chat buffers for all unread messages."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Update some information on certain posts when an item is selected. For example, update the date of a post."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Read messages will be marked as read in the social network, so it'll cause that your friends could see that you have read the message and socializer will not load chat buffers with read messages at startup."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Included a brief manual in the help menu. Currently available only in English."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Included a context menu in list items. Currently there are functions not available. Menu for chat buffers is not implemented yet."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Implemented audio album load (in the music buffer), creation (in the application menu) and deletion (in the application menu, too)."
|
||||
msgstr ""
|
||||
|
||||
msgid "* audios can be moved to albums by pressing the menu key or doing a right click in the item, and selecting \"move to album\". Audios will be added to the album in the next update (there is a programmed update every 3 minutes), or you can update the buffer manually (from the buffer menu in the menu bar). This option will be available in audio buffers (searches, popular and recommended audio buffers, and audio timelines)."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Albums will be empty at startup. In order to get the album's audios, you'll have to navigate to the album and press the button \"load\". It'll load the needed information for displaying and playing the added songs "
|
||||
msgstr ""
|
||||
|
||||
msgid "* If the config is invalid (for example you changed email or phone in the VK site and didn't changed that in Socializer, or just entered invalid credentials), the program will display an error with instructions for fixing the problem."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Now is possible to press enter in the password or email/phone field and it'll do the action of the OK button."
|
||||
msgstr ""
|
||||
|
||||
msgid "* If you have set russian as the main language in the VK site, you'll see names in genitive and instrumental cases in certain phrases."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Updated russian and spanish translations."
|
||||
msgstr ""
|
||||
|
||||
msgid "## Changes on build 2016.05.25"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added grouped controls in the audio searches dialogue. It will be more accessible so screen readers could detect and read the label for radio buttons."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added documents to the list of supported attachments in the post viewer. The action for this kind of attachments is to open the default web browser, pointing to the URL address of that file."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Now It's possible to add photos to the wall, by uploading files to the VK servers. Check the attachments button in the new post dialogue for this. Basically it is possible to add some photos and when the post is sent, photos will start to be uploaded before. At the moment it is not possible to add descriptions to photos. Take in to account that photos will be uploaded when the send button is pressed and the post could take some time before being posted."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added a new option to the menu bar: new timeline. It allows to create a special buffer for a selected user. This buffer could be an audio or wall buffer, when created, the buffer will be updated with items for the specified user or community."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added an user selection control. In dialogues where an user must be selected, there will be an edit box with a selected name. You need to start writing for changing this name, or just press the down arrow for looking in the users' database. You can start writing and then press the down arrow, so you will see the closest result to the name you was writing. For example if you want to write manuel, you could write m, a, n, u, and press the down arrow, and you will see the full name in the edit box. Take in to account that you have to make sure that you write a valid user name in the box, otherwise you will see an error."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"* Posts from twitter are displayed in a better way (newline characters (\n"
|
||||
") are handled properly instead being displayed)."
|
||||
msgstr ""
|
||||
|
||||
msgid "* In the play all function, everything should be cleaned before start the new playback."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Now links included in text of a comment are included as attachments (links are \"untitled\" because it isn't possible to retrieve information for every link without performance issues). This is especially useful when someone posts a link from Twitter."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Chat support: There is a new kind of buffer, named chat buffer, wich allows you to have a conversation with someone of your friends. If you receive a message while socializer is opened it will create a chat buffer under chats with the last 200 messages between you and your friend. You can send a message by writing in the edit box and pressing send or enter. At the moment chats buffers can't be removed. Will be added this possibility in the near future."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added your friendlist as a buffer. You can create chats from there by using the send message button."
|
||||
msgstr ""
|
||||
|
||||
msgid "## Changes for build 2016.04.5 (5/04/2016)"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Fixed minor bugs in the likes button for posts."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Now it's possible to open wall posts by pressing enter, as newsfeeds' posts."
|
||||
msgstr ""
|
||||
|
||||
msgid "* It's possible to see reposts in the news and wall buffers, and the post displayer (when you press enter in a post) shows the full post story."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added \"load previous items\" in the main menu. It should work for wall and news feed. This feature is not available in audio buffers due to API limits."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added more options in the search audio dialog. Now users could use more parameters and searches will be more precise."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added a new attachments' list. When a post is opened, this list will show up if there are attachments in the current post (attachments are audio, photos, video and links). You will be able to interact with the supported data (at the moment only photos, videos, audio and links are supported, more will be added in future)."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added a changelog file which could be opened from the help menu."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Added a preferences dialogue and a new application menu in the menu bar. From this dialogue you can change the number of items to be loaded for every buffer."
|
||||
msgstr ""
|
||||
|
||||
#. Translators: the label for the Windows default NVDA interface language.
|
||||
msgid "User default"
|
||||
msgstr ""
|
||||
|
||||
msgid "socializer's manual "
|
||||
msgid "# Socializer's manual "
|
||||
msgstr ""
|
||||
|
||||
msgid "## Introduction"
|
||||
@@ -29,13 +335,13 @@ msgstr ""
|
||||
msgid "Socializer is an application to use [VK.com](https://vk.com) in an easy and accessible way with minimal CPU resource usage. Socializer will allow you to interact with the VK social network by giving you access to the most relevant features such as:"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Supports two factor authentication (2FA)."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Basic post creation in your wall (including photos)."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Audio addition, removal, download and search."
|
||||
msgstr ""
|
||||
|
||||
msgid "* audio albums management (create, delete and add audios)."
|
||||
msgid "* audio support."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Post comments."
|
||||
@@ -44,170 +350,317 @@ msgstr ""
|
||||
msgid "* like, unlike and repost other's posts."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Open other's timelines so you could track someone's friends, posts or audio files."
|
||||
msgid "* Open other's timelines so you could track their friends, posts or audio files."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Basic chat features."
|
||||
msgstr ""
|
||||
|
||||
msgid "Note: When new features are added to socializer they will be added to this section."
|
||||
msgid "## Usage"
|
||||
msgstr ""
|
||||
|
||||
msgid "## Running"
|
||||
msgid "In order to use socializer, you must have an account in the [VK](https://vk.com) website. The process for registering an account is very accessible and is not covered in this manual. In the documentation, it is assumed you have a registered account on VK and you are able to sign in in the website by providing your phone number or email address, and a password. You will require this data for signing in the application later."
|
||||
msgstr ""
|
||||
|
||||
msgid "If you are using a built version, unzip the file in a new directory with no special characters, and open the socializer.exe file. If you haven't configured your VK account, you will see a dialogue, just press yes and a new dialogue will prompt for an user email or phone number and the password for your account. Take into account that the provided information will be saved in a config file as plain text. This application will need your information for renegotiating the access token when it expires."
|
||||
msgid "## authorising the application"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note: Every time you grant access to socializer, probably You will receive an email from VK by telling you that someone has accessed to your account. It means that a new token has been negotiated between VK and socializer by using an authomatic process, you should ignore those advices, unless you receive an email when you are not logged in VK with socializer or other application. You can see your authorised applications in the configuration section in the VK website. New tokens are renegotiated every 24 hours."
|
||||
msgid "First of all, it's necessary to authorise the application so it can access your VK account and act on your behalf. The authorisation process is quite simple, and will be required only once. In order to start the authorisation process, you just need to run the executable file called \"socializer.exe\" (on some computers it will appear only as socializer, depending if windows explorer is set to display file extensions or not). You may like to place a Windows shortcut in your desktop for an easier access to the application."
|
||||
msgstr ""
|
||||
|
||||
msgid "If this is the first time you have launched socializer, you will see a message asking you whether socializer should connect through a proxy server, already configured in the application, or use the system network settings. This allows people from countries where VK is blocked to use the social network without having to look for a proxy server themselves. It is highly adviced to use the proxy server only if you are in need of it."
|
||||
msgstr ""
|
||||
|
||||
msgid "After the proxy message, you will see a new message dialog asking you to proceed with the account authorisation process. It consists in providing the authentication data you normally use to sign in VK. It is very important to know that this data will be stored in a folder called config, located in the same folder where the socializer files are. Your config folder is a very important storage for your authentication data, so you must be sure you never will share it with anyone, mostly because your data is stored as plain text (this will be fixed in a future release and your data will be properly encrypted). Socializer will need your authentication data for acting in your behalf and offering you a better experience that what it could do with a simple access token. You must provide your phone number or email address in the first text box, and your password in the second. When pressing OK, your data will be saved and the application will start to retrieve all the required information for showing your buffers. If you have two factor authentication configured in your account, you will see an additional dialog where you have to type the code provided by VK via SMS."
|
||||
msgstr ""
|
||||
|
||||
msgid "Once started, the application will start loading your data (posts, audio files, conversations, friends). When done, it will show you a notification indicating that the program is ready."
|
||||
msgstr ""
|
||||
|
||||
msgid "## General concepts"
|
||||
msgstr ""
|
||||
|
||||
msgid "Before starting to describe Socializer's usage, we'll explain some concepts that will be used extensively throughout this manual."
|
||||
msgstr ""
|
||||
|
||||
msgid "### Buffer"
|
||||
msgstr ""
|
||||
|
||||
msgid "A buffer is a list of items that will manage the data which arrives from VK, after being processed by the application. When you configure your account on Socializer and start it, many buffers are created. Each of them may contain some of the items which this program works with: Newsfeed posts, wall posts, audio and video files, friendship requests and conversations. According to the buffer you are focusing, you will be able to do different actions with these items."
|
||||
msgstr ""
|
||||
|
||||
msgid "All buffers will be updated in one of the following ways:"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Periodically: Most buffers containing posts, audio or video files and people, will be updated periodically to reflect the new additions to them. Updates will be every 2 minutes for every buffer, so if you posted something and did not see the post in the buffer, you may need to wait a moment. There is an option, located in the buffer menu on the menu bar, which allows you to trigger a manual update in the current buffer."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Real time: Conversation buffers will be updated every time someone sends a message to you. When an user sends you a message, if there is not a conversation buffer created to receive the message, a new conversation buffer will be opened automatically and the message will be placed on it. If you already have an opened conversation for the user sending the message, the message will be placed at the end of the buffer. A different sound will indicate whether a new conversation has been opened or an existing buffer gets updated."
|
||||
msgstr ""
|
||||
|
||||
msgid "### item"
|
||||
msgstr ""
|
||||
|
||||
msgid "An item is an element representing some data provided by VK. Items are separated in buffers which stores items of the same type: Audio buffers will contain only audio files, wall buffers will be full of wall posts. The only exception to this rule is the newsfeed buffer, which can contain different kind of items. Actions are available in a per-item basis, allowing certain items to be treated differently than others and showing different dialogs, depending in the kind of data VK sends for them. All items show a menu with their available actions by focusing them in the list and pressing the menu key or a right mouse click."
|
||||
msgstr ""
|
||||
|
||||
msgid "The following is a brief description of the kind of items socializer can work with, and what actions are available for those."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Newsfeed post: It represents a post displayed in your \"home\" page on VK. It may contain a variety of information based in what you or your friends do. A newsfeed item may contain information about new audios added to your friend's library, new people added to friends, wall posts, reposts and new photos added. Depending on the kind of data VK has supplied, the item can open a dialog showing information about the post, a list displaying the people added to friends, or a dialog displaying information for every audio added to library. If a wall post contains a long message, only the first 140 characters will be displayed. You can open the post to read the full message in the dialog. Available options for this item are different depending in the information the item contains. You can open or view the profile of the user that generated the item, like, dislike or add a comment to a post."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Wall post: Represent a post in an user's wall. This post will be similar to wall posts displayed in the newsfeed. If a wall post contains a long message, only the first 140 characters will be displayed. You can open the post to read the full message in the dialog. When opened (by pressing enter or the open option in the associated menu), it will show a dialogue where you can read the message, see how many times the post has been viewed by other users, interact with attachment files (by searching the list and pressing enter in the focused attachment to open it), see the photos included in the post, read information related to likes and times the post has been shared, read and reply to comments. Additionally, you can share the post, indicate you like it, or add a comment. You can cycle through every item in the dialog by pressing tab."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Audio: It represent an audio uploaded to the VK'S platform. Actions available for this item are opening the audio in a dialog, add or remove it from your library, move the audio to a playlist, and play it. When opened, it will be displayed in a dialog allowing you to read the title of the song, artist name, duration and a few buttons: play, add or remove from your library and download. You can control playback of audio items from the buffer by using the player menu on the menu bar or the corresponding keyboard shortcuts."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Video: It represent a video uploaded to the VK'S platform. Actions available for this item are opening the video in your default web browser and move it to a video album. When opened, it will open a web browser and play the video automatically due to VK limitations in access to video files."
|
||||
msgstr ""
|
||||
|
||||
msgid "* person: It contains information about a VK user, this item is present in all buffers under the \"people\" category. Actions available for this item are view user profile, send message and create a timeline, which is a special buffer to track all posts, friends or audios owned by the user. When opened, it will display the profile of this user in a dialog and will provide actions to send a message to the user, or view other sections of her/his profile."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Message: A message appears only in conversation buffers and represents a chat message. It may include a list of attached files that will be displayed in a separated list. You can tab to that list (from the history) and press enter in the attached file you want to open. Chat items are marked as read automatically as soon as they are focused."
|
||||
msgstr ""
|
||||
|
||||
msgid "## Main interface"
|
||||
msgstr ""
|
||||
|
||||
msgid "If you have used [TWBlue](https://github.com/manuelcortez/twblue) before, the socializer's interface is quite similar. Once you have authorised your account, you will see a window with the following elements:"
|
||||
msgid "The graphical user interface of Socializer consists of a window containing:"
|
||||
msgstr ""
|
||||
|
||||
msgid "* A tree view at the left of the window, where you will see the list of buffers. These buffers are divided in three categories, posts, music and people. You could expand each category for seeing the child buffers. There are some additional buffers, timelines and chats, wich will be filled with timelines for your friends or with chats, when you start or receive a chat session."
|
||||
msgid "* a menu bar accomodating five menus (application, Me, buffer, player and help),"
|
||||
msgstr ""
|
||||
|
||||
msgid "* A button for making a post to your wall."
|
||||
msgid "* One tree view,"
|
||||
msgstr ""
|
||||
|
||||
msgid "* In audio buffers, Two buttons: Play and play all."
|
||||
msgid "* One list of items"
|
||||
msgstr ""
|
||||
|
||||
msgid "* In audio album buffers, a button for loading music. By default, albums are empty, you have to press the load button for getting the album's items."
|
||||
msgid "* Some buttons, depending which is the focused buffer."
|
||||
msgstr ""
|
||||
|
||||
msgid "* A list where you will see the posts for the currently selected buffer."
|
||||
msgid "The actions that are available for every item will be described later."
|
||||
msgstr ""
|
||||
|
||||
msgid "* In people buffers, like the friends buffer, a button for sending a message to your friends. Pressing that button will cause a chat buffer to be created."
|
||||
msgid "In summary, the GUI contains two core components. These are the controls you will find while pressing the Tab key within the program's interface, and the different elements present on the menu bar."
|
||||
msgstr ""
|
||||
|
||||
msgid "* A status bar where the program will put some useful information about what it's doing at the moment."
|
||||
msgid "### Buttons in the application"
|
||||
msgstr ""
|
||||
|
||||
msgid "* And a menu bar."
|
||||
msgid "* Post: this button opens up a dialogue box to write a post in the wall of the focused user. For example, if you are in the \"my wall\" buffer you will send a post to your own wall, but if you are in an user timeline the post will be sent to the owner of the timeline. You can upload an attachment by pressing the \"attach\" button and choosing between uploading a photo or audio file in the dialog which will appear, check spelling or translate your message by selecting one of the available buttons in the dialogue box. In addition, you can tag a friend in your post by pressing the corresponding button for that purpose. Also it is possible to configure the privacy settings for your post by allowing all users or just your friends to read it. Press the send button to send the post."
|
||||
msgstr ""
|
||||
|
||||
msgid "When socializer starts, it will try to load your news items, wall, audios (your audios, recommended and populars) and friends. At the moment there are only a few supported actions for these items:"
|
||||
msgid "* Play: In audio buffers, plays the focused song. In video buffers, this button will open a web browser for playing the focused video, due to a limitation VK placed to third party developers with videos."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Audio files: You can play the currently selected song, view the song's details (including lyrics, if available), add or remove from your library, and download it to a desired place in your hard drive. You can find audio files in your news feed or in your own audios buffers. You can find audios as post's attachments. You can create an audios timeline for displaying other's audios."
|
||||
msgid "* Play all: In audio buffers, play all songs starting from the focused buffer, until the last item in the list."
|
||||
msgstr ""
|
||||
|
||||
msgid "* News feed's post: In your news feed buffer, you can press return in any post and socializer will open a new dialogue which can be different, depending in the kind of post you are when the return key was pressed. For example it will open the post if you are focusing a \"normal\" post, a list of people if you are in a post wich indicates that someone has added friends, an audio displayer if you are in a post wich indicates that someone has added an audio, etc."
|
||||
msgid "* Send message: Send a message to a friend, which will open a conversation buffer if it does not exist already. Conversation buffers contain a full conversation, accommodating chat messages, between the current user and someone else. You can type your message in the provided box and press enter to send it to your friend. Additionally, You can upload an attachment by pressing the \"attach\" button and choosing between uploading a photo, audio file or record a voice message in the dialog which will appear, and open attachments sent in the focused message by pressing tab and finding them in the attachments list."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Wall posts: It will show the post in a dialogue so you could interact with its attachments, view and post comments, or like/unlike/share the post."
|
||||
msgid "Bear in mind that buttons will appear according to which actions are possible on the list you are browsing."
|
||||
msgstr ""
|
||||
|
||||
msgid "* You can send a message to someone by pressing the send message button in the buffer where you are, if available. Deactivated accounts cannot receive messages."
|
||||
msgid "## Menus"
|
||||
msgstr ""
|
||||
|
||||
msgid "### Making a post"
|
||||
msgstr ""
|
||||
|
||||
msgid "When you press the post button, a new dialogue will show up. This dialogue allows you to post something in your wall. In this dialogue you have to write a message. You can translate your message and fix your spelling mistakes. Also you can post an URL address, socializer will try to add it as an attachment, so you will not have to worry about this. When you're ready, just press the send button and it'll be done."
|
||||
msgstr ""
|
||||
|
||||
msgid "If you want to add some photos, you can press the attach button, then press the kind of attachment you want to add. After this, select the file you want to add and you will see it in the list, once processed. When you are done with attachments, press the OK button, and continue with your post. When you are ready, press the send button. Your post could take some time to be published, depending in the amount of files you have added, but it should be displayed in your wall and newsfeed as soon as it is posted."
|
||||
msgstr ""
|
||||
|
||||
msgid "### Working with posts in news feed"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can press the return key in any post in your news feed for opening a new dialogue with some information. The information and dialogue will be different if you are viewing a friendship's notification (when someone has added some friends), an audio file, or a regular post."
|
||||
msgstr ""
|
||||
|
||||
msgid "If you open a regular post in your newsfeed, you will be able to see the comments in a list, indicate if you do like or dislike the post, repost or add a new comment. If the post has some attachments, you'll find a list populated with them, you can press return in an attachment to execute its default action, wich will be different depending on the kind of attachment that you are viewing."
|
||||
msgstr ""
|
||||
|
||||
msgid "For friend notifications, you can only view the new added friends in a list and there are some kind of posts that aren't handled. It should be improved."
|
||||
msgstr ""
|
||||
|
||||
msgid "Additionally, you can press the menu Key or the right click for displaying a menu with some quick actions available for the post you are focusing. These actions are different for every post type."
|
||||
msgstr ""
|
||||
|
||||
msgid "### Working with songs"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note: the following applies to audio timelines too."
|
||||
msgstr ""
|
||||
|
||||
msgid "If you want to play or view audio's details, you'll have to navigate to the tree view, and, using the down arrow, look for \"my audios\", \"populars\" or \"Recommendations\". You will see two more buttons, play and play all. The play button will play the currently selected audio, and the play all button will play audios in the current buffer, starting with the current selected item. You can go to the song's list, look for a desired song and press the play button, or Ctrl+return, which is a keyboard shorcut. Take in to account that there are some keyboard shorcuts that only work in the list of items."
|
||||
msgstr ""
|
||||
|
||||
msgid "You can play audio from any buffer, just press ctrl+return for making the audio playback possible."
|
||||
msgstr ""
|
||||
|
||||
msgid "If someone has added multiple audios at once to his library, you will see something like this in your newsfeed: \"(friend) has added 4 audios: audio 1, audio2, audio3 and audio4\". You can press return in the post for opening the audio's details dialogue, where you will be able to see a list with these audios. By default the first detected song is selected, which means that you could read its details by pressing tab, download or add it to your library. If you change the audio in the list, the information will be updated and you will see details and actions will take effect in the new selected audio."
|
||||
msgstr ""
|
||||
|
||||
msgid "When an audio file is playing, you can press f5 and f6 for decreasing and increasing volume, respectively, or control+shift+return for play/pause."
|
||||
msgstr ""
|
||||
|
||||
msgid "If you want to see some details for the selected audio file, you can do it by pressing the return key. You will be able to read some useful information (title, artist, duration and the lyric, if available). Also you will be able to download the song to your hard drive, you have to press the download button in the details' dialogue."
|
||||
msgstr ""
|
||||
|
||||
msgid "When the download starts, you can close the details dialogue and check the status bar in the main window for seeing the current progress."
|
||||
msgstr ""
|
||||
|
||||
msgid "Additionally, you can search for audios by using the menu bar, in the buffer menu, select search, then audio. It will display a dialog where you have to set your search preferences."
|
||||
msgstr ""
|
||||
|
||||
msgid "If you press the menu key, you will see a menu where you will be able to do some actions, for example, add the audio to an album, or add/remove the song from your library."
|
||||
msgstr ""
|
||||
|
||||
msgid "## menu Bar"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can go to the menu bar by pressing ALT. Right now, there are three menus, application, buffer and help:"
|
||||
msgid "Visually, Towards the top of the main application window, A menu bar can be found which contains many of the same functions as listed in the previous section, together with some additional items. To access the menu bar, press the alt key. You will find five menus listed: application, Me, buffer, player and help. This section describes the items on each one of them."
|
||||
msgstr ""
|
||||
|
||||
msgid "### Application menu"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Create. Here you can create some things in VK. The only supported item at this moment is the audio album."
|
||||
msgid "* Create: opens a menu where you can create a new album. At the moment, only video albums are supported."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Delete: Removes items from the VK servers. The only supported item here is the audio album."
|
||||
msgid "* Delete: opens a menu where you can delete an already existing album owned by yourself. Only video albums are supported at this time."
|
||||
msgstr ""
|
||||
|
||||
msgid "* you can set your preferences by opening the preferences dialog located in this menu."
|
||||
msgid "* Preferences: Opens a dialogue which lets you configure settings for the entire application."
|
||||
msgstr ""
|
||||
|
||||
msgid "### Me menu"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Profile: Opens a menu with several options to do in your profile:"
|
||||
msgstr ""
|
||||
|
||||
msgid " * View profile: Displays your profile in a dialog in the application."
|
||||
msgstr ""
|
||||
|
||||
msgid " * Open in browser: Redirects you to your profile in vk.com."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Set status message: Opens up a dialog where you can write your status message. The status message is displayed in your profile and can contain up to 140 characters."
|
||||
msgstr ""
|
||||
|
||||
msgid "### Buffer menu"
|
||||
msgstr ""
|
||||
|
||||
msgid "* new timeline: This option allows you to create a new timeline. This kind of buffers is capable of download all posts in an user's profile."
|
||||
msgid "* New timeline: Lets you open a user's timeline by choosing the user in a dialog box. You can choose which items you want to track: wall posts, friends or audio items. It is created when you press enter. If you invoke this option relative to a user that has no items of the kind you specified, the operation will fail. If you try creating an existing timeline the program will warn you and will not create it again."
|
||||
msgstr ""
|
||||
|
||||
msgid "* search: This submenu allows you to create a new buffer, at the moment, you can create only a kind of buffer, an audio search. The audio search will be located in the music category and will have the last 299 results of your query."
|
||||
msgid "* Search: Shows a menu where you can search for audios or videos on VK. Search results will be created in a new buffer inside \"music\" or \"videos\"."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Update current buffer: perform an update operation in the selected buffer, which will retrieve the new items."
|
||||
msgid "* Update buffer: Performs a manual update operation in the buffer, which will retrieve all new items present in the social network since the last update."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Load previous items: Get the previous items for the currently focused buffer."
|
||||
msgid "* Load previous items: This allows more items to be loaded for the specified buffer. Bear in mind that not all buffers support this setting."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Remove buffer: Tries to remove the current buffer. Default buffers can't be removed."
|
||||
msgid "* Destroy: dismisses the list you're on, if possible."
|
||||
msgstr ""
|
||||
|
||||
msgid "The help menu is self explanatory."
|
||||
msgid "### Player menu"
|
||||
msgstr ""
|
||||
|
||||
msgid "## Contributing"
|
||||
msgid "* Play: Plays the currently focused audio item, if the current buffer contains audio files. If not, plays the focused audio in the \"my music\" buffer."
|
||||
msgstr ""
|
||||
|
||||
msgid "If you notice some errors in this document, or features that are not documented yet, you can suggest those changes by contacting me (more information can be find in the following section)."
|
||||
msgid "* Play all: Plays all audio items in the current buffer or the \"my music\" buffer, starting by the currently focused audio item until the last audio in the list."
|
||||
msgstr ""
|
||||
|
||||
msgid "## contact"
|
||||
msgid "* Stop: Stops audio playback."
|
||||
msgstr ""
|
||||
|
||||
msgid "If you have questions, don't esitate to contact me in [Twitter,](https://twitter.com/manuelcortez00) or sending me an email to manuel(at)manuelcortez(dot)net. Just replace the words in parentheses with the original signs."
|
||||
msgid "* Previous: Plays the previous audio in the buffer or the last item in the list, if the current audio was the first on the buffer."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Next: Plays the Next audio in the buffer or the first item in the list, if the current audio was the last on the buffer."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Shuffle: Plays all audios in the current buffer or the \"my music\" buffer shuffled."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Volume up: Increases volume by 5%."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Volume down: decreases volume by 5%."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Mute: Mutes audio playback, setting volume to 0%."
|
||||
msgstr ""
|
||||
|
||||
msgid "### help menu"
|
||||
msgstr ""
|
||||
|
||||
msgid "* About Socializer: shows the credits of the program."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Documentation: opens up this file, where you can read some useful program concepts."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Check for updates: every time you open the program it automatically checks for new versions. If an update is available, it will ask you if you want to download the update. If you accept, the updating process will commence. When complete, Socializer will be restarted. This item checks for new updates without having to restart the application."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Changelog: opens up a document with the list of changes from the current version to the earliest."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Report an error: opens up a dialogue box to report a bug by completing a small number of fields. Pressing enter will send the report. If the operation doesn't succeed the program will display a warning."
|
||||
msgstr ""
|
||||
|
||||
msgid "## Keyboard shortcuts"
|
||||
msgstr ""
|
||||
|
||||
msgid "Socializer includes some keyboard shortcuts, available from any buffer (except empty buffers and conversations). Here you have the list of the available shortcuts:"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Enter: Execute the default action for the focused item. It may be opening a post, view friends added by someone else, view audio details or opening an user profile."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Control + Enter: Play audio."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Control + Shift+Enter: pause audio playback."
|
||||
msgstr ""
|
||||
|
||||
msgid "* F5: Decrease volume by 5%."
|
||||
msgstr ""
|
||||
|
||||
msgid "* F6: Increase volume by 5%."
|
||||
msgstr ""
|
||||
|
||||
msgid "## configuration"
|
||||
msgstr ""
|
||||
|
||||
msgid "As described above, this application has a preferences dialogue accessible under the application menu. Here you have a brief description of the settings present in this dialogue."
|
||||
msgstr ""
|
||||
|
||||
msgid "### General tab"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Number of items to load for newsfeed and wall buffers: Allows you to specify how many items should be retrieved from VK in the newsfeed buffer and when opening walls for other users. Default and maximum is 100."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Number of items to load in video buffers: Allows you to specify how many items should be retrieved from VK in video buffers. Default and maximum is 200."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Load images in posts: Allows you to specify whether you want socializer to display all images when opening a post, or not. This can be useful for people with slow connections or not needing images."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Update channel: allows you to specify how often you will receive updates for the program. There are two update channels available: Alpha channel, which contains unstable versions of the application and gets updates almost dayly, and stable, which contain tested and more stable versions of the program, but gets updates once in a month, approximately."
|
||||
msgstr ""
|
||||
|
||||
msgid "### Chat settings tab"
|
||||
msgstr ""
|
||||
|
||||
msgid "* Show notifications when users are online/offline: These two checkboxes allows you to specify if you want socializer to notify you when someone is connected or disconnected in the VK network."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Open unread conversations at startup: When enabled, Socializer will load any conversation with unread messages after started."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Move focus to new conversations: When enabled, new conversations will be focused automatically right after being created."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Notification type: This setting allows you to specify the notification type you prefer to use in socializer. The options are native and custom. Native notifications send a system notification every time someone is online or offline, while custom notifications play a sound and announce the notification in the screen reader only."
|
||||
msgstr ""
|
||||
|
||||
msgid "### Optional buffers tab"
|
||||
msgstr ""
|
||||
|
||||
msgid "This section allows you to specify which buffers should be precreated every time socializer starts. This kind of buffers, namely audio playlists, video albums and communities, have a special way of being created. When a buffer of the previously mentioned types is created, the buffer is added to the corresponding section but no data is loaded from VK. In order to load the data for one of these buffers you have to press the load button present in the buffer. From this tab you can mark and unmark the buffers Socializer will create when it starts. By default, buffers for audio playlists, video albums and communities are not created automatically when Socializer starts."
|
||||
msgstr ""
|
||||
|
||||
msgid "## License and source code"
|
||||
msgstr ""
|
||||
|
||||
msgid "Socializer is free software, licensed under the GNU GPL license, either version 2 or, at your option, any later version. You can view the license in the file named license.txt, or online at <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>."
|
||||
msgstr ""
|
||||
|
||||
msgid "The source code of the program is available at <https://code.manuelcortez.net/manuelcortez/socializer>."
|
||||
msgstr ""
|
||||
|
||||
msgid "## Contact"
|
||||
msgstr ""
|
||||
|
||||
msgid "If you still have questions after reading this document, if you wish to collaborate to the project in some other way, or if you simply want to get in touch with the team, [join the Socializer's community in VK.](https://vk.com/socializer.club) You can also visit [The project website.](http://socializer.su)"
|
||||
msgstr ""
|
||||
|
||||
msgid "## Credits"
|
||||
msgstr ""
|
||||
|
||||
msgid "Socializer is developed and mantained by [Manuel Cortez,](https://manuelcortez.net) with contributions by [Anibal Hernandez](https://dragodark.com)"
|
||||
msgstr ""
|
||||
|
||||
msgid "We would also like to thank the translators of Socializer, who have allowed the spreading of the application."
|
||||
msgstr ""
|
||||
|
||||
msgid "* English: Manuel Cortéz."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Spanish: Manuel Cortéz."
|
||||
msgstr ""
|
||||
|
||||
msgid "* Russian: Дарья Ратникова."
|
||||
msgstr ""
|
||||
|
||||
msgid "Special thanks to Дарья Ратникова, as she also manages the Socializer's community in VK, translates the website and the documentation into Russian."
|
||||
msgstr ""
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,33 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
import ctypes
|
||||
import os
|
||||
import types
|
||||
from platform_utils import paths
|
||||
|
||||
def load_library(libname, cdll=False):
|
||||
if paths.is_frozen():
|
||||
libfile = os.path.join(paths.embedded_data_path(), 'accessible_output2', 'lib', libname)
|
||||
else:
|
||||
libfile = os.path.join(paths.module_path(), 'lib', libname)
|
||||
if cdll:
|
||||
return ctypes.cdll[libfile]
|
||||
else:
|
||||
return ctypes.windll[libfile]
|
||||
|
||||
def get_output_classes():
|
||||
from . import outputs
|
||||
module_type = types.ModuleType
|
||||
classes = [m.output_class for m in outputs.__dict__.values() if type(m) == module_type and hasattr(m, 'output_class')]
|
||||
return sorted(classes, key=lambda c: c.priority)
|
||||
|
||||
def find_datafiles():
|
||||
import os
|
||||
import platform
|
||||
from glob import glob
|
||||
import accessible_output2
|
||||
if platform.system() != 'Windows':
|
||||
return []
|
||||
path = os.path.join(accessible_output2.__path__[0], 'lib', '*.dll')
|
||||
results = glob(path)
|
||||
dest_dir = os.path.join('accessible_output2', 'lib')
|
||||
return [(dest_dir, results)]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,20 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
import platform
|
||||
if platform.system() == 'Windows':
|
||||
from . import nvda
|
||||
from . import jaws
|
||||
from . import sapi5
|
||||
from . import window_eyes
|
||||
from . import system_access
|
||||
from . import dolphin
|
||||
from . import pc_talker
|
||||
#import sapi4
|
||||
|
||||
if platform.system() == 'Darwin':
|
||||
from . import voiceover
|
||||
from . import say
|
||||
|
||||
if platform.system() == 'Linux':
|
||||
from . import e_speak
|
||||
|
||||
from . import auto
|
||||
@@ -1,40 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
import accessible_output2
|
||||
from .base import Output, OutputError
|
||||
|
||||
class Auto(Output):
|
||||
|
||||
def __init__(self):
|
||||
output_classes = accessible_output2.get_output_classes()
|
||||
self.outputs = []
|
||||
for output in output_classes:
|
||||
try:
|
||||
self.outputs.append(output())
|
||||
except OutputError:
|
||||
pass
|
||||
|
||||
def get_first_available_output(self):
|
||||
for output in self.outputs:
|
||||
if output.is_active():
|
||||
return output
|
||||
return None
|
||||
|
||||
def speak(self, *args, **kwargs):
|
||||
output = self.get_first_available_output()
|
||||
if output:
|
||||
output.speak(*args, **kwargs)
|
||||
|
||||
def braille(self, *args, **kwargs):
|
||||
output = self.get_first_available_output()
|
||||
if output:
|
||||
output.braille(*args, **kwargs)
|
||||
|
||||
def output(self, *args, **kwargs):
|
||||
output = self.get_first_available_output()
|
||||
if output:
|
||||
output.speak(*args, **kwargs)
|
||||
|
||||
def is_system_output(self):
|
||||
output = self.get_first_available_output()
|
||||
if output:
|
||||
return output.is_system_output()
|
||||
@@ -1,47 +0,0 @@
|
||||
from accessible_output2 import load_library
|
||||
import platform
|
||||
|
||||
class OutputError(Exception):
|
||||
pass
|
||||
|
||||
class Output(object):
|
||||
name = "Unnamed Output"
|
||||
lib32 = None
|
||||
lib64 = None
|
||||
argtypes = {}
|
||||
cdll = False
|
||||
priority = 100
|
||||
system_output = False
|
||||
|
||||
def __init__(self):
|
||||
self.is_32bit = platform.architecture()[0] == "32bit"
|
||||
if self.lib32 and self.is_32bit:
|
||||
self.lib = load_library(self.lib32, cdll=self.cdll)
|
||||
elif self.lib64:
|
||||
self.lib = load_library(self.lib64, cdll=self.cdll)
|
||||
else:
|
||||
self.lib = None
|
||||
if self.lib is not None:
|
||||
for func in self.argtypes:
|
||||
try:
|
||||
getattr(self.lib, func).argtypes = self.argtypes[func]
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
def output(self, text, **options):
|
||||
output = False
|
||||
if self.speak(text, **options):
|
||||
output = True
|
||||
if self.braille(text, **options):
|
||||
output = True
|
||||
if not output:
|
||||
raise RuntimeError("Output %r does not have any method defined to output" % self)
|
||||
|
||||
def is_system_output(self):
|
||||
return self.system_output
|
||||
|
||||
def speak(self, **optiont):
|
||||
return False
|
||||
|
||||
def braille(self, *args, **options):
|
||||
return False
|
||||
@@ -1,33 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
import ctypes
|
||||
|
||||
from .base import Output
|
||||
|
||||
class Dolphin (Output):
|
||||
"""Supports dolphin products."""
|
||||
|
||||
name = 'Dolphin'
|
||||
lib32 = 'dolapi.dll'
|
||||
argtypes = {
|
||||
'DolAccess_Command': (ctypes.c_wchar_p, ctypes.c_int, ctypes.c_int),
|
||||
'DolAccess_Action': (ctypes.c_int,),
|
||||
}
|
||||
|
||||
def speak(self, text, interrupt=0):
|
||||
if interrupt:
|
||||
self.silence()
|
||||
#If we don't call this, the API won't let us speak.
|
||||
if self.is_active():
|
||||
self.lib.DolAccess_Command(text, (len(text)*2)+2, 1)
|
||||
|
||||
def silence(self):
|
||||
self.lib.DolAccess_Action(141)
|
||||
|
||||
def is_active(self):
|
||||
try:
|
||||
return self.lib.DolAccess_GetSystem() in (1, 4, 8)
|
||||
except:
|
||||
return False
|
||||
|
||||
output_class = Dolphin
|
||||
@@ -1,31 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
from .base import Output
|
||||
|
||||
try:
|
||||
import espeak.core
|
||||
except:
|
||||
raise RuntimeError("Cannot find espeak.core. Please install python-espeak")
|
||||
|
||||
class ESpeak(Output):
|
||||
"""Speech output supporting ESpeak on Linux
|
||||
Note this requires python-espeak to be installed
|
||||
This can be done on Debian distros by using apt-get install python-espeak
|
||||
Or through this tarball: https://launchpad.net/python-espeak
|
||||
"""
|
||||
name = "Linux ESpeak"
|
||||
|
||||
def is_active(self):
|
||||
try:
|
||||
import espeak.core
|
||||
except:
|
||||
return False
|
||||
return True
|
||||
|
||||
def speak(self, text, interrupt = 0):
|
||||
if interrupt:
|
||||
self.silence()
|
||||
espeak.core.synth(text)
|
||||
def silence(self):
|
||||
espeak.core.cancel()
|
||||
|
||||
output_class = ESpeak
|
||||
@@ -1,34 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
import win32gui
|
||||
from libloader.com import load_com
|
||||
import pywintypes
|
||||
|
||||
from .base import Output, OutputError
|
||||
|
||||
class Jaws (Output):
|
||||
"""Output supporting the Jaws for Windows screen reader."""
|
||||
|
||||
name = 'jaws'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super (Jaws, self).__init__(*args, **kwargs)
|
||||
try:
|
||||
self.object = load_com("FreedomSci.JawsApi", "jfwapi")
|
||||
except pywintypes.com_error:
|
||||
raise OutputError
|
||||
|
||||
def braille(self, text, **options):
|
||||
# HACK: replace " with ', Jaws doesn't seem to understand escaping them with \
|
||||
text = text.replace('"', "'")
|
||||
self.object.RunFunction("BrailleString(\"%s\")" % text)
|
||||
|
||||
def speak(self, text, interrupt=False):
|
||||
self.object.SayString(' %s' % text, interrupt)
|
||||
|
||||
def is_active(self):
|
||||
try:
|
||||
return self.object.SayString('',0) == True or win32gui.FindWindow("JFWUI2", "JAWS") != 0
|
||||
except:
|
||||
return False
|
||||
|
||||
output_class = Jaws
|
||||
@@ -1,37 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
import platform
|
||||
import ctypes
|
||||
|
||||
from platform_utils import paths
|
||||
from libloader import load_library
|
||||
from .base import Output
|
||||
|
||||
class NVDA(Output):
|
||||
"""Supports The NVDA screen reader"""
|
||||
name = "NVDA"
|
||||
lib32 = 'nvdaControllerClient32.dll'
|
||||
lib64 = 'nvdaControllerClient64.dll'
|
||||
argtypes = {
|
||||
'nvdaController_brailleMessage': (ctypes.c_wchar_p,),
|
||||
'nvdaController_speakText': (ctypes.c_wchar_p,),
|
||||
}
|
||||
|
||||
def is_active(self):
|
||||
try:
|
||||
return self.lib.nvdaController_testIfRunning() == 0
|
||||
except:
|
||||
return False
|
||||
|
||||
def braille(self, text, **options):
|
||||
self.lib.nvdaController_brailleMessage(text)
|
||||
|
||||
def speak(self, text, interrupt=False):
|
||||
if interrupt:
|
||||
self.silence()
|
||||
self.lib.nvdaController_speakText(text)
|
||||
|
||||
def silence(self):
|
||||
self.lib.nvdaController_cancelSpeech()
|
||||
|
||||
output_class = NVDA
|
||||
@@ -1,24 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
import ctypes
|
||||
from .base import Output
|
||||
|
||||
class PCTalker(Output):
|
||||
lib32 = 'pctkusr.dll'
|
||||
lib64 = 'pctkusr64.dll'
|
||||
cdll = True
|
||||
argtypes = {
|
||||
'PCTKPRead': (ctypes.c_char_p, ctypes.c_int, ctypes.c_int)
|
||||
}
|
||||
|
||||
def speak(self, text, interrupt=False):
|
||||
if interrupt:
|
||||
self.silence()
|
||||
self.lib.PCTKPRead(text.encode('cp932', 'replace'), 0, 1)
|
||||
|
||||
def silence(self):
|
||||
self.lib.PCTKVReset()
|
||||
|
||||
def is_active(self):
|
||||
return self.lib.PCTKStatus() != 0
|
||||
|
||||
output_class = PCTalker
|
||||
@@ -1,143 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
from builtins import range
|
||||
from libloader.com import load_com
|
||||
from .base import Output
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
class Sapi4(Output):
|
||||
|
||||
name = 'sapi4'
|
||||
priority = 102
|
||||
|
||||
def __init__(self):
|
||||
sapi4 = load_com("{EEE78591-FE22-11D0-8BEF-0060081841DE}")
|
||||
self._voiceNo = sapi4.Find(0)
|
||||
sapi4.Select(self._voiceNo)
|
||||
sapi4.Speak(" ")
|
||||
self.__object = sapi4
|
||||
self._voice_list = self._available_voices()
|
||||
|
||||
def _set_capabilities(self):
|
||||
sapi4 = self.__object
|
||||
try:
|
||||
sapi4.Pitch = sapi4.Pitch
|
||||
self._min_pitch = sapi4.MinPitch
|
||||
self._max_pitch = sapi4.MaxPitch
|
||||
self._has_pitch = True
|
||||
except:
|
||||
self._min_pitch = 0
|
||||
self._max_pitch = 0
|
||||
self._has_pitch = False
|
||||
try:
|
||||
sapi4.Speed = sapi4.Speed
|
||||
self._min_rate = sapi4.MinSpeed
|
||||
self._max_rate = sapi4.MaxSpeed
|
||||
self._has_rate = True
|
||||
except:
|
||||
self._min_rate = 0
|
||||
self._max_rate = 0
|
||||
self._has_rate = False
|
||||
try:
|
||||
sapi4.VolumeLeft = sapi4.VolumeLeft
|
||||
self._min_volume = sapi4.MinVolumeLeft
|
||||
self._max_volume = sapi4.MaxVolumeLeft
|
||||
self._has_volume = True
|
||||
except:
|
||||
self._min_volume = 0
|
||||
self._max_volume = 0
|
||||
self._has_volume = False
|
||||
|
||||
def _available_voices(self):
|
||||
voice_list = []
|
||||
for voice_no in range(1, self.__object.CountEngines):
|
||||
voice_list.append(self.__object.ModeName(voice_no))
|
||||
return voice_list
|
||||
|
||||
@property
|
||||
def available_voices(self):
|
||||
return self._voice_list
|
||||
|
||||
def list_voices(self):
|
||||
return self.available_voices
|
||||
|
||||
def get_voice(self):
|
||||
return self.__object.ModeName(self._voice_no)
|
||||
|
||||
def set_voice(self, value):
|
||||
self._voice_no = self.list_voices().index(value) + 1
|
||||
self.__object.Select(self._voice_no)
|
||||
self.silence()
|
||||
self.__object.Speak(" ")
|
||||
self._set_capabilities()
|
||||
|
||||
def get_pitch(self):
|
||||
if self.has_pitch:
|
||||
return self.__object.Pitch
|
||||
|
||||
def set_pitch(self, value):
|
||||
if self.has_pitch:
|
||||
self.__object.Pitch = value
|
||||
|
||||
def get_rate(self):
|
||||
if self.has_rate:
|
||||
return self.__object.Speed
|
||||
|
||||
def set_rate(self, value):
|
||||
if self.has_rate:
|
||||
self.__object.Speed = value
|
||||
|
||||
def get_volume(self):
|
||||
if self.has_volume:
|
||||
return self.__object.VolumeLeft
|
||||
|
||||
def set_volume(self, value):
|
||||
if self.has_volume:
|
||||
self.__object.VolumeLeft = value
|
||||
|
||||
@property
|
||||
def has_pitch(self):
|
||||
return self._has_pitch
|
||||
|
||||
@property
|
||||
def has_rate(self):
|
||||
return self._has_rate
|
||||
|
||||
@property
|
||||
def has_volume(self):
|
||||
return self._has_volume
|
||||
|
||||
@property
|
||||
def min_pitch(self):
|
||||
return self._min_pitch
|
||||
|
||||
@property
|
||||
def max_pitch(self):
|
||||
return self._max_pitch
|
||||
|
||||
@property
|
||||
def min_rate(self):
|
||||
return self._min_rate
|
||||
|
||||
@property
|
||||
def max_rate(self):
|
||||
return self._max_rate
|
||||
|
||||
@property
|
||||
def min_volume(self):
|
||||
return self._min_volume
|
||||
|
||||
@property
|
||||
def max_volume(self):
|
||||
return self._max_volume
|
||||
|
||||
def speak(self, text, interrupt=False):
|
||||
if interrupt:
|
||||
self.silence()
|
||||
self.__object.Speak(text)
|
||||
|
||||
def silence(self):
|
||||
self.__object.AudioReset()
|
||||
|
||||
output_class = Sapi4
|
||||
@@ -1,95 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
from collections import OrderedDict
|
||||
from libloader.com import load_com
|
||||
from .base import Output, OutputError
|
||||
import pywintypes
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
SVSFDefault = 0
|
||||
SVSFlagsAsync = 1
|
||||
SVSFPurgeBeforeSpeak = 2
|
||||
SVSFIsFilename = 4
|
||||
SVSFIsXML = 8
|
||||
SVSFIsNotXML = 16
|
||||
SVSFPersistXML = 32
|
||||
|
||||
class SAPI5(Output):
|
||||
has_volume = True
|
||||
has_rate = True
|
||||
has_pitch = True
|
||||
min_pitch = -10
|
||||
max_pitch = 10
|
||||
min_rate = -10
|
||||
max_rate = 10
|
||||
min_volume = 0
|
||||
max_volume = 100
|
||||
name = "sapi5"
|
||||
priority = 101
|
||||
system_output = True
|
||||
|
||||
def __init__(self):
|
||||
try:
|
||||
self.object = load_com("SAPI.SPVoice")
|
||||
self._voices = self._available_voices()
|
||||
except pywintypes.com_error:
|
||||
raise OutputError
|
||||
self._pitch = 0
|
||||
|
||||
def _available_voices(self):
|
||||
_voices = OrderedDict()
|
||||
for v in self.object.GetVoices():
|
||||
_voices[v.GetDescription()] = v
|
||||
return _voices
|
||||
|
||||
def list_voices(self):
|
||||
return list(self._voices.keys())
|
||||
|
||||
def get_voice(self):
|
||||
return self.object.Voice.GetDescription()
|
||||
|
||||
def set_voice(self, value):
|
||||
log.debug("Setting SAPI5 voice to \"%s\"" % value)
|
||||
self.object.Voice = self._voices[value]
|
||||
# For some reason SAPI5 does not reset audio after changing the voice
|
||||
# By setting the audio device after changing voices seems to fix this
|
||||
# This was noted from information at:
|
||||
# http://lists.nvaccess.org/pipermail/nvda-dev/2011-November/022464.html
|
||||
self.object.AudioOutput = self.object.AudioOutput
|
||||
|
||||
def get_pitch(self):
|
||||
return self._pitch
|
||||
|
||||
def set_pitch(self, value):
|
||||
log.debug("Setting pitch to %d" % value)
|
||||
self._pitch = value
|
||||
|
||||
def get_rate(self):
|
||||
return self.object.Rate
|
||||
|
||||
def set_rate(self, value):
|
||||
log.debug("Setting rate to %d" % value)
|
||||
self.object.Rate = value
|
||||
|
||||
def get_volume(self):
|
||||
return self.object.Volume
|
||||
|
||||
def set_volume(self, value):
|
||||
self.object.Volume = value
|
||||
|
||||
def speak(self, text, interrupt=False):
|
||||
if interrupt:
|
||||
self.silence()
|
||||
# We need to do the pitch in XML here
|
||||
textOutput = "<pitch absmiddle=\"%d\">%s</pitch>" % (round(self._pitch), text.replace("<", "<"))
|
||||
self.object.Speak(textOutput, SVSFlagsAsync | SVSFIsXML)
|
||||
|
||||
def silence(self):
|
||||
self.object.Speak("", SVSFlagsAsync | SVSFPurgeBeforeSpeak)
|
||||
|
||||
def is_active(self):
|
||||
if self.object:
|
||||
return True
|
||||
return False
|
||||
|
||||
output_class = SAPI5
|
||||
@@ -1,21 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
from .base import Output
|
||||
|
||||
class AppleSay(Output):
|
||||
"""Speech output supporting the Apple Say subsystem."""
|
||||
name = 'Apple Say'
|
||||
def __init__(self, voice = 'Alex', rate = '300'):
|
||||
self.voice = voice
|
||||
self.rate = rate
|
||||
super(AppleSay, self).__init__()
|
||||
def is_active(self):
|
||||
return not os.system('which say')
|
||||
def speak(self, text, interrupt = 0):
|
||||
if interrupt:
|
||||
self.silence()
|
||||
os.system('say -v %s -r %s "%s" &' % (self.voice, self.rate, text))
|
||||
def silence(self):
|
||||
os.system('killall say')
|
||||
|
||||
output_class = AppleSay
|
||||
@@ -1,29 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
import ctypes
|
||||
from .base import Output
|
||||
|
||||
class SystemAccess (Output):
|
||||
"""Supports System Access and System Access Mobile"""
|
||||
|
||||
name = "System Access"
|
||||
lib32 = 'saapi32.dll'
|
||||
argtypes = {
|
||||
'SA_BrlShowTextW': (ctypes.c_wchar_p,),
|
||||
'SA_SayW': (ctypes.c_wchar_p,),
|
||||
}
|
||||
priority = 99
|
||||
|
||||
def braille(self, text, **options):
|
||||
self.lib.SA_BrlShowTextW(text)
|
||||
|
||||
def speak(self, text, interrupt=False):
|
||||
if self.is_active():
|
||||
self.dll.SA_SayW(str(text))
|
||||
|
||||
def is_active(self):
|
||||
try:
|
||||
return self.dll.SA_IsRunning()
|
||||
except:
|
||||
return False
|
||||
|
||||
output_class = SystemAccess
|
||||
@@ -1 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
@@ -1,33 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
import win32gui
|
||||
from libloader.com import load_com
|
||||
from .base import Output, OutputError
|
||||
import pywintypes
|
||||
|
||||
class WindowEyes (Output):
|
||||
"""Speech output supporting the WindowEyes screen reader"""
|
||||
|
||||
name = 'Window-Eyes'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(WindowEyes, self).__init__(*args, **kwargs)
|
||||
try:
|
||||
self.object = load_com("gwspeak.speak")
|
||||
except pywintypes.com_error:
|
||||
raise OutputError
|
||||
|
||||
def speak(self, text, interrupt=0):
|
||||
if interrupt:
|
||||
self.silence()
|
||||
self.object.SpeakString(text)
|
||||
|
||||
def silence (self):
|
||||
self.object.Silence()
|
||||
|
||||
def is_active(self):
|
||||
try:
|
||||
return win32gui.FindWindow("GWMExternalControl", "External Control") != 0
|
||||
except:
|
||||
return False
|
||||
|
||||
output_class = WindowEyes
|
||||
@@ -1,4 +1,11 @@
|
||||
[app-settings]
|
||||
username = string(default="")
|
||||
password = string(default="")
|
||||
language = string(default="system")
|
||||
language = string(default="system")
|
||||
use_proxy = boolean(default=False)
|
||||
first_start = boolean(default=True)
|
||||
|
||||
[sound]
|
||||
volume = integer(default=100)
|
||||
input_device = string(default="Default")
|
||||
output_device = string(default="Default")
|
||||
session_mute = boolean(default=False)
|
||||
current_soundpack = string(default="default")
|
||||
@@ -1,12 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
name = "Socializer"
|
||||
version = "0.13"
|
||||
author = u"Manuel Cortéz"
|
||||
version = "0.23"
|
||||
author = "Manuel Cortez"
|
||||
authorEmail = "manuel@manuelcortez.net"
|
||||
copyright = u"Copyright (C) 2016, Manuel cortéz."
|
||||
description = unicode(name+" Is an accessible VK client for Windows.")
|
||||
url = "https://github.com/manuelcortez/socializer"
|
||||
update_url = "https://raw.githubusercontent.com/manuelcortez/socializer/master/update-files/socializer.json"
|
||||
copyright = "Copyright (C) 2016-2019, Manuel Cortez"
|
||||
description = name+" Is an accessible VK client for Windows."
|
||||
url = "http://socializer.su"
|
||||
# The short name will be used for detecting translation files. See languageHandler for more details.
|
||||
short_name = "socializer"
|
||||
translators = [u"Valeria K (Russian)", u"Manuel Cortez (Spanish)"]
|
||||
translators = ["Darya Ratnikova (Russian)", "Manuel Cortez (Spanish)"]
|
||||
bts_name = "socializer"
|
||||
bts_access_token = "U29jaWFsaXplcg"
|
||||
bts_url = "https://issues.manuelcortez.net"
|
||||
### Update information
|
||||
# URL to retrieve the latest updates for the stable branch.
|
||||
update_stable_url = "https://code.manuelcortez.net/manuelcortez/socializer/raw/master/update-files/socializer.json"
|
||||
# URL to retrieve update information for the "next" branch. This is a channel made for alpha versions.
|
||||
# Every commit will trigger an update, so users wanting to have the bleeding edge code will get it as soon as it is committed here and build by a runner.
|
||||
update_next_url = "https://code.manuelcortez.net/api/v4/projects/4/repository/commits/master"
|
||||
# Short_id of the last commit, this is set to none here because it will be set manually by the building tools.
|
||||
update_next_version = "03286a44"
|
||||
103
src/authenticator/official.py
Normal file
103
src/authenticator/official.py
Normal file
@@ -0,0 +1,103 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
""" Set of methods used to retrieve access tokens by simulating the official VK application for Android. """
|
||||
import random
|
||||
import requests
|
||||
import logging
|
||||
from hashlib import md5
|
||||
from .wxUI import two_factor_auth, bad_password
|
||||
|
||||
log = logging.getLogger("authenticator.official")
|
||||
|
||||
class AuthenticationError(Exception):
|
||||
pass
|
||||
|
||||
# Data extracted from official VK android APP.
|
||||
client_id = "2274003"
|
||||
client_secret = "hHbZxrka2uZ6jB1inYsH"
|
||||
api_ver="5.93"
|
||||
scope = "nohttps,all"
|
||||
user_agent = "VKAndroidApp/5.23-2978 (Android 4.4.2; SDK 19; x86; unknown Android SDK built for x86; en; 320x240)"
|
||||
|
||||
api_url = "https://api.vk.com/method/"
|
||||
|
||||
def get_device_id():
|
||||
""" Generate a random device ID, consisting in 16 alphanumeric characters."""
|
||||
return "".join(random.choice(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "e", "f"]) for _ in range(16))
|
||||
|
||||
def get_sig(method, values, secret):
|
||||
""" Create a signature for parameters passed to VK API. """
|
||||
postdata = ""
|
||||
for key in values:
|
||||
# None values should be excluded from SIG, otherwise VK won't validate it correctly.
|
||||
if values[key] != None:
|
||||
postdata = postdata + "{key}={value}&".format(key=key, value=values[key])
|
||||
# Remove the last "&" character.
|
||||
postdata = postdata[:-1]
|
||||
sig = md5(b"/method/"+method.encode("utf-8")+b"?"+postdata.encode("utf-8")+secret.encode("utf-8"))
|
||||
return sig.hexdigest()
|
||||
|
||||
def perform_request(method, postdata, secret):
|
||||
""" Send a request to VK servers by signing the data with the 'sig' parameter."""
|
||||
url = api_url+method
|
||||
sig = get_sig(method, postdata, secret)
|
||||
postdata.update(sig=sig)
|
||||
headers = {'User-Agent': user_agent}
|
||||
r = requests.post(url, data=postdata, headers=headers)
|
||||
return r.json()
|
||||
|
||||
def get_non_refreshed(login, password, scope=scope):
|
||||
""" Retrieves a non-refreshed token, this should be the first token needed to authenticate in VK.
|
||||
returns the access_token which still needs to be refreshed, device_id, and secret code, needed to sign all petitions in VK."""
|
||||
if not (login or password):
|
||||
raise ValueError("Both user and password are required.")
|
||||
device_id = get_device_id()
|
||||
# Let's authenticate.
|
||||
url = "https://oauth.vk.com/token"
|
||||
params = dict(grant_type="password",
|
||||
client_id=client_id, client_secret=client_secret, username=login,
|
||||
password=password, v=api_ver, scope=scope, lang="en", device_id=device_id, force_sms=1)
|
||||
# Add two factor auth later due to python's syntax.
|
||||
params["2fa_supported"] = 1
|
||||
headers = {'User-Agent': user_agent}
|
||||
r = requests.get(url, params=params, headers=headers)
|
||||
log.exception(r.json())
|
||||
# If a 401 error is raised, we need to use 2FA here.
|
||||
# see https://vk.com/dev/auth_direct (switch lang to russian, english docs are very incomplete in the matter)
|
||||
# ToDo: this needs testing after implemented official VK tokens.
|
||||
if r.status_code == 401 and "phone_mask" in r.text:
|
||||
t = r.json()
|
||||
code, remember = two_factor_auth()
|
||||
url = "https://oauth.vk.com/token"
|
||||
params = dict(grant_type="password", lang="en",
|
||||
client_id=client_id, client_secret=client_secret, username=login,
|
||||
password=password, v=api_ver, scope=scope, device_id=device_id, code=code)
|
||||
r = requests.get(url, params=params, headers=headers)
|
||||
if r.status_code == 200 and 'access_token' in r.text:
|
||||
res = r.json()
|
||||
# Retrieve access_token and secret.
|
||||
access_token = res['access_token']
|
||||
secret = res['secret']
|
||||
return access_token, secret, device_id
|
||||
else:
|
||||
raise AuthenticationError(r.text)
|
||||
|
||||
def refresh_token(token, secret, device_id):
|
||||
method = "execute.getUserInfo"
|
||||
postdata = dict(v=api_ver, https=1, androidVersion=19, androidModel="Android SDK built for x86", info_fields="audio_ads,audio_background_limit,country,discover_design_version,discover_preload,discover_preload_not_seen,gif_autoplay,https_required,inline_comments,intro,lang,menu_intro,money_clubs_p2p,money_p2p,money_p2p_params,music_intro,audio_restrictions,profiler_settings,raise_to_record_enabled,stories,masks,subscriptions,support_url,video_autoplay,video_player,vklive_app,community_comments,webview_authorization,story_replies,animated_stickers,community_stories,live_section,playlists_download,calls,security_issue,eu_user,wallet,vkui_community_create,vkui_profile_edit,vkui_community_manage,vk_apps,stories_photo_duration,stories_reposts,live_streaming,live_masks,camera_pingpong,role,video_discover", device_id=device_id, lang="en", func_v=11, androidManufacturer="unknown", fields="photo_100,photo_50,exports,country,sex,status,bdate,first_name_gen,last_name_gen,verified,trending", access_token=token)
|
||||
perform_request(method, postdata, secret)
|
||||
method = "auth.refreshToken"
|
||||
postdata = dict(v=api_ver, https=1, timestamp=0, receipt2="", device_id=device_id, receipt="", lang="en", nonce="", access_token=token)
|
||||
return perform_request(method, postdata, secret)
|
||||
|
||||
def login(user, password):
|
||||
try:
|
||||
access_token, secret, device_id = get_non_refreshed(user, password)
|
||||
response = refresh_token(access_token, secret, device_id)
|
||||
except AuthenticationError:
|
||||
bad_password()
|
||||
raise AuthenticationError("")
|
||||
try:
|
||||
return response["response"]["token"], secret, device_id
|
||||
except KeyError:
|
||||
log.exception("An exception has occurred while attempting to authenticate. Printing response returned by vk...")
|
||||
log.exception(response)
|
||||
17
src/authenticator/wxUI.py
Normal file
17
src/authenticator/wxUI.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import time
|
||||
import wx
|
||||
import widgetUtils
|
||||
|
||||
def two_factor_auth():
|
||||
code = None
|
||||
dlg = wx.TextEntryDialog(None, _("Please provide the authentication code you have received from VK."), _("Two factor authentication code"))
|
||||
response = dlg.ShowModal()
|
||||
if response == widgetUtils.OK:
|
||||
code = dlg.GetValue()
|
||||
dlg.Destroy()
|
||||
return (code, True)
|
||||
|
||||
def bad_password():
|
||||
return wx.MessageDialog(None, _("Your password or email address are incorrect. Please fix the mistakes and try it again."), _("Wrong data"), wx.ICON_ERROR).ShowModal()
|
||||
@@ -1,4 +1,5 @@
|
||||
# -*- coding: cp1252 -*-
|
||||
import os
|
||||
import config_utils
|
||||
import paths
|
||||
import logging
|
||||
@@ -12,5 +13,5 @@ app = None
|
||||
def setup ():
|
||||
global app
|
||||
log.debug("Loading global app settings...")
|
||||
app = config_utils.load_config(paths.config_path(MAINFILE), paths.app_path(MAINSPEC))
|
||||
app = config_utils.load_config(os.path.join(paths.config_path(), MAINFILE), os.path.join(paths.app_path(), MAINSPEC))
|
||||
|
||||
@@ -45,7 +45,7 @@ def hist(keys):
|
||||
def find_problems(hist):
|
||||
"Takes a histogram and returns a list of items occurring more than once."
|
||||
res=[]
|
||||
for k,v in hist.items():
|
||||
for k,v in list(hist.items()):
|
||||
if v>1:
|
||||
res.append(k)
|
||||
return res
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import widgetUtils
|
||||
import logging
|
||||
from wxUI.dialogs import attach as gui
|
||||
log = logging.getLogger("controller.attach")
|
||||
|
||||
class attach(object):
|
||||
def __init__(self):
|
||||
self.attachments = list()
|
||||
self.dialog = gui.attachDialog()
|
||||
widgetUtils.connect_event(self.dialog.photo, widgetUtils.BUTTON_PRESSED, self.upload_image)
|
||||
widgetUtils.connect_event(self.dialog.remove, widgetUtils.BUTTON_PRESSED, self.remove_attachment)
|
||||
self.dialog.get_response()
|
||||
log.debug("Attachments controller started.")
|
||||
|
||||
def upload_image(self, *args, **kwargs):
|
||||
image, description = self.dialog.get_image()
|
||||
if image != None:
|
||||
imageInfo = {"type": "photo", "file": image, "description": os.path.basename(image)}
|
||||
log.debug("Image data to upload: %r" % (imageInfo,))
|
||||
self.attachments.append(imageInfo)
|
||||
# Translators: This is the text displayed in the attachments dialog, when the user adds a photo.
|
||||
info = [_(u"Photo"), os.path.basename(image)]
|
||||
self.dialog.attachments.insert_item(False, *info)
|
||||
self.dialog.remove.Enable(True)
|
||||
|
||||
def remove_attachment(self, *args, **kwargs):
|
||||
current_item = self.dialog.attachments.get_selected()
|
||||
log.debug("Removing item %d" % (current_item,))
|
||||
if current_item == -1: current_item = 0
|
||||
self.attachments.pop(current_item)
|
||||
self.dialog.attachments.remove_item(current_item)
|
||||
self.check_remove_status()
|
||||
log.debug("Removed")
|
||||
|
||||
def check_remove_status(self):
|
||||
if len(self.attachments) == 0 and self.dialog.attachments.get_count() == 0:
|
||||
self.dialog.remove.Enable(False)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,22 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import widgetUtils
|
||||
from wxUI.dialogs import configuration as configurationUI
|
||||
|
||||
class configuration(object):
|
||||
|
||||
def __init__(self, session):
|
||||
self.session = session
|
||||
self.dialog = configurationUI.configurationDialog(_(u"Preferences"))
|
||||
self.create_config()
|
||||
|
||||
def create_config(self):
|
||||
self.dialog.create_general()
|
||||
self.dialog.set_value("general", "wall_buffer_count", self.session.settings["buffers"]["count_for_wall_buffers"])
|
||||
self.dialog.set_value("general", "audio_buffers_count", self.session.settings["buffers"]["count_for_audio_buffers"])
|
||||
self.dialog.realize()
|
||||
self.response = self.dialog.get_response()
|
||||
|
||||
def save_configuration(self):
|
||||
self.session.settings["buffers"]["count_for_audio_buffers"] = self.dialog.get_value("general", "wall_buffer_count")
|
||||
self.session.settings["buffers"]["count_for_audio_buffers"] = self.dialog.get_value("general", "audio_buffers_count")
|
||||
self.session.settings.write()
|
||||
@@ -1,22 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import threading
|
||||
from vk import longpool
|
||||
from pubsub import pub
|
||||
|
||||
class worker(threading.Thread):
|
||||
def __init__(self, session):
|
||||
super(worker, self).__init__()
|
||||
self.session = session
|
||||
self.l = longpool.LongPoll(self.session.vk.client)
|
||||
|
||||
def run(self):
|
||||
while self.session.is_logged == True:
|
||||
p = self.l.check()
|
||||
for i in p:
|
||||
# print i.message_id, i.flags, i.from_id, i.user_id, i.mask, i.byself, i.message_flags
|
||||
# if i.flags == 4 or i.flags == 51 or i.flags == 49:
|
||||
if i.text != None and i.from_id != None and i.flags != None and i.message_flags != None:
|
||||
# print i.message_id, i.flags, i.from_id, i.user_id, i.mask, i.byself, i.message_flags
|
||||
# if i.from_id != None:
|
||||
# print "ordering sent stuff"
|
||||
pub.sendMessage("order-sent-message", obj=i)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,56 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import widgetUtils
|
||||
import output
|
||||
from pubsub import pub
|
||||
import attach
|
||||
from wxUI.dialogs import message
|
||||
from extra import SpellChecker, translator
|
||||
|
||||
class post(object):
|
||||
def __init__(self, title, caption, text, post_type="post"):
|
||||
super(post, self).__init__()
|
||||
self.title = title
|
||||
self.message = getattr(message, post_type)(title, caption, text)
|
||||
self.message.set_title(title)
|
||||
widgetUtils.connect_event(self.message.spellcheck, widgetUtils.BUTTON_PRESSED, self.spellcheck)
|
||||
widgetUtils.connect_event(self.message.translateButton, widgetUtils.BUTTON_PRESSED, self.translate)
|
||||
self.images = []
|
||||
if hasattr(self.message, "attach"):
|
||||
widgetUtils.connect_event(self.message.attach, widgetUtils.BUTTON_PRESSED, self.show_attach_dialog)
|
||||
|
||||
def get_privacy_options(self):
|
||||
p = self.message.get("privacy")
|
||||
if p == _(u"Friends of friends"):
|
||||
privacy = 0
|
||||
elif p == _(u"All users"):
|
||||
privacy = 1
|
||||
return privacy
|
||||
|
||||
def translate(self, *args, **kwargs):
|
||||
dlg = translator.gui.translateDialog()
|
||||
if dlg.get_response() == widgetUtils.OK:
|
||||
text_to_translate = self.message.get_text()
|
||||
source = [x[0] for x in translator.translator.available_languages()][dlg.get("source_lang")]
|
||||
dest = [x[0] for x in translator.translator.available_languages()][dlg.get("dest_lang")]
|
||||
msg = translator.translator.translate(text_to_translate, source, dest)
|
||||
self.message.set_text(msg)
|
||||
self.message.text_focus()
|
||||
output.speak(_(u"Translated"))
|
||||
dlg.Destroy()
|
||||
|
||||
def spellcheck(self, event=None):
|
||||
text = self.message.get_text()
|
||||
checker = SpellChecker.spellchecker.spellChecker(text, "")
|
||||
if hasattr(checker, "fixed_text"):
|
||||
self.message.set_text(checker.fixed_text)
|
||||
checker.clean()
|
||||
|
||||
def show_attach_dialog(self, *args, **kwargs):
|
||||
a = attach.attach()
|
||||
if len(a.attachments) != 0:
|
||||
self.attachments = a.attachments
|
||||
|
||||
class comment(post):
|
||||
def __init__(self, title, caption, text):
|
||||
super(comment, self).__init__(title, caption, text, "comment")
|
||||
self.message.set_title(_(u"New comment"))
|
||||
@@ -1,89 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import output
|
||||
import sound_lib
|
||||
from sound_lib.stream import URLStream
|
||||
from mysc.repeating_timer import RepeatingTimer
|
||||
from pubsub import pub
|
||||
|
||||
player = None
|
||||
|
||||
def setup():
|
||||
global player
|
||||
if player == None:
|
||||
player = audioPlayer()
|
||||
|
||||
class audioPlayer(object):
|
||||
|
||||
def __init__(self):
|
||||
self.is_playing = False
|
||||
self.stream = None
|
||||
self.vol = 100
|
||||
self.is_working = False
|
||||
self.queue = []
|
||||
self.stopped = True
|
||||
|
||||
def play(self, url):
|
||||
if self.stream != None and self.stream.is_playing == True:
|
||||
self.stream.stop()
|
||||
self.stopped = True
|
||||
if hasattr(self, "worker") and self.worker != None:
|
||||
self.worker.cancel()
|
||||
self.worker = None
|
||||
self.queue = []
|
||||
# Make sure that there are no other sounds trying to be played.
|
||||
if self.is_working == False:
|
||||
self.is_working = True
|
||||
self.stream = URLStream(url=url["url"])
|
||||
# Translators: {0} will be replaced with a song's title and {1} with the artist.
|
||||
msg = _(u"Playing {0} by {1}").format(url["title"], url["artist"])
|
||||
pub.sendMessage("update-status-bar", status=msg)
|
||||
self.stream.volume = self.vol/100.0
|
||||
self.stream.play()
|
||||
self.stopped = False
|
||||
self.is_working = False
|
||||
|
||||
def stop(self):
|
||||
if self.stream != None and self.stream.is_playing == True:
|
||||
self.stream.stop()
|
||||
self.stopped = True
|
||||
if hasattr(self, "worker") and self.worker != None:
|
||||
self.worker.cancel()
|
||||
self.worker = None
|
||||
self.queue = []
|
||||
|
||||
def pause(self):
|
||||
if self.stream != None:
|
||||
if self.stream.is_playing == True:
|
||||
self.stream.pause()
|
||||
self.stopped = True
|
||||
else:
|
||||
self.stream.play()
|
||||
self.stopped = False
|
||||
|
||||
@property
|
||||
def volume(self):
|
||||
if self.stream != None:
|
||||
return self.vol
|
||||
|
||||
@volume.setter
|
||||
def volume(self, vol):
|
||||
if vol <= 100 and vol >= 0:
|
||||
self.vol = vol
|
||||
if self.stream != None:
|
||||
self.stream.volume = self.vol/100.0
|
||||
|
||||
def play_all(self, list_of_urls):
|
||||
self.stop()
|
||||
self.queue = list_of_urls
|
||||
self.play(self.queue[0])
|
||||
self.queue.remove(self.queue[0])
|
||||
self.worker = RepeatingTimer(5, self.player_function)
|
||||
self.worker.start()
|
||||
|
||||
def player_function(self):
|
||||
if self.stream != None and self.stream.is_playing == False and self.stopped == False:
|
||||
if len(self.queue) == 0:
|
||||
self.worker.cancel()
|
||||
return
|
||||
self.play(self.queue[0])
|
||||
self.queue.remove(self.queue[0])
|
||||
@@ -1,464 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import arrow
|
||||
import messages
|
||||
import languageHandler
|
||||
import widgetUtils
|
||||
import output
|
||||
import wx
|
||||
import webbrowser
|
||||
import utils
|
||||
import logging
|
||||
from sessionmanager import session # We'll use some functions from there
|
||||
from pubsub import pub
|
||||
from wxUI.dialogs import postDialogs, urlList
|
||||
from extra import SpellChecker, translator
|
||||
from mysc.thread_utils import call_threaded
|
||||
from wxUI import menus
|
||||
|
||||
log = logging.getLogger("controller.post")
|
||||
|
||||
def get_user(id, profiles):
|
||||
""" Returns an user name and last name based in the id receibed."""
|
||||
for i in profiles:
|
||||
if i["id"] == id:
|
||||
return u"{0} {1}".format(i["first_name"], i["last_name"])
|
||||
# Translators: This string is user when socializer can't find the right user information.
|
||||
return _(u"Unknown username")
|
||||
|
||||
def add_attachment(attachment):
|
||||
msg = u""
|
||||
tpe = ""
|
||||
if attachment["type"] == "link":
|
||||
msg = u"{0}: {1}".format(attachment["link"]["title"], attachment["link"]["url"])
|
||||
tpe = _(u"Link")
|
||||
elif attachment["type"] == "photo":
|
||||
tpe = _(u"Photo")
|
||||
msg = attachment["photo"]["text"]
|
||||
if msg == "":
|
||||
msg = _(u"no description available")
|
||||
elif attachment["type"] == "video":
|
||||
msg = u"{0}".format(attachment["video"]["title"],)
|
||||
tpe = _(u"Video")
|
||||
elif attachment["type"] == "audio":
|
||||
msg = u"{0}".format(" ".join(session.compose_audio(attachment["audio"])))
|
||||
tpe = _(u"Audio")
|
||||
elif attachment["type"] == "doc":
|
||||
msg = u"{0}".format(attachment["doc"]["title"])
|
||||
tpe = _(u"{0} file").format(attachment["doc"]["ext"])
|
||||
return [tpe, msg]
|
||||
|
||||
def get_message(status):
|
||||
message = ""
|
||||
if status.has_key("text"):
|
||||
message = utils.clean_text(status["text"])
|
||||
return message
|
||||
|
||||
class postController(object):
|
||||
def __init__(self, session, postObject):
|
||||
super(postController, self).__init__()
|
||||
self.session = session
|
||||
self.post = postObject
|
||||
# Posts from newsfeed contains this source_id instead from_id in walls. Also it uses post_id and walls use just id.
|
||||
if self.post.has_key("source_id"):
|
||||
self.user_identifier = "source_id"
|
||||
self.post_identifier = "post_id"
|
||||
else:
|
||||
# In wall's posts, if someone has posted in user's wall, owner_id should be used instead from_id
|
||||
# This will help for retrieving comments, do likes, etc.
|
||||
if not self.post.has_key("owner_id"):
|
||||
self.user_identifier = "from_id"
|
||||
else:
|
||||
self.user_identifier = "owner_id"
|
||||
self.post_identifier = "id"
|
||||
self.dialog = postDialogs.post()
|
||||
# self.dialog.comments.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.show_comment)
|
||||
widgetUtils.connect_event(self.dialog.like, widgetUtils.BUTTON_PRESSED, self.post_like)
|
||||
widgetUtils.connect_event(self.dialog.comment, widgetUtils.BUTTON_PRESSED, self.add_comment)
|
||||
widgetUtils.connect_event(self.dialog.tools, widgetUtils.BUTTON_PRESSED, self.show_tools_menu)
|
||||
widgetUtils.connect_event(self.dialog.repost, widgetUtils.BUTTON_PRESSED, self.post_repost)
|
||||
# self.dialog.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.show_menu, self.dialog.comments.list)
|
||||
# self.dialog.Bind(wx.EVT_LIST_KEY_DOWN, self.show_menu_by_key, self.dialog.comments.list)
|
||||
call_threaded(self.load_all_components)
|
||||
# if self.post.has_key("attachments"): print self.post["attachments"]
|
||||
self.attachments = []
|
||||
|
||||
def get_comments(self):
|
||||
user = self.post[self.user_identifier]
|
||||
id = self.post[self.post_identifier]
|
||||
self.comments = self.session.vk.client.wall.getComments(owner_id=user, post_id=id, need_likes=1, count=100, extended=1, preview_length=0)
|
||||
comments_ = []
|
||||
for i in self.comments["items"]:
|
||||
from_ = get_user(i["from_id"], self.comments["profiles"])
|
||||
if i.has_key("reply_to_user"):
|
||||
extra_info = get_user(i["reply_to_user"], self.comments["profiles"])
|
||||
from_ = _(u"{0} Has replied to {1}").format(from_, extra_info)
|
||||
if len(i["text"]) > 140:
|
||||
text = i["text"][:141]
|
||||
else:
|
||||
text = i["text"]
|
||||
original_date = arrow.get(i["date"])
|
||||
created_at = original_date.humanize(locale=languageHandler.getLanguage())
|
||||
likes = str(i["likes"]["count"])
|
||||
comments_.append((from_, text, created_at, likes))
|
||||
self.dialog.insert_comments(comments_)
|
||||
|
||||
def get_post_information(self):
|
||||
from_ = self.session.get_user_name(self.post[self.user_identifier])
|
||||
if self.post.has_key("copy_history"):
|
||||
# Translators: {0} will be replaced with an user.
|
||||
title = _(u"repost from {0}").format(from_,)
|
||||
else:
|
||||
if self.post.has_key("from_id") and self.post.has_key("owner_id"):
|
||||
# Translators: {0} will be replaced with the user who is posting, and {2} with the wall owner.
|
||||
title = _(u"Post from {0} in the {1}'s wall").format(self.session.get_user_name(self.post["from_id"]), self.session.get_user_name(self.post["owner_id"]))
|
||||
else:
|
||||
title = _(u"Post from {0}").format(from_,)
|
||||
self.dialog.set_title(title)
|
||||
message = u""
|
||||
message = get_message(self.post)
|
||||
if self.post.has_key("copy_history"):
|
||||
nm = u"\n"
|
||||
for i in self.post["copy_history"]:
|
||||
nm += u"{0}: {1}\n\n".format(self.session.get_user_name(i["from_id"]), get_message(i))
|
||||
self.get_attachments(i)
|
||||
message += nm
|
||||
self.dialog.set_post(message)
|
||||
self.get_attachments(self.post)
|
||||
|
||||
def get_attachments(self, post):
|
||||
attachments = []
|
||||
if post.has_key("attachments"):
|
||||
for i in post["attachments"]:
|
||||
# We don't need the photos_list attachment, so skip it.
|
||||
if i["type"] == "photos_list":
|
||||
continue
|
||||
attachments.append(add_attachment(i))
|
||||
self.attachments.append(i)
|
||||
# Links in text are not treated like normal attachments, so we'll have to catch and add those to the list without title
|
||||
# We can't get a title because title is provided by the VK API and it will not work for links as simple text.
|
||||
urls = utils.find_urls_in_text(self.dialog.get("post_view"))
|
||||
print urls
|
||||
if len(urls) > 0:
|
||||
links = []
|
||||
for i in urls:
|
||||
links.append({"link": {"title": _(U"Untitled link"), "url": i}, "type": "link"})
|
||||
for i in links:
|
||||
attachments.append(add_attachment(i))
|
||||
self.attachments.append(i)
|
||||
if len(self.attachments) > 0:
|
||||
self.dialog.attachments.list.Enable(True)
|
||||
self.dialog.attachments.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.open_attachment)
|
||||
self.dialog.insert_attachments(attachments)
|
||||
|
||||
def load_all_components(self):
|
||||
self.get_post_information()
|
||||
self.get_likes()
|
||||
self.get_reposts()
|
||||
self.get_comments()
|
||||
if self.post["comments"]["can_post"] == 0:
|
||||
self.dialog.disable("comment")
|
||||
if self.post["likes"]["can_like"] == 0 and self.post["likes"]["user_likes"] == 0:
|
||||
self.dialog.disable("like")
|
||||
elif self.post["likes"]["user_likes"] == 1:
|
||||
self.dialog.set("like", _(u"&Dislike"))
|
||||
if self.post["likes"]["can_publish"] == 0:
|
||||
self.dialog.disable("repost")
|
||||
|
||||
def post_like(self, *args, **kwargs):
|
||||
if self.post.has_key("owner_id") == False:
|
||||
user = int(self.post[self.user_identifier])
|
||||
else:
|
||||
user = int(self.post["owner_id"])
|
||||
id = int(self.post[self.post_identifier])
|
||||
if self.post.has_key("type"):
|
||||
type_ = self.post["type"]
|
||||
else:
|
||||
type_ = "post"
|
||||
if self.dialog.get("like") == _(u"&Dislike"):
|
||||
l = self.session.vk.client.likes.delete(owner_id=user, item_id=id, type=type_)
|
||||
output.speak(_(u"You don't like this"))
|
||||
self.post["likes"]["count"] = l["likes"]
|
||||
self.post["likes"]["user_likes"] = 2
|
||||
self.get_likes()
|
||||
self.dialog.set("like", _(u"&Like"))
|
||||
else:
|
||||
l = self.session.vk.client.likes.add(owner_id=user, item_id=id, type=type_)
|
||||
output.speak(_(u"You liked this"))
|
||||
self.dialog.set("like", _(u"&Dislike"))
|
||||
self.post["likes"]["count"] = l["likes"]
|
||||
self.post["likes"]["user_likes"] = 1
|
||||
self.get_likes()
|
||||
|
||||
def post_repost(self, *args, **kwargs):
|
||||
object_id = "wall{0}_{1}".format(self.post[self.user_identifier], self.post[self.post_identifier])
|
||||
p = messages.post(title=_(u"Repost"), caption=_(u"Add your comment here"), text="")
|
||||
if p.message.get_response() == widgetUtils.OK:
|
||||
msg = p.message.get_text().encode("utf-8")
|
||||
self.session.vk.client.wall.repost(object=object_id, message=msg)
|
||||
|
||||
def get_likes(self):
|
||||
self.dialog.set_likes(self.post["likes"]["count"])
|
||||
|
||||
def get_reposts(self):
|
||||
self.dialog.set_shares(self.post["reposts"]["count"])
|
||||
|
||||
def add_comment(self, *args, **kwargs):
|
||||
comment = messages.comment(title=_(u"Add a comment"), caption="", text="")
|
||||
if comment.message.get_response() == widgetUtils.OK:
|
||||
msg = comment.message.get_text().encode("utf-8")
|
||||
try:
|
||||
user = self.post[self.user_identifier]
|
||||
id = self.post[self.post_identifier]
|
||||
self.session.vk.client.wall.addComment(owner_id=user, post_id=id, text=msg)
|
||||
output.speak(_(u"You've posted a comment"))
|
||||
if self.comments["count"] < 100:
|
||||
self.clear_comments_list()
|
||||
self.get_comments()
|
||||
except Exception as msg:
|
||||
print msg
|
||||
|
||||
def clear_comments_list(self):
|
||||
self.dialog.comments.clear()
|
||||
|
||||
def show_comment(self, *args, **kwargs):
|
||||
c = comment(self.session, self.comments["data"][self.dialog.comments.get_selected()])
|
||||
c.dialog.get_response()
|
||||
|
||||
def show_menu(self, *args, **kwargs):
|
||||
if self.dialog.comments.get_count() == 0: return
|
||||
menu = menus.commentMenu()
|
||||
widgetUtils.connect_event(self.dialog, widgetUtils.MENU, self.show_comment, menuitem=menu.open)
|
||||
widgetUtils.connect_event(self.dialog, widgetUtils.MENU, self.comment_like, menuitem=menu.like)
|
||||
widgetUtils.connect_event(self.dialog, widgetUtils.MENU, self.comment_unlike, menuitem=menu.unlike)
|
||||
self.dialog.PopupMenu(menu, self.dialog.comments.list.GetPosition())
|
||||
|
||||
def show_menu_by_key(self, ev):
|
||||
if ev.GetKeyCode() == wx.WXK_WINDOWS_MENU:
|
||||
self.show_menu()
|
||||
|
||||
def show_tools_menu(self, *args, **kwargs):
|
||||
menu = menus.toolsMenu()
|
||||
widgetUtils.connect_event(self.dialog, widgetUtils.MENU, self.open_url, menuitem=menu.url)
|
||||
widgetUtils.connect_event(self.dialog, widgetUtils.MENU, self.translate, menuitem=menu.translate)
|
||||
widgetUtils.connect_event(self.dialog, widgetUtils.MENU, self.spellcheck, menuitem=menu.CheckSpelling)
|
||||
self.dialog.PopupMenu(menu, self.dialog.tools.GetPosition())
|
||||
|
||||
def comment_like(self, *args, **kwargs):
|
||||
comment_id = self.comments["data"][self.dialog.comments.get_selected()]["id"]
|
||||
self.session.like(comment_id)
|
||||
output.speak(_(u"You do like this comment"))
|
||||
|
||||
def comment_unlike(self, *args, **kwargs):
|
||||
comment_id = self.comments["data"][self.dialog.comments.get_selected()]["id"]
|
||||
self.session.unlike(comment_id)
|
||||
output.speak(_(u"You don't like this comment"))
|
||||
|
||||
def translate(self, *args, **kwargs):
|
||||
dlg = translator.gui.translateDialog()
|
||||
if dlg.get_response() == widgetUtils.OK:
|
||||
text_to_translate = self.dialog.post_view.GetValue().encode("utf-8")
|
||||
source = [x[0] for x in translator.translator.available_languages()][dlg.get("source_lang")]
|
||||
dest = [x[0] for x in translator.translator.available_languages()][dlg.get("dest_lang")]
|
||||
msg = translator.translator.translate(text_to_translate, source, dest)
|
||||
self.dialog.post_view.ChangeValue(msg)
|
||||
output.speak(_(u"Translated"))
|
||||
else:
|
||||
return
|
||||
|
||||
def spellcheck(self, *args, **kwargs):
|
||||
text = self.dialog.post_view.GetValue()
|
||||
checker = SpellChecker.spellchecker.spellChecker(text, "")
|
||||
if hasattr(checker, "fixed_text"):
|
||||
self.dialog.post_view.ChangeValue(checker.fixed_text)
|
||||
|
||||
def open_url(self, *args, **kwargs):
|
||||
text = self.dialog.post_view.GetValue()
|
||||
urls = find_urls(text)
|
||||
url = None
|
||||
if len(urls) == 0: return
|
||||
if len(urls) == 1:
|
||||
url = urls[0]
|
||||
elif len(urls) > 1:
|
||||
url_list = urlList.urlList()
|
||||
url_list.populate_list(urls)
|
||||
if url_list.get_response() == widgetUtils.OK:
|
||||
url = urls[url_list.get_item()]
|
||||
if url != None:
|
||||
output.speak(_(u"Opening URL..."), True)
|
||||
webbrowser.open_new_tab(url)
|
||||
|
||||
def open_attachment(self, *args, **kwargs):
|
||||
index = self.dialog.attachments.get_selected()
|
||||
attachment = self.attachments[index]
|
||||
if attachment["type"] == "audio":
|
||||
a = audio(session=self.session, postObject=[attachment["audio"]])
|
||||
a.dialog.get_response()
|
||||
a.dialog.Destroy()
|
||||
if attachment["type"] == "link":
|
||||
output.speak(_(u"Opening URL..."), True)
|
||||
webbrowser.open_new_tab(attachment["link"]["url"])
|
||||
elif attachment["type"] == "doc":
|
||||
output.speak(_(u"Opening document in web browser..."))
|
||||
webbrowser.open(attachment["doc"]["url"])
|
||||
elif attachment["type"] == "video":
|
||||
# it seems VK doesn't like to attach video links as normal URLS, so we'll have to
|
||||
# get the full video object and use its "player" key which will open a webbrowser in their site with a player for the video.
|
||||
# see https://vk.com/dev/attachments_w and and https://vk.com/dev/video.get
|
||||
# However, the flash player isn't good for visually impaired people (when you press play you won't be able to close the window with alt+f4), so it could be good to use the HTML5 player.
|
||||
# For firefox, see https://addons.mozilla.org/ru/firefox/addon/force-html5-video-player-at-vk/
|
||||
# May be I could use a dialogue here for inviting people to use this addon in firefox. It seems it isn't possible to use this html5 player from the player URL.
|
||||
object_id = "{0}_{1}".format(attachment["video"]["owner_id"], attachment["video"]["id"])
|
||||
video_object = self.session.vk.client.video.get(owner_id=attachment["video"]["owner_id"], videos=object_id)
|
||||
video_object = video_object["items"][0]
|
||||
output.speak(_(u"Opening video in web browser..."), True)
|
||||
webbrowser.open_new_tab(video_object["player"])
|
||||
elif attachment["type"] == "photo":
|
||||
output.speak(_(u"Opening photo in web browser..."), True)
|
||||
# Possible photo sizes for looking in the attachment information. Try to use the biggest photo available.
|
||||
possible_sizes = [1280, 604, 130, 75]
|
||||
url = ""
|
||||
for i in possible_sizes:
|
||||
if attachment["photo"].has_key("photo_{0}".format(i,)):
|
||||
url = attachment["photo"]["photo_{0}".format(i,)]
|
||||
if url != "":
|
||||
webbrowser.open_new_tab(url)
|
||||
else:
|
||||
print attachment["photo"].keys()
|
||||
else:
|
||||
log.debug("Unhandled attachment: %r" % (attachment,))
|
||||
|
||||
class comment(object):
|
||||
def __init__(self, session, comment_object):
|
||||
super(comment, self).__init__()
|
||||
self.session = session
|
||||
self.comment = comment_object
|
||||
self.dialog = postDialogs.comment()
|
||||
from_ = self.comment["from"]["name"]
|
||||
message = self.comment["message"]
|
||||
original_date = arrow.get(self.comment["created_time"], "YYYY-MM-DTHH:m:sZ", locale="en")
|
||||
created_at = original_date.humanize(locale=languageHandler.getLanguage())
|
||||
self.dialog.set_post(message)
|
||||
self.dialog.set_title(_(u"Comment from {0}").format(from_,))
|
||||
widgetUtils.connect_event(self.dialog.like, widgetUtils.BUTTON_PRESSED, self.post_like)
|
||||
call_threaded(self.get_likes)
|
||||
|
||||
def get_likes(self):
|
||||
self.likes = self.session.fb.client.get_connections(id=self.comment["id"], connection_name="likes", summary=True)
|
||||
self.dialog.set_likes(self.likes["summary"]["total_count"])
|
||||
|
||||
def post_like(self, *args, **kwargs):
|
||||
lk = self.session.like(self.comment["id"])
|
||||
self.get_likes()
|
||||
|
||||
class audio(postController):
|
||||
def __init__(self, session, postObject):
|
||||
self.added_audios = {}
|
||||
self.session = session
|
||||
self.post = postObject
|
||||
self.dialog = postDialogs.audio()
|
||||
widgetUtils.connect_event(self.dialog.list, widgetUtils.LISTBOX_CHANGED, self.handle_changes)
|
||||
self.load_audios()
|
||||
self.fill_information(0)
|
||||
widgetUtils.connect_event(self.dialog.download, widgetUtils.BUTTON_PRESSED, self.download)
|
||||
widgetUtils.connect_event(self.dialog.play, widgetUtils.BUTTON_PRESSED, self.play)
|
||||
widgetUtils.connect_event(self.dialog.add, widgetUtils.BUTTON_PRESSED, self.add_to_library)
|
||||
widgetUtils.connect_event(self.dialog.remove, widgetUtils.BUTTON_PRESSED, self.remove_from_library)
|
||||
|
||||
def add_to_library(self, *args, **kwargs):
|
||||
post = self.post[self.dialog.get_audio()]
|
||||
args = {}
|
||||
args["audio_id"] = post["id"]
|
||||
if post.has_key("album_id"):
|
||||
args["album_id"] = post["album_id"]
|
||||
args["owner_id"] = post["owner_id"]
|
||||
audio = self.session.vk.client.audio.add(**args)
|
||||
if audio != None and int(audio) > 21:
|
||||
self.added_audios[post["id"]] = audio
|
||||
self.dialog.change_state("add", False)
|
||||
self.dialog.change_state("remove", True)
|
||||
|
||||
def remove_from_library(self, *args, **kwargs):
|
||||
post = self.post[self.dialog.get_audio()]
|
||||
args = {}
|
||||
if self.added_audios.has_key(post["id"]):
|
||||
args["audio_id"] = self.added_audios[post["id"]]
|
||||
args["owner_id"] = self.session.user_id
|
||||
else:
|
||||
args["audio_id"] = post["id"]
|
||||
args["owner_id"] = post["owner_id"]
|
||||
result = self.session.vk.client.audio.delete(**args)
|
||||
if int(result) == 1:
|
||||
self.dialog.change_state("add", True)
|
||||
self.dialog.change_state("remove", False)
|
||||
if self.added_audios.has_key(post["id"]):
|
||||
self.added_audios.pop(post["id"])
|
||||
|
||||
def fill_information(self, index):
|
||||
post = self.post[index]
|
||||
if post.has_key("artist"):
|
||||
self.dialog.set("artist", post["artist"])
|
||||
if post.has_key("title"):
|
||||
self.dialog.set("title", post["title"])
|
||||
if post.has_key("duration"):
|
||||
self.dialog.set("duration", utils.seconds_to_string(post["duration"]))
|
||||
self.dialog.set_title(u"{0} - {1}".format(post["title"], post["artist"]))
|
||||
call_threaded(self.get_lyrics)
|
||||
if post["owner_id"] == self.session.user_id or self.added_audios.has_key(post["id"]) == True:
|
||||
self.dialog.change_state("remove", True)
|
||||
self.dialog.change_state("add", False)
|
||||
else:
|
||||
self.dialog.change_state("add", True)
|
||||
self.dialog.change_state("remove", False)
|
||||
|
||||
def get_lyrics(self):
|
||||
post = self.post[self.dialog.get_audio()]
|
||||
if post.has_key("lyrics_id"):
|
||||
l = self.session.vk.client.audio.getLyrics(lyrics_id=int(post["lyrics_id"]))
|
||||
self.dialog.set("lyric", l["text"])
|
||||
else:
|
||||
self.dialog.change_state("lyric", False)
|
||||
|
||||
def download(self, *args, **kwargs):
|
||||
post = self.post[self.dialog.get_audio()]
|
||||
f = u"{0} - {1}.mp3".format(post["title"], post["artist"])
|
||||
path = self.dialog.get_destination_path(f)
|
||||
if path != None:
|
||||
pub.sendMessage("download-file", url=post["url"], filename=path)
|
||||
|
||||
def play(self, *args, **kwargs):
|
||||
post = self.post[self.dialog.get_audio()]
|
||||
pub.sendMessage("play-audio", audio_object=post)
|
||||
|
||||
def load_audios(self):
|
||||
for i in self.post:
|
||||
s = u"{0} - {1}. {2}".format(i["title"], i["artist"], utils.seconds_to_string(i["duration"]))
|
||||
self.dialog.insert_audio(s)
|
||||
self.dialog.list.SetSelection(0)
|
||||
if len(self.post) == 1:
|
||||
self.dialog.list.Enable(False)
|
||||
self.dialog.title.SetFocus()
|
||||
|
||||
def handle_changes(self, *args, **kwargs):
|
||||
p = self.dialog.get_audio()
|
||||
self.fill_information(p)
|
||||
|
||||
class friendship(object):
|
||||
|
||||
def __init__(self, session, post):
|
||||
self.session = session
|
||||
self.post = post
|
||||
self.dialog = postDialogs.friendship()
|
||||
list_of_friends = self.get_friend_names()
|
||||
from_ = self.session.get_user_name(self.post["source_id"])
|
||||
title = _(u"{0} added the following friends").format(from_,)
|
||||
self.dialog.set_title(title)
|
||||
self.set_friends_list(list_of_friends)
|
||||
|
||||
def get_friend_names(self):
|
||||
self.friends = self.post["friends"]["items"]
|
||||
return [self.session.get_user_name(i["user_id"]) for i in self.friends]
|
||||
|
||||
def set_friends_list(self, friendslist):
|
||||
for i in friendslist:
|
||||
self.dialog.friends.insert_item(False, *[i])
|
||||
@@ -2,22 +2,26 @@
|
||||
import widgetUtils
|
||||
from wxUI.dialogs import selector as gui
|
||||
|
||||
class audioAlbum(object):
|
||||
class album(object):
|
||||
|
||||
def __init__(self, title, session):
|
||||
super(audioAlbum, self).__init__()
|
||||
def __init__(self, title, session, album_type="audio_albums"):
|
||||
super(album, self).__init__()
|
||||
self.item = None
|
||||
self.session = session
|
||||
if not hasattr(self.session, album_type):
|
||||
return
|
||||
self.albums = getattr(self.session, album_type)
|
||||
self.dialog = gui.selectAlbum(title=title, albums=self.get_albums_as_string())
|
||||
response = self.dialog.get_response()
|
||||
if response == widgetUtils.OK:
|
||||
self.item = self.search_item(self.dialog.get_string())
|
||||
|
||||
def get_albums_as_string(self):
|
||||
return [i["title"] for i in self.session.audio_albums]
|
||||
return [i["title"] for i in self.albums]
|
||||
|
||||
def search_item(self, item):
|
||||
for i in self.session.audio_albums:
|
||||
for i in self.albums:
|
||||
if i["title"] == item:
|
||||
return i["id"]
|
||||
return None
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import spellchecker
|
||||
from . import spellchecker
|
||||
import platform
|
||||
if platform.system() == "Windows":
|
||||
from wx_ui import *
|
||||
from .wx_ui import *
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import logging
|
||||
import wx_ui
|
||||
import widgetUtils
|
||||
import output
|
||||
import config
|
||||
@@ -8,6 +8,7 @@ import languageHandler
|
||||
from enchant.checker import SpellChecker
|
||||
from enchant.errors import DictNotFoundError
|
||||
from enchant import tokenize
|
||||
from . import wx_ui
|
||||
|
||||
log = logging.getLogger("extra.SpellChecker.spellChecker")
|
||||
|
||||
@@ -25,7 +26,7 @@ class spellChecker(object):
|
||||
self.checker = SpellChecker(languageHandler.curLang, filters=[tokenize.EmailFilter, tokenize.URLFilter])
|
||||
self.checker.set_text(text)
|
||||
except DictNotFoundError:
|
||||
print "no dict"
|
||||
print("no dict")
|
||||
log.exception("Dictionary for language %s not found." % (dictionary,))
|
||||
wx_ui.dict_not_found_error()
|
||||
self.active = False
|
||||
@@ -42,9 +43,9 @@ class spellChecker(object):
|
||||
|
||||
def check(self):
|
||||
try:
|
||||
self.checker.next()
|
||||
textToSay = _(u"Misspelled word: %s") % (self.checker.word,)
|
||||
context = u"... %s %s %s" % (self.checker.leading_context(10), self.checker.word, self.checker.trailing_context(10))
|
||||
next(self.checker)
|
||||
textToSay = _("Misspelled word: %s") % (self.checker.word,)
|
||||
context = "... %s %s %s" % (self.checker.leading_context(10), self.checker.word, self.checker.trailing_context(10))
|
||||
self.dialog.set_title(textToSay)
|
||||
output.speak(textToSay)
|
||||
self.dialog.set_word_and_suggestions(word=self.checker.word, context=context, suggestions=self.checker.suggest())
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
############################################################
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import application
|
||||
|
||||
@@ -24,25 +25,25 @@ class spellCheckerDialog(wx.Dialog):
|
||||
super(spellCheckerDialog, self).__init__(None, 1)
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
word = wx.StaticText(panel, -1, _(u"&Misspelled word"))
|
||||
word = wx.StaticText(panel, -1, _("&Misspelled word"))
|
||||
self.word = wx.TextCtrl(panel, -1)
|
||||
wordBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
wordBox.Add(word, 0, wx.ALL, 5)
|
||||
wordBox.Add(self.word, 0, wx.ALL, 5)
|
||||
context = wx.StaticText(panel, -1, _(u"Con&text"))
|
||||
context = wx.StaticText(panel, -1, _("Con&text"))
|
||||
self.context = wx.TextCtrl(panel, -1)
|
||||
contextBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
contextBox.Add(context, 0, wx.ALL, 5)
|
||||
contextBox.Add(self.context, 0, wx.ALL, 5)
|
||||
suggest = wx.StaticText(panel, -1, _(u"&Suggestions"))
|
||||
suggest = wx.StaticText(panel, -1, _("&Suggestions"))
|
||||
self.suggestions = wx.ListBox(panel, -1, choices=[], style=wx.LB_SINGLE)
|
||||
suggestionsBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
suggestionsBox.Add(suggest, 0, wx.ALL, 5)
|
||||
suggestionsBox.Add(self.suggestions, 0, wx.ALL, 5)
|
||||
self.ignore = wx.Button(panel, -1, _(u"&Ignore"))
|
||||
self.ignoreAll = wx.Button(panel, -1, _(u"Ignore &all"))
|
||||
self.replace = wx.Button(panel, -1, _(u"&Replace"))
|
||||
self.replaceAll = wx.Button(panel, -1, _(u"Replace a&ll"))
|
||||
self.ignore = wx.Button(panel, -1, _("&Ignore"))
|
||||
self.ignoreAll = wx.Button(panel, -1, _("Ignore &all"))
|
||||
self.replace = wx.Button(panel, -1, _("&Replace"))
|
||||
self.replaceAll = wx.Button(panel, -1, _("Replace a&ll"))
|
||||
close = wx.Button(panel, wx.ID_CANCEL)
|
||||
btnBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
btnBox.Add(self.ignore, 0, wx.ALL, 5)
|
||||
@@ -73,7 +74,7 @@ class spellCheckerDialog(wx.Dialog):
|
||||
return self.suggestions.GetStringSelection()
|
||||
|
||||
def dict_not_found_error():
|
||||
wx.MessageDialog(None, _(u"An error has occurred. There are no dictionaries available for the selected language in {0}").format(application.name,), _(u"Error"), wx.ICON_ERROR).ShowModal()
|
||||
wx.MessageDialog(None, _("An error has occurred. There are no dictionaries available for the selected language in {0}").format(application.name,), _("Error"), wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def finished():
|
||||
wx.MessageDialog(None, _(u"Spell check complete."), application.name, style=wx.OK).ShowModal()
|
||||
wx.MessageDialog(None, _("Spell check complete."), application.name, style=wx.OK).ShowModal()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import translator
|
||||
import platform
|
||||
from . import translator
|
||||
if platform.system() == "Windows":
|
||||
import wx_ui as gui
|
||||
from . import wx_ui as gui
|
||||
|
||||
@@ -1,108 +1,115 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from microsofttranslator import Translator
|
||||
|
||||
def translate(text="", source="auto", target="en"):
|
||||
t = Translator("twblue", "4KZA26GYIfmVAqQA/z16Hlucbg64hVSDTIpRjT2FqIU=")
|
||||
return t.translate(text, target)
|
||||
from __future__ import unicode_literals
|
||||
from builtins import zip
|
||||
from yandex_translate import YandexTranslate
|
||||
|
||||
def translate(text="", target="en"):
|
||||
t = YandexTranslate("trnsl.1.1.20161012T134532Z.d01b9c75fc39aa74.7d1be75a5166a80583eeb020e10f584168da6bf7")
|
||||
vars = dict(text=text, lang=target)
|
||||
return t.translate(**vars)["text"][0]
|
||||
|
||||
supported_langs = None
|
||||
d = None
|
||||
languages = {
|
||||
"af": _(u"Afrikaans"),
|
||||
"sq": _(u"Albanian"),
|
||||
"am": _(u"Amharic"),
|
||||
"ar": _(u"Arabic"),
|
||||
"hy": _(u"Armenian"),
|
||||
"az": _(u"Azerbaijani"),
|
||||
"eu": _(u"Basque"),
|
||||
"be": _(u"Belarusian"),
|
||||
"bn": _(u"Bengali"),
|
||||
"bh": _(u"Bihari"),
|
||||
"bg": _(u"Bulgarian"),
|
||||
"my": _(u"Burmese"),
|
||||
"ca": _(u"Catalan"),
|
||||
"chr": _(u"Cherokee"),
|
||||
"zh": _(u"Chinese"),
|
||||
"zh-CN": _(u"Chinese_simplified"),
|
||||
"zh-TW": _(u"Chinese_traditional"),
|
||||
"hr": _(u"Croatian"),
|
||||
"cs": _(u"Czech"),
|
||||
"da": _(u"Danish"),
|
||||
"dv": _(u"Dhivehi"),
|
||||
"nl": _(u"Dutch"),
|
||||
"en": _(u"English"),
|
||||
"eo": _(u"Esperanto"),
|
||||
"et": _(u"Estonian"),
|
||||
"tl": _(u"Filipino"),
|
||||
"fi": _(u"Finnish"),
|
||||
"fr": _(u"French"),
|
||||
"gl": _(u"Galician"),
|
||||
"ka": _(u"Georgian"),
|
||||
"de": _(u"German"),
|
||||
"el": _(u"Greek"),
|
||||
"gn": _(u"Guarani"),
|
||||
"gu": _(u"Gujarati"),
|
||||
"iw": _(u"Hebrew"),
|
||||
"hi": _(u"Hindi"),
|
||||
"hu": _(u"Hungarian"),
|
||||
"is": _(u"Icelandic"),
|
||||
"id": _(u"Indonesian"),
|
||||
"iu": _(u"Inuktitut"),
|
||||
"ga": _(u"Irish"),
|
||||
"it": _(u"Italian"),
|
||||
"ja": _(u"Japanese"),
|
||||
"kn": _(u"Kannada"),
|
||||
"kk": _(u"Kazakh"),
|
||||
"km": _(u"Khmer"),
|
||||
"ko": _(u"Korean"),
|
||||
"ku": _(u"Kurdish"),
|
||||
"ky": _(u"Kyrgyz"),
|
||||
"lo": _(u"Laothian"),
|
||||
"lv": _(u"Latvian"),
|
||||
"lt": _(u"Lithuanian"),
|
||||
"mk": _(u"Macedonian"),
|
||||
"ms": _(u"Malay"),
|
||||
"ml": _(u"Malayalam"),
|
||||
"mt": _(u"Maltese"),
|
||||
"mr": _(u"Marathi"),
|
||||
"mn": _(u"Mongolian"),
|
||||
"ne": _(u"Nepali"),
|
||||
"no": _(u"Norwegian"),
|
||||
"or": _(u"Oriya"),
|
||||
"ps": _(u"Pashto"),
|
||||
"fa": _(u"Persian"),
|
||||
"pl": _(u"Polish"),
|
||||
"pt-PT": _(u"Portuguese"),
|
||||
"pa": _(u"Punjabi"),
|
||||
"ro": _(u"Romanian"),
|
||||
"ru": _(u"Russian"),
|
||||
"sa": _(u"Sanskrit"),
|
||||
"sr": _(u"Serbian"),
|
||||
"sd": _(u"Sindhi"),
|
||||
"si": _(u"Sinhalese"),
|
||||
"sk": _(u"Slovak"),
|
||||
"sl": _(u"Slovenian"),
|
||||
"es": _(u"Spanish"),
|
||||
"sw": _(u"Swahili"),
|
||||
"sv": _(u"Swedish"),
|
||||
"tg": _(u"Tajik"),
|
||||
"ta": _(u"Tamil"),
|
||||
"tl": _(u"Tagalog"),
|
||||
"te": _(u"Telugu"),
|
||||
"th": _(u"Thai"),
|
||||
"bo": _(u"Tibetan"),
|
||||
"tr": _(u"Turkish"),
|
||||
"uk": _(u"Ukrainian"),
|
||||
"ur": _(u"Urdu"),
|
||||
"uz": _(u"Uzbek"),
|
||||
"ug": _(u"Uighur"),
|
||||
"vi": _(u"Vietnamese"),
|
||||
"cy": _(u"Welsh"),
|
||||
"yi": _(u"Yiddish")
|
||||
"af": _("Afrikaans"),
|
||||
"sq": _("Albanian"),
|
||||
"am": _("Amharic"),
|
||||
"ar": _("Arabic"),
|
||||
"hy": _("Armenian"),
|
||||
"az": _("Azerbaijani"),
|
||||
"eu": _("Basque"),
|
||||
"be": _("Belarusian"),
|
||||
"bn": _("Bengali"),
|
||||
"bh": _("Bihari"),
|
||||
"bg": _("Bulgarian"),
|
||||
"my": _("Burmese"),
|
||||
"ca": _("Catalan"),
|
||||
"chr": _("Cherokee"),
|
||||
"zh": _("Chinese"),
|
||||
"zh-CN": _("Chinese_simplified"),
|
||||
"zh-TW": _("Chinese_traditional"),
|
||||
"hr": _("Croatian"),
|
||||
"cs": _("Czech"),
|
||||
"da": _("Danish"),
|
||||
"dv": _("Dhivehi"),
|
||||
"nl": _("Dutch"),
|
||||
"en": _("English"),
|
||||
"eo": _("Esperanto"),
|
||||
"et": _("Estonian"),
|
||||
"tl": _("Filipino"),
|
||||
"fi": _("Finnish"),
|
||||
"fr": _("French"),
|
||||
"gl": _("Galician"),
|
||||
"ka": _("Georgian"),
|
||||
"de": _("German"),
|
||||
"el": _("Greek"),
|
||||
"gn": _("Guarani"),
|
||||
"gu": _("Gujarati"),
|
||||
"iw": _("Hebrew"),
|
||||
"hi": _("Hindi"),
|
||||
"hu": _("Hungarian"),
|
||||
"is": _("Icelandic"),
|
||||
"id": _("Indonesian"),
|
||||
"iu": _("Inuktitut"),
|
||||
"ga": _("Irish"),
|
||||
"it": _("Italian"),
|
||||
"ja": _("Japanese"),
|
||||
"kn": _("Kannada"),
|
||||
"kk": _("Kazakh"),
|
||||
"km": _("Khmer"),
|
||||
"ko": _("Korean"),
|
||||
"ku": _("Kurdish"),
|
||||
"ky": _("Kyrgyz"),
|
||||
"lo": _("Laothian"),
|
||||
"lv": _("Latvian"),
|
||||
"lt": _("Lithuanian"),
|
||||
"mk": _("Macedonian"),
|
||||
"ms": _("Malay"),
|
||||
"ml": _("Malayalam"),
|
||||
"mt": _("Maltese"),
|
||||
"mr": _("Marathi"),
|
||||
"mn": _("Mongolian"),
|
||||
"ne": _("Nepali"),
|
||||
"no": _("Norwegian"),
|
||||
"or": _("Oriya"),
|
||||
"ps": _("Pashto"),
|
||||
"fa": _("Persian"),
|
||||
"pl": _("Polish"),
|
||||
"pt": _("Portuguese"),
|
||||
"pa": _("Punjabi"),
|
||||
"ro": _("Romanian"),
|
||||
"ru": _("Russian"),
|
||||
"sa": _("Sanskrit"),
|
||||
"sr": _("Serbian"),
|
||||
"sd": _("Sindhi"),
|
||||
"si": _("Sinhalese"),
|
||||
"sk": _("Slovak"),
|
||||
"sl": _("Slovenian"),
|
||||
"es": _("Spanish"),
|
||||
"sw": _("Swahili"),
|
||||
"sv": _("Swedish"),
|
||||
"tg": _("Tajik"),
|
||||
"ta": _("Tamil"),
|
||||
"tl": _("Tagalog"),
|
||||
"te": _("Telugu"),
|
||||
"th": _("Thai"),
|
||||
"bo": _("Tibetan"),
|
||||
"tr": _("Turkish"),
|
||||
"uk": _("Ukrainian"),
|
||||
"ur": _("Urdu"),
|
||||
"uz": _("Uzbek"),
|
||||
"ug": _("Uighur"),
|
||||
"vi": _("Vietnamese"),
|
||||
"cy": _("Welsh"),
|
||||
"yi": _("Yiddish")
|
||||
}
|
||||
|
||||
def available_languages():
|
||||
l = languages.keys()
|
||||
d = languages.values()
|
||||
l.insert(0, '')
|
||||
d.insert(0, _(u"autodetect"))
|
||||
return sorted(zip(l, d))
|
||||
global supported_langs, d
|
||||
if supported_langs == None and d == None:
|
||||
t = YandexTranslate("trnsl.1.1.20161012T134532Z.d01b9c75fc39aa74.7d1be75a5166a80583eeb020e10f584168da6bf7")
|
||||
supported_langs = t.langs
|
||||
d = []
|
||||
for i in supported_langs:
|
||||
d.append(languages[i])
|
||||
return sorted(zip(supported_langs, d))
|
||||
|
||||
@@ -16,30 +16,29 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
############################################################
|
||||
import translator
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import widgetUtils
|
||||
from . import translator
|
||||
|
||||
class translateDialog(widgetUtils.BaseDialog):
|
||||
def __init__(self):
|
||||
super(translateDialog, self).__init__(None, -1, title=_(u"Translate message"))
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
staticSource = wx.StaticText(panel, -1, _(u"&Source language"))
|
||||
self.source_lang = wx.ComboBox(panel, -1, choices=[x[1] for x in translator.available_languages()], style = wx.CB_READONLY)
|
||||
self.source_lang.SetFocus()
|
||||
staticDest = wx.StaticText(panel, -1, _(u"&Target language"))
|
||||
self.source_lang.SetSelection(0)
|
||||
self.dest_lang = wx.ComboBox(panel, -1, choices=[x[1] for x in translator.available_languages()], style = wx.CB_READONLY)
|
||||
listSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
listSizer.Add(staticSource)
|
||||
listSizer.Add(self.source_lang)
|
||||
listSizer.Add(staticDest)
|
||||
listSizer.Add(self.dest_lang)
|
||||
ok = wx.Button(panel, wx.ID_OK)
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL)
|
||||
self.SetEscapeId(wx.ID_CANCEL)
|
||||
class translateDialog(wx.Dialog):
|
||||
def __init__(self):
|
||||
super(translateDialog, self).__init__(None, -1, title=_("Translate message"))
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
staticDest = wx.StaticText(panel, -1, _("Target language"))
|
||||
self.dest_lang = wx.ComboBox(panel, -1, choices=[x[1] for x in translator.available_languages()], style = wx.CB_READONLY)
|
||||
self.dest_lang.SetFocus()
|
||||
self.dest_lang.SetSelection(0)
|
||||
listSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
listSizer.Add(staticDest)
|
||||
listSizer.Add(self.dest_lang)
|
||||
ok = wx.Button(panel, wx.ID_OK)
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL)
|
||||
self.SetEscapeId(wx.ID_CANCEL)
|
||||
|
||||
def get(self, control):
|
||||
return getattr(self, control).GetSelection()
|
||||
def get(self, control):
|
||||
return getattr(self, control).GetSelection()
|
||||
|
||||
def get_response(self):
|
||||
return self.ShowModal()
|
||||
@@ -1,9 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import sys
|
||||
import fix_requests
|
||||
import fix_win32com
|
||||
from . import fix_requests
|
||||
|
||||
#if hasattr(sys, "frozen"):
|
||||
from . import fix_win32com
|
||||
from . import fix_libloader
|
||||
|
||||
def setup():
|
||||
fix_requests.fix()
|
||||
if hasattr(sys, "frozen"):
|
||||
fix_win32com.fix()
|
||||
# if hasattr(sys, "frozen"):
|
||||
fix_libloader.fix()
|
||||
fix_win32com.fix()
|
||||
36
src/fixes/fix_libloader.py
Normal file
36
src/fixes/fix_libloader.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import win32com
|
||||
import paths
|
||||
win32com.__build_path__=paths.com_path()
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.join(win32com.__gen_path__, "."))
|
||||
from win32com.client import gencache
|
||||
from pywintypes import com_error
|
||||
from libloader import com
|
||||
|
||||
fixed=False
|
||||
|
||||
def patched_getmodule(modname):
|
||||
mod=__import__(modname)
|
||||
return sys.modules[modname]
|
||||
|
||||
def load_com(*names):
|
||||
global fixed
|
||||
if fixed==False:
|
||||
gencache._GetModule=patched_getmodule
|
||||
com.prepare_gencache()
|
||||
fixed=True
|
||||
result = None
|
||||
for name in names:
|
||||
try:
|
||||
result = gencache.EnsureDispatch(name)
|
||||
break
|
||||
except com_error:
|
||||
continue
|
||||
if result is None:
|
||||
raise com_error("Unable to load any of the provided com objects.")
|
||||
return result
|
||||
|
||||
def fix():
|
||||
com.load_com = load_com
|
||||
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import requests
|
||||
import paths
|
||||
import os
|
||||
@@ -7,5 +8,5 @@ log = logging.getLogger("fixes.fix_requests")
|
||||
|
||||
def fix():
|
||||
log.debug("Applying fix for requests...")
|
||||
os.environ["REQUESTS_CA_BUNDLE"] = paths.app_path("cacert.pem")
|
||||
log.debug("Changed CA path to %s" % (paths.app_path("cacert.pem"),))
|
||||
os.environ["REQUESTS_CA_BUNDLE"] = os.path.join(paths.app_path(), "cacert.pem")#.encode(paths.fsencoding)
|
||||
# log.debug("Changed CA path to %s" % (os.environ["REQUESTS_CA_BUNDLE"]))#.decode(paths.fsencoding)))
|
||||
@@ -1,3 +1,4 @@
|
||||
from __future__ import unicode_literals
|
||||
import win32com.client
|
||||
def fix():
|
||||
if win32com.client.gencache.is_readonly == True:
|
||||
|
||||
70
src/installer.nsi
Normal file
70
src/installer.nsi
Normal file
@@ -0,0 +1,70 @@
|
||||
!include "MUI2.nsh"
|
||||
!include "LogicLib.nsh"
|
||||
Unicode true
|
||||
CRCCheck on
|
||||
ManifestSupportedOS all
|
||||
XPStyle on
|
||||
Name "Socializer"
|
||||
OutFile "socializer_0.23_setup.exe"
|
||||
InstallDir "$PROGRAMFILES\socializer"
|
||||
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "InstallLocation"
|
||||
RequestExecutionLevel admin
|
||||
SetCompress auto
|
||||
SetCompressor /solid lzma
|
||||
SetDatablockOptimize on
|
||||
VIAddVersionKey ProductName "Socializer"
|
||||
VIAddVersionKey LegalCopyright "Copyright 2019 Manuel Cortez."
|
||||
VIAddVersionKey ProductVersion "0.23"
|
||||
VIAddVersionKey FileVersion "0.23"
|
||||
VIProductVersion "0.23.0.0"
|
||||
VIFileVersion "0.23.0.0"
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
var StartMenuFolder
|
||||
!insertmacro MUI_PAGE_STARTMENU startmenu $StartMenuFolder
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!define MUI_FINISHPAGE_LINK "Visit Socializer website"
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION "http://socializer.su"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\socializer.exe"
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||
Section
|
||||
SetShellVarContext All
|
||||
SetOutPath "$INSTDIR"
|
||||
File /r dist\main\*
|
||||
CreateShortCut "$DESKTOP\socializer.lnk" "$INSTDIR\socializer.exe"
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN startmenu
|
||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\socializer.lnk" "$INSTDIR\socializer.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Socializer on the web.lnk" "http://socializer.su"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "DisplayName" "Socializer"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall" "InstallLocation" $INSTDIR
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall" "Publisher" "Manuel Cortez"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "DisplayVersion" "0.23"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "URLInfoAbout" "http://socializer.su"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "VersionMajor" 0
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "VersionMinor" 19
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "NoModify" 1
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "NoRepair" 1
|
||||
SectionEnd
|
||||
Section "Uninstall"
|
||||
SetShellVarContext All
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer"
|
||||
RMDir /r /REBOOTOK $INSTDIR
|
||||
Delete "$DESKTOP\socializer.lnk"
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER startmenu $StartMenuFolder
|
||||
RMDir /r "$SMPROGRAMS\$StartMenuFolder"
|
||||
SectionEnd
|
||||
Function .onInit
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
FunctionEnd
|
||||
7
src/interactors/__init__.py
Normal file
7
src/interactors/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from .attach import *
|
||||
from . audioRecorder import *
|
||||
from . blacklist import *
|
||||
from .configuration import *
|
||||
from .postCreation import *
|
||||
from .postDisplayer import *
|
||||
from .profiles import *
|
||||
93
src/interactors/attach.py
Normal file
93
src/interactors/attach.py
Normal file
@@ -0,0 +1,93 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import widgetUtils
|
||||
from pubsub import pub
|
||||
from wxUI.dialogs import selector
|
||||
from wxUI.menus import attachMenu
|
||||
from . import base
|
||||
|
||||
class attachInteractor(base.baseInteractor):
|
||||
|
||||
def insert_attachment(self, attachment):
|
||||
self.view.attachments.insert_item(False, *attachment)
|
||||
|
||||
def remove_attachment(self, attachment):
|
||||
self.view.attachments.remove_item(attachment)
|
||||
|
||||
def install(self, *args, **kwargs):
|
||||
super(attachInteractor, self).install(*args, **kwargs)
|
||||
widgetUtils.connect_event(self.view.photo, widgetUtils.BUTTON_PRESSED, self.on_image)
|
||||
widgetUtils.connect_event(self.view.audio, widgetUtils.BUTTON_PRESSED, self.on_audio)
|
||||
widgetUtils.connect_event(self.view.document, widgetUtils.BUTTON_PRESSED, self.on_document)
|
||||
if hasattr(self.view, "voice_message"):
|
||||
widgetUtils.connect_event(self.view.voice_message, widgetUtils.BUTTON_PRESSED, self.on_upload_voice_message)
|
||||
widgetUtils.connect_event(self.view.remove, widgetUtils.BUTTON_PRESSED, self.on_remove_attachment)
|
||||
pub.subscribe(self.insert_attachment, self.modulename+"_insert_attachment")
|
||||
pub.subscribe(self.remove_attachment, self.modulename+"_remove_attachment")
|
||||
|
||||
def uninstall(self):
|
||||
super(attachInteractor, self).uninstall()
|
||||
pub.unsubscribe(self.insert_attachment, self.modulename+"_insert_attachment")
|
||||
pub.unsubscribe(self.remove_attachment, self.modulename+"_remove_attachment")
|
||||
|
||||
def on_image(self, *args, **kwargs):
|
||||
""" display menu for adding image attachments. """
|
||||
m = attachMenu()
|
||||
# disable add from VK as it is not supported in images, yet.
|
||||
m.add.Enable(False)
|
||||
widgetUtils.connect_event(m, widgetUtils.MENU, self.on_upload_image, menuitem=m.upload)
|
||||
self.view.PopupMenu(m, self.view.photo.GetPosition())
|
||||
|
||||
def on_audio(self, *args, **kwargs):
|
||||
""" display menu to add audio attachments."""
|
||||
m = attachMenu()
|
||||
widgetUtils.connect_event(m, widgetUtils.MENU, self.on_upload_audio, menuitem=m.upload)
|
||||
widgetUtils.connect_event(m, widgetUtils.MENU, self.on_add_audio, menuitem=m.add)
|
||||
self.view.PopupMenu(m, self.view.audio.GetPosition())
|
||||
|
||||
def on_document(self, *args, **kwargs):
|
||||
""" display menu for adding document attachments. """
|
||||
m = attachMenu()
|
||||
# disable add from VK as it is not supported in documents, yet.
|
||||
m.add.Enable(False)
|
||||
widgetUtils.connect_event(m, widgetUtils.MENU, self.on_upload_document, menuitem=m.upload)
|
||||
self.view.PopupMenu(m, self.view.photo.GetPosition())
|
||||
|
||||
def on_upload_image(self, *args, **kwargs):
|
||||
""" allows uploading an image from the computer.
|
||||
"""
|
||||
image, description = self.view.get_image()
|
||||
if image != None:
|
||||
self.presenter.upload_image(image, description)
|
||||
|
||||
def on_upload_audio(self, *args, **kwargs):
|
||||
""" Allows uploading an audio file from the computer. Only mp3 files are supported. """
|
||||
audio = self.view.get_audio()
|
||||
if audio != None:
|
||||
self.presenter.upload_audio(audio)
|
||||
|
||||
def on_upload_document(self, *args, **kwargs):
|
||||
""" allows uploading a document from the computer.
|
||||
"""
|
||||
document = self.view.get_document()
|
||||
if document != None:
|
||||
if document.endswith(".mp3") or document.endswith(".exe"):
|
||||
self.view.invalid_attachment()
|
||||
return
|
||||
self.presenter.upload_document(document)
|
||||
|
||||
def on_upload_voice_message(self, *args, **kwargs):
|
||||
self.presenter.upload_voice_message()
|
||||
|
||||
def on_add_audio(self, *args, **kwargs):
|
||||
""" Allow adding an audio directly from the user's audio library."""
|
||||
audios = self.presenter.get_available_audios()
|
||||
select = selector.selectAttachment(_("Select the audio files you want to send"), audios)
|
||||
if select.get_response() == widgetUtils.OK and select.attachments.GetCount() > 0:
|
||||
attachments = select.get_all_attachments()
|
||||
self.presenter.take_audios(attachments)
|
||||
|
||||
def on_remove_attachment(self, *args, **kwargs):
|
||||
""" Remove the currently focused item from the attachments list."""
|
||||
current_item = self.view.attachments.get_selected()
|
||||
self.presenter.remove_attachment(current_item)
|
||||
29
src/interactors/audioRecorder.py
Normal file
29
src/interactors/audioRecorder.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import widgetUtils
|
||||
from pubsub import pub
|
||||
from . import base
|
||||
|
||||
class audioRecorderInteractor(base.baseInteractor):
|
||||
def install(self, presenter, view, modulename="audiorecorder"):
|
||||
super(audioRecorderInteractor, self).install(view=view, presenter=presenter, modulename=modulename)
|
||||
widgetUtils.connect_event(view.play, widgetUtils.BUTTON_PRESSED, self.on_play)
|
||||
widgetUtils.connect_event(view.record, widgetUtils.BUTTON_PRESSED, self.on_record)
|
||||
widgetUtils.connect_event(view.discard, widgetUtils.BUTTON_PRESSED, self.on_discard)
|
||||
|
||||
def start(self):
|
||||
result = self.view.get_response()
|
||||
if result == widgetUtils.OK:
|
||||
self.on_postprocess()
|
||||
|
||||
def on_record(self, *args, **kwargs):
|
||||
self.presenter.toggle_recording()
|
||||
|
||||
def on_discard(self, *args, **kwargs):
|
||||
self.presenter.discard_recording()
|
||||
|
||||
def on_play(self, *args, **kwargs):
|
||||
self.presenter.play()
|
||||
|
||||
def on_postprocess(self):
|
||||
self.presenter.postprocess()
|
||||
40
src/interactors/base.py
Normal file
40
src/interactors/base.py
Normal file
@@ -0,0 +1,40 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pubsub import pub
|
||||
|
||||
class baseInteractor(object):
|
||||
|
||||
def install(self, view, presenter, modulename):
|
||||
self.modulename = modulename
|
||||
self.view = view
|
||||
self.presenter = presenter
|
||||
pub.subscribe(self.disable_control, "{modulename}_disable_control".format(modulename=modulename))
|
||||
pub.subscribe(self.enable_control, "{modulename}_enable_control".format(modulename=modulename))
|
||||
pub.subscribe(self.set_label, "{modulename}_set_label".format(modulename=modulename))
|
||||
pub.subscribe(self.focus_control, "{modulename}_focus_control".format(modulename=modulename))
|
||||
pub.subscribe(self.set_title, "{modulename}_set_title".format(modulename=modulename))
|
||||
|
||||
def uninstall(self):
|
||||
pub.unsubscribe(self.disable_control, "{modulename}_disable_control".format(modulename=self.modulename))
|
||||
pub.unsubscribe(self.enable_control, "{modulename}_enable_control".format(modulename=self.modulename))
|
||||
pub.unsubscribe(self.set_label, "{modulename}_set_label".format(modulename=self.modulename))
|
||||
pub.unsubscribe(self.focus_control, "{modulename}_focus_control".format(modulename=self.modulename))
|
||||
pub.unsubscribe(self.set_title, "{modulename}_set_title".format(modulename=self.modulename))
|
||||
self.view.Destroy()
|
||||
|
||||
def start(self):
|
||||
self.result = self.view.get_response()
|
||||
|
||||
def disable_control(self, control):
|
||||
self.view.disable(control)
|
||||
|
||||
def enable_control(self, control):
|
||||
self.view.enable(control)
|
||||
|
||||
def focus_control(self, control):
|
||||
getattr(self.view, control).SetFocus()
|
||||
|
||||
def set_label(self, control, label):
|
||||
self.view.set(control, label)
|
||||
|
||||
def set_title(self, value):
|
||||
self.view.SetTitle(value)
|
||||
31
src/interactors/blacklist.py
Normal file
31
src/interactors/blacklist.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import widgetUtils
|
||||
from wxUI import commonMessages
|
||||
from pubsub import pub
|
||||
from . import base
|
||||
|
||||
class blacklistInteractor(base.baseInteractor):
|
||||
|
||||
def add_items(self, control, items):
|
||||
if not hasattr(self.view, control):
|
||||
raise AttributeError("The control is not present in the view.")
|
||||
for i in items:
|
||||
getattr(self.view, control).insert_item(False, *i)
|
||||
|
||||
def install(self, *args, **kwargs):
|
||||
super(blacklistInteractor, self).install(*args, **kwargs)
|
||||
widgetUtils.connect_event(self.view.unblock, widgetUtils.BUTTON_PRESSED, self.on_unblock)
|
||||
pub.subscribe(self.add_items, self.modulename+"_add_items")
|
||||
|
||||
def uninstall(self):
|
||||
super(blacklistInteractor, self).uninstall()
|
||||
pub.unsubscribe(self.add_items, self.modulename+"_add_items")
|
||||
|
||||
|
||||
def on_unblock(self, *args, **kwargs):
|
||||
question = commonMessages.unblock_person()
|
||||
if question == widgetUtils.NO:
|
||||
return
|
||||
item = self.view.persons.get_selected()
|
||||
if self.presenter.unblock_person(item) == 1:
|
||||
self.view.persons.remove_item(item)
|
||||
72
src/interactors/configuration.py
Normal file
72
src/interactors/configuration.py
Normal file
@@ -0,0 +1,72 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import widgetUtils
|
||||
from pubsub import pub
|
||||
from wxUI.commonMessages import restart_program as restart_program_dialog
|
||||
from . import base
|
||||
|
||||
class configurationInteractor(base.baseInteractor):
|
||||
|
||||
def create_tab(self, tab, arglist=dict()):
|
||||
getattr(self.view, "create_"+tab)(**arglist)
|
||||
|
||||
def set_setting(self, tab, setting, value):
|
||||
self.view.set_value(tab, setting, value)
|
||||
|
||||
def restart(self):
|
||||
dlg = restart_program_dialog()
|
||||
if dlg == widgetUtils.YES:
|
||||
self.presenter.restart_application()
|
||||
|
||||
def set_language(self, language):
|
||||
self.view.general.language.SetSelection(language)
|
||||
|
||||
def install(self, *args, **kwargs):
|
||||
super(configurationInteractor, self).install(*args, **kwargs)
|
||||
pub.subscribe(self.create_tab, self.modulename+"_create_tab")
|
||||
pub.subscribe(self.set_setting, self.modulename+"_set")
|
||||
pub.subscribe(self.restart, self.modulename+"_restart_program")
|
||||
pub.subscribe(self.set_language, self.modulename+"_set_language")
|
||||
|
||||
def uninstall(self):
|
||||
super(configurationInteractor, self).uninstall()
|
||||
pub.unsubscribe(self.create_tab, self.modulename+"_create_tab")
|
||||
pub.unsubscribe(self.set_setting, self.modulename+"_set")
|
||||
pub.unsubscribe(self.restart, self.modulename+"_restart_program")
|
||||
pub.unsubscribe(self.set_language, self.modulename+"_set_language")
|
||||
|
||||
def start(self):
|
||||
self.view.realize()
|
||||
result = self.view.get_response()
|
||||
if result == widgetUtils.OK:
|
||||
self.on_save_settings()
|
||||
|
||||
def on_save_settings(self, *args, **kwargs):
|
||||
self.presenter.update_setting(section="buffers", setting="count_for_wall_buffers", value=self.view.get_value("buffers", "wall_buffer_count"))
|
||||
self.presenter.update_setting(section="buffers", setting="count_for_video_buffers", value=self.view.get_value("buffers", "video_buffers_count"))
|
||||
self.presenter.update_setting(section="buffers", setting="count_for_chat_buffers", value=self.view.get_value("buffers", "chat_buffers_count"))
|
||||
self.presenter.update_setting(section="general", setting="load_images", value=self.view.get_value("general", "load_images"))
|
||||
update_channel = self.presenter.get_update_channel_type(self.view.get_value("general", "update_channel"))
|
||||
if update_channel != self.presenter.session.settings["general"]["update_channel"]:
|
||||
if update_channel == "stable":
|
||||
self.presenter.update_setting(section="general", setting="update_channel", value=update_channel)
|
||||
elif update_channel == "weekly":
|
||||
dialog = self.view.weekly_channel()
|
||||
if dialog == widgetUtils.YES:
|
||||
self.presenter.update_setting(section="general", setting="update_channel", value=update_channel)
|
||||
elif update_channel == "alpha":
|
||||
dialog = self.view.alpha_channel()
|
||||
if dialog == widgetUtils.YES:
|
||||
self.presenter.update_setting(section="general", setting="update_channel", value=update_channel)
|
||||
self.presenter.update_setting(section="chat", setting="notify_online", value=self.view.get_value("chat", "notify_online"))
|
||||
self.presenter.update_setting(section="chat", setting="notify_offline", value=self.view.get_value("chat", "notify_offline"))
|
||||
self.presenter.update_setting(section="chat", setting="notifications", value=self.presenter.get_notification_type(self.view.get_value("chat", "notifications")))
|
||||
self.presenter.update_setting(section="load_at_startup", setting="audio_albums", value=self.view.get_value("startup", "audio_albums"))
|
||||
self.presenter.update_setting(section="load_at_startup", setting="video_albums", value=self.view.get_value("startup", "video_albums"))
|
||||
self.presenter.update_setting(section="load_at_startup", setting="communities", value=self.view.get_value("startup", "communities"))
|
||||
self.presenter.update_app_setting(section="app-settings", setting="language", value=self.presenter.codes[self.view.general.language.GetSelection()])
|
||||
self.presenter.update_app_setting(section="sound", setting="input_device", value=self.view.get_value("sound", "input"))
|
||||
self.presenter.update_app_setting(section="sound", setting="output_device", value=self.view.get_value("sound", "output"))
|
||||
self.presenter.update_app_setting(section="app-settings", setting="use_proxy", value=self.view.get_value("general", "use_proxy"))
|
||||
self.presenter.save_app_settings_file()
|
||||
self.presenter.save_settings_file()
|
||||
71
src/interactors/postCreation.py
Normal file
71
src/interactors/postCreation.py
Normal file
@@ -0,0 +1,71 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import widgetUtils
|
||||
from wxUI.dialogs import selector
|
||||
from pubsub import pub
|
||||
from extra import translator
|
||||
from .import base
|
||||
|
||||
class createPostInteractor(base.baseInteractor):
|
||||
|
||||
def set(self, control, value):
|
||||
if not hasattr(self.view, control):
|
||||
raise AttributeError("The control is not present in the view.")
|
||||
getattr(self.view, control).SetValue(value)
|
||||
|
||||
def add_tagged_users(self, users):
|
||||
self.view.text.SetValue(self.view.text.GetValue()+", ".join(users))
|
||||
|
||||
def install(self, *args, **kwargs):
|
||||
super(createPostInteractor, self).install(*args, **kwargs)
|
||||
widgetUtils.connect_event(self.view.spellcheck, widgetUtils.BUTTON_PRESSED, self.on_spellcheck)
|
||||
widgetUtils.connect_event(self.view.translateButton, widgetUtils.BUTTON_PRESSED, self.on_translate)
|
||||
widgetUtils.connect_event(self.view.mention, widgetUtils.BUTTON_PRESSED, self.on_mention)
|
||||
if hasattr(self.view, "attach"):
|
||||
widgetUtils.connect_event(self.view.attach, widgetUtils.BUTTON_PRESSED, self.on_add_attachments)
|
||||
pub.subscribe(self.set, self.modulename+"_set")
|
||||
pub.subscribe(self.add_tagged_users, self.modulename+"_add_tagged_users")
|
||||
|
||||
def uninstall(self):
|
||||
super(createPostInteractor, self).uninstall()
|
||||
pub.unsubscribe(self.set, self.modulename+"_set")
|
||||
pub.unsubscribe(self.add_tagged_users, self.modulename+"_add_tagged_users")
|
||||
|
||||
def start(self):
|
||||
self.result = self.view.get_response()
|
||||
if self.result == widgetUtils.OK:
|
||||
self.presenter.text = self.view.get_text()
|
||||
if hasattr(self.view, "privacy"):
|
||||
self.presenter.privacy = self.get_privacy_options()
|
||||
else:
|
||||
self.presenter.privacy = 0
|
||||
|
||||
def get_privacy_options(self):
|
||||
p = self.view.get("privacy")
|
||||
if p == _("Friends of friends"):
|
||||
privacy = 0
|
||||
elif p == _("All users"):
|
||||
privacy = 1
|
||||
return privacy
|
||||
|
||||
def on_mention(self, *args, **kwargs):
|
||||
users = self.presenter.get_friends()
|
||||
select = selector.selectPeople(users)
|
||||
if select.get_response() == widgetUtils.OK and select.users.GetCount() > 0:
|
||||
tagged_users = select.get_all_users()
|
||||
self.presenter.add_tagged_users(tagged_users)
|
||||
|
||||
def on_translate(self, *args, **kwargs):
|
||||
dlg = translator.gui.translateDialog()
|
||||
if dlg.get_response() == widgetUtils.OK:
|
||||
text_to_translate = self.view.get_text()
|
||||
dest = [x[0] for x in translator.translator.available_languages()][dlg.get("dest_lang")]
|
||||
self.presenter.translate(text_to_translate, dest)
|
||||
dlg.Destroy()
|
||||
|
||||
def on_spellcheck(self, event=None):
|
||||
text = self.view.get_text()
|
||||
self.presenter.spellcheck(text)
|
||||
|
||||
def on_add_attachments(self, *args, **kwargs):
|
||||
self.presenter.add_attachments()
|
||||
286
src/interactors/postDisplayer.py
Normal file
286
src/interactors/postDisplayer.py
Normal file
@@ -0,0 +1,286 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import six
|
||||
import widgetUtils
|
||||
import wx
|
||||
from pubsub import pub
|
||||
from wxUI import menus
|
||||
from wxUI import commonMessages
|
||||
from .import base
|
||||
|
||||
class displayPostInteractor(base.baseInteractor):
|
||||
|
||||
def set(self, control, value):
|
||||
if not hasattr(self.view, control):
|
||||
raise AttributeError("The control is not present in the view.")
|
||||
getattr(self.view, control).SetValue(value)
|
||||
|
||||
def load_image(self, image):
|
||||
image = wx.Image(stream=six.BytesIO(image.content))
|
||||
try:
|
||||
self.view.image.SetBitmap(wx.Bitmap(image))
|
||||
except ValueError:
|
||||
return
|
||||
self.view.panel.Layout()
|
||||
|
||||
def add_items(self, control, items):
|
||||
if not hasattr(self.view, control):
|
||||
raise AttributeError("The control is not present in the view.")
|
||||
for i in items:
|
||||
getattr(self.view, control).insert_item(False, *i)
|
||||
|
||||
def add_item(self, control, item, reversed=False):
|
||||
if not hasattr(self.view, control):
|
||||
raise AttributeError("The control is not present in the view.")
|
||||
getattr(self.view, control).insert_item(reversed, *item)
|
||||
|
||||
def enable_attachments(self):
|
||||
self.view.attachments.list.Enable(True)
|
||||
|
||||
def enable_photo_controls(self, navigation):
|
||||
self.view.enable_photo_controls(navigation)
|
||||
|
||||
def clean_list(self, list):
|
||||
if not hasattr(self.view, list):
|
||||
raise AttributeError("The control is not present in the view.")
|
||||
getattr(self.view, list).clear()
|
||||
|
||||
def post_deleted(self):
|
||||
msg = commonMessages.post_deleted()
|
||||
|
||||
def install(self, *args, **kwargs):
|
||||
super(displayPostInteractor, self).install(*args, **kwargs)
|
||||
if hasattr(self.view, "comments"):
|
||||
self.view.comments.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.on_show_comment)
|
||||
self.view.comments.list.Bind(wx.EVT_LIST_ITEM_FOCUSED, self.on_comment_changed)
|
||||
self.view.attachments.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.on_open_attachment)
|
||||
widgetUtils.connect_event(self.view.like, widgetUtils.BUTTON_PRESSED, self.on_like)
|
||||
widgetUtils.connect_event(self.view.comment, widgetUtils.BUTTON_PRESSED, self.on_add_comment)
|
||||
widgetUtils.connect_event(self.view.tools, widgetUtils.BUTTON_PRESSED, self.on_show_tools_menu)
|
||||
if hasattr(self.view, "likes"):
|
||||
widgetUtils.connect_event(self.view.likes, widgetUtils.BUTTON_PRESSED, self.on_show_likes_menu)
|
||||
if hasattr(self.view, "shares"):
|
||||
widgetUtils.connect_event(self.view.shares, widgetUtils.BUTTON_PRESSED, self.on_show_shares_menu)
|
||||
if hasattr(self.view, "repost"):
|
||||
widgetUtils.connect_event(self.view.repost, widgetUtils.BUTTON_PRESSED, self.on_repost)
|
||||
self.view.comments.list.Bind(wx.EVT_LIST_ITEM_FOCUSED, self.on_focus)
|
||||
if hasattr(self.view, "reply"):
|
||||
widgetUtils.connect_event(self.view.reply, widgetUtils.BUTTON_PRESSED, self.on_reply)
|
||||
if hasattr(self.view, "load_more_comments"):
|
||||
widgetUtils.connect_event(self.view.load_more_comments, widgetUtils.BUTTON_PRESSED, self.on_load_more_comments)
|
||||
# self.view.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.on_show_menu, self.view.comments.list)
|
||||
# self.view.Bind(wx.EVT_LIST_KEY_DOWN, self.on_show_menu_by_key, self.view.comments.list)
|
||||
pub.subscribe(self.set, self.modulename+"_set")
|
||||
pub.subscribe(self.load_image, self.modulename+"_load_image")
|
||||
pub.subscribe(self.add_items, self.modulename+"_add_items")
|
||||
pub.subscribe(self.add_item, self.modulename+"_add_item")
|
||||
pub.subscribe(self.enable_attachments, self.modulename+"_enable_attachments")
|
||||
pub.subscribe(self.enable_photo_controls, self.modulename+"_enable_photo_controls")
|
||||
pub.subscribe(self.post_deleted, self.modulename+"_post_deleted")
|
||||
pub.subscribe(self.clean_list, self.modulename+"_clean_list")
|
||||
|
||||
def uninstall(self):
|
||||
super(displayPostInteractor, self).uninstall()
|
||||
pub.unsubscribe(self.set, self.modulename+"_set")
|
||||
pub.unsubscribe(self.load_image, self.modulename+"_load_image")
|
||||
pub.unsubscribe(self.add_items, self.modulename+"_add_items")
|
||||
pub.unsubscribe(self.add_item, self.modulename+"_add_item")
|
||||
pub.unsubscribe(self.enable_attachments, self.modulename+"_enable_attachments")
|
||||
pub.unsubscribe(self.enable_photo_controls, self.modulename+"_enable_photo_controls")
|
||||
pub.unsubscribe(self.post_deleted, self.modulename+"_post_deleted")
|
||||
pub.unsubscribe(self.clean_list, self.modulename+"_clean_list")
|
||||
|
||||
def on_focus(self, *args, **kwargs):
|
||||
item = self.view.comments.get_selected()
|
||||
if item == -1:
|
||||
self.view.reply.Enable(False)
|
||||
else:
|
||||
self.view.reply.Enable(True)
|
||||
|
||||
def on_like(self, *args, **kwargs):
|
||||
self.presenter.post_like()
|
||||
|
||||
def on_repost(self, *args, **kwargs):
|
||||
self.presenter.post_repost()
|
||||
|
||||
def on_reply(self, *args, **kwargs):
|
||||
if hasattr(self.view, "comments") and (hasattr(self.view, "repost") or not hasattr(self, "post_view")):
|
||||
comment = self.view.comments.get_selected()
|
||||
self.presenter.reply(comment)
|
||||
else:
|
||||
self.presenter.reply()
|
||||
|
||||
def on_add_comment(self, *args, **kwargs):
|
||||
self.presenter.add_comment()
|
||||
|
||||
def on_load_more_comments(self, *args, **kwargs):
|
||||
if hasattr(self.presenter, "load_more_comments"):
|
||||
self.presenter.load_more_comments()
|
||||
|
||||
def on_show_tools_menu(self, *args, **kwargs):
|
||||
menu = menus.toolsMenu()
|
||||
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.on_open_url, menuitem=menu.url)
|
||||
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.on_translate, menuitem=menu.translate)
|
||||
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.on_spellcheck, menuitem=menu.CheckSpelling)
|
||||
self.view.PopupMenu(menu, self.view.tools.GetPosition())
|
||||
|
||||
def on_open_url(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
def on_open_attachment(self, *args, **kwargs):
|
||||
attachment = self.view.attachments.get_selected()
|
||||
self.presenter.open_attachment(attachment)
|
||||
|
||||
def on_translate(self, *args, **kwargs):
|
||||
dlg = translator.gui.translateDialog()
|
||||
if dlg.get_response() == widgetUtils.OK:
|
||||
text_to_translate = self.view.get("post_view")
|
||||
dest = [x[0] for x in translator.translator.available_languages()][dlg.get("dest_lang")]
|
||||
self.presenter.translate(text_to_translate, dest)
|
||||
dlg.Destroy()
|
||||
|
||||
def on_spellcheck(self, event=None):
|
||||
text = self.view.get("post_view")
|
||||
self.presenter.spellcheck(text)
|
||||
|
||||
def on_show_comment(self, *args, **kwargs):
|
||||
comment = self.view.comments.get_selected()
|
||||
self.presenter.show_comment(comment)
|
||||
|
||||
def on_comment_changed(self, *args, **kwargs):
|
||||
if hasattr(self.presenter, "change_comment"):
|
||||
comment = self.view.comments.get_selected()
|
||||
self.presenter.change_comment(comment)
|
||||
|
||||
def on_show_likes_menu(self, *args, **kwargs):
|
||||
self.presenter.show_likes()
|
||||
|
||||
def on_show_shares_menu(self, *args, **kwargs):
|
||||
self.presenter.show_shares()
|
||||
|
||||
class displayAudioInteractor(base.baseInteractor):
|
||||
|
||||
def set(self, control, value):
|
||||
if not hasattr(self.view, control):
|
||||
raise AttributeError("The control is not present in the view.")
|
||||
getattr(self.view, control).SetValue(value)
|
||||
|
||||
def add_items(self, control, items):
|
||||
if not hasattr(self.view, control):
|
||||
raise AttributeError("The control is not present in the view.")
|
||||
for i in items:
|
||||
getattr(self.view, control).Append(i)
|
||||
getattr(self.view, control).SetSelection(0)
|
||||
|
||||
def change_label(self, stopped):
|
||||
|
||||
if stopped == False:
|
||||
self.view.play.SetLabel(_("P&ause"))
|
||||
else:
|
||||
self.view.play.SetLabel(_("P&lay"))
|
||||
|
||||
def install(self, *args, **kwargs):
|
||||
super(displayAudioInteractor, self).install(*args, **kwargs)
|
||||
widgetUtils.connect_event(self.view.list, widgetUtils.LISTBOX_CHANGED, self.on_change)
|
||||
widgetUtils.connect_event(self.view.download, widgetUtils.BUTTON_PRESSED, self.on_download)
|
||||
widgetUtils.connect_event(self.view.play, widgetUtils.BUTTON_PRESSED, self.on_play)
|
||||
widgetUtils.connect_event(self.view.add, widgetUtils.BUTTON_PRESSED, self.on_add_to_library)
|
||||
widgetUtils.connect_event(self.view.remove, widgetUtils.BUTTON_PRESSED, self.on_remove_from_library)
|
||||
pub.subscribe(self.set, self.modulename+"_set")
|
||||
pub.subscribe(self.add_items, self.modulename+"_add_items")
|
||||
pub.subscribe(self.change_label, "playback-changed")
|
||||
|
||||
def uninstall(self):
|
||||
super(displayAudioInteractor, self).uninstall()
|
||||
pub.unsubscribe(self.set, self.modulename+"_set")
|
||||
pub.unsubscribe(self.add_items, self.modulename+"_add_items")
|
||||
pub.unsubscribe(self.change_label, "playback-changed")
|
||||
|
||||
def on_change(self, *args, **kwargs):
|
||||
post = self.view.get_audio()
|
||||
self.presenter.handle_changes(post)
|
||||
|
||||
def on_download(self, *args, **kwargs):
|
||||
post = self.view.get_audio()
|
||||
suggested_filename = self.presenter.get_suggested_filename(post)
|
||||
path = self.view.get_destination_path(suggested_filename)
|
||||
self.presenter.download(post, path)
|
||||
|
||||
def on_play(self, *args, **kwargs):
|
||||
post = self.view.get_audio()
|
||||
self.presenter.play(post)
|
||||
|
||||
def on_add_to_library(self, *args, **kwargs):
|
||||
post = self.view.get_audio()
|
||||
self.presenter.add_to_library(post)
|
||||
|
||||
def on_remove_from_library(self, *args, **kwargs):
|
||||
post = self.view.get_audio()
|
||||
self.presenter.remove_from_library(post)
|
||||
|
||||
class displayPollInteractor(base.baseInteractor):
|
||||
|
||||
def set(self, control, value):
|
||||
if not hasattr(self.view, control):
|
||||
raise AttributeError("The control is not present in the view.")
|
||||
getattr(self.view, control).SetValue(value)
|
||||
|
||||
def done(self):
|
||||
self.view.done()
|
||||
|
||||
def add_options(self, options, multiple):
|
||||
self.view.add_options(options, multiple)
|
||||
|
||||
def install(self, *args, **kwargs):
|
||||
super(displayPollInteractor, self).install(*args, **kwargs)
|
||||
pub.subscribe(self.set, self.modulename+"_set")
|
||||
pub.subscribe(self.done, self.modulename+"_done")
|
||||
pub.subscribe(self.add_options, self.modulename+"_add_options")
|
||||
|
||||
def uninstall(self):
|
||||
super(displayPollInteractor, self).uninstall()
|
||||
pub.unsubscribe(self.set, self.modulename+"_set")
|
||||
pub.unsubscribe(self.done, self.modulename+"_done")
|
||||
pub.unsubscribe(self.add_options, self.modulename+"_add_options")
|
||||
|
||||
def start(self, *args, **kwargs):
|
||||
super(displayPollInteractor, self).start(*args, **kwargs)
|
||||
if self.result == widgetUtils.OK: # USer votd.
|
||||
answers = self.view.get_answers()
|
||||
self.presenter.vote(answers)
|
||||
|
||||
class displayFriendshipInteractor(base.baseInteractor):
|
||||
|
||||
def add_items(self, control, items):
|
||||
if not hasattr(self.view, control):
|
||||
raise AttributeError("The control is not present in the view.")
|
||||
for i in items:
|
||||
getattr(self.view, control).insert_item(False, *[i])
|
||||
|
||||
def install(self, *args, **kwargs):
|
||||
super(displayFriendshipInteractor, self).install(*args, **kwargs)
|
||||
pub.subscribe(self.add_items, self.modulename+"_add_items")
|
||||
self.view.friends.list.Bind(wx.EVT_CONTEXT_MENU, self.on_context_menu)
|
||||
|
||||
def uninstall(self):
|
||||
super(displayFriendshipInteractor, self).uninstall()
|
||||
pub.unsubscribe(self.add_items, self.modulename+"_add_items")
|
||||
|
||||
def on_context_menu(self, *args, **kwargs):
|
||||
item = self.view.friends.get_selected()
|
||||
if item < 0:
|
||||
return
|
||||
menu = menus.peopleMenu(False, False, True)
|
||||
widgetUtils.connect_event(menu, widgetUtils.MENU, self.on_view_profile, menuitem=menu.view_profile)
|
||||
widgetUtils.connect_event(menu, widgetUtils.MENU, self.on_open_in_browser, menuitem=menu.open_in_browser)
|
||||
# Generally message sending is blocked.
|
||||
menu.message.Enable(False)
|
||||
self.view.PopupMenu(menu, self.view.friends.list.GetPosition())
|
||||
|
||||
def on_view_profile(self, *args, **kwargs):
|
||||
item = self.view.friends.get_selected()
|
||||
self.presenter.view_profile(item)
|
||||
|
||||
def on_open_in_browser(self, *args, **kwargs):
|
||||
item = self.view.friends.get_selected()
|
||||
self.presenter.open_in_browser(item)
|
||||
70
src/interactors/profiles.py
Normal file
70
src/interactors/profiles.py
Normal file
@@ -0,0 +1,70 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import six
|
||||
import wx
|
||||
import widgetUtils
|
||||
from pubsub import pub
|
||||
from views.dialogs import urlList
|
||||
from . import base
|
||||
|
||||
class userProfileInteractor(base.baseInteractor):
|
||||
|
||||
def enable_control(self, tab, control):
|
||||
if not hasattr(self.view, tab):
|
||||
raise AttributeError("The viw does not contain the specified tab.")
|
||||
tab = getattr(self.view, tab)
|
||||
if not hasattr(tab, control):
|
||||
raise AttributeError("The control is not present in the tab.")
|
||||
getattr(tab, control).Enable(True)
|
||||
|
||||
def set(self, tab, control, value):
|
||||
if not hasattr(self.view, tab):
|
||||
raise AttributeError("The view does not contain the specified tab.")
|
||||
tab = getattr(self.view, tab)
|
||||
if not hasattr(tab, control):
|
||||
raise AttributeError("The control is not present in the tab.")
|
||||
control = getattr(tab, control)
|
||||
control.SetValue(value)
|
||||
|
||||
def set_label(self, tab, control, value):
|
||||
if not hasattr(self.view, tab):
|
||||
raise AttributeError("The viw does not contain the specified tab.")
|
||||
tab = getattr(self.view, tab)
|
||||
if not hasattr(tab, control):
|
||||
raise AttributeError("The control is not present in the tab.")
|
||||
control = getattr(tab, control)
|
||||
control.SetLabel(value)
|
||||
|
||||
def load_image(self, image):
|
||||
image = wx.Image(stream=six.BytesIO(image.content))
|
||||
try:
|
||||
self.view.image.SetBitmap(wx.Bitmap(image))
|
||||
except ValueError:
|
||||
return
|
||||
self.view.panel.Layout()
|
||||
|
||||
def install(self, *args, **kwargs):
|
||||
super(userProfileInteractor, self).install(*args, **kwargs)
|
||||
pub.subscribe(self.set, self.modulename+"_set")
|
||||
pub.subscribe(self.load_image, self.modulename+"_load_image")
|
||||
self.view.create_controls("main_info")
|
||||
self.view.realice()
|
||||
widgetUtils.connect_event(self.view.main_info.go_site, widgetUtils.BUTTON_PRESSED, self.on_visit_website)
|
||||
|
||||
def uninstall(self):
|
||||
super(userProfileInteractor, self).uninstall()
|
||||
pub.unsubscribe(self.set, self.modulename+"_set")
|
||||
pub.unsubscribe(self.load_image, self.modulename+"_load_image")
|
||||
|
||||
|
||||
def on_visit_website(self, *args, **kwargs):
|
||||
urls = self.presenter.get_urls()
|
||||
if len(urls) == 1:
|
||||
self.presenter.visit_url(urls[0])
|
||||
else:
|
||||
dialog = urlList.urlList()
|
||||
dialog.populate_list(urls)
|
||||
if dialog.get_response() != widgetUtils.OK:
|
||||
return
|
||||
selected_url = urls[dialog.get_item()]
|
||||
self.presenter.visit_url(selected_url)
|
||||
64
src/issueReporter/issueReporter.py
Normal file
64
src/issueReporter/issueReporter.py
Normal file
@@ -0,0 +1,64 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
############################################################
|
||||
# Copyright (c) 2018 Manuel Cortez <manuel@manuelcortez.net>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
############################################################
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import platform
|
||||
import requests
|
||||
import widgetUtils
|
||||
import application
|
||||
import paths
|
||||
from requests.auth import HTTPBasicAuth
|
||||
from mysc.thread_utils import call_threaded
|
||||
from . import wx_ui
|
||||
|
||||
class reportBug(object):
|
||||
def __init__(self):
|
||||
self.dialog = wx_ui.reportBugDialog()
|
||||
widgetUtils.connect_event(self.dialog.ok, widgetUtils.BUTTON_PRESSED, self.send)
|
||||
self.dialog.get_response()
|
||||
|
||||
def do_report(self, *args, **kwargs):
|
||||
r = requests.post(*args, **kwargs)
|
||||
if r.status_code > 300:
|
||||
wx.CallAfter(self.dialog.error)
|
||||
wx.CallAfter(self.dialog.progress.Destroy)
|
||||
wx.CallAfter(self.dialog.success, r.json()["data"]["issue"]["id"])
|
||||
|
||||
def send(self, *args, **kwargs):
|
||||
if self.dialog.get("summary") == "" or self.dialog.get("description") == "" or self.dialog.get("first_name") == "" or self.dialog.get("last_name") == "":
|
||||
self.dialog.no_filled()
|
||||
return
|
||||
if self.dialog.get("agree") == False:
|
||||
self.dialog.no_checkbox()
|
||||
return
|
||||
title = self.dialog.get("summary")
|
||||
body = self.dialog.get("description")
|
||||
issue_type = "issue" # for now just have issue
|
||||
app_type = paths.mode
|
||||
app_version = application.version
|
||||
reporter_name = "{first_name} {last_name}".format(first_name=self.dialog.get("first_name"), last_name=self.dialog.get("last_name"))
|
||||
reporter_contact_type = "email" # For now just email is supported in the issue reporter
|
||||
reporter_contact_handle = self.dialog.get("email")
|
||||
operating_system = platform.platform()
|
||||
json = dict(title=title, issue_type=issue_type, body=body, operating_system=operating_system, app_type=app_type, app_version=app_version, reporter_name=reporter_name, reporter_contact_handle=reporter_contact_handle, reporter_contact_type=reporter_contact_type)
|
||||
auth=HTTPBasicAuth(application.bts_name, application.bts_access_token)
|
||||
url = "{bts_url}/issue/new".format(bts_url=application.bts_url)
|
||||
call_threaded(self.do_report, url, json=json, auth=auth)
|
||||
self.dialog.show_progress()
|
||||
self.dialog.EndModal(wx.ID_OK)
|
||||
110
src/issueReporter/wx_ui.py
Normal file
110
src/issueReporter/wx_ui.py
Normal file
@@ -0,0 +1,110 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
############################################################
|
||||
# Copyright (c) 2018 Manuel cortez <manuel@manuelcortez.net>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
############################################################
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import widgetUtils
|
||||
import application
|
||||
|
||||
class reportBugDialog(widgetUtils.BaseDialog):
|
||||
def __init__(self):
|
||||
super(reportBugDialog, self).__init__(parent=None, id=wx.NewId())
|
||||
self.SetTitle(_("Report an error"))
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
summaryLabel = wx.StaticText(panel, -1, _("Briefly describe what happened. You will be able to thoroughly explain it later"), size=wx.DefaultSize)
|
||||
self.summary = wx.TextCtrl(panel, -1)
|
||||
dc = wx.WindowDC(self.summary)
|
||||
dc.SetFont(self.summary.GetFont())
|
||||
self.summary.SetSize(dc.GetTextExtent("a"*80))
|
||||
summaryB = wx.BoxSizer(wx.HORIZONTAL)
|
||||
summaryB.Add(summaryLabel, 0, wx.ALL, 5)
|
||||
summaryB.Add(self.summary, 0, wx.ALL, 5)
|
||||
sizer.Add(summaryB, 0, wx.ALL, 5)
|
||||
|
||||
first_nameLabel = wx.StaticText(panel, -1, _("First Name"), size=wx.DefaultSize)
|
||||
self.first_name = wx.TextCtrl(panel, -1)
|
||||
dc = wx.WindowDC(self.first_name)
|
||||
dc.SetFont(self.first_name.GetFont())
|
||||
self.first_name.SetSize(dc.GetTextExtent("a"*40))
|
||||
first_nameB = wx.BoxSizer(wx.HORIZONTAL)
|
||||
first_nameB.Add(first_nameLabel, 0, wx.ALL, 5)
|
||||
first_nameB.Add(self.first_name, 0, wx.ALL, 5)
|
||||
sizer.Add(first_nameB, 0, wx.ALL, 5)
|
||||
|
||||
last_nameLabel = wx.StaticText(panel, -1, _("Last Name"), size=wx.DefaultSize)
|
||||
self.last_name = wx.TextCtrl(panel, -1)
|
||||
dc = wx.WindowDC(self.last_name)
|
||||
dc.SetFont(self.last_name.GetFont())
|
||||
self.last_name.SetSize(dc.GetTextExtent("a"*40))
|
||||
last_nameB = wx.BoxSizer(wx.HORIZONTAL)
|
||||
last_nameB.Add(last_nameLabel, 0, wx.ALL, 5)
|
||||
last_nameB.Add(self.last_name, 0, wx.ALL, 5)
|
||||
sizer.Add(last_nameB, 0, wx.ALL, 5)
|
||||
|
||||
emailLabel = wx.StaticText(panel, -1, _("Email address (Will not be public)"), size=wx.DefaultSize)
|
||||
self.email = wx.TextCtrl(panel, -1)
|
||||
dc = wx.WindowDC(self.email)
|
||||
dc.SetFont(self.email.GetFont())
|
||||
self.email.SetSize(dc.GetTextExtent("a"*30))
|
||||
emailB = wx.BoxSizer(wx.HORIZONTAL)
|
||||
emailB.Add(emailLabel, 0, wx.ALL, 5)
|
||||
emailB.Add(self.email, 0, wx.ALL, 5)
|
||||
sizer.Add(emailB, 0, wx.ALL, 5)
|
||||
|
||||
descriptionLabel = wx.StaticText(panel, -1, _("Here, you can describe the bug in detail"), size=wx.DefaultSize)
|
||||
self.description = wx.TextCtrl(panel, -1, style=wx.TE_MULTILINE)
|
||||
dc = wx.WindowDC(self.description)
|
||||
dc.SetFont(self.description.GetFont())
|
||||
(x, y) = dc.GetMultiLineTextExtent("0"*2000)
|
||||
self.description.SetSize((x, y))
|
||||
descBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
descBox.Add(descriptionLabel, 0, wx.ALL, 5)
|
||||
descBox.Add(self.description, 0, wx.ALL, 5)
|
||||
sizer.Add(descBox, 0, wx.ALL, 5)
|
||||
self.agree = wx.CheckBox(panel, -1, _("I know that the {0} bug system will get my email address to contact me and fix the bug quickly").format(application.name,))
|
||||
self.agree.SetValue(False)
|
||||
sizer.Add(self.agree, 0, wx.ALL, 5)
|
||||
self.ok = wx.Button(panel, wx.ID_OK, _("Send report"))
|
||||
self.ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _("Cancel"))
|
||||
btnBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
btnBox.Add(self.ok, 0, wx.ALL, 5)
|
||||
btnBox.Add(cancel, 0, wx.ALL, 5)
|
||||
sizer.Add(btnBox, 0, wx.ALL, 5)
|
||||
panel.SetSizer(sizer)
|
||||
self.SetClientSize(sizer.CalcMin())
|
||||
|
||||
def no_filled(self):
|
||||
wx.MessageDialog(self, _("You must fill out the following fields: first name, last name, email address and issue information."), _("Error"), wx.OK|wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def no_checkbox(self):
|
||||
wx.MessageDialog(self, _("You need to mark the checkbox to provide us your email address to contact you if it is necessary."), _("Error"), wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def success(self, id):
|
||||
wx.MessageDialog(self, _("Thanks for reporting this bug! In future versions, you may be able to find it in the changes list. You have received an email with more information regarding your report. You've reported the bug number %i") % (id), _("reported"), wx.OK).ShowModal()
|
||||
self.Destroy()
|
||||
|
||||
def error(self):
|
||||
wx.MessageDialog(self, _("Something unexpected occurred while trying to report the bug. Please, try again later"), _("Error while reporting"), wx.ICON_ERROR|wx.OK).ShowModal()
|
||||
self.Destroy()
|
||||
|
||||
def show_progress(self):
|
||||
self.progress = wx.ProgressDialog(title=_("Sending report..."), message=_("Please wait while your report is being send."), maximum=100, parent=self)
|
||||
self.progress.ShowModal()
|
||||
@@ -1,4 +1,9 @@
|
||||
import __builtin__
|
||||
from __future__ import unicode_literals
|
||||
from future import standard_library
|
||||
standard_library.install_aliases()
|
||||
from builtins import zip
|
||||
from builtins import str
|
||||
import builtins
|
||||
import os
|
||||
import sys
|
||||
import ctypes
|
||||
@@ -25,12 +30,12 @@ def localeNameToWindowsLCID(localeName):
|
||||
func_LocaleNameToLCID=getattr(ctypes.windll.kernel32,'LocaleNameToLCID',None)
|
||||
if func_LocaleNameToLCID is not None:
|
||||
localeName=localeName.replace('_','-')
|
||||
LCID=func_LocaleNameToLCID(unicode(localeName),0)
|
||||
LCID=func_LocaleNameToLCID(str(localeName),0)
|
||||
else: #Windows doesn't have this functionality, manually search Python's windows_locale dictionary for the LCID
|
||||
localeName=locale.normalize(localeName)
|
||||
if '.' in localeName:
|
||||
localeName=localeName.split('.')[0]
|
||||
LCList=[x[0] for x in locale.windows_locale.iteritems() if x[1]==localeName]
|
||||
LCList=[x[0] for x in locale.windows_locale.items() if x[1]==localeName]
|
||||
if len(LCList)>0:
|
||||
LCID=LCList[0]
|
||||
else:
|
||||
@@ -77,7 +82,7 @@ def getAvailableLanguages():
|
||||
"""
|
||||
#Make a list of all the locales found in NVDA's locale dir
|
||||
l=[x for x in os.listdir(paths.locale_path()) if not x.startswith('.')]
|
||||
l=[x for x in l if os.path.isfile(paths.locale_path('%s/LC_MESSAGES/%s.po' % (x, application.short_name)))]
|
||||
l=[x for x in l if os.path.isfile(os.path.join(paths.locale_path(), '%s/LC_MESSAGES/%s.po' % (x, application.short_name)))]
|
||||
#Make sure that en (english) is in the list as it may not have any locale files, but is default
|
||||
if 'en' not in l:
|
||||
l.append('en')
|
||||
@@ -93,7 +98,7 @@ def getAvailableLanguages():
|
||||
# Translators: the label for the Windows default NVDA interface language.
|
||||
d.append(_("User default"))
|
||||
#return a zipped up version of both the lists (a list with tuples of locale,label)
|
||||
return zip(l,d)
|
||||
return list(zip(l,d))
|
||||
|
||||
def makePgettext(translations):
|
||||
"""Obtaina pgettext function for use with a gettext translations instance.
|
||||
@@ -103,15 +108,15 @@ def makePgettext(translations):
|
||||
"""
|
||||
if isinstance(translations, gettext.GNUTranslations):
|
||||
def pgettext(context, message):
|
||||
message = unicode(message)
|
||||
message = str(message)
|
||||
try:
|
||||
# Look up the message with its context.
|
||||
return translations._catalog[u"%s\x04%s" % (context, message)]
|
||||
return translations._catalog["%s\x04%s" % (context, message)]
|
||||
except KeyError:
|
||||
return message
|
||||
else:
|
||||
def pgettext(context, message):
|
||||
return unicode(message)
|
||||
return str(message)
|
||||
return pgettext
|
||||
|
||||
def setLanguage(lang):
|
||||
@@ -161,7 +166,10 @@ def setLanguage(lang):
|
||||
except IOError:
|
||||
trans=gettext.translation(application.short_name, fallback=True)
|
||||
curLang="en"
|
||||
trans.install(unicode=True)
|
||||
if sys.version[0] == "3":
|
||||
trans.install()
|
||||
else:
|
||||
trans.install(unicode=True)
|
||||
# Install our pgettext function.
|
||||
# __builtin__.__dict__["pgettext"] = makePgettext(trans)
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
from .libloader import *
|
||||
|
||||
__version__ = 0.1
|
||||
__author__ = 'Christopher Toth <q@q-continuum.net>'
|
||||
__doc__ = """
|
||||
Quickly and easily load shared libraries from various platforms. Also includes a libloader.com module for loading com modules on Windows.
|
||||
"""
|
||||
@@ -1,40 +0,0 @@
|
||||
from pywintypes import com_error
|
||||
import win32com
|
||||
import paths
|
||||
win32com.__gen_path__=paths.com_path()
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.join(win32com.__gen_path__, "."))
|
||||
from win32com.client import gencache
|
||||
fixed=False
|
||||
|
||||
def prepare_gencache():
|
||||
gencache.is_readonly = False
|
||||
gencache.GetGeneratePath()
|
||||
|
||||
def patched_getmodule(modname):
|
||||
mod=__import__(modname)
|
||||
return sys.modules[modname]
|
||||
|
||||
def load_com(*names):
|
||||
global fixed
|
||||
if fixed==False:
|
||||
gencache._GetModule=patched_getmodule
|
||||
fixed=True
|
||||
result = None
|
||||
for name in names:
|
||||
try:
|
||||
result = gencache.EnsureDispatch(name)
|
||||
break
|
||||
except com_error:
|
||||
continue
|
||||
if result is None:
|
||||
raise com_error("Unable to load any of the provided com objects.")
|
||||
return result
|
||||
|
||||
|
||||
def preexec():
|
||||
global fixed
|
||||
if fixed==False:
|
||||
gencache._GetModule=patched_getmodule
|
||||
fixed=True
|
||||
@@ -1,56 +0,0 @@
|
||||
import ctypes
|
||||
import collections
|
||||
import platform
|
||||
import os
|
||||
|
||||
TYPES = {
|
||||
'Linux': {
|
||||
'loader': ctypes.CDLL,
|
||||
'functype': ctypes.CFUNCTYPE,
|
||||
'prefix': 'lib',
|
||||
'extension': '.so'
|
||||
},
|
||||
'Darwin': {
|
||||
'loader': ctypes.CDLL,
|
||||
'functype': ctypes.CFUNCTYPE,
|
||||
'prefix': 'lib',
|
||||
'extension': '.dylib'
|
||||
},
|
||||
}
|
||||
if platform.system() == 'Windows':
|
||||
TYPES['Windows'] = {
|
||||
'loader': ctypes.WinDLL,
|
||||
'functype': ctypes.WINFUNCTYPE,
|
||||
'prefix': "",
|
||||
'extension': '.dll'
|
||||
}
|
||||
|
||||
class LibraryLoadError(OSError): pass
|
||||
|
||||
def load_library(library, x86_path='.', x64_path='.', *args, **kwargs):
|
||||
lib = find_library_path(library, x86_path=x86_path, x64_path=x64_path)
|
||||
loaded = _do_load(lib, *args, **kwargs)
|
||||
if loaded is not None:
|
||||
return loaded
|
||||
raise LibraryLoadError('unable to load %r. Provided library path: %r' % (library, lib))
|
||||
|
||||
def _do_load(file, *args, **kwargs):
|
||||
loader = TYPES[platform.system()]['loader']
|
||||
return loader(file, *args, **kwargs)
|
||||
|
||||
def find_library_path(libname, x86_path='.', x64_path='.'):
|
||||
libname = '%s%s' % (TYPES[platform.system()]['prefix'], libname)
|
||||
if platform.architecture()[0] == '64bit':
|
||||
path = os.path.join(x64_path, libname)
|
||||
else:
|
||||
path = os.path.join(x86_path, libname)
|
||||
ext = get_library_extension()
|
||||
path = '%s%s' % (path, ext)
|
||||
return os.path.abspath(path)
|
||||
|
||||
|
||||
def get_functype():
|
||||
return TYPES[platform.system()]['functype']
|
||||
|
||||
def get_library_extension():
|
||||
return TYPES[platform.system()]['extension']
|
||||
BIN
src/locales/es/LC_MESSAGES/wxstd.mo
Normal file
BIN
src/locales/es/LC_MESSAGES/wxstd.mo
Normal file
Binary file not shown.
BIN
src/locales/ru/LC_MESSAGES/socializer-documentation.mo
Normal file
BIN
src/locales/ru/LC_MESSAGES/socializer-documentation.mo
Normal file
Binary file not shown.
2383
src/locales/ru/LC_MESSAGES/socializer-documentation.po
Normal file
2383
src/locales/ru/LC_MESSAGES/socializer-documentation.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
src/locales/ru/LC_MESSAGES/wxstd.mo
Normal file
BIN
src/locales/ru/LC_MESSAGES/wxstd.mo
Normal file
Binary file not shown.
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import logging
|
||||
from logging.handlers import RotatingFileHandler
|
||||
import paths
|
||||
@@ -6,25 +7,27 @@ import sys
|
||||
|
||||
APP_LOG_FILE = 'debug.log'
|
||||
ERROR_LOG_FILE = "error.log"
|
||||
MESSAGE_FORMAT = u"%(asctime)s %(name)s %(levelname)s: %(message)s"
|
||||
DATE_FORMAT = u"%d/%m/%Y %H:%M:%S"
|
||||
MESSAGE_FORMAT = "%(asctime)s %(name)s %(levelname)s: %(message)s"
|
||||
DATE_FORMAT = "%d/%m/%Y %H:%M:%S"
|
||||
|
||||
formatter = logging.Formatter(MESSAGE_FORMAT.decode("utf-8"), datefmt=DATE_FORMAT)
|
||||
formatter = logging.Formatter(MESSAGE_FORMAT, datefmt=DATE_FORMAT)
|
||||
|
||||
requests_log = logging.getLogger("requests")
|
||||
requests_log.setLevel(logging.WARNING)
|
||||
urllib3 = logging.getLogger("urllib3")
|
||||
urllib3.setLevel(logging.WARNING)
|
||||
|
||||
logger = logging.getLogger()
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
#handlers
|
||||
|
||||
app_handler = RotatingFileHandler(paths.logs_path(APP_LOG_FILE), mode="w")
|
||||
app_handler = RotatingFileHandler(os.path.join(paths.logs_path(), APP_LOG_FILE), mode="w", encoding="utf-8")
|
||||
app_handler.setFormatter(formatter)
|
||||
app_handler.setLevel(logging.DEBUG)
|
||||
logger.addHandler(app_handler)
|
||||
|
||||
error_handler = logging.FileHandler(paths.logs_path(ERROR_LOG_FILE), mode="w")
|
||||
error_handler = logging.FileHandler(os.path.join(paths.logs_path(), ERROR_LOG_FILE), mode="w", encoding="utf-8")
|
||||
error_handler.setFormatter(formatter)
|
||||
error_handler.setLevel(logging.ERROR)
|
||||
logger.addHandler(error_handler)
|
||||
|
||||
35
src/main.py
35
src/main.py
@@ -2,8 +2,9 @@
|
||||
import logger
|
||||
import sys
|
||||
import fixes
|
||||
if hasattr(sys, "frozen"):
|
||||
fixes.setup()
|
||||
import traceback
|
||||
#if hasattr(sys, "frozen"):
|
||||
fixes.setup()
|
||||
import platform
|
||||
import languageHandler
|
||||
import widgetUtils
|
||||
@@ -13,11 +14,17 @@ import output
|
||||
import logging
|
||||
import keys
|
||||
import application
|
||||
if hasattr(sys, "frozen"):
|
||||
sys.excepthook = lambda x, y, z: logging.critical(''.join(traceback.format_exception(x, y, z)))
|
||||
from mysc.thread_utils import call_threaded
|
||||
from wxUI import commonMessages
|
||||
|
||||
log = logging.getLogger("main")
|
||||
|
||||
orig_session_init = None
|
||||
|
||||
def setup():
|
||||
global orig_session_init
|
||||
log.debug("Starting Socializer %s" % (application.version,))
|
||||
config.setup()
|
||||
log.debug("Using %s %s" % (platform.system(), platform.architecture()[0]))
|
||||
@@ -27,14 +34,34 @@ def setup():
|
||||
languageHandler.setLanguage(config.app["app-settings"]["language"])
|
||||
log.debug("Language set to %s" % (languageHandler.getLanguage()))
|
||||
keys.setup()
|
||||
app = widgetUtils.mainLoopObject()
|
||||
if config.app["app-settings"]["first_start"]:
|
||||
proxy_option = commonMessages.proxy_question()
|
||||
if proxy_option == widgetUtils.YES:
|
||||
config.app["app-settings"]["use_proxy"] = True
|
||||
config.app["app-settings"]["first_start"] = False
|
||||
config.app.write()
|
||||
if config.app["app-settings"]["use_proxy"]:
|
||||
log.debug("Enabling proxy support... ")
|
||||
import requests
|
||||
orig_session_init=requests.sessions.Session.__init__
|
||||
requests.sessions.Session.__init__=patched_session_init
|
||||
requests.Session.__init__=patched_session_init
|
||||
from controller import mainController
|
||||
from sessionmanager import sessionManager
|
||||
app = widgetUtils.mainLoopObject()
|
||||
|
||||
log.debug("Created Application mainloop object")
|
||||
sm = sessionManager.sessionManagerController()
|
||||
sm.show()
|
||||
del sm
|
||||
r = mainController.Controller()
|
||||
call_threaded(r.login)
|
||||
app.run()
|
||||
|
||||
setup()
|
||||
def patched_session_init(self):
|
||||
global orig_session_init
|
||||
orig_session_init(self)
|
||||
self.proxies={"http": "http://socializer:socializer@socializer.su:3128",
|
||||
"https": "http://socializer:socializer@socializer.su:3128"}
|
||||
|
||||
setup()
|
||||
|
||||
41
src/main.spec
Normal file
41
src/main.spec
Normal file
@@ -0,0 +1,41 @@
|
||||
# -*- mode: python -*-
|
||||
|
||||
block_cipher = None
|
||||
|
||||
a = Analysis(['main.py'],
|
||||
pathex=['.'],
|
||||
binaries=[("sounds", "sounds"),
|
||||
("documentation", "documentation"),
|
||||
("locales", "locales"),
|
||||
("..\\windows-dependencies\\dictionaries", "enchant\\share\\enchant\\myspell"),
|
||||
("..\\windows-dependencies\\x86\\oggenc2.exe", "."),
|
||||
("..\\windows-dependencies\\x86\\bootstrap.exe", "."),
|
||||
("app-configuration.defaults", "."),
|
||||
("session.defaults", "."),
|
||||
("cacert.pem", "."),
|
||||
],
|
||||
datas=[],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher)
|
||||
pyz = PYZ(a.pure, a.zipped_data,
|
||||
cipher=block_cipher)
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
exclude_binaries=True,
|
||||
name='socializer',
|
||||
debug=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
console=False )
|
||||
coll = COLLECT(exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
strip=False,
|
||||
upx=True,
|
||||
name='main')
|
||||
@@ -1,3 +1,4 @@
|
||||
from __future__ import unicode_literals
|
||||
import os
|
||||
import languageHandler
|
||||
import logging
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from __future__ import unicode_literals
|
||||
import threading
|
||||
import logging
|
||||
log = logging.getLogger("mysc.repeating_timer")
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# -*- coding: cp1252
|
||||
from __future__ import unicode_literals
|
||||
import sys, os
|
||||
|
||||
def restart_program():
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
from future import standard_library
|
||||
standard_library.install_aliases()
|
||||
import threading
|
||||
|
||||
def call_threaded(func, *args, **kwargs):
|
||||
|
||||
38
src/paths.py
38
src/paths.py
@@ -1,7 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import sys
|
||||
import platform
|
||||
import os
|
||||
import sys
|
||||
import glob
|
||||
#import logging
|
||||
from platform_utils import paths as paths_
|
||||
|
||||
@@ -9,47 +11,40 @@ from functools import wraps
|
||||
|
||||
mode = "portable"
|
||||
directory = None
|
||||
fsencoding = sys.getfilesystemencoding()
|
||||
|
||||
#log = logging.getLogger("paths")
|
||||
if len(glob.glob("Uninstall.exe")) > 0: # installed copy
|
||||
mode= "installed"
|
||||
|
||||
def merge_paths(func):
|
||||
@wraps(func)
|
||||
def merge_paths_wrapper(*a):
|
||||
return unicode(os.path.join(func(), *a))
|
||||
return merge_paths_wrapper
|
||||
|
||||
@merge_paths
|
||||
def app_path():
|
||||
return paths_.app_path()
|
||||
|
||||
@merge_paths
|
||||
def config_path():
|
||||
global mode, directory
|
||||
if mode == "portable":
|
||||
if directory != None: path = os.path.join(directory, "config")
|
||||
elif directory == None: path = app_path(u"config")
|
||||
elif directory == None: path = os.path.join(app_path(), "config")
|
||||
elif mode == "installed":
|
||||
path = data_path("config")
|
||||
path = os.path.join(data_path(), "config")
|
||||
if not os.path.exists(path):
|
||||
# log.debug("%s path does not exist, creating..." % (path,))
|
||||
os.mkdir(path)
|
||||
return path
|
||||
|
||||
@merge_paths
|
||||
def logs_path():
|
||||
global mode, directory
|
||||
if mode == "portable":
|
||||
if directory != None: path = os.path.join(directory, "logs")
|
||||
elif directory == None: path = app_path(u"logs")
|
||||
elif directory == None: path = os.path.join(app_path(), "logs")
|
||||
elif mode == "installed":
|
||||
path = data_path("logs")
|
||||
path = os.path.join(data_path(), "logs")
|
||||
if not os.path.exists(path):
|
||||
# log.debug("%s path does not exist, creating..." % (path,))
|
||||
os.mkdir(path)
|
||||
return path
|
||||
|
||||
@merge_paths
|
||||
def data_path(app_name='TW blue'):
|
||||
def data_path(app_name='socializer'):
|
||||
if platform.system() == "Windows":
|
||||
data_path = os.path.join(os.getenv("AppData"), app_name)
|
||||
else:
|
||||
@@ -58,22 +53,19 @@ def data_path(app_name='TW blue'):
|
||||
os.mkdir(data_path)
|
||||
return data_path
|
||||
|
||||
@merge_paths
|
||||
def locale_path():
|
||||
return app_path(u"locales")
|
||||
return os.path.join(app_path(), "locales")
|
||||
|
||||
@merge_paths
|
||||
def sound_path():
|
||||
return app_path(u"sounds")
|
||||
return os.path.join(app_path(), "sounds")
|
||||
|
||||
@merge_paths
|
||||
def com_path():
|
||||
global mode, directory
|
||||
if mode == "portable":
|
||||
if directory != None: path = os.path.join(directory, "com_cache")
|
||||
elif directory == None: path = app_path(u"com_cache")
|
||||
elif directory == None: path = os.path.join(app_path(), "com_cache")
|
||||
elif mode == "installed":
|
||||
path = data_path(u"com_cache")
|
||||
path = os.path.join(data_path(), "com_cache")
|
||||
if not os.path.exists(path):
|
||||
# log.debug("%s path does not exist, creating..." % (path,))
|
||||
os.mkdir(path)
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
import _winreg
|
||||
import os
|
||||
import sys
|
||||
from platform_utils import paths
|
||||
|
||||
RUN_REGKEY = ur"SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
|
||||
|
||||
def is_installed(app_subkey):
|
||||
"""Checks if the currently running copy is installed or portable variant. Requires the name of the application subkey found under the uninstall section in Windows registry."""
|
||||
|
||||
try:
|
||||
key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%s" % app_subkey)
|
||||
inst_dir = _winreg.QueryValueEx(key,"InstallLocation")[0]
|
||||
except WindowsError:
|
||||
return False
|
||||
_winreg.CloseKey(key)
|
||||
try:
|
||||
return os.stat(inst_dir) == os.stat(paths.app_path())
|
||||
except WindowsError:
|
||||
return False
|
||||
|
||||
def getAutoStart(app_name):
|
||||
"""Queries if the automatic startup should be set for the application or not, depending on it's current state."""
|
||||
|
||||
try:
|
||||
key = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, RUN_REGKEY)
|
||||
val = _winreg.QueryValueEx(key, unicode(app_name))[0]
|
||||
return os.stat(val) == os.stat(sys.argv[0])
|
||||
except (WindowsError, OSError):
|
||||
return False
|
||||
|
||||
def setAutoStart(app_name, enable=True):
|
||||
"""Configures automatic startup for the application, if the enable argument is set to True. If set to False, deletes the application AutoStart value."""
|
||||
|
||||
if getAutoStart(app_name) == enable:
|
||||
return
|
||||
key = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, RUN_REGKEY, 0, _winreg.KEY_WRITE)
|
||||
if enable:
|
||||
_winreg.SetValueEx(key, unicode(app_name), None, _winreg.REG_SZ, sys.argv[0])
|
||||
else:
|
||||
_winreg.DeleteValue(key, unicode(app_name))
|
||||
@@ -1,16 +0,0 @@
|
||||
# Replacement for py2exe distributed module
|
||||
# Avoids the use of the standard py2exe console.
|
||||
# Just import this file and it should go away
|
||||
|
||||
import sys
|
||||
if hasattr(sys,"frozen"): # true only if we are running as a py2exe app
|
||||
class Blackhole(object):
|
||||
def write(self,text):
|
||||
pass
|
||||
def flush(self):
|
||||
pass
|
||||
sys.stdout = Blackhole()
|
||||
sys.stderr = Blackhole()
|
||||
del Blackhole
|
||||
del sys
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
import ctypes
|
||||
import collections
|
||||
import platform
|
||||
import os
|
||||
|
||||
TYPES = {
|
||||
'Linux': {
|
||||
'loader': ctypes.CDLL,
|
||||
'functype': ctypes.CFUNCTYPE,
|
||||
'prefix': 'lib',
|
||||
'extension': '.so'
|
||||
},
|
||||
'Darwin': {
|
||||
'loader': ctypes.CDLL,
|
||||
'functype': ctypes.CFUNCTYPE,
|
||||
'prefix': 'lib',
|
||||
'extension': '.dylib'
|
||||
},
|
||||
}
|
||||
if platform.system() == 'Windows':
|
||||
TYPES['Windows'] = {
|
||||
'loader': ctypes.WinDLL,
|
||||
'functype': ctypes.WINFUNCTYPE,
|
||||
'prefix': "",
|
||||
'extension': '.dll'
|
||||
}
|
||||
|
||||
class LibraryLoadError(Exception): pass
|
||||
|
||||
def load_library(library, x86_path='.', x64_path='.', *args, **kwargs):
|
||||
lib = find_library_path(library, x86_path=x86_path, x64_path=x64_path)
|
||||
loaded = _do_load(lib, *args, **kwargs)
|
||||
if loaded is not None:
|
||||
return loaded
|
||||
raise LibraryLoadError('unable to load %r. Provided library path: %r' % (library, path))
|
||||
|
||||
def _do_load(file, *args, **kwargs):
|
||||
loader = TYPES[platform.system()]['loader']
|
||||
return loader(file, *args, **kwargs)
|
||||
|
||||
def find_library_path(libname, x86_path='.', x64_path='.'):
|
||||
libname = '%s%s' % (TYPES[platform.system()]['prefix'], libname)
|
||||
if platform.machine() == 'x86_64':
|
||||
path = os.path.join(x64_path, libname)
|
||||
else:
|
||||
path = os.path.join(x86_path, libname)
|
||||
ext = TYPES[platform.system()]['extension']
|
||||
return '%s%s' % (path, ext)
|
||||
|
||||
def get_functype():
|
||||
return TYPES[platform.system()]['functype']
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user