Compare commits

..

922 Commits

Author SHA1 Message Date
1aa34ba4fa
Removed old fixes no longer needed 2022-03-22 10:16:18 -06:00
c90ff6a467
Removed old setup file 2022-03-22 10:13:38 -06:00
826631ba1b
Removed proxy from application 2022-03-22 10:12:00 -06:00
ea653f6c64 Merge branch 'weblate-socializer-interface' into 'master'
Translations update from Translations hub - MCV Software

See merge request socializer/socializer!1
2022-01-13 16:31:27 +00:00
519dd23d91 Translated using Weblate (Spanish)
Currently translated at 51.5% (326 of 632 strings)

Translation: Socializer/interface
Translate-URL: https://weblate.mcvsoftware.com/projects/socializer/interface/es/ [Skip CI]
2022-01-12 12:51:31 -06:00
2f298f4020
Deleted unneeded file to install chocolatey [skip CI] 2022-01-02 08:47:08 -06:00
2cd9e25dd9
[Skip CI] updated readme 2022-01-02 08:45:38 -06:00
50aa4e9dc8
Added other 2 jobs to the CI pipeline 2022-01-01 16:04:23 -06:00
c8f968578e
attempt to build socializer for both 32 and 64 bit 2022-01-01 16:02:08 -06:00
8acbea78ae
Generate update file with links to the new downloads center 2022-01-01 16:01:46 -06:00
f4eea98a4b
Added 64 bits code for generating the installer 2022-01-01 16:00:54 -06:00
d671854453
Indicate application bitness in both about dialog and in page title 2021-12-31 18:46:00 -06:00
211673a821
Updated about information 2021-12-31 18:35:26 -06:00
cf68b524a8
Updated documentation generation, now translations should work again 2021-12-31 18:21:44 -06:00
99279a8dab
Test latest python version for doc generation 2021-12-31 18:07:25 -06:00
198aa0c383
Removed no longer needed files 2021-12-31 17:59:36 -06:00
1aebd40a94
Updated gitlab CI File 2021-12-31 17:58:44 -06:00
0e5859c659
Added pages to socializer CI jobs 2021-12-31 06:00:31 -06:00
80bad717b3
Attempted to build socializer fully 2021-12-28 15:50:24 -06:00
3010677b5a
Adjusted path for documentation folder 2021-12-27 12:15:11 -06:00
f003fde885
Update gitlab CI file 2021-12-27 11:59:07 -06:00
e9c45e3178
Added python 3.7 in docker image 2021-12-23 17:55:51 -06:00
c7a57ff63f
Added requests as a dependency 2021-12-23 17:51:40 -06:00
52a0410327
Added quotation marks 2021-12-23 17:31:45 -06:00
ad9793cc47
Let's give containers a go 2021-12-23 17:15:06 -06:00
6a809d52f0
Avoid to use docker containers for now, as using the windows python seems to be easier 2021-12-23 15:52:42 -06:00
db8b0b581e
Try to import all steps needed to build Socializer 2021-12-23 15:30:58 -06:00
716a83b009
Fix pythonpath for windows 2021-12-23 14:57:22 -06:00
3d41c3fc6b
Removed syntax error 2021-12-23 14:56:08 -06:00
1be07728ae
Try to install python 2021-12-23 14:54:38 -06:00
b76733f9b9
Tried to update yml file with new chocolatey install 2021-12-23 14:40:03 -06:00
ae1674cb09
Added choco 2021-12-23 12:34:44 -06:00
aa3e4fb9fc
Test 3 2021-12-23 12:19:48 -06:00
4174b18074
Test 2 2021-12-23 12:16:21 -06:00
1e9994fa21
Test 1 2021-12-23 12:14:24 -06:00
7e68b9a18a
YML fixes 2021-12-23 12:12:05 -06:00
b8066adbca
Attempted to push a drone test file 2021-12-23 11:57:10 -06:00
a1d9b27d67
Fixed installer Nsis script to point to the correct socializer folder 2021-12-15 15:03:23 -06:00
e5c5c69d69
Recreate gitlab jobs to attempt to be less resource intensive 2021-12-15 13:56:02 -06:00
d12a934280
Attempt to add caches from gitlab runners 2021-12-15 12:55:42 -06:00
7cf935e3b2
Fixed data package inclusion of enchant module 2021-12-14 16:26:35 -06:00
b5ef428f5e
Attempt to use Nuitka to generate Socializer 2021-12-14 15:27:02 -06:00
b46634997e
Exclude 64 bits program files to avoid including binary data from there 2021-11-15 05:46:32 -06:00
feca6ab0fb
Stop including microsoft visual c++ redistributable packages 2021-11-15 05:31:43 -06:00
26c6fddf49
Build without visual c++ stuff 2021-11-14 11:32:42 -06:00
0c797689b9
Reduced to python 3.7 for building 2021-11-14 10:58:22 -06:00
7c9301117d Deploy docs to gitlab pages 2021-09-28 08:09:48 -05:00
62eb758157 [Skip CI] Update generation now creates the single version as opposed to alpha or stable version bundles 2021-09-27 10:51:59 -05:00
e56ec19421 Fixed About Dialog 2021-09-27 10:22:02 -05:00
35c1a754f3 Updated CI Script 2021-09-27 10:03:42 -05:00
f1def25bb5 Removed alpha version development. All versions would be a single update channel 2021-09-27 09:59:25 -05:00
4bdba42eab changed indentation from tabs to spaces 2021-09-22 09:17:12 -05:00
5c02a67ac7 Updated Russian and Spanish translations 2021-09-22 09:01:43 -05:00
59133a08c5 Updated setup file to stop ignoring our local Microsoft redistributable files 2021-09-22 09:00:41 -05:00
3013f34c19 Fixed an issue that was making Socializer unable to select or unselect audio by pressing space 2021-04-26 10:10:37 -05:00
c6fd4c00eb Added actions button in chat tabs 2021-04-26 09:45:21 -05:00
684a6006f5 Added actions button on all chat conversations 2021-04-26 09:44:40 -05:00
2e508a53a0 Removed call to clean on spellchecker 2021-04-26 09:44:11 -05:00
3afff7eba2 Removed an unneeded call to clean in spellchecker 2021-04-26 09:43:24 -05:00
783d54b55f Added loading of group members and actions on them. 2021-04-23 14:39:08 -05:00
b86bad024e Add experimental hability to see group members (actions for group members are not supported yet) 2021-04-23 13:18:55 -05:00
4d44af2fc0 Display buttons for sending private messages if applicable for the current user 2021-04-23 13:18:14 -05:00
5978a7749d Separated also tab GUI components in modules so it will be easier to mantain the codebase in the future 2021-04-23 12:26:35 -05:00
0a0e2a4dd9 Removed old log message regarding copying of spelling dictionaries 2021-04-23 11:03:08 -05:00
ea0f6ea1b3 Added some more log info to main script 2021-04-23 11:02:31 -05:00
44f6fbc883 Restructured buffers in individual python modules as opposed to a big module containing everything 2021-04-23 10:57:54 -05:00
f4ca895a27 changed auth library to vkaudiotoken 2021-04-22 11:26:35 -05:00
01f08e98a2 Added vkaudiotoken as a requirement 2021-04-22 11:21:06 -05:00
f8e8a11f96 Rebert back to use token as normally 2021-04-22 11:20:36 -05:00
a59e7a9c53 Remove need of secret and device_id in auth 2021-04-22 11:19:43 -05:00
ae53761d3a Started implementation of community member buffers 2021-04-21 15:31:04 -05:00
6bce7b956e fixed a small issue when focusing chat messages 2021-04-21 10:31:53 -05:00
aeade1cc2c Updated ToDo list 2021-04-21 08:59:41 -05:00
58084592dd Setup: Avoid dupplicate addition of the dictionaries folder 2021-04-21 08:59:23 -05:00
f8b0e36362 spellchecker: fix an error that occurs if there is no dictionary available for the current language 2021-04-21 08:58:32 -05:00
e23c6645f6 Added an actions button inside all displayed posts which is able to translate and check spelling on posts' messages 2021-04-21 08:57:47 -05:00
1d9e6f8074 Implemented a debug logging feature that can be turned on/off from preferences 2021-04-20 10:23:55 -05:00
197e649afb Fixed a small issue that was making impossible to close the blacklist by pressing escape 2021-04-20 09:57:54 -05:00
1f575f0311 Added reading article support from Socializer wall posts 2021-02-25 14:06:33 -06:00
273f25c24f Changed translation service to google Translate 2021-02-24 11:41:45 -06:00
b8ef10af3f Removed main spec file as no longer required in the project 2021-02-24 10:35:57 -06:00
48e599c14a Started to use some dependencies from upstream [Skip CI] 2021-02-24 09:30:26 -06:00
a142c93ba3 Set tasks as interruptible [skip ci] 2021-01-19 12:44:07 -06:00
9b48613db4 Fixed VK audios again 2021-01-19 12:12:44 -06:00
a53b333be0 Dropped Python 2 support 2021-01-19 11:40:40 -06:00
1ef2cf46fc Improved the audio transformation URl function 2021-01-19 11:40:17 -06:00
68350ce536 Updated vk_api to version 11.9 2021-01-19 11:37:42 -06:00
3a78a24599 Updated readme with latest repository changes 2021-01-19 11:36:55 -06:00
9382597108 Updated internal URLS to make reference to files 2021-01-18 15:49:30 -06:00
291334654c Alpha versions are back 2021-01-18 15:47:19 -06:00
11b4b76eae Use python image for python tasks only 2021-01-18 15:20:59 -06:00
035d1dabc6 Rebuild gitlab CI file 2021-01-18 15:13:08 -06:00
94960952b9 Attempted to fix the ftp upload script 2021-01-18 13:36:19 -06:00
87a9e49f2b Updatd path to repository on write_version_info.py 2021-01-15 09:12:36 -06:00
af82dee097 Updated requirements 2021-01-15 09:03:47 -06:00
79c0ea2225 Attempt to use python 3.8.7 for windows 7 compatibility 2021-01-15 09:01:23 -06:00
996b0d1b15 Added more debug info to upload script 2021-01-05 16:05:56 -06:00
99d08b31d2 Fixed a new typo 2021-01-05 15:23:08 -06:00
d2507f42da Fixed some YML errors 2021-01-05 15:18:27 -06:00
dee65a5fbf Attempt to build everything using the gitlab shared runners 2021-01-05 15:12:36 -06:00
59131b6929 Added correct package of python for 32 bits 2021-01-05 14:03:49 -06:00
9e5989863c Attempt to install a 32 bit python version with chocolatey 2021-01-05 13:56:59 -06:00
47378cedbf Fixed an issue with a missing dependency 2021-01-05 13:46:03 -06:00
5877fd4df5 Improves test 2021-01-05 13:22:37 -06:00
a4a4257192 Adding a test file 2021-01-05 13:08:38 -06:00
9c8f1978e2 Merge branch 'master' of code.manuelcortez.net:manuelcortez/socializer 2021-01-05 12:45:55 -06:00
95f925e5fd Updated locales [skip ci] 2021-01-04 17:20:07 -08:00
ce402549b6 Updated locales [skip ci] 2021-01-03 17:20:09 -08:00
6feee434d0 Updated locales [skip ci] 2021-01-02 17:20:12 -08:00
1782a92109 Updated locales [skip ci] 2021-01-01 17:19:56 -08:00
83874d73d0 Updated locales [skip ci] 2020-12-31 17:20:10 -08:00
7a6cd95c26 Updated locales [skip ci] 2020-12-30 17:20:21 -08:00
28ef94c963 Updated locales [skip ci] 2020-12-29 17:20:01 -08:00
b443819fd2 Updated locales [skip ci] 2020-12-28 17:20:04 -08:00
81d6395fb0 Updated locales [skip ci] 2020-12-27 17:20:14 -08:00
c7e79efc7a Updated locales [skip ci] 2020-12-26 17:19:57 -08:00
5f9b1513e4 Updated locales [skip ci] 2020-12-25 17:20:20 -08:00
fbb5c075e8 Updated locales [skip ci] 2020-12-24 17:19:56 -08:00
01c9c49fcf Updated locales [skip ci] 2020-12-23 17:19:54 -08:00
bd218fcc1a Updated locales [skip ci] 2020-12-22 17:20:02 -08:00
63f8eda381 Updated locales [skip ci] 2020-12-21 17:19:58 -08:00
8b1d2655c9 Updated locales [skip ci] 2020-12-20 17:20:07 -08:00
9519f87ec6 Updated locales [skip ci] 2020-12-19 17:20:08 -08:00
c9e52f8eaa Updated locales [skip ci] 2020-12-18 17:19:48 -08:00
fe69ff8cde Updated locales [skip ci] 2020-12-17 17:20:21 -08:00
acc8d80abc Updated locales [skip ci] 2020-12-16 17:20:06 -08:00
99aec73110 Updated locales [skip ci] 2020-12-15 17:19:57 -08:00
4215fb0910 Updated locales [skip ci] 2020-12-14 17:20:28 -08:00
464a9d66a4 Updated locales [skip ci] 2020-12-13 17:20:08 -08:00
00c355e0d9 Updated locales [skip ci] 2020-12-12 17:20:23 -08:00
30d49f3817 Updated locales [skip ci] 2020-12-11 17:20:08 -08:00
ed4567d800 Updated locales [skip ci] 2020-12-10 17:20:12 -08:00
387247ea3b Updated locales [skip ci] 2020-12-09 17:19:55 -08:00
9439a583b8 Updated locales [skip ci] 2020-12-08 17:20:05 -08:00
bdfa9791f3 Updated locales [skip ci] 2020-12-07 17:19:47 -08:00
6ed1257895 Updated locales [skip ci] 2020-12-06 17:20:27 -08:00
8f55d77074 Updated locales [skip ci] 2020-12-05 17:19:51 -08:00
50267bf5ea Updated locales [skip ci] 2020-12-04 17:19:39 -08:00
d931695394 Updated locales [skip ci] 2020-12-03 17:19:44 -08:00
204a74b936 Updated locales [skip ci] 2020-12-02 17:19:53 -08:00
9921ea4590 Updated locales [skip ci] 2020-12-01 17:19:42 -08:00
172af3c9ef Updated locales [skip ci] 2020-11-30 17:19:58 -08:00
0be4a3dcaf Updated locales [skip ci] 2020-11-29 17:19:56 -08:00
f1a8c34950 Updated locales [skip ci] 2020-11-28 17:19:47 -08:00
ac7759ed5a Updated locales [skip ci] 2020-11-27 17:19:45 -08:00
1eb1f1fb3c Updated locales [skip ci] 2020-11-26 17:19:43 -08:00
0342b7e0e1 Translated using Weblate (Spanish) [Skip CI]
Currently translated at 4.3% (15 of 348 strings)

Translation: Socializer/documentation
Translate-URL: http://translations.manuelcortez.net/projects/socializer/documentation/es/
2020-11-26 14:24:41 -06:00
96f15e746f Translated using Weblate (Spanish) [Skip CI]
Currently translated at 46.4% (291 of 627 strings)

Translation: Socializer/application
Translate-URL: http://translations.manuelcortez.net/projects/socializer/application/es/
2020-11-26 14:24:41 -06:00
Weblate
21f34d07c5 Update translation files [Skip CI]
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: Socializer/application
Translate-URL: http://translations.manuelcortez.net/projects/socializer/application/
2020-11-26 12:36:28 -06:00
9ac9281dd5 Translated using Weblate (Spanish) [Skip CI]
Currently translated at 45.7% (287 of 627 strings)

Translation: Socializer/application
Translate-URL: http://translations.manuelcortez.net/projects/socializer/application/es/
2020-11-26 12:26:55 -06:00
9cbe1071d1 Updated locales [skip ci] 2020-11-26 10:05:29 -08:00
355d25e560 Translated using Weblate (Spanish)
Currently translated at 43.8% (275 of 627 strings)

Translation: Socializer/application
Translate-URL: http://translations.manuelcortez.net/projects/socializer/application/es/
[SkipCI]
2020-11-26 12:04:46 -06:00
5a53be9e7a Updated locales [skip ci] 2020-11-25 17:19:51 -08:00
d9ac57b9af Updated locales [skip ci] 2020-11-24 17:19:57 -08:00
fa778616f3 Updated locales [skip ci] 2020-11-23 17:19:42 -08:00
6ee18cb028 Merge branch 'master' of code.manuelcortez.net:manuelcortez/socializer 2020-11-23 13:21:02 -06:00
dd52a512d4 Updated changelog 2020-11-23 10:26:25 -06:00
1468428689 Updated CI configuration for Socializer 2020-11-23 10:26:13 -06:00
fe577d75b4 Generates an exception if an item cannot be rendered into a buffer 2020-11-23 10:12:59 -06:00
2a2bea5780 Renderers: Take into account users with no last seen activity 2020-11-23 10:12:16 -06:00
008698e055 Updated locales [skip ci] 2020-11-22 17:20:04 -08:00
d618512210 Updated locales [skip ci] 2020-11-21 17:20:06 -08:00
faaf67987d Updated locales [skip ci] 2020-11-20 17:19:38 -08:00
6da84fae87 Updated locales [skip ci] 2020-11-19 17:19:42 -08:00
3ce699ceaf Updated locales [skip ci] 2020-11-18 17:19:37 -08:00
dd564dc17f Updated locales [skip ci] 2020-11-17 17:21:45 -08:00
19de0ac272 Updated locales [skip ci] 2020-11-16 17:21:15 -08:00
d6582e1b3e Updated locales [skip ci] 2020-11-16 05:52:19 -08:00
ee0af2fd2e Attempt to fix the incorrect CI configuration 2020-11-16 07:51:30 -06:00
78db9ef375 Translated using Weblate (Spanish)
Currently translated at 43.7% (274 of 627 strings)

Translation: socializer/interface
Translate-URL: http://translations.manuelcortez.net/projects/socializer/interface/es/ [Skip CI]
2020-10-01 18:10:18 -05:00
e8a4031a65 Merge branch 'master' of code.manuelcortez.net:manuelcortez/socializer 2020-10-01 10:06:43 -05:00
ef2ef76f0f Update translation files on every commit [skip CI] 2020-10-01 10:06:15 -05:00
7bf5cd8f7c Updated locales [skip ci] 2020-09-30 18:20:06 -07:00
6667a29869 Translated using Weblate (Spanish)
Currently translated at 3.1% (11 of 348 strings)

Translation: socializer/documentation
Translate-URL: http://translations.manuelcortez.net/projects/socializer/documentation/es/
2020-09-30 17:10:38 -05:00
d44e20ed10 Translated using Weblate (Spanish)
Currently translated at 41.9% (263 of 627 strings)

Translation: socializer/interface
Translate-URL: http://translations.manuelcortez.net/projects/socializer/interface/es/ [Skip CI]
2020-09-30 17:10:37 -05:00
c2dbb44a8a Updated locales [skip ci] 2020-09-29 18:19:57 -07:00
8b89fbd4e0 Added translation using Weblate (Spanish) 2020-09-29 16:32:12 -05:00
bbd730bb38 Translated using Weblate (Spanish)
Currently translated at 32.5% (204 of 627 strings)

Translation: socializer/interface
Translate-URL: http://translations.manuelcortez.net/projects/socializer/interface/es/ [Skip CI]
2020-09-29 16:09:19 -05:00
d855899cbd Merge branch 'master' of code.manuelcortez.net:manuelcortez/socializer 2020-09-29 15:52:22 -05:00
1f7f98cafa Trigger translation catalog updates only when scheduled [skip CI] 2020-09-29 15:51:52 -05:00
bc3dcd7333 Updated locales [skip ci] 2020-09-29 11:38:27 -07:00
a799f3d0d5 Fix issue 2020-09-29 13:35:38 -05:00
b305a3702c Updated locales 2020-09-29 11:34:30 -07:00
a838b1fa09 Merge branch 'master' of code.manuelcortez.net:manuelcortez/socializer 2020-09-29 13:31:06 -05:00
90d2aa7519 Modified translator stuff for docs 2020-09-29 13:30:34 -05:00
27f3d0847b Updated locales 2020-09-29 11:28:42 -07:00
02cbb5bdb9 Updated locales 2020-09-29 11:25:06 -07:00
40801da71e Updated locales 2020-09-29 11:24:38 -07:00
5fd2207ed4 Set remote URl in git origin 2020-09-29 13:20:04 -05:00
376407e6fd Push to master branch from CI 2020-09-29 12:31:42 -05:00
f3a963b39f Added git config stuff into public CI 2020-09-29 12:28:56 -05:00
b0165952cb Fixed small git issue 2020-09-29 12:18:24 -05:00
b5390de4b0 fixed yaml error 2020-09-29 12:16:37 -05:00
32756c6a92 another fix 2020-09-29 11:57:27 -05:00
4670ca3d0b Fixed a typo 2020-09-29 11:54:04 -05:00
67c6e54a2a Merge branch 'master' of code.manuelcortez.net:manuelcortez/socializer 2020-09-29 11:51:50 -05:00
d245d74acf Try to make the catalogs update automatic 2020-09-29 11:51:02 -05:00
c43de3e9e5 socializer should not stop responding when loading conversation buffers 2020-07-23 08:59:30 -05:00
f56d46417a Define the _() function in the setup script so it will avoid issues for translations not taken 2020-07-10 00:04:23 -05:00
c1865b3ecd Switch to wxpython 4.1.0 2020-07-07 17:48:33 -05:00
9520954347 Reuse ftp sessions when uploading 2020-06-29 10:27:28 -05:00
cb084faf85 Fixed upload script 2020-06-29 10:12:14 -05:00
e3db177d1a Updated socializer to support again two factor verification 2020-06-29 09:51:55 -05:00
f43e9ffccf Added bak the enchant based spelling correction module 2020-06-14 08:39:43 -05:00
45465b246f Fixed typos [Skip CI] 2020-06-11 10:40:51 -05:00
af33450835 Updated Readme [Skip CI] 2020-06-11 10:35:57 -05:00
7e978593d2 Fixed a few values in gitlab CI 2020-06-05 10:37:27 -05:00
0466115a6d Release version 0.24 2020-06-05 10:26:26 -05:00
5168b9e7d8 Include C++ redistributables 2017 in Socializer executable files 2020-05-21 02:41:26 -05:00
329c84a65f Prepare stuff for next table 2020-05-07 23:44:29 -05:00
7c5fa5dea7 Hide paths in built exes 2020-05-07 17:17:07 -05:00
3ed262bd61 Merge branch 'master' of code.manuelcortez.net:manuelcortez/socializer 2020-05-07 17:13:29 -05:00
f159889f5d Updated requirements file 2020-05-07 17:12:58 -05:00
e1f517595d Added translatoin for changelog 2020-03-04 12:07:24 -06:00
6fbe6be74e Now it is possible to open a group in the VK website from the context menu in the group buffer 2020-03-03 23:09:38 -06:00
d443b99f27 Fixed context menu in audio buffers 2020-03-03 23:00:36 -06:00
b977e2b2af Updated Russian locales 2020-03-03 20:35:22 -06:00
3dda56688c Install babel as a dependency on documentation generation stage 2020-02-28 17:30:28 -06:00
4b62576a0a Updated a translation catalog 2020-02-28 17:27:07 -06:00
5c48f3ed70 Updated gitlab YML template 2020-02-28 17:26:05 -06:00
8ebf5dedd2 Added little code to update documentation catalogs aswell 2020-02-28 16:59:51 -06:00
1d181b61a3 Documentation_importer: Now blank lines will not be created at gettext translatable strings 2020-02-28 16:59:14 -06:00
c5b9f668b2 Updated CI environment 2020-02-28 15:41:52 -06:00
cc1be262d1 Added babel as a dependency and prepare the setup file for translating with this 2020-02-28 15:41:14 -06:00
ae2288a982 Remove the newline from all generated translation ready strings 2020-02-28 15:38:39 -06:00
7e1765c26b Added documentation to the upload script 2020-02-24 08:57:56 -06:00
4955986c3e Modified FTP upload script 2020-02-23 23:50:02 -06:00
aacaa528fb fixed a typo 2020-02-23 23:26:01 -06:00
dc4f9a30bd Added something else regarding powerShell scripts 2020-02-23 23:17:50 -06:00
a2ea4dad11 Removed apostrophes 2020-02-23 16:25:27 -06:00
725097392a Fixed a typo 2020-02-23 16:20:34 -06:00
f267161c29 Migrated gitlab executor commands to powershell 2020-02-23 16:08:46 -06:00
794cc4f3dc Added some more info and handle a new case 2020-02-04 11:56:01 -06:00
9373b3db93 Added more logging info 2020-02-04 11:03:34 -06:00
9dfb6dc916 Removed threads when creating some buffers 2020-02-04 10:32:27 -06:00
98c35f6f9d Removed a small error with threads being out of control 2020-02-04 08:52:12 -06:00
2f488a5daf Retrieve more anonimous info about creation of conversation buffers to debug some issues 2020-02-04 08:40:41 -06:00
1622f864fc Added more logging info 2020-02-03 06:48:51 -06:00
08d3201cee Revert "In theory, general loading times should be decreased"
This reverts commit 296b4164a7.
2020-02-03 05:05:55 -06:00
bc996df3d8 Revert "Fixed a few bugs"
This reverts commit 3f5c79dd05.
2020-02-03 05:05:19 -06:00
3f5c79dd05 Fixed a few bugs 2020-01-30 17:38:56 -06:00
296b4164a7 In theory, general loading times should be decreased 2020-01-28 17:28:21 -06:00
ed260b6b37 decreased load times of audio and video albums during buffer creation 2020-01-28 12:42:47 -06:00
5f1604aece Load more than 10 audio albums 2020-01-27 16:52:58 -06:00
7ddca4aec7 Fixed inconsistency with two unread messages in a conversation 2020-01-20 10:39:38 -06:00
d286674cee Show error dialogs when attempting to send audio messages to banned or blocked users 2019-12-20 08:09:11 -06:00
1d96a4807b Removed old code to support update transitions 2019-12-18 09:02:32 -06:00
02bedad2ed Use first name only instead of full name when notifying about users typing 2019-12-18 08:56:52 -06:00
1876907bac Delete unneeded scripts 2019-12-12 11:11:01 -06:00
07398456c1 Fixed a typo 2019-12-12 11:08:59 -06:00
58414affe8 Change architecture for update files 2019-12-12 10:39:11 -06:00
1a89871aa9 Save alpha versions in the right path 2019-12-12 10:32:11 -06:00
10fcedf537 Changed paths to updater so it will use the same methods for both stable and alpha versions 2019-12-11 11:38:13 -06:00
c4d89faa33 Fixed an incorrect path name in update generation 2019-12-11 11:29:23 -06:00
a912b4aeef Attempt to upload alpha update files 2019-12-11 11:13:52 -06:00
0b5ca8ddb3 Attempt to generate alpha update files 2019-12-11 10:54:13 -06:00
2932427ab0 Revert alpha generation to gitlab for a while 2019-12-10 20:09:02 -06:00
3b4625961f Fixed a typo 2019-12-10 10:49:26 -06:00
46d5608dfe Added installer for alphas 2019-12-10 10:43:55 -06:00
1b44f35967 Attempt to upload alpha versions to our FTP server 2019-12-10 10:41:52 -06:00
ecd758220a Fixed a typo 2019-12-10 09:59:58 -06:00
28e03cbf8e Modified gitlab template 2019-12-10 09:56:40 -06:00
e51601a8bd Added select/unselect all option in menu for audio buffers 2019-12-09 12:12:25 -06:00
6667b9e4cb Updated ToDo list 2019-12-09 10:37:52 -06:00
93fe11728a Added toDo list 2019-12-09 10:30:10 -06:00
c83f7c8d94 Displaying articles from the attachments list in wall posts 2019-12-05 16:28:01 -06:00
1ef8c99c43 Removed unneeded code 2019-12-05 16:26:58 -06:00
f4bb812fd4 Added download of multiple audios from any audio buffer 2019-12-04 17:48:59 -06:00
81963979d1 Reverted back to wx 4.0.3 2019-12-04 17:46:44 -06:00
da6d73d9bf Removed 64 bits platform from build bot 2019-12-04 17:45:42 -06:00
d91c4f4cf2 Multiupload attempt #1 2019-12-04 12:45:47 -06:00
f3aeb9f61b Ask for confirmation before exiting 2019-12-03 13:24:59 -06:00
20dcb4a475 Fixed a typo 2019-12-03 12:11:09 -06:00
0bf0fd9f27 Fixed small issue with dicts 2019-12-03 12:06:36 -06:00
17bfa4b260 Test a 64 bits build 2019-12-03 10:34:34 -06:00
73f1a9c31f Remove all references to old code 2019-12-03 10:02:35 -06:00
c74c6f6f5d Added a new module for performing the spelling correction. Needs testing 2019-12-03 09:59:54 -06:00
28e2d3df08 Added symspellpy as a dependency 2019-12-03 09:58:17 -06:00
62914b2dfd Removed dependency on enchant 2019-12-03 09:57:36 -06:00
46c1beed88 Replaced enchant based dictionaries by Symspell dicts 2019-12-03 09:56:09 -06:00
9f499b8e8f Generate all versions of socializer 2019-11-27 09:12:26 -06:00
33c15d2444 Added updates to new alpha 2019-11-27 09:05:16 -06:00
7116d5c805 Abord creation of alpha for 64 bits due to enchant.ddl not available for such architecture 2019-11-26 12:03:23 -06:00
c4ccb4f072 Rename socializer for 32 bits as socializer_x86.zip 2019-11-26 09:54:03 -06:00
fe1ac8e324 Added path to python 64 2019-11-26 09:52:13 -06:00
6049531de5 file clean 2019-11-26 09:43:56 -06:00
ed52202017 Modified documentation importer for unicode strings 2019-11-26 09:40:49 -06:00
b90eb1fc8f Attempt to create 64 bits alpha 2019-11-26 09:30:56 -06:00
f9a1183993 Commented CI configuration file 2019-11-26 09:26:27 -06:00
63585661ae Now the documentation system works with Pytohn 3 2019-11-26 09:06:03 -06:00
711ec58419 Modified code se so updates will work properly for the next Socializer alpha stuff 2019-11-26 08:28:12 -06:00
bbeb80600b Fixed missing pyinstaller path 2019-11-25 14:04:44 -06:00
15d4124d89 reverted to python 3.7 due to CXFreeze 2019-11-25 13:52:51 -06:00
87acd01273 Removed stright dependency on wxPython4.0.3 2019-11-25 13:26:47 -06:00
8d83e51947 attempt to use python 3.8.0 2019-11-25 12:03:26 -06:00
b19032da9b Added some missing translations useful for the next few dys of alphas 2019-11-25 12:03:07 -06:00
b4b977ffc5 Modified installer file 2019-11-25 10:59:22 -06:00
d82d07bf2c Attempt to update CI file for tags 2019-11-25 10:59:03 -06:00
3a87d2957a Finished uploader to FTP (will upload only stable versions) 2019-11-25 10:49:58 -06:00
8aa7f34fd2 Merge branch 'master' of code.manuelcortez.net:manuelcortez/socializer 2019-11-25 08:43:16 -06:00
79f3177a60 Added some kind of ftp upload script 2019-11-25 08:42:18 -06:00
c468147db0 Fixed issue with notifications during Socializer startup 2019-11-25 08:33:57 -06:00
c19fbf40a0 Display information about the next generation of alpha versions 2019-11-22 17:35:55 -06:00
55193a958d Fixed error that was making some links to redirect to 404 errors in chat messages, posts and comments 2019-11-20 16:18:16 -06:00
bb92a8a8d4 Added cx_freeze in the CI environment 2019-11-19 17:41:29 -06:00
e0a3b6db70 Created a version that would zip the version generated with cx_freeze 2019-11-19 17:41:09 -06:00
c860834f17 Remove unneeded code from the experimental setup file 2019-11-19 17:33:56 -06:00
8544fe806e Modified setup file to complete the creation process using cx-freeze 2019-11-19 17:32:37 -06:00
a14f648cb3 Prepare some packages to be imported correctly by cx_freeze 2019-11-19 17:31:47 -06:00
56171f94cf Added setup for cx_freeze (needs testing and further implementation details) 2019-11-15 17:46:36 -06:00
2e08fa5745 Removed old dependencies 2019-11-15 17:41:48 -06:00
0afcdcc1f6 Removed deps 2019-11-15 17:40:43 -06:00
e7d71e3607 Removed old dependencies used for Python 2 2019-11-15 17:39:01 -06:00
2d068cfd79 Moved path to a working copy of Socializer 2019-11-15 13:04:16 -06:00
ee0c22e37c Release 0.23 2019-11-11 11:47:47 -06:00
925e82e5c5 Updated Russian translation for both interface and documentation 2019-10-30 09:10:06 -06:00
0cdfc253d2 added a safe-filename function so we will be sure the suggested filename won't break anything in the operating system 2019-10-14 17:25:06 -05:00
9e6e72c0a1 Started some kind of implementation 2019-10-11 17:39:19 -05:00
63def5530f Added 'manage accounts' option in the application menu 2019-10-11 13:19:53 -05:00
c206a40e62 Updated documentation regarding account management 2019-10-11 13:19:32 -05:00
2889923940 Added video buffers to the timeline dialog 2019-10-11 12:05:27 -05:00
3deabdbf36 Fixed parsing of video data. Now videos are loaded correctly again 2019-10-11 12:04:46 -05:00
89c8e6a194 Added information related to blacklist support and video buffers on timelines 2019-10-11 12:03:43 -05:00
19a5216373 Added block in people buffers' menu and blacklist management in the application menu 2019-10-10 10:43:29 -05:00
f274ba9caa fixed some issues when rendering topic comments 2019-10-09 09:25:39 -05:00
5a36db2366 Added checks when using player_function 2019-10-07 16:50:30 -05:00
9003d3c738 Added accounts dialog at startup in socializer (implementation is half pending) 2019-09-23 17:47:26 -05:00
d06a32311e Update version number to 0.23 2019-09-23 12:52:48 -05:00
63fb0e0ff9 Finished fault tolerance in socializer. Now also topic comments are fully supported 2019-09-20 14:07:44 -05:00
4e14801db6 Updated documentation 2019-09-20 13:50:00 -05:00
926db6007a Added fault tolerance to wall coments and reposts 2019-09-19 17:52:04 -05:00
cf0e001cfc display wall comments and replies in the same list. 2019-09-19 11:25:28 -05:00
ee6370bb0b (pubsub) Refresh comments when a new one is added in wall posts and comments 2019-09-18 14:49:00 -05:00
33ba50a7b4 Show age in profile dialog 2019-09-18 13:56:07 -05:00
29e8b00656 calls to wall.createcomment and wall.report are done via the pubsub method (pubsub reply for failed posts not implementd yet) 2019-09-18 13:55:30 -05:00
ff175c0c8f Added mobile and home phone to basic info tab in the profile display dialog 2019-09-17 17:26:23 -05:00
a015593971 Changed to VK APi V 5.101 2019-09-17 17:23:46 -05:00
fdbf42ad1a Added a new tab called buffer settings to the preferences dialog. Moved some settings to that new tab 2019-09-15 14:13:25 -05:00
61583447b6 Replaced the post button for post in wall in people buffers 2019-09-15 12:42:01 -05:00
33ab63c1bc Added chat buffer count in the preferences dialog 2019-09-15 10:52:01 -05:00
5b3a013766 Update online friends buffer even if chat notifications are disabled 2019-09-15 09:58:22 -05:00
69f8b79fc4 Added fault tolerance to socializer in posts, topic creation and chat messages 2019-08-30 11:26:00 -05:00
60d283f931 Added some comments to the new post function 2019-08-28 08:53:37 -05:00
f41dd51dc7 Added error reports to failed posts in VK (pubsub). Added an extra param called from_post which specifies which buffer will get updated if the post is created successfully 2019-08-27 16:59:57 -05:00
a7173adc22 Chat messages were upgraded to the new post method, too 2019-08-27 12:13:13 -05:00
bbef34d125 Removed unneeded prints 2019-08-27 11:14:29 -05:00
277b10b155 Updated post in walls and topic creation to use the new pubsub event for posting 2019-08-27 11:12:54 -05:00
6a69d4eaac Added new methods (pubsub) for uploading attachments and sending posts to VK. Those methods will be extended to support all post types and attachments lately and will be able to report errors and success when posting to the full application 2019-08-27 11:10:15 -05:00
4d3c1cacc9 Updated changelog 2019-08-27 08:33:12 -05:00
2ed26bc8d9 DisplayPost: It is possible to see who liked a comment or topic comment by pressing the likes button 2019-08-27 08:29:02 -05:00
52e55a24fa Display topic post: It is possible to like or dislike a topic comment when displaying it individually 2019-08-22 09:22:16 -05:00
98b85435ac Now it is possible to add/remove from library or move to a different album all selected audios when multiselection is used 2019-08-19 17:15:44 -05:00
3903c5630f Fixed the status bar size in the window 2019-08-19 11:25:52 -05:00
ac7ef77a8d Skipping update check when running from sources 2019-08-19 10:02:05 -05:00
c80ca295c6 Attempted to collect more data in incorrect attachment parsing 2019-08-06 08:41:46 -05:00
19a9c305ce Added more type fixes 2019-08-06 08:41:26 -05:00
dca7b4a694 Fixed problems when loading newsfeed buffers sometimes in Socializer 2019-07-27 12:45:03 -05:00
357d18fbe0 fixed incorrect display of the method being called from VK in the logs 2019-07-22 13:21:13 -05:00
251623acf0 Removed contributors file as is not needed in the repository 2019-07-22 12:54:21 -05:00
4caa5a6ab0 Merge branch 'next' 2019-07-22 12:53:10 -05:00
d1b11c0630 Fixed errors when uploading audio files without ID3 tags to VK 2019-07-22 12:49:46 -05:00
36b25e1c9f Removed some confidential data from the logs generated by socializer 2019-07-22 10:04:56 -05:00
6a2407a07c Bump new version 2019-07-14 11:37:10 -05:00
cd623065e7 Fixed a few important errors avoiding normal usage of Socializer 2019-07-14 11:31:10 -05:00
2b462bfecb Merge branch 'next' 2019-07-13 12:15:30 -05:00
9353ea93c1 Update file now points to the latest v0.21 version 2019-07-13 08:57:35 -05:00
853cce4a66 Bumped version to 0.21 2019-07-13 08:56:00 -05:00
2d944b276c Updated translations 2019-07-13 08:47:40 -05:00
b4299ef066 Updated translations 2019-07-13 08:40:33 -05:00
64799d2e14 Attempt to speed up the initial buffer loading on socializer 2019-07-04 09:34:05 -05:00
ead54fce3f Fixed error with some posts in the home timeline that were making socializer to not load anything else 2019-07-04 08:38:47 -05:00
ae93efb17a Display version type in about dialog between alpha or stable 2019-07-02 09:26:07 -05:00
d95dfb18fd Removed some settings no longer needed 2019-07-02 08:55:55 -05:00
4e3c397ce5 Refactored some functions to call wx's threads properly. 2019-06-10 09:26:10 -05:00
4e6126405f Send links when posting a topic comment 2019-06-06 13:42:22 -05:00
8cdec543e1 Modified auth info for 2 factor auth 2019-06-05 10:38:59 -05:00
4810cbe138 Added timeline creation from the context menu in people buffers 2019-05-29 17:51:37 -05:00
8ec7fbb49e Added support for displaying and opening wall posts as attachments in conversations 2019-05-29 09:17:02 -05:00
7d52ed8802 Fixed error retrieving group information of objects not present in the db. 2019-05-29 09:16:16 -05:00
9d44d063eb Modified timeline dialog for a future change 2019-05-24 17:42:59 -05:00
d5eb9ed478 Merge branch 'master' of code.manuelcortez.net:manuelcortez/socializer 2019-05-24 16:33:20 -05:00
40afb6cdc2 Fixed error when attenpting to upload photos to wall posts. Now it should work normally 2019-05-21 16:20:38 -05:00
74234476ab Updated button label in group feed buffers 2019-05-20 21:32:51 -05:00
82c71a3bd8 Merge branch 'master' of code.manuelcortez.net:manuelcortez/socializer 2019-05-20 00:42:19 -05:00
5161e1c045 Updated changelog 2019-05-19 12:35:19 -05:00
40052dbf3f Fixed audio player on walls 2019-05-15 17:19:02 -05:00
e73d92754e Fixed a typo in documentation translation 2019-05-07 11:38:04 -05:00
6df1b80941 Test 4 2019-05-07 10:37:31 -05:00
a9e5963b74 Test 3 2019-05-07 10:35:12 -05:00
95671966cd Test 2 2019-05-07 10:32:12 -05:00
a8ce7216e1 Test 2019-05-07 10:29:15 -05:00
5c6829165b Fixed a typo 2019-05-07 03:46:14 -05:00
91eebfd895 Added topic creation in groups (experimental) 2019-05-06 17:57:34 -05:00
72cc04342f Restructured group info storage for a wider usage 2019-05-06 15:50:45 -05:00
75267294f9 Now it is possible to post as group or username in group walls 2019-05-06 14:58:45 -05:00
f81d302c9a Updated player 2019-05-06 12:09:53 -05:00
c3ab0406e4 Updated documentation translations 2019-05-06 11:45:58 -05:00
fdcaf4e596 Fixed two factor auth in socializer! 2019-05-05 01:01:31 -05:00
ca7b3eff29 Added some debug info 2019-05-04 14:25:39 -05:00
f1eb640564 Select songs with spacebar and play audio from selected tracks has been implemented 2019-05-02 05:57:49 -05:00
194ca2d380 Implemented a selection control in audio buffers (not working yet) 2019-04-30 17:36:53 -05:00
976e90f0a0 Fixed audio methods 2019-04-30 15:32:38 -05:00
2c836f473d Fixed a strange issue with play_all function 2019-04-30 15:31:54 -05:00
f834b6046e Added the full implementation, pending usage into an experiment 2019-04-26 17:53:55 -05:00
e6087f3818 Fixed a typo 2019-04-26 17:51:18 -05:00
20c3df6be2 Added experiment of a selectableList (not implemented, et) 2019-04-26 17:49:54 -05:00
b914e4b548 Merge branch 'next' 2019-04-25 17:42:16 -05:00
f336489609 Released v0.20 2019-04-25 12:10:35 -05:00
4ce2e88568 Updated changelog 2019-04-25 11:38:38 -05:00
a917a6a9cd Ducking when voice messages are being played 2019-04-25 11:38:00 -05:00
a01eabea91 Separate playback of voice messages from regular audio playback 2019-04-25 10:18:13 -05:00
605f0da751 Modified worker in player module so it will set stopped to True after finishing playback 2019-04-25 09:58:53 -05:00
6bd0c10ef2 Removed some old keystrokes no longer needed 2019-04-25 09:17:48 -05:00
a9032602bf Added play and pause functionality in the audios displayer 2019-04-25 08:56:12 -05:00
8c03601bd2 Change lable to 'pause' in the play button when something is playing 2019-04-25 08:48:19 -05:00
afc4c0ca1f prepared content for V0.20 2019-04-24 17:39:25 -05:00
e0ee8a7040 Updated translations 2019-04-24 17:34:09 -05:00
e32336aff8 Added support for loading all comments in topics 2019-04-23 13:13:58 -05:00
0edbba5625 fixed a typo in last commit 2019-04-23 11:31:49 -05:00
eec5350926 Improve checks for audio in stayed state 2019-04-22 00:10:40 -05:00
20f0b3f782 Updated changelog 2019-04-20 14:17:36 -05:00
5cf4128c49 Fixed error in disconnected friends algorithm 2019-04-19 14:41:57 -05:00
47768acf5c Fixed session error in new config files 2019-04-19 02:13:29 -05:00
f88d2177c3 Updated audio methods for changes introduced in 17/04 2019-04-17 11:50:15 -05:00
9373f10d68 Added seeking in the audio player menu and in new keystrokes (read changelog) 2019-04-17 11:46:26 -05:00
4f3bb6ac93 Fixed all audio methods due to latest VK changes 2019-04-16 15:45:25 -05:00
5f224a077c Reordered presenters for post display and cretion 2019-04-16 12:24:42 -05:00
14cdeb0b5a Updated and restructured Socializer's changelog 2019-04-16 09:41:47 -05:00
b02137c216 Added display of people who shared the post in the post displayer dialog 2019-04-16 09:41:32 -05:00
7c90103af4 Show people who have liked a post if pressing the likes button in the post displayer 2019-04-15 17:50:56 -05:00
903af03d15 Added menu in list of added friends in home timeline buffer 2019-04-15 16:16:17 -05:00
b57ca4d207 Fix error on 'open in vk' for group topics 2019-04-14 23:51:18 -05:00
2fe58941ea Added open in vk.com option in context menu for lots of items 2019-04-13 18:43:48 -05:00
04f734bebe some functions present in the player should not freeze the app while taking place 2019-04-11 17:43:52 -05:00
a0d43ebe0e Moved audio playback infrastructure to pubsub events 2019-04-11 17:15:45 -05:00
6d80dce66d Sent voice messages from socializer should work in phones now 2019-04-11 15:52:41 -05:00
3d765dd701 Fix some issues introduced in the last player stuff 2019-04-11 15:52:18 -05:00
2b42c64160 Fix AttributeError when saving data from the alternative tokens method 2019-04-11 05:29:42 -05:00
7928131112 Added language settings in preferences dialog 2019-04-11 05:25:43 -05:00
9cb1f9647c Started pubsub implementation in all player related functions 2019-04-10 17:49:23 -05:00
6d6daa60b6 Added comments to the player module 2019-04-10 17:36:02 -05:00
81a454c29c Read confirmations will be sent in real time in conversations 2019-04-10 15:19:22 -05:00
6f245d9b7f Added support to delete conversations 2019-04-09 17:55:05 -05:00
05c001067e Removed old alpha version built with Python 2 2019-04-09 16:15:38 -05:00
fea57a4034 Updated changelog with getting more items to conversation buffers 2019-04-09 16:09:33 -05:00
00eebf9260 Added support for loading more items in conversation buffers 2019-04-09 16:08:14 -05:00
cde18c8d35 Include all relevant spelling dictionaries in binary builds 2019-03-28 10:18:44 -06:00
0b2c3fa96e Added sound settings tab in the preferences dialog. Only available options there are input and output device 2019-03-28 08:57:48 -06:00
8f631cfe4b Modify audio player volume by 2% instead of 5% 2019-03-25 16:35:56 -06:00
f10b25c07f Updated app to 0.19 2019-03-12 17:19:10 -06:00
77a959fe29 Moved documentation locales to Src directory, as doc is generated already from the src dir in CI environments 2019-03-12 16:33:18 -06:00
d8db111d30 Updaed locales for documentation 2019-03-12 16:04:29 -06:00
c2811f2818 Updated Russian translation 2019-03-12 12:09:01 -06:00
b258a3ff9c Updated installer file 2019-03-12 12:08:43 -06:00
02029d22b0 Updated information before release of 0.19 2019-03-11 17:34:33 -06:00
1f7f1c170d Updated translations 2019-03-11 02:17:46 -06:00
a13a4a5695 display results of polls closed when reaching end_date, and polls where the current user cannot vote 2019-03-07 15:23:37 -06:00
0b9dcaa8f1 Remove option 'view information' from documents menu as there is not much to show from a document 2019-03-07 15:12:17 -06:00
9c7030f80e prefix calls to scripts 2019-03-06 16:52:58 -06:00
d8112550f5 Updates some strings 2019-03-06 16:38:11 -06:00
4eb662d314 Modify move command for generated files 2019-03-06 16:28:27 -06:00
8e06ffc3b1 Attempt to upload translation catalogs to CI artifacts 2019-03-06 16:19:22 -06:00
98c5c052de Added option to download document from the context menu 2019-03-05 17:43:19 -06:00
95fe0c9516 Focus should be more persistent when dealing with the online friends buffer 2019-03-05 16:51:19 -06:00
2908b1449c Fixed small issue in audio player 2019-03-05 13:44:35 -06:00
454b461e89 Added basic support to polls (only voting and seeing results is implemented) 2019-03-05 05:58:41 -06:00
0a8d2ad233 started poll implementation 2019-03-01 17:41:46 -06:00
35e34e44ee Fix libloader stuff 2019-03-01 17:33:54 -06:00
b6ce1f62e0 display poll in attachments for posts (no actions are available, yet) 2019-02-26 16:41:30 -06:00
55eaa85979 Announcement of users typing will be send only when the socializer window is focused 2019-02-26 16:17:53 -06:00
b3f5c532dd Allows uploading audio directly from the 'my audios' buffer 2019-02-26 13:57:37 -06:00
0821565a75 Fixed a typo 2019-02-26 11:18:02 -06:00
d187ad43f3 Updated documentation 2019-02-26 11:08:08 -06:00
b5aff6a8eb display document type properly in buffers 2019-02-26 09:02:18 -06:00
a6291b3ee2 Started the documents menu. For now it just allows to add and remove a document to your documents list 2019-02-26 08:38:49 -06:00
f1f86e04e6 Fixed buffer updates for buffers depending on get_page. That includes wall buffers and everything else which is not the home buffer 2019-02-26 08:35:42 -06:00
06898ca0af Updated context menu for buffers. Now it allows to load and discard audio and video albums 2019-02-25 15:42:59 -06:00
305f8317fe Merge branch 'master' of code.manuelcortez.net:manuelcortez/socializer 2019-02-25 05:31:29 -06:00
d7d13dd523 Fixed call to reply() in comment presenter 2019-02-24 19:40:59 -06:00
84dd9dbcea RepeatingTimer should not raise tracebacks when loading all buffers periodically 2019-02-18 13:45:47 -06:00
a345fa8874 Improved Button's label 2019-02-18 13:41:49 -06:00
5780d3ca21 Added online friends buffer 2019-02-14 13:09:44 -06:00
4c220cbb36 display error if there is an internet connection problem during startup 2019-02-14 08:36:31 -06:00
942f9296a0 Added options in the help menu to go to the logs and config folder 2019-02-13 16:48:00 -06:00
fb50f2783f Improved GUI for topic comments. Authentication errors should be handled gracefully now 2019-02-12 17:49:33 -06:00
a50ddd25b2 Fixed an error when displaying posts in a community wall, if the community had shared another community's post 2019-02-11 05:33:18 -06:00
4b6d5a86b2 It is possible to load previous items in the home buffer properly, and the feature works too in wall buffers and timelines 2019-02-11 04:53:32 -06:00
fbada0c4be Fixed get previous item in newsfeed buffer. Now it should load around 700 items 2019-02-11 03:55:16 -06:00
6a8459cc4e Reorganized source code in main module, added docstrings to lots of functions 2019-02-06 17:47:49 -06:00
fce9e9a73f Removed create-empty_buffer and improved create_buffer for dealing with empty buffers too 2019-02-06 11:35:38 -06:00
8ab3c937b6 Renamed some buffers 2019-02-06 11:35:07 -06:00
f8e431cc2e Fixes in document buffers 2019-02-06 11:34:54 -06:00
3f7c069ce0 Added basic creation of document buffers in communities 2019-02-05 12:20:50 -06:00
21895d307b Added correct unicode representation to chat messages 2019-02-03 21:04:10 -06:00
38b0eec741 Text should be cleaned better in posts, coments and topic comments. Cleaned texts will render properly usernames, group names and render properly certain unicode characters 2019-02-03 20:56:32 -06:00
2496f19bee Updated main controller 2019-02-03 18:55:14 -06:00
21932dc329 Group mentions are displayed properly when mentioned in comments 2019-02-03 18:54:31 -06:00
35fc287d55 Added support for reply to topic comments 2019-02-01 13:25:47 -06:00
3a3623859b Changelog should be displayed properly when opened from the help menu. Fixes #21 2019-02-01 11:03:26 -06:00
f623e78bdc Updated changelog 2019-01-31 16:50:53 -06:00
2bcc14888c Added view and presenter for topic displayer. Needs some more methods yet 2019-01-31 16:48:21 -06:00
7bee6cf1ea Display load topics menu item 2019-01-31 16:47:51 -06:00
eea264a099 Added topic buffer's GUI 2019-01-31 16:47:27 -06:00
b99d872c53 Allow creation of topic buffers, loading and unloading of groups too 2019-01-31 16:46:55 -06:00
f09d1b5da1 Added a buffer for displaying topics. Community buffers will keep group_info on them so we can check for group permissions and available post types 2019-01-31 16:46:26 -06:00
9e3ff74b98 Added renderer for group topics 2019-01-31 16:45:31 -06:00
2e64e31a8f Fixed clean_list for all post interactor dialogs 2019-01-31 16:45:05 -06:00
150f9d6c08 Added actions in community buffers from context menu in the treebook 2019-01-30 15:32:46 -06:00
a6565aae53 Added proxy setting to preferences dialog 2019-01-29 16:23:02 -06:00
ac268c0672 Attaching documents is now supported 2019-01-28 05:36:51 -06:00
94902c661f chat names have been simplified for an easier navigation 2019-01-27 05:37:42 -06:00
0a90e1fe4a Fixed an error when removing audio items from my audios buffer 2019-01-26 18:51:34 -06:00
9f1a09689f Updated changelog 2019-01-26 18:45:07 -06:00
af68d9b0cf Fixed errors in move to album option for audios 2019-01-26 18:44:23 -06:00
d75b7de20b Implemented adding and removing audio albums appropiately 2019-01-26 18:42:50 -06:00
f968e618ac Reenabled create and delete audio albums 2019-01-26 18:42:20 -06:00
fb9717a00f Added more parameters to audio search feature 2019-01-26 17:45:10 -06:00
0acdf41fa3 Switched to a proper context menu handler 2019-01-26 07:11:11 -06:00
f5fddd0369 Fixed issues in post displayer dialogs introduced in previous alpha 2019-01-26 07:10:53 -06:00
660f801afd Replaced bytes object for unicode counterpart 2019-01-25 17:52:59 -06:00
da66118d20 Attempt to fix proxy not working in audio playback 2019-01-25 11:46:15 -06:00
93d1de941c volume for application sounds will not be connected to app volume for audio files 2019-01-25 11:45:45 -06:00
94106a11c0 Improved handling for deleted posts. Now they should display an error 2019-01-25 10:36:28 -06:00
76f0ee3ef0 Documentation and changelog should be included in all builds 2019-01-24 17:11:33 -06:00
712792ac9f Remove friend implementation finished 2019-01-24 17:10:32 -06:00
56424cf0d1 Implemented Ctrl+A to select all in important edit boxes 2019-01-24 16:07:02 -06:00
9230bd8115 fixed an error in community buffers 2019-01-24 13:30:40 -06:00
ab0d34599f Fixed an error in chat messages that was making the program unable to keep sending messages after an attachment file has been sent 2019-01-23 09:17:33 -06:00
0c4ee6a033 Updated russian translation with a few suggestions 2019-01-23 09:16:29 -06:00
f5b80b6e63 Remove None values from sig generation 2019-01-23 08:55:23 -06:00
63f4a8310e Sound player module take volume config properly 2019-01-23 08:54:06 -06:00
53176a9a26 Sound settings are taken from app-settings instead of session settings 2019-01-23 08:22:22 -06:00
8422243465 Volume should be saved across restarts 2019-01-22 17:49:18 -06:00
91317b7a41 Added some modifications to the way the media player works 2019-01-22 17:41:39 -06:00
cbcc6f812a Fixed an error raised when there were attempts to set volume before the URL Player has played something 2019-01-22 16:40:00 -06:00
a53a3d595c Improved notifications a little bit 2019-01-22 16:35:52 -06:00
d741035707 Chats receiving new messages will be moved automatically to the first position in the chats section 2019-01-22 16:20:37 -06:00
bab02110b0 Fixed error in Media player. Now it should not skip the first song if you are in the last track and pressed 'play next' 2019-01-22 10:29:37 -06:00
1db4e10dc8 Load all chats during startup 2019-01-21 17:32:23 -06:00
d6a87bc426 Play is now play/pause in the player menu. Removed stop item 2019-01-21 16:48:51 -06:00
d8096a3695 Added some keystrokes for audio playback. Read changelog for more references 2019-01-21 16:48:09 -06:00
0927695261 Updated requirements to match python 3 only 2019-01-21 16:46:36 -06:00
97380e9833 Started implementation for friends removal 2019-01-21 05:42:21 -06:00
2c64581a2c Changed friends order by rating 2019-01-21 05:31:32 -06:00
05a00e8ce0 Disable alpha for Python 2. Ends support to Python 2 builds. Closes #16 2019-01-21 05:17:42 -06:00
d056bd0bd2 Fixed error when displaying certain user profile info. Closes #29 2019-01-21 05:13:05 -06:00
fa187be88a Updated readme 2019-01-21 05:04:12 -06:00
357ccca819 Don't create socializer.exe.log, save log errors to log file instead. Closes #27 2019-01-21 04:51:59 -06:00
993f49c0a0 Unread messages should be detected appropiately 2019-01-21 04:44:16 -06:00
3b180cda83 Added support to subscribers buffer 2019-01-21 04:42:52 -06:00
1a877bbfa1 Automove to conversation is unchecked by default for new sessions 2019-01-20 12:01:50 -06:00
c3bbd75c65 Updated to 0.18 2019-01-20 11:00:15 -06:00
03a6e537b8 User will be invited to group only if we not did do this before 2019-01-20 03:13:28 -06:00
401a1480d6 Proxy question will be shown only during the first start 2019-01-20 03:08:02 -06:00
5c75b2cb38 Updated docs translation catalog 2019-01-20 02:43:13 -06:00
2137043c8c Added Russian translations for changelog and manual file 2019-01-20 02:42:30 -06:00
a919f51fc0 Updated manual 2019-01-20 02:42:06 -06:00
16d85a5a41 Deal with the title issue for markdown documents 2019-01-20 02:41:32 -06:00
0ccf46456a Use wxPython 4.0.3 for a while now as 4.0.4 has some accessibility issues 2019-01-20 01:53:09 -06:00
2f20961395 Added Russian as target in the documentation generator script 2019-01-19 23:50:07 -06:00
f3318e0dd0 Always apply fixes, not only when the application is frozen 2019-01-19 23:24:10 -06:00
7843090907 Added device_id to the list of data saved for the new auth method 2019-01-19 23:22:19 -06:00
29ceca055e Added a new authentication method to replace official Kate's tokens 2019-01-19 23:20:51 -06:00
076f64788a Added some code to get alternative tokens 2019-01-18 17:22:24 -06:00
b9dca52e52 All stable builds will be generated with Python 3 #16 2019-01-17 16:48:25 -06:00
2ac306ec15 Testing CI 2019-01-17 16:36:31 -06:00
999bfae344 Testing a new stable 2019-01-17 16:34:44 -06:00
0994743fd8 Updated CI stuff to build an installer 2019-01-17 16:22:49 -06:00
8b0070efd4 Attempt to fix problem when a message is not detected as unread 2019-01-16 17:54:29 -06:00
82ed352c1d Added code to generate an installer version for 0.18 2019-01-16 17:43:04 -06:00
2a975123fc Modified paths module for dealing with installer data 2019-01-16 16:43:01 -06:00
5d6a66dcac Restored settings from gitlab CI file 2019-01-16 16:25:18 -06:00
8c1197e8e1 Added DLL to excludes 2019-01-16 16:21:32 -06:00
6db4ba7082 Added DLL to excludes 2019-01-16 16:19:22 -06:00
609bccefe1 Added DLL to excludes 2019-01-16 16:12:37 -06:00
ff35e480f2 Added DLL to excludes 2019-01-16 16:10:37 -06:00
b32ccb48be Added DLL to excludes 2019-01-16 16:08:40 -06:00
db6c6de8e9 Added DLL to excludes 2019-01-16 16:06:37 -06:00
6f69fe2545 Added DLL to excludes 2019-01-16 16:04:21 -06:00
05a4491bb2 Added DLL to excludes 2019-01-16 15:55:42 -06:00
27334858c9 Added DLL to excludes 2019-01-16 15:25:52 -06:00
a8bdfef271 Added DLL to excludes 2019-01-16 15:09:54 -06:00
b59d64682e Excluded new lib 2019-01-16 14:56:07 -06:00
d3d4add5a2 Added DLL to excludes 2019-01-16 13:27:24 -06:00
fa4dd48955 Added a proxy to Socializer 2019-01-15 16:20:08 -06:00
dce50b226f Avoid converting string to bytes in search audio functions 2019-01-15 11:52:06 -06:00
a0aa04e036 Increased timeout for playing audio and use proxy for bass lib too 2019-01-15 11:43:32 -06:00
2670bb8f6d proxy will use authentication 2019-01-15 10:06:17 -06:00
b0642aafb7 Fixed an error when unable to play a file 2019-01-14 17:37:28 -06:00
3901a2a281 Added own socializer proxy 2019-01-14 17:37:09 -06:00
2403881a7c Updated code for displaying timelines 2019-01-14 17:20:12 -06:00
758907a660 Started code to add proxy support built in 2019-01-14 04:58:17 -06:00
70a511a141 Added settings to control creation of buffers for audio albums, video albums and community buffers at startup 2019-01-14 02:23:38 -06:00
86aa453093 Thread optimizations for avoiding freezing the app during lots of requests to VK 2019-01-14 02:00:30 -06:00
be6fb7bd75 Tracebacks will be logged to error.log instead creating socializer.exe.log 2019-01-13 22:35:45 -06:00
0ab5b873f1 Try to fix a strange traceback in get_items for chat buffer 2019-01-13 22:34:49 -06:00
06dbc71a1d Disable loading of communities for now 2019-01-13 22:34:18 -06:00
a51b25208f Updated Russian translation 2019-01-13 19:46:38 -06:00
cb00ff7c5d Retrieve data for users not cached when they are requested 2019-01-13 13:13:05 -06:00
43b762dd2a Added handling of 'user is typing' event 2019-01-13 12:37:19 -06:00
ba40b74230 Reports when user is writing. Needs testing 2019-01-11 17:22:52 -06:00
da9425228e Added some code to catch user_typing event. Needs view implementation 2019-01-11 17:00:58 -06:00
2ba4233ac7 Changed methods to create buffers. Now they use pub events 2019-01-11 16:08:49 -06:00
1545bf39ee Invite users to the socializer's group during the first start. This will be done only if the user is not already a member 2019-01-11 11:20:09 -06:00
ff4496be24 Deleting a video album will fail if there are no albums 2019-01-11 10:03:51 -06:00
bf7e602e4a Added wxWidgets locale files 2019-01-11 08:55:28 -06:00
a66430c255 Implemented get_user in postDisplayers 2019-01-11 04:23:38 -06:00
689d7bf0a9 Removed get_user_name and replaced it with get_user which handles cases correctly 2019-01-11 04:22:53 -06:00
6d1417ab73 Fixed an incorrect call to uninstall() in the displayFriendshipInteractor 2019-01-11 04:15:35 -06:00
a60edfdd37 It is possible to delete conversation buffers from the tree 2019-01-11 04:14:55 -06:00
a28c088c06 Merge branch 'master' of code.manuelcortez.net:manuelcortez/socializer 2019-01-11 03:19:31 -06:00
acb57bffb4 Fixed compatibility with Python 2.x 2019-01-11 03:18:31 -06:00
35c2e07261 Implemented get_user() in all other renderer functions 2019-01-10 17:52:33 -06:00
14a2313e5f Added experimental support to communities. Only posts are supported so far 2019-01-10 17:35:32 -06:00
1f75ba41cf Use genitive case when viewing an user profile. Seems to work fine in russian 2019-01-10 17:33:27 -06:00
77109fd3cc Implemented get_user() in newsfeed renderer 2019-01-10 17:30:01 -06:00
21570ea5ec Retrieve all cases for user names and stores them in a new structure. Added get_user(user_id, key) that will return a dictionary with keys similar to key_gen, key_nom, key_acc 2019-01-10 17:29:17 -06:00
2b8ed2192b Updated changelog 2019-01-10 13:11:35 -06:00
1e5cf55521 Comments allow sending attachments. New comments are rendered automatically after being made 2019-01-10 13:02:11 -06:00
87db7ddd98 fixed incorrect parameters in call to messages.markAsRead 2019-01-10 13:00:48 -06:00
09d7bd4fae Call to view.Destroy in uninstall() 2019-01-10 13:00:08 -06:00
38e56254ff Added views in post displaying dialog 2019-01-09 17:42:11 -06:00
c5246e73ca Retrieve wallposts when displaying them for updating likes, reposts and view info 2019-01-09 17:24:00 -06:00
120da86904 Updated changelog 2019-01-09 17:04:40 -06:00
02f1ab0e4a Added support to comment threads. Shows comment replies in a separate viewer. Show total replies for a comment in a column in the list 2019-01-09 16:47:58 -06:00
9465cf03ac Fixed exception when message is blank in a post. Fixes #20 2019-01-09 05:17:25 -06:00
7168b874aa Added basic comment viewer. It is possible to do likes and remove likes to comments. Pressing enter in a comment will open the experimental viewer 2019-01-08 17:56:51 -06:00
67f2eec4eb Audio display features have been moved to work in MVP 2019-01-08 11:56:10 -06:00
50a23afe7a Moved basic post displaying logic to MVP. Comments and audio still are not moved 2019-01-08 10:40:58 -06:00
d57c07affd Fixed typos 2019-01-07 23:14:14 -06:00
d5c975d0b6 Added basic support to chat groups. Closes #23 2019-01-07 17:52:14 -06:00
febf9f2c3e Added update exceptions to Python3 2019-01-07 15:35:28 -06:00
cfadede201 Tests will be performed once in a day 2019-01-07 15:26:06 -06:00
9988c4daf6 Install gettext function 2019-01-07 15:07:53 -06:00
6b4feb3b91 Handles permission errors when opening timelines. Closes #22 2019-01-07 15:05:43 -06:00
b4625335b6 Moved code related to post creation to MVP 2019-01-07 13:16:20 -06:00
0d7bae5be8 Documented new design pattern 2019-01-07 09:31:47 -06:00
11b4aaad6e Updated changelog 2019-01-06 22:51:44 -06:00
589a7da53b Refactored attachment code so it will match to the MVP pattern 2019-01-06 22:51:20 -06:00
71ce8597e5 Deleted old attach code 2019-01-06 22:50:55 -06:00
7ef1ba10a9 Added player to presenters module 2019-01-06 19:58:33 -06:00
b8df7e9603 Moved longPoll thread to presenters package 2019-01-06 19:53:01 -06:00
73d2d4a95d Moved profile displayer to MVP pattern. User info is collected in a thread 2019-01-06 19:41:00 -06:00
0f68d2d0fc Updated tests 2019-01-06 17:27:36 -06:00
9083fc65d4 Modified presenters to use basePresenter as parent 2019-01-06 17:22:23 -06:00
9604869639 Modified interactors and presenters to match base modules 2019-01-06 16:12:55 -06:00
0c0238ee20 Added a base presenter class 2019-01-06 16:12:20 -06:00
0763168367 Deleted old config controller 2019-01-06 15:36:30 -06:00
9490952d6c Reorganized code for audioRecorder and config module 2019-01-06 15:35:07 -06:00
9a576d70e4 Changed config to MVP 2019-01-06 15:26:54 -06:00
0530b450ce Deleted old fle 2019-01-06 15:24:51 -06:00
17e90c4761 Added unittest for audioRecorder 2019-01-05 18:54:57 -06:00
200d476462 Call to postprocess after successful response from view 2019-01-05 18:54:33 -06:00
e7d1044716 Increased coverage of Baseinteractor 2019-01-04 17:47:12 -06:00
44df84e286 Added mock to requirements 2019-01-04 17:37:37 -06:00
f8738c64b7 Added testcase for baseInteractor and started testcase for audiorecorder 2019-01-04 17:34:15 -06:00
fdfeb2a90b Cleaned up some code in audioRecorder's GUI 2019-01-04 17:33:44 -06:00
2804400910 Added basic replacement for audioRecorder based in MVP+interactor 2019-01-04 17:32:17 -06:00
9d2fc5bc6e Now it is possible to create a timeline by using an user domain. Closes #18 2019-01-03 17:53:51 -06:00
536aea6c48 get_user_name now retrieves new user_ids from VK.. Closes #17 2019-01-03 17:53:29 -06:00
c64ca0c814 Fixed error in title for post dialogs present in walls 2019-01-03 13:52:13 -06:00
86c9ac93d5 Added wall posts deletion if allowed 2019-01-03 13:40:11 -06:00
e1f25475b1 Reordered some imports 2019-01-03 12:56:59 -06:00
6cd4b6c549 Modified GUI postMenu to display a delete optoin if user has permissions 2019-01-03 12:08:38 -06:00
81f7a5f25b Fixed incorrect profile viewer ID when opening the dialog from a wall. [skip ci] 2019-01-03 10:19:12 -06:00
a10064c205 If user is not allowed to post in someone's wall, hide the post button 2019-01-02 17:46:01 -06:00
f1b9be44f4 Added function to post in other user-s walls. Only work with users 2019-01-02 17:30:34 -06:00
14ca2b6687 Fixed issues related to images in Python 3 2019-01-02 16:58:00 -06:00
e78dacd029 The two alpha versions (for python 2 and 3) will be generated dayly 2019-01-02 10:19:57 -06:00
87b420e21e Attempting to integrate a basic test suite 2019-01-02 10:06:19 -06:00
da3374a484 Fixed typo in CI settings 2019-01-01 21:25:17 -06:00
b151eed4b6 Add bootstrap correctly in pyinstaller 2019-01-01 21:19:29 -06:00
f0513c19b8 Attempt to add oggenc2.exe from windows dependencies 2019-01-01 21:14:45 -06:00
ee0219b39a Remove enum34 properly after vk_api 2019-01-01 21:10:08 -06:00
a93d334b1f Attempt to update CI to Python 3. #16 2019-01-01 20:56:12 -06:00
59803d547c More bugfixes for Python 2 2019-01-01 20:19:39 -06:00
8dcee29952 Fixed an issue when playing a song in Python 2 2019-01-01 20:04:30 -06:00
53d5a09fb4 fixed unicode errors and add the future module to the list of explicit includes 2019-01-01 19:57:37 -06:00
acdfae1608 Merge branch 'py3' into 'master'
Port socializer to Python 3. #16

See merge request manuelcortez/socializer!2
2019-01-02 04:42:53 +03:00
4442931dd4 Port socializer to Python 3. #16 2019-01-02 04:42:53 +03:00
1aeab0aef5 Fixed update file [skip ci] 2019-01-01 05:48:13 -06:00
e9600fa5ec Bumped version to 0.17 2019-01-01 05:36:29 -06:00
42a5b67386 Merge branch 'master' into next 2018-12-31 11:51:33 -06:00
58e6940bad Added changes in GUI for communities 2018-12-31 11:51:13 -06:00
3b685fe164 Added rendering to audio playlists in the newsfeed buffer 2018-12-31 11:50:48 -06:00
a531e8ee19 Fixes a traceback when adding an unsupported post to db. Closes #15 2018-12-31 11:50:11 -06:00
a51a1458be Changed URL schema of issue reporter 2018-12-31 11:48:47 -06:00
f029b9034d Load communities in a buffer dedicated to them 2018-12-30 10:41:47 -06:00
7c1766825b Updated reference to latest version in readme [skip ci] 2018-12-27 13:05:04 -06:00
8ac2fa3334 Updated changelog [skip ci] 2018-12-27 12:27:51 -06:00
6c64246ca8 Fixed unresponsiveness of dialogs during updates 2018-12-27 11:30:37 -06:00
57968875f0 Modified update channel 2018-12-27 11:15:08 -06:00
009b1cddcd Fixed merge conflict 2018-12-27 11:12:48 -06:00
8f52ae6f0c Updated calls to autoupdate feature for alpha channel 2018-12-27 11:11:30 -06:00
54247b8b90 Merge branch 'next' into 'master'
Modifications to release process. Closes #14

Closes #14

See merge request manuelcortez/socializer!1
2018-12-27 18:29:46 +03:00
762fa93c23 Modifications to release process. Closes #14 2018-12-27 18:29:46 +03:00
2e025ebf20 Modify gitlab CI configuration to generate both alpha and stable versions 2018-12-27 09:19:28 -06:00
833c089a27 Added script to write data for versions in the alpha channel 2018-12-27 09:15:32 -06:00
a410c2a2f6 Removed weekly channel for now as there are no idea on how to track updates, yet 2018-12-27 09:01:07 -06:00
fae791ff71 Added update channel settings to general tab 2018-12-27 08:30:51 -06:00
729b410d63 Updater now accepts updates from the gitlab repo URL 2018-12-26 12:27:44 -06:00
b9bb17dd69 Added new update data 2018-12-26 12:24:12 -06:00
03286a44b9 Fixed a small issue in chat text controls 2018-12-25 19:08:36 -06:00
1cff350fed Added 2FA for kate's tokens, finally. Closes #13 2018-12-25 18:55:50 -06:00
f191ed42da Added oggenc2.exe to the list of requirement files 2018-12-25 17:13:38 -06:00
46ba62d346 Added support for voice messages 2018-12-24 17:54:18 -06:00
dd07501c5c Added audio recorder controller. 2018-12-24 17:53:59 -06:00
68e48205f3 Added basic interface to audio recorder dialog 2018-12-24 17:53:28 -06:00
3aaeafbfc0 Added new recording facilities to sound.py 2018-12-24 17:53:09 -06:00
a34e9637fe Chats will not be able to sent twice when pressing enter repeatedly 2018-12-24 12:52:58 -06:00
4af259ffed Added 2FA partially. #13 2018-12-24 12:32:00 -06:00
6165b80147 Updated changelog 2018-12-24 11:52:19 -06:00
33fd9c1b4d Updated requirements 2018-12-24 09:03:08 -06:00
c442aac0a9 Updated patched VK and core methods 2018-12-24 08:54:53 -06:00
081f51dfd2 Updated changelog 2018-12-24 08:53:42 -06:00
27b6d068ed Added a few comments to session 2018-12-24 08:53:28 -06:00
b4adf42644 Replaced eyed3 for mutagen for tag parsing 2018-12-24 08:52:48 -06:00
527d4670d4 Implemented two factor authentication for alternative tokens 2018-12-23 10:06:06 -06:00
17c6b7d282 Added a bug reporting feature in the help menu 2018-12-22 08:08:30 -06:00
2a729ffcc2 Avoid adding removed newsfeed posts to the database and log unhandled posts 2018-12-22 05:40:39 -06:00
3ffbf556f2 Pass user_id when retrieving video and audio albums 2018-12-22 05:39:58 -06:00
5f04ac3bee Fixed issues in get_selection() in certian buffers 2018-12-22 05:39:21 -06:00
bd05860f11 Updated changelog 2018-12-21 17:02:46 -06:00
3887dce508 Handles case when an audio object has been deleted by the user 2018-12-21 16:21:19 -06:00
651b66198f Title and artist will be taken from ID3 tags in audio files 2018-12-21 16:20:31 -06:00
77fac967bc Updated changelog 2018-12-21 08:22:18 -06:00
c8375ca138 Fixed an incorrect handling in attachments for chat messages 2018-12-21 08:18:39 -06:00
34c5824255 Started adding the new attachment dialog to chat buffers 2018-12-21 05:54:52 -06:00
abcbbe9ae2 Finished rework of attachments methods for wall posts 2018-12-21 05:27:35 -06:00
fb06df8578 Started an effort to merge the attachment dialogs in socializer. It will be possible to add both local files and files already present in VK 2018-12-20 17:46:54 -06:00
d71721ab87 Added audio uploading support in posts. Needs improvements to detect its ID3 tags 2018-12-20 17:29:23 -06:00
93e6cd36a7 Try to handle better exceptions in the chat server 2018-12-20 16:58:29 -06:00
ca3873f055 Fixed a condition that was raising a traceback when adding an audio attachment 2018-12-20 16:05:20 -06:00
ba14699dfb Updated code to handle unread messsages 2018-12-20 15:36:32 -06:00
e3dae698d9 Removed pandoc reference from Readme 2018-12-20 13:44:31 -06:00
b8eee58b01 Updated changelog 2018-12-20 13:41:42 -06:00
344d2f3dac Added very basic test 2018-12-20 11:59:35 -06:00
bc863a3345 Converts src directory in a package so unittest will work properly here 2018-12-20 11:59:10 -06:00
6ffe47b2d8 Added schedules to pipeline 2018-12-20 11:45:08 -06:00
30ecfd4370 Fixed a memory leak in the app when audio and video albums are updated 2018-12-20 08:33:16 -06:00
48e3e39514 Attempt to add two factor auth to socializer. Needs testing 2018-12-19 17:34:51 -06:00
909fd9d68c Use patched VK api only if kate tokens are enabled 2018-12-19 17:34:28 -06:00
b9ccc083ae fixed a typo 2018-12-19 17:33:40 -06:00
42549d9bb9 Re-added count for audio buffers in session settings 2018-12-19 17:31:42 -06:00
ce93a83305 Fixed localization in profiles 2018-12-19 17:31:10 -06:00
08f6e5d3d9 Updated languageHandler 2018-12-19 05:00:45 -06:00
dfa597f2d0 Added changelog as a translatable document. Copy license appropiately 2018-12-19 04:58:34 -06:00
ea917c470e attempt to add changelog and license to doc in CI built 2018-12-19 04:47:48 -06:00
945f310eae Updated changelog 2018-12-19 04:33:23 -06:00
ea005587de Chat widget now is multiline. Add new lines with shift+enter 2018-12-19 04:32:47 -06:00
eb545f3763 Reconfigure CI. Documentation now is part of the CI process 2018-12-18 17:50:02 -06:00
378d373a04 Added markdown to requirements 2018-12-18 17:45:11 -06:00
6bcbc655ed First doc integration in CI 2018-12-18 17:42:56 -06:00
8bea1859c8 Removed unneeded import 2018-12-18 17:40:37 -06:00
8b10bf7242 Improved documentation builder for integrating it in the gitlab CI proces 2018-12-18 17:36:52 -06:00
3949ae5185 Removed edit profile setting for now, as it is not implemented yet 2018-12-18 16:36:30 -06:00
ac2b9c6a1e Added set status option 2018-12-18 16:32:14 -06:00
126ec7a881 Fixed a few issues when calling update_all_buffers 2018-12-18 15:22:16 -06:00
90999fc3d6 Readded popular and suggested audios 2018-12-18 13:18:21 -06:00
9d2615c221 Added a patched version of jconfig to support non-ascii paths 2018-12-18 11:48:53 -06:00
28d5c2d5d7 Pointed out a few issues in russian translations 2018-12-18 05:53:13 -06:00
d250d3dcb6 Updated changelog 2018-12-18 05:32:41 -06:00
207e38e619 Removed old files 2018-12-18 04:23:04 -06:00
61084d6526 Update readme 2018-12-18 04:16:40 -06:00
ea15edd45c Revert CI settings to default building time 2018-12-18 04:12:14 -06:00
4c118e161b Added bs4 to the list of dependencies 2018-12-18 04:00:18 -06:00
4430aff718 Build stuff in windows servers 2018-12-18 03:55:24 -06:00
5cd8e8a834 Testing CI 2018-12-18 03:53:38 -06:00
20a01c8c52 Removes dist and build folders when done 2018-12-18 03:53:13 -06:00
0a5822e64e Added a patched version of vk_api to use kate's user agent 2018-12-17 21:55:26 -06:00
977dcb7dc3 Improvement to unread messages: Mark as unread only messages sent by another user 2018-12-17 17:47:15 -06:00
9296ef5333 authenticate properly in alternative tokens 2018-12-17 17:01:37 -06:00
49c96963f8 Build artifacts only when tags are applied 2018-12-17 01:03:25 -06:00
934744362f Change name to artifacts zip file 2018-12-17 00:59:23 -06:00
e1b79af4a5 Improved dist for CI 2018-12-17 00:56:08 -06:00
9b89612edb Fixed artifacts 2018-12-17 00:45:10 -06:00
196a965aea 3rd attempt 2018-12-17 00:39:24 -06:00
aad538ecfc Second attempt to generate artifacts 2018-12-17 00:29:12 -06:00
1c51225277 Attempt to improve artifacts 2018-12-17 00:25:28 -06:00
766879d47c Second update to CI 2018-12-17 00:13:29 -06:00
d52a7ae08c Finished CI file (needs testing) 2018-12-17 00:09:39 -06:00
803a84638e Updated CI status file 2018-12-17 00:03:36 -06:00
d163cd60f5 Updated contributions 2018-12-16 23:41:51 -06:00
ec895f3e12 Updated translation related files 2018-12-16 23:25:44 -06:00
41c9bcc6ce Updated CI config 2018-12-16 17:30:50 -06:00
325db8ab3c Added script to prepare a zipped version ofsocializer 2018-12-16 17:30:31 -06:00
f31a7b736b Added test CI file 2018-12-16 07:23:45 -06:00
c2c79ca9ec Online notification is shown onli at startup 2018-12-16 02:20:14 -06:00
0e96ed1519 Fixed actions when there are no posts in a buffer 2018-12-16 02:06:36 -06:00
d43f5f5320 Skip restricted songs from playback 2018-12-16 00:53:02 -06:00
4b51126239 Mark unread messags as read and play sound when unread messages are focused 2018-12-16 00:41:47 -06:00
a21d0f8a73 Updated changelog 2018-12-15 21:19:10 -06:00
0e83d1e39f Access to audio albums is fully restored 2018-12-15 21:11:25 -06:00
bb500779d9 Allow use of kate mobile's tokens for accessing all methods 2018-12-15 21:09:17 -06:00
815bd4b49e Updated changelog 2018-12-14 16:57:44 -06:00
619595fd65 Updated changelog 2018-12-14 16:52:46 -06:00
127207414c Added a replacement tokes as an entry point for an experiment 2018-12-14 15:31:15 -06:00
ba72e80279 Tokens will not expire in 24 hours 2018-12-14 15:30:44 -06:00
4b5d271ab4 Handles non-english charset encoding for filesystem paths 2018-12-14 15:27:20 -06:00
7f2956e47a Exclude crypt32.dll from dist 2018-12-13 17:37:13 -06:00
36a199946e Call setOnlyne every 4:40 instead of 15 minutes 2018-12-13 17:16:56 -06:00
d79f29d237 Update URL in app info 2018-12-13 17:14:14 -06:00
0d440fafa7 Minor changes 2018-12-13 16:49:30 -06:00
353a487ded fixed some issue when building a distributable file 2018-12-13 16:36:46 -06:00
a0c4ad6af4 Reads incoming chat message if the current buffer is the buffer receiving the message 2018-12-13 12:05:48 -06:00
f16576c03c Added voice messages to the list of supported attached files in chats 2018-12-13 11:48:17 -06:00
0144a5787a Reconnects the ongpoll chat server after a ReadTimeout or ConnectionError 2018-12-12 13:41:57 -06:00
ed624f5bf1 Plays a different sound when a conversation has been created 2018-12-12 12:38:01 -06:00
2699feada5 Added 'custom' notifications for chat settings 2018-12-12 12:24:05 -06:00
1affb38cd5 Replaced message_received.ogg 2018-12-12 12:23:27 -06:00
2feb5bc6ff Reverted experiment. Not working 2018-12-12 08:08:07 -06:00
2f175f5529 Added an experiment (stage 1 of 3) 2018-12-12 05:49:28 -06:00
cf4971a6c4 Started recovering the search function 2018-12-11 18:02:49 -06:00
65e253a538 Avoids trying to send a blank chat message to VK 2018-12-11 12:17:08 -06:00
5f010b68af Removed support for audio albm delete as is not supported by vk_api 2018-12-11 12:08:56 -06:00
e04d098527 Removed audio album creation as it is not supported by vk_api 2018-12-11 12:07:18 -06:00
24b5e279db Added audio albums (still not working) 2018-12-11 12:04:04 -06:00
26f4c0bcff Removed count_for_audio_buffers from config settings controller 2018-12-11 11:49:26 -06:00
b82c94bf51 Added chat settings in the config dialog 2018-12-11 11:45:38 -06:00
6f9a5ce8d2 Chat messages should be able to be send with enter in the edit box 2018-12-11 09:26:14 -06:00
e0eb0eefce Handled deleted comments properly in wall posts 2018-12-11 09:04:57 -06:00
641921537b Added 'keep as follower' for friendship requests (needs testing) 2018-12-10 17:52:01 -06:00
52f892f35f Added accepting/declining friend requests from friendship request folder by using the menu key or right mouse click 2018-12-10 17:35:36 -06:00
15e4c19f04 Removed unneeded comments 2018-12-10 14:54:54 -06:00
cca89f9260 Call to account.setOffline when closing the app to notify everyone about it 2018-12-10 13:25:30 -06:00
bbee451f2c Added support for description in photo uploading 2018-12-10 12:20:01 -06:00
51f7daba6c Updated links for readme file 2018-12-10 09:36:52 -06:00
7fa35f18e4 Clear attachments list when switching to a new message in chats 2018-12-10 02:32:57 -06:00
217765254d Updated changelog 2018-12-10 00:49:01 -06:00
c747be2743 Shows a notification when someone is onlyne or offline 2018-12-10 00:48:40 -06:00
2d60e2b461 Call to get_my_data after logging in VK 2018-12-10 00:47:25 -06:00
69cd540329 Removed count for audio buffers in config GUI 2018-12-10 00:45:56 -06:00
ad57be052e Removed audio count for buffers in config 2018-12-10 00:03:08 -06:00
5cded5f27c Updated code for the new deletion of methods in vk sessions 2018-12-09 21:41:09 -06:00
39d1663fa1 Removed login with tokens only due to vk_api login requirements 2018-12-09 21:40:25 -06:00
6ddea35dec Fixed a typo 2018-12-09 12:43:56 -06:00
f3e8a3024f generate random_id with randint 2018-12-09 11:26:21 -06:00
7d35facdaf Generate random_id as integer value 2018-12-09 10:53:50 -06:00
7ba24f7a54 Removed some unneeded code 2018-12-09 07:28:13 -06:00
feb3215745 Use methods provided in vk_api for supporting conversations 2018-12-09 07:25:30 -06:00
ba5d734a05 Restored access to audios by users 2018-12-09 05:22:37 -06:00
bb26d45f1d Replaced VK with vk_api 2018-12-09 05:21:52 -06:00
1a79e7149c Updated requirements 2018-12-09 05:20:35 -06:00
4bdd2b3894 Fixed issues related to sound unable to be played 2018-12-07 17:53:55 -06:00
5d804b2d8e Display audio attachments in chat messages properly 2018-12-06 17:56:22 -06:00
4a83edf3bc Adapted some files to changes present in renderers 2018-12-06 17:34:48 -06:00
d0de4ac677 Removed sound_lib and platform_utils and install them as external deps 2018-12-06 15:57:13 -06:00
49530b8d0c Separated rendering functions from the rest of the code 2018-12-06 15:37:16 -06:00
3aa5a27268 Updated changelog again 2018-12-05 17:34:25 -06:00
88518338f1 Updated changelog 2018-12-05 15:59:55 -06:00
965f14e249 Change date formatting for chat messages 2018-12-05 15:56:23 -06:00
c91e04b4d8 Re-enable audio playback (works with audios transferred in chats) 2018-12-05 15:55:24 -06:00
8fa8267e04 Added some comments in important parts in chat buffer 2018-12-05 15:54:24 -06:00
73fa9532b5 Improved chats focusing. Now they should work properly 2018-12-05 12:43:33 -06:00
04102677f2 Added first experiment on focus mode for chat history 2018-12-04 17:53:10 -06:00
331636b9f4 Refactored chat widget to be more manageable for screen readers. Needs improvements 2018-12-04 16:58:40 -06:00
8c1d9c3fe2 Updated readme 2018-12-03 16:49:14 -06:00
c655e23cb3 Replaced libloader and accessible_output2 for modules retrieved in requirements file 2018-12-03 15:56:57 -06:00
26b78eecf6 Added more comments 2018-12-03 15:55:55 -06:00
08484d9807 Added call to trackVisitor for helping with app statistics 2018-11-05 10:04:02 -06:00
13b19fec75 Added docstrings to attachment controllers and deprecated the previously audio attacher 2018-11-05 09:37:40 -06:00
6fb70a5b32 Added docstrings to profile viewer 2018-11-05 09:11:20 -06:00
317aea7492 Updated changelog 2018-11-04 02:18:58 -06:00
0936ae6fb6 Chats with more than 200 messages will be displayed properly 2018-11-04 01:39:06 -06:00
6bf29a45db Fixed arrow formatter when dealing with profile birthdates 2018-10-14 08:13:12 -05:00
b00668e758 Added option to open authenticated user's profile in browser 2018-09-06 13:07:55 -05:00
6941f26e97 When visiting an user's 'website', handles case where there are multiple sites listed. #7 2018-09-06 12:34:08 -05:00
71a15a24bc Mae profile viewer a tabbed window. Added photo to the dialog. Separated profile code from other post types 2018-09-06 10:47:10 -05:00
964ff00520 Fixed strange issue with chat messages 2018-09-03 13:55:27 -05:00
856b2527e3 Replaced AppendItem for Append in context menus 2018-09-03 13:22:54 -05:00
92158f2496 Replaced old translator by the new yandex powered translator 2018-09-03 10:24:59 -05:00
2a5a184662 Stopped using deprecated objects when Loading images due to WX 4 2018-09-03 10:00:23 -05:00
d45bfb0eeb Started using VK API V 5.84 2018-09-03 09:43:33 -05:00
314a615b68 Commented issue #11 2018-09-03 09:18:32 -05:00
e77276ae52 Fixed error when getting VK API error 5. Closes #11 2018-09-03 09:15:52 -05:00
72348008a2 More WX Python 4 changes 2018-09-03 08:33:05 -05:00
3e43f67ee2 Updated contributors list 2018-09-02 08:42:37 -05:00
d1fd6d1861 Removed VK module from repo. Install it via pip. Custom modules has been moved to mysc 2018-09-02 08:38:49 -05:00
c7743fccb9 Updated GUI regarding WX 4.0.3 2018-09-02 07:57:21 -05:00
ee75c6a53d Moved some dependencies to PIP. Updated Python to 2.7.15 and WX to 4.0.3 2018-09-02 07:50:00 -05:00
fc637e553c Updated WidgetUtils for WXPython 4 2018-09-02 07:33:09 -05:00
fc76b3929b Added comments to buffers.py 2018-01-14 14:55:53 -06:00
0e83c7368d Updated author information 2018-01-14 07:22:54 -06:00
0b8e1a1a0d Switched to VK API V 5.69 2018-01-14 07:18:00 -06:00
6d6a801a01 Removed unneeded prints 2018-01-14 06:58:24 -06:00
ba2ba9bc58 Removed audio elements in menus and main window 2017-09-26 05:19:30 -05:00
268138d726 Changed author information 2017-05-12 12:16:07 +04:00
7fe615a7ee Merge branch 'master' of manuelcortez.net:manuelcortez/socializer 2017-05-12 12:07:52 +04:00
d4fa723155 Disabled audio playback 2017-05-12 12:06:53 +04:00
ae5ec93b53 Added some changes 2017-04-30 16:09:11 -05:00
ead1f186f0 Update API version 2017-03-13 02:16:34 -06:00
2c6704ae9e Updated readme 2016-12-10 07:13:58 -06:00
e2a2758f6d Added support for playing voice messages in VK 2016-09-25 14:24:40 -05:00
3973b57413 Added relationship status, occupation, last seen and website to profile viewer #7 2016-09-21 13:59:31 -05:00
f1ce4b834a Enabled view profile option in the menu for items in people buffers 2016-09-21 13:54:52 -05:00
69346bfaa1 Added a very basic user profile viewer #7 2016-09-20 10:36:17 -05:00
9df49c354b Player object will not be unusable after an error 2016-09-19 17:13:40 -05:00
444d506359 Keep loading other buffers if a section cannot be loaded 2016-09-15 15:27:38 -05:00
65815113d5 Updated changelog 2016-09-05 13:15:13 -05:00
53196b5dda Fixed a bug in the user selection dialog 2016-09-05 13:13:45 -05:00
03f73564da Tag people in posts and comments. Closes #6 2016-08-19 04:25:49 -05:00
9fd845c424 Added a setting for load (or not) images in posts. Closes #9 2016-08-17 17:18:17 -05:00
f079907a9e Parse replies in comments. Start changes for #1 2016-08-17 16:25:01 -05:00
ee308fb5aa Added video search 2016-08-15 17:00:49 -05:00
4900b67882 My videos, album management, add/remove to video albums 2016-08-14 07:46:41 -05:00
4ae167e461 Chats can be sent by pressing enter in the text box 2016-08-14 02:12:49 -05:00
4491a600f3 Fixed problem with false positives in error 6: Too many requests per second 2016-08-13 20:12:18 -05:00
c8927e0b60 Using VK API Version 5.53 2016-08-13 19:50:27 -05:00
50355abdda Added pauses between calls to vk.audio.get in when loading albums 2016-08-10 17:37:36 -05:00
f190b7651e Added an experimental photo viewer in posts dialog 2016-08-10 12:58:11 -05:00
38c394581c Added friendship requests buffers inside the people buffer 2016-08-02 10:38:10 -05:00
00d7cf48af Added audio player menu in menu bar 2016-07-18 17:34:37 -05:00
740ae124f9 Version 2016.07.9 2016-07-12 05:10:57 -05:00
17977d2a88 Fixed a few bugs 2016-07-12 05:00:07 -05:00
ed29923d2e Improved play all function for slow connections 2016-07-10 22:59:59 -05:00
6228e7229b Removed print statements 2016-07-10 22:51:06 -05:00
677f92af68 Added a few translatable strings 2016-07-08 16:40:34 -05:00
ce43d8b30e Updated changelog 2016-07-08 16:37:43 -05:00
09470e85ce Remove a few bugs when users press enter in friend lists 2016-07-08 16:34:28 -05:00
bab896aba1 Get instrumental case for name in chat buffers. Remove set Offline option in VK at exit 2016-07-07 14:50:09 -05:00
519381684d Updated russian translations 2016-07-07 13:24:01 -05:00
a66b35190f Fixed a bug in the get_page function 2016-07-07 13:23:49 -05:00
411 changed files with 959711 additions and 13041 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
*.py.bak
*.pyc
*~
src/config/

129
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,129 @@
stages:
- generate_doc
- build
- generate_versions
- upload
pages:
image: python:latest
tags:
- docker
interruptible: true
only:
- master
stage: generate_doc
script:
- 'pip install --upgrade markdown babel'
- 'cp changelog.md doc/changelog.md'
- 'cd doc'
- 'python documentation_importer.py'
- 'python generator.py'
- 'mv -f documentation ../public'
artifacts:
expire_in: 1 day
paths:
- public
socializer64:
stage: build
interruptible: true
variables:
PYTHON: "C:\\python37\\python.exe"
tags:
- windows10
only:
- master
- tags
script:
- '&$env:PYTHON -V'
- '&$env:PYTHON -m venv env'
- 'env\Scripts\Activate.ps1'
- 'python -m pip install --upgrade pip'
- 'python -m pip install --upgrade -r requirements.txt'
- 'python -m pip uninstall enum34 -y'
- 'cd src'
- 'python write_version_data.py'
- 'python -m nuitka --mingw64 --standalone --enable-plugin=anti-bloat --noinclude-pytest-mode=nofollow --noinclude-setuptools-mode=nofollow --nofollow-import-to=numpy --nofollow-import-to=babel --nofollow-import-to=cx_freeze --nofollow-import-to=pil --include-data-file=../windows-dependencies/x64/oggenc2.exe=oggenc2.exe --include-data-file=../windows-dependencies/x64/bootstrap.exe=bootstrap.exe --include-data-file=app-configuration.defaults=app-configuration.defaults --include-data-dir=locales=locales --include-data-dir=../public=documentation --include-data-dir=sounds=sounds --include-data-file=session.defaults=session.defaults --windows-disable-console --windows-file-description="Accessible VK Client for Windows" --windows-product-version=2021.12.14.0 --windows-file-version=2021.12.14.0 --windows-product-name="Socializer" --windows-company-name="MCV Software" --python-flag=no_site --assume-yes-for-downloads --remove-output "socializer.py"'
- 'python ..\scripts\copy_missing_files.py'
- 'cd ..'
- 'mkdir artifacts'
- 'cd scripts'
- 'python prepare_zipversion.py'
- 'cd ..'
- 'move src\socializer.zip artifacts\socializer_x64.zip'
- 'mv src/socializer.dist artifacts/program64'
- 'move src/installer.nsi artifacts'
- 'python scripts/generate_update_file.py'
- 'move *.json artifacts'
artifacts:
expire_in: 1 day
paths:
- artifacts
socializer32:
stage: build
interruptible: true
variables:
PYTHON: "C:\\python37-32\\python.exe"
tags:
- windows10
only:
- master
- tags
script:
- '&$env:PYTHON -V'
- '&$env:PYTHON -m venv env'
- 'env\Scripts\Activate.ps1'
- 'python -m pip install --upgrade pip'
- 'python -m pip install --upgrade -r requirements.txt'
- 'python -m pip uninstall enum34 -y'
- 'cd src'
- 'python write_version_data.py'
- 'python -m nuitka --mingw64 --standalone --enable-plugin=anti-bloat --noinclude-pytest-mode=nofollow --noinclude-setuptools-mode=nofollow --nofollow-import-to=numpy --nofollow-import-to=babel --nofollow-import-to=cx_freeze --nofollow-import-to=pil --include-data-file=../windows-dependencies/x86/oggenc2.exe=oggenc2.exe --include-data-file=../windows-dependencies/x86/bootstrap.exe=bootstrap.exe --include-data-file=app-configuration.defaults=app-configuration.defaults --include-data-dir=locales=locales --include-data-dir=../public=documentation --include-data-dir=sounds=sounds --include-data-file=session.defaults=session.defaults --windows-disable-console --windows-file-description="Accessible VK Client for Windows" --windows-product-version=2021.12.14.0 --windows-file-version=2021.12.14.0 --windows-product-name="Socializer" --windows-company-name="MCV Software" --python-flag=no_site --assume-yes-for-downloads --remove-output "socializer.py"'
- 'python ..\scripts\copy_missing_files.py'
- 'cd ..'
- 'mkdir artifacts'
- 'cd scripts'
- 'python prepare_zipversion.py'
- 'cd ..'
- 'move src\socializer.zip artifacts\socializer_x86.zip'
- 'mv src/socializer.dist artifacts/program32'
artifacts:
expire_in: 1 day
paths:
- artifacts
make_installer:
stage: generate_versions
interruptible: true
tags:
- windows10
only:
- tags
- schedule
- master
variables:
NSIS: "C:\\program files (x86)\\nsis\\makensis.exe"
before_script:
- 'choco upgrade all'
script:
- cd artifacts
- '&$env:NSIS installer.nsi'
artifacts:
paths:
- artifacts
expire_in: 1 day
upload:
stage: upload
tags:
- docker
image: python
interruptible: true
script:
- cd artifacts
- python ../scripts/upload.py
only:
- tags
- schedules
- master

101
README.md
View File

@ -1,43 +1,94 @@
# socializer
A desktop application for handling [vk.com](http://vk.com) in an easy way.
[![pipeline status](https://gitlab.com/socializer1/socializer/badges/master/pipeline.svg)](https://gitlab.com/socializer1/socializer/commits/master)
## weekly builds
> Note: this project has two different main repositories. [Here is the official repository, hosted in our GitLab instance,](https://gitlab.mcvsoftware.com/socializer/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.
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.
A desktop application for handling [vk.com](https://vk.com) in an easy way.
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.
[See Socializer's website](https://socializer.su)
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)
> Note: this is the developer oriented documentation. If you want to read the user manual of socializer, [read the manual in the project's website](https://socializer.su/en/documentation)
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.
## running
## dependencies
This document describes how to run Socializer from source and how to build a binary version which doesn't need Python and the other dependencies to run.
* [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.
### Required dependencies
## Documentation
Although most dependencies (except Python) can be found in the windows-dependencies directory, we provide links to their official websites.
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.
* [Python,](http://python.org) version 3.7.9
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)
#### Dependencies that must be installed using pip
Python installs a tool called Pip that allows to install packages in a simple way. You can find it in the python scripts directory. To install packages using Pip, you have to navigate to the scripts directory using a command prompt, for example:
cd C:\python37\scripts
You can also add the scripts folder to your path environment variable or choose the corresponding option when installing Python.
Pip is able to install packages listed in a special text file, called the requirements file. To install all remaining dependencies, perform the following command:
pip install -r requirements.txt
Note that if you perform the command from the path where Pip is located, you need to specify the path to your Socializer root folder where the requirements file is located, for example:
pip install -r D:\repos\socializer\requirements.txt
Pip will automatically get the additional libraries that the listed packages need to work properly.
If you need to update your dependencies, perform the following command:
pip install --upgrade -r requirements.txt
#### Other dependencies
These dependencies are located in the windows-dependencies directory. You don't need to install or modify them.
* Bootstrap 1.2.1: included in dependencies directory.
This dependency has been built using pure basic 4.61. Its source can be found at http://hg.q-continuum.net/updater
* [oggenc2.exe,](http://www.rarewares.org/ogg-oggenc.php) version 2.87
* Microsoft Visual c++ 2017 redistributable dlls.
#### Dependencies required to build the installer
* [NSIS,](http://nsis.sourceforge.net/) version 3.04
### Running Socializer from source
Now that you have installed all these packages, you can run Socializer from source using a command prompt. Navigate to the repo's `src` directory, and type the following command:
python main.py
If necessary, change the first part of the command to reflect the location of your python executable.
### Generating the documentation
To generate the documentation in html format, ensure you are in the doc folder inside this repo. After that, run these commands:
copy ..\changelog.md .
python document_importer.py
cd ..\src
python ..\doc\generator.py
The documentation will be generated, placing each language in a separate folder in the doc directory.
### Building a binary version
A binary version doesn't need python and the other dependencies to run, it's the same version that you will find on the Socializer's website if you download the zip files or the Alpha versions.
To build it, run the following command from the src folder:
python setup.py build
You will find the binaries in the dist directory.
### Building an installer
If you want to install Socializer on your computer, you must create the installer first. Follow these steps:
* Navigate to the src directory, and Write the latest alpha version in the application file, so this version will be able to check updates and get the alpha channel: c:\python37\python.exe write_version_data.py
* create a binary version: C:\python37\python setup.py build
* run the installer script: C:\nsis\makensis.exe installer.nsi
## 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

View File

@ -1,13 +1,266 @@
% Changelog
Changelog
## Changes for the current build ()
## News in this version
### new additions
* Now socializer can load the list of members for a community. You have to use the context menu in the community in order to load all members. For community administrators and moderators, it will display also a new buffer with invites that have been sent to the group. You can use the context menu in those buffers to perform common actions to those user. Take into account, though, that available actions from those buffers depend in the focused user's privacy settings.
* Added an actions button that allows you to perform several tasks from the parts of the application where it appears. For now, the action button is shown in any displayed post or repost, and also in chat messages. When pressed, it opens a menu from where you can translate texts or do spelling correction on the message.
* It is now possible to read an article from a wall post. The article will be opened in a new dialog. This might work better in countries where VK is blocked as users no longer need to open the web browser. Unfortunately, as articles are mainly undocumented in the API, it is not possible to perform other actions besides reading them from Socializer.
* the spelling correction module is able to add words to the dictionary so it will learn which words should start to ignore.
* Added a new setting, in the preferences dialog, that allows you to turn on the debug logging feature. With this feature Enabled, Socializer will log more information regarding what is doing while an error occurs. This feature must be enabled when you want to report an issue and send us your logs.
### bugfixes
* Now it is possible to select or unselect audios in a list by pressing space again. This was not possible earlier due to an unexpected issue when migrating to the latest version of socializer's components.
* Fixed an issue when focusing chat messages. Sometimes, socializer was not precise enough to focus the right message. Now all messages should be getting the focus as expected.
* Fixed a small issue that was making impossible to close the blacklist dialog by pressing escape.
* Now it is possible to perform authentication in accounts using two factor verification again. This issue was caused due to a recent change in the VK workflow for two factor verification processes.
* Users who have chosen to not show their online activity (specifically the last seen field in VK) will be added in people buffers. Before, those people were making socializer to raise an exception and the whole buffer was unable to be loaded.
* It is possible to translate texts again, thanks to the Google Translate implementation added in the application.
### Changes
* The spelling correction module has been rewritten to take advantage of the newest enchant Python module which is more stable and can be added properly to the distribution, as opposed to the first enchant module we have tried.
* Better performance on Socializer should be noticed for users with many conversations opened. Before, socializer could freeze while loading all messages in conversations. Now that should work more efficiently and the application should not stop responding.
* Socializer now uses Google Translate services instead of yandex.translate.
* When displaying people buffers (such as those shown in the current user's account), socializer shows the buttons for sending private messages or post in user's wall only if the focused user has enabled those options.
## News in Version 0.24
### New additions
* Socializer will ask for confirmation before closing the application.
* In all audio buffers, there is a new item in the context menu that allows downloading of the audio directly from the buffer. If there are multiple audios selected, socializer will ask for a folder where all audios should be placed. When downloading multiple audios, socializer will name those automatically by following the template "song title - artist".
* In all audio buffers, there are two new menu items for selecting and deselecting all items in the buffer.
* Added displaying of articles as attachments in wall posts. When opened, Socializer will open the article in the web browser.
* Starting from Version 0.24, there will be an installer for the Alpha version of socializer, always available from our downloads page.
### bugfixes
* Fixed an error that was making socializer unable to render correctly certain Links containing uppercase letters (such as yandex.disk shared links). Before, those links were giving 404 errors when pressed, now they should work normally. This error was present in wall posts, comments, topics and chat messages.
* Fixed an error related to chat notifications in Socializer. Before, the "online now" notification could break the Socializer interface, making it unable to load the chat in real time.
* Fixed a small inconsistency when marking a conversation as read. Before, if two messages were sent by the recipient, only the last message was marked as read and the previous was making the unread sound all the time. Now that issue should be handled properly.
### Changes
* Socializer will not be marked as Virus by most antivirus softwares due to a new build tool which is cleaner and less prone to be flagged by antivirus.
* Socializer is distributed with the Microsoft C++ redistributable package, so everyone will be able to use the software without needing to install any extra package.
* Replaced the underlying library we were using for spelling correction as is no longer in development. Instead, we started to use a new approach in socializer, which, in theory, should allow us to switch language for spelling correction and other benefits a bit later. For now, available languages are Russian, Ukranian, English, Polish and Spanish, but more languages can be added by request.
* When downloading a file (such as an audio file or document), the download process should be relatively faster due to some optimizations made in the function.
* Socializer now uses just the first name of users in typing notifications.
* socializer should be able to inform users about common errors when sending chat messages (such as sending messages to people in the current user's blacklist or banned from VK). Later, more errors related to posts will be added.
* The application will load up to 100 audio albums instead of the default 10.
## Changes in Version 0.23 (11.11.2019)
### 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 +271,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
@ -43,6 +298,3 @@
* 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.

View File

@ -1,2 +0,0 @@
Manuel E. Cortéz
Valeria K

289
doc/changelog.md Normal file
View File

@ -0,0 +1,289 @@
# Changelog
## News in this version
## new additions
* the spelling correction module is able to add words to the dictionary so it will learn which words should start to ignore.
### bugfixes
* Now it is possible to perform authentication in accounts using two factor verification again. This issue was caused due to a recent change in the VK workflow for two factor verification processes.
### Changes
* The spelling correction module has been rewritten to take advantage of the newest enchant Python module which is more stable and can be added properly to the distribution, as opposed to the first enchant module we have tried.
* Better performance on Socializer should be noticed for users with many conversations opened. Before, socializer could freeze while loading all messages in conversations. Now that should work more efficiently and the application should not stop responding.
## News in Version 0.24
### New additions
* Socializer will ask for confirmation before closing the application.
* In all audio buffers, there is a new item in the context menu that allows downloading of the audio directly from the buffer. If there are multiple audios selected, socializer will ask for a folder where all audios should be placed. When downloading multiple audios, socializer will name those automatically by following the template "song title - artist".
* In all audio buffers, there are two new menu items for selecting and deselecting all items in the buffer.
* Added displaying of articles as attachments in wall posts. When opened, Socializer will open the article in the web browser.
* Starting from Version 0.24, there will be an installer for the Alpha version of socializer, always available from our downloads page.
### bugfixes
* Fixed an error that was making socializer unable to render correctly certain Links containing uppercase letters (such as yandex.disk shared links). Before, those links were giving 404 errors when pressed, now they should work normally. This error was present in wall posts, comments, topics and chat messages.
* Fixed an error related to chat notifications in Socializer. Before, the "online now" notification could break the Socializer interface, making it unable to load the chat in real time.
* Fixed a small inconsistency when marking a conversation as read. Before, if two messages were sent by the recipient, only the last message was marked as read and the previous was making the unread sound all the time. Now that issue should be handled properly.
### Changes
* Socializer will not be marked as Virus by most antivirus softwares due to a new build tool which is cleaner and less prone to be flagged by antivirus.
* Socializer is distributed with the Microsoft C++ redistributable package, so everyone will be able to use the software without needing to install any extra package.
* Replaced the underlying library we were using for spelling correction as is no longer in development. Instead, we started to use a new approach in socializer, which, in theory, should allow us to switch language for spelling correction and other benefits a bit later. For now, available languages are Russian, Ukranian, English, Polish and Spanish, but more languages can be added by request.
* When downloading a file (such as an audio file or document), the download process should be relatively faster due to some optimizations made in the function.
* Socializer now uses just the first name of users in typing notifications.
* socializer should be able to inform users about common errors when sending chat messages (such as sending messages to people in the current user's blacklist or banned from VK). Later, more errors related to posts will be added.
* The application will load up to 100 audio albums instead of the default 10.
## Changes in Version 0.23 (11.11.2019)
### 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 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.
* Included a brief manual in the help menu. Currently available only in English.
* Included a context menu in list items. Currently there are functions not available. Menu for chat buffers is not implemented yet.
* Implemented audio album load (in the music buffer), creation (in the application menu) and deletion (in the application menu, too).
* 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).
* 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
* 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.
* 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.
* 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.
* 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.
* 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.
* Posts from twitter are displayed in a better way (newline characters (\n) are handled properly instead being displayed).
* In the play all function, everything should be cleaned before start the new playback.
* 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.
* 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.
* Added your friendlist as a buffer. You can create chats from there by using the send message button.
## Changes for build 2016.04.5 (5/04/2016)
* Updated russian and spanish translations.
* Fixed minor bugs in the likes button for posts.
* Now it's possible to open wall posts by pressing enter, as newsfeeds' posts.
* 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.
* 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.
* 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.

292
doc/changelog.py Normal file
View File

@ -0,0 +1,292 @@
# -*- coding: utf-8 -*-
documentation = [
_(u"""# Changelog"""),
"",
_(u"""## News in this version"""),
"",
_(u"""## new additions"""),
"",
_(u"""* the spelling correction module is able to add words to the dictionary so it will learn which words should start to ignore."""),
"",
_(u"""### bugfixes"""),
"",
_(u"""* Now it is possible to perform authentication in accounts using two factor verification again. This issue was caused due to a recent change in the VK workflow for two factor verification processes."""),
"",
_(u"""### Changes"""),
"",
_(u"""* The spelling correction module has been rewritten to take advantage of the newest enchant Python module which is more stable and can be added properly to the distribution, as opposed to the first enchant module we have tried."""),
_(u"""* Better performance on Socializer should be noticed for users with many conversations opened. Before, socializer could freeze while loading all messages in conversations. Now that should work more efficiently and the application should not stop responding."""),
"",
_(u"""## News in Version 0.24"""),
"",
_(u"""### New additions"""),
"",
_(u"""* Socializer will ask for confirmation before closing the application."""),
_(u"""* In all audio buffers, there is a new item in the context menu that allows downloading of the audio directly from the buffer. If there are multiple audios selected, socializer will ask for a folder where all audios should be placed. When downloading multiple audios, socializer will name those automatically by following the template "song title - artist"."""),
_(u"""* In all audio buffers, there are two new menu items for selecting and deselecting all items in the buffer."""),
_(u"""* Added displaying of articles as attachments in wall posts. When opened, Socializer will open the article in the web browser."""),
_(u"""* Starting from Version 0.24, there will be an installer for the Alpha version of socializer, always available from our downloads page."""),
"",
_(u"""### bugfixes"""),
"",
_(u"""* Fixed an error that was making socializer unable to render correctly certain Links containing uppercase letters (such as yandex.disk shared links). Before, those links were giving 404 errors when pressed, now they should work normally. This error was present in wall posts, comments, topics and chat messages."""),
_(u"""* Fixed an error related to chat notifications in Socializer. Before, the "online now" notification could break the Socializer interface, making it unable to load the chat in real time."""),
_(u"""* Fixed a small inconsistency when marking a conversation as read. Before, if two messages were sent by the recipient, only the last message was marked as read and the previous was making the unread sound all the time. Now that issue should be handled properly."""),
"",
_(u"""### Changes"""),
"",
_(u"""* Socializer will not be marked as Virus by most antivirus softwares due to a new build tool which is cleaner and less prone to be flagged by antivirus."""),
_(u"""* Socializer is distributed with the Microsoft C++ redistributable package, so everyone will be able to use the software without needing to install any extra package."""),
_(u"""* Replaced the underlying library we were using for spelling correction as is no longer in development. Instead, we started to use a new approach in socializer, which, in theory, should allow us to switch language for spelling correction and other benefits a bit later. For now, available languages are Russian, Ukranian, English, Polish and Spanish, but more languages can be added by request."""),
_(u"""* When downloading a file (such as an audio file or document), the download process should be relatively faster due to some optimizations made in the function."""),
_(u"""* Socializer now uses just the first name of users in typing notifications."""),
_(u"""* socializer should be able to inform users about common errors when sending chat messages (such as sending messages to people in the current user's blacklist or banned from VK). Later, more errors related to posts will be added."""),
_(u"""* The application will load up to 100 audio albums instead of the default 10."""),
"",
_(u"""## Changes in Version 0.23 (11.11.2019)"""),
"",
_(u"""### New additions"""),
"",
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* In the new timeline dialog, it is possible to create video buffers by selecting the "video" radio button as buffer type."""),
"",
_(u"""### bugfixes"""),
"",
_(u"""* Fixed an error that was causing socializer to not update the "Online friends" buffer if chat notifications were disabled."""),
_(u"""* Fixed an error that was making Socializer unable to attach audio files from the computer, if the file does not include correct ID3 TAGS."""),
_(u"""* Fixed a traceback that was being logged when attempting to load an image but cancel the dialog for attaching it."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* fixed an error that was making socializer unable to parse video data, thus video buffers were impossible to be loaded."""),
"",
_(u"""### Changes"""),
"",
_(u"""* Less confidential user data will be send to the logs, so it will be much safer to pass logs publicly."""),
_(u"""* automatic update checks will be disabled if using socializer from the source code."""),
_(u"""* 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."""),
_(u"""* When displaying a profile, information about mobile and home phone is displayed in the basic information tab."""),
_(u"""* 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."""),
"",
_(u"""## changes in Versions 0.21 and 0.22 (14.07.2019)"""),
"",
_(u"""### New additions"""),
"",
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* In conversation buffers, it is possible to display and open wall posts sent as attachments in messages."""),
_(u"""* 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."""),
"",
_(u"""### bugfixes"""),
"",
_(u"""* Fixed an error with two factor authentication in the recent socializer version. Now it works reliably again."""),
_(u"""* 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."""),
_(u"""* Fixed an error retrieving some group information for the current session."""),
_(u"""* When posting in a topic, links will be posted properly."""),
"",
"",
_(u"""### Changes"""),
"",
_(u"""* the audio player module has received some improvements:"""),
_(u""" - 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."""),
_(u""" - 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."""),
_(u""" - 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."""),
_(u"""* In audio buffers, you will play the focused audio when pressing enter in the item, instead of opening the audio information dialog."""),
_(u"""* 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."""),
_(u""" - Control+Enter and control+Shift+Enter: superseeded by Control+P for playing (and pausing) the currently focused audio."""),
_(u""" - F5 and F6: superseeded by Alt+down and up arrows for modifying volume."""),
"",
_(u"""## changes in version 0.20 (25.04.2019)"""),
"",
_(u"""### New additions"""),
"",
_(u"""* 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)"""),
_(u"""* 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."""),
_(u""" * Alt+Shift+Left arrow: Seek 5 seconds backwards."""),
_(u""" * Alt+Shift+Right arrow: Seek 5 seconds forwards."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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)"""),
_(u"""* 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)"""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
"",
_(u"""### bugfixes"""),
"",
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* The bug reporting feature works normally again."""),
"",
_(u"""### Changes"""),
"",
_(u"""* Updated method for accessing audio files due to the latest changes on VK apps."""),
_(u"""* When changing volume of the playing audio, it will decrease or increase the volume by 2% instead of 5%. """),
_(u"""* 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."""),
"",
_(u"""## Changes in version 0.19 (13.03.2019)"""),
"",
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* Added experimental support to "subscribers" buffer, inside frienship requests. This shows friend requests that have been declined by the current user."""),
_(u"""* the message when an user is typing in conversation buffers will be announced only if the socializer window is focused."""),
_(u"""* 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."""),
_(u"""* Added experimental support to user and community polls:"""),
_(u""" * 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."""),
_(u""" * Otherwise it will display a dialog from where the user can vote in the current poll."""),
_(u"""* Fixed an error in Socializer that was making it unable to detect unread messages properly."""),
_(u"""* 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))"""),
_(u"""* 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))"""),
_(u"""* Socializer will load all conversations during startup, not only conversations with unread messages."""),
_(u"""* Added new global keystrokes, available in the main window."""),
_(u""" * Alt + up/down arrows: Increase / decrease volume."""),
_(u""" * Alt + Left/down arrows: Play previous and next song if playing an audios buffer."""),
_(u""" * Control + P: Play/pause."""),
_(u""" * control+Shift+P: Play all."""),
_(u"""* 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."""),
_(u"""* 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))"""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* Deleted posts will display an error message when trying to view details about those. Before, the dialog was created and left blank."""),
_(u"""* Improvements in audio features present in Socializer:"""),
_(u""" * 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."""),
_(u""" * Now it is possible to create and delete audio albums again."""),
_(u""" * Fixed errors when moving songs to albums. Now everything works as expected."""),
_(u"""* Added documents to the list of supported files when adding attachments to a wall post or private message."""),
_(u"""* It is possible to enable or disable proxy from the preferences dialog. The application must be restarted for this change to take effect."""),
_(u"""* 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))"""),
_(u"""* 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."""),
_(u"""* It is possible to retrieve previous items for the home buffer and walls (current user's wall and any other timeline):"""),
_(u""" * For the home buffer, only a limited amount of items (around 700) can be loaded, supposedly due to VK API limits."""),
_(u""" * For walls, all posts should be possible to be loaded, however, testing with walls containing more than 2000 posts are not performed yet."""),
_(u"""* Added improvements to groups:"""),
_(u""" * 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."""),
_(u""" * You can create or delete all buffers for groups by pressing the menu key or right mouse click in the "communities" buffer."""),
_(u""" * 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."""),
_(u"""* Authentication errors should be handled gracefully by the application:"""),
_(u""" * 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."""),
_(u""" * If the user introduced incorrect or invalid data, Socializer will display an error and prompt the user again for valid information."""),
_(u""" * If there is a connection problem when opening Socializer, it will display an error and inform the user about the issue."""),
"",
_(u"""## Changes in version 0.18 (21.01.2019)"""),
"",
_(u"""* Changed authentication tokens in Socializer. It is mandatory to download a fresh copy of socializer and start a new configuration for your account."""),
_(u"""* 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."""),
_(u"""* There is an installer file for Socializer, available in our downloads page. Installed version of Socializer will be more confortable for some people."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* If you are not allowed to post in someone's wall, the post button will not be visible."""),
_(u"""* 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."""),
_(u"""* 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))"""),
_(u"""* 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))"""),
_(u"""* 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."""),
_(u"""* 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))"""),
_(u"""* 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))"""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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))"""),
_(u"""* 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."""),
_(u"""* Added functionality regarding comments in wall posts:"""),
_(u""" * 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."""),
_(u""" * A new "replies" field has been added to the comments' list."""),
_(u""" * When writing a comment, it is possible to do the same actions available for a post (translate, spell checking and adding attachments)."""),
"",
_(u"""## Changes in version 0.17 (01.01.2019)"""),
"",
_(u"""* Added support for Two factor authentication (2FA). ([#13,](https://code.manuelcortez.net/manuelcortez/socializer/issues/13))"""),
_(u"""* 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:"""),
_(u""" * 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."""),
_(u""" * 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."""),
_(u"""* Now it is possible to send voice messages from socializer. Voice messages are available from the "add" button in any conversation buffer."""),
_(u"""* tokens generated by socializer will never expire. ([#3,](https://code.manuelcortez.net/manuelcortez/socializer/issues/3))"""),
_(u"""* 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."""),
_(u"""* Audio albums are loaded correctly."""),
_(u"""* It is possible to play audios added by friends appearing in the news feed."""),
_(u"""* Adding and removing an audio file to your library works."""),
_(u"""* Unread messages will play a sound when focused."""),
_(u"""* Unread messages will be marked as read when user focuses them."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* Now Socializer will not send a notification every 5 minutes."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* Added popular and suggested songs. This will not work when using alternative tokens."""),
_(u"""* Now it is possible to update the status message, located in your profile."""),
_(u"""* 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."""),
_(u"""* Updated Russian translation: thanks to Дарья Ратникова."""),
_(u"""* Fixed some conditions, especially when rendering items in feeds, that were making the client to crash."""),
_(u"""* new versions will include documentation and changelog."""),
_(u"""* 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)"""),
"",
_(u"""## Changes in version 0.16 (13.12.2018)"""),
"",
_(u"""* Added two more buffers: "Pending requests" and "I follow", located in the people buffer, under "friendship requests"."""),
_(u"""* 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."""),
_(u"""* Improved the chat features present in the application. Read documentation to get a full understanding about how it works now."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* Added basic tagging for users in posts and comments. You can tag only people in your friends buffer."""),
_(u"""* Added a basic user profile viewer."""),
_(u"""* Added support for listening voice messages in chats. Currently it is not possible to send them."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* It is possible to play songs sent in a chat message by opening them from the attachments panel."""),
_(u"""* Reimplemented most of the audio playback methods (audio albums buffer still not working)."""),
_(u"""* Added some notifications and chat notifications when friends are online and offline. Most notifications can be configured from settings."""),
"",
_(u"""## Changes in build 2016.07.08 (08/07/2016)"""),
"",
_(u"""* Removed platform from "last seen" column in the friends list as it could cause some problems and it was being not so exact."""),
_(u"""* Now deleted audios are not parsed and displayed as "audio removed from library". They are silently ignored."""),
_(u"""* It's possible to open a friends timeline for others."""),
_(u"""* Fixed some strange bugs in the built version."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* When opened, socializer will try to create chat buffers for all unread messages."""),
_(u"""* Update some information on certain posts when an item is selected. For example, update the date of a post."""),
_(u"""* 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."""),
_(u"""* Included a brief manual in the help menu. Currently available only in English."""),
_(u"""* Included a context menu in list items. Currently there are functions not available. Menu for chat buffers is not implemented yet."""),
_(u"""* Implemented audio album load (in the music buffer), creation (in the application menu) and deletion (in the application menu, too)."""),
_(u"""* 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)."""),
_(u"""* 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 """),
_(u"""* 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."""),
_(u"""* Now is possible to press enter in the password or email/phone field and it'll do the action of the OK button."""),
_(u"""* 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."""),
_(u"""* Updated russian and spanish translations."""),
"",
_(u"""## Changes on build 2016.05.25"""),
"",
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* Posts from twitter are displayed in a better way (newline characters (\n) are handled properly instead being displayed)."""),
_(u"""* In the play all function, everything should be cleaned before start the new playback."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* Added your friendlist as a buffer. You can create chats from there by using the send message button."""),
"",
_(u"""## Changes for build 2016.04.5 (5/04/2016)"""),
"",
_(u"""* Updated russian and spanish translations."""),
_(u"""* Fixed minor bugs in the likes button for posts."""),
_(u"""* Now it's possible to open wall posts by pressing enter, as newsfeeds' posts."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* Added more options in the search audio dialog. Now users could use more parameters and searches will be more precise."""),
_(u"""* 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)."""),
_(u"""* Added a changelog file which could be opened from the help menu."""),
_(u"""* 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."""),
]

View File

@ -1,24 +1,24 @@
# -*- coding: utf-8 -*-
from codecs import open
""" 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"""
f1 = open(fileSource, "r")
f2 = open(fileDest, "w")
f1 = open(fileSource, "r", encoding="utf-8")
f2 = open(fileDest, "w", encoding="utf-8")
lns = f1.readlines()
f2.write("# -*- coding: utf-8 -*-\n")
f2.write("documentation = [\n")
for i in lns:
if "\n" == i:
newvar = "\"\","
if "\n" == i or i.splitlines()[0] == "":
newvar = "\"\",\n"
elif "\n" == i[-1]:
newvar = "_(u\"\"\"%s\"\"\"),\n" % (i[:-1])
newvar = "_(u\"\"\"%s\"\"\"),\n" % (i.splitlines()[0])
else:
newvar = "_(u\"\"\"%s\"\"\"),\n" % (i)
# print i[-1:]
f2.write(newvar)
f1.close()
f2.write("]")
@ -26,3 +26,4 @@ def prepare_documentation_in_file(fileSource, fileDest):
prepare_documentation_in_file("manual.md", "strings.py")
prepare_documentation_in_file("changelog.md", "changelog.py")

View File

@ -1,20 +1,51 @@
# -*- coding: utf-8 -*-
import markdown
import gettext
import os
from codecs import open as _open
import languageHandler
languageHandler.setLanguage("en")
import documentation_importer
import locale
import markdown
import shutil
from importlib import reload
# the list of supported language codes of TW Blue
languages = ["en", "es"]
# Languages already translated or translating the documentation.
documentation_languages = ["ru", "en", "es"]
def generate_document(language):
import strings
reload(languageHandler)
languageHandler.setLanguage(language)
reload(strings)
markdown_file = markdown.markdown("\n".join(strings.documentation[1:]), extensions=["markdown.extensions.toc"])
# Changelog translated languages.
changelog_languages = ["ru", "en", "es"]
# this function will help us to have both strings.py and changelog.py without issues by installing a global dummy translation function.
def install_null_translation(name):
_ = gettext.NullTranslations()
_.install()
return
def get_translations(name):
""" Create translation instances for every language of the translated document. """
translations = {}
if "documentation" in name:
langs = documentation_languages
else:
langs = changelog_languages
for l in langs:
if l != "en":
_ = gettext.translation(name, os.path.join(os.getcwd(), "locales"), languages=[l])
translations[l] = _
else:
_ = gettext.NullTranslations()
translations[l] = _
return translations
def generate_document(lang, lang_name, document_type="documentation"):
""" Generates a document by using the provided lang object, which should be a translation, and lang_name, which should be the two letter code representing the language. """
if document_type == "documentation":
translation_file = "socializer-documentation"
markdown_file = markdown.markdown("\n".join([lang.gettext(s) if s != "" else s for s in strings.documentation[1:]]), extensions=["markdown.extensions.toc"])
title = lang.gettext(strings.documentation[0])
filename = "manual.html"
elif document_type == "changelog":
translation_file = "socializer-documentation"
markdown_file = markdown.markdown("\n".join([lang.gettext(s) if s != "" else s for s in changelog.documentation[1:]]), extensions=["markdown.extensions.toc"])
title = lang.gettext(changelog.documentation[0])
filename = "changelog.html"
first_html_block = """<!doctype html>
<html lang="%s">
<head>
@ -23,20 +54,32 @@ def generate_document(language):
</head>
<body>
<header><h1>%s</h1></header>
""" % (language, strings.documentation[0], strings.documentation[0])
""" % (lang_name, 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", lang_name)):
os.mkdir(os.path.join("documentation", lang_name))
mdfile = open(os.path.join("documentation", lang_name, filename), "w", encoding="utf-8")
mdfile.write(first_html_block)
mdfile.close()
def create_documentation():
changelog_translations = get_translations("socializer-documentation")
documentation_translations = get_translations("socializer-documentation")
print("Creating documentation in the supported languages...\n")
for i in languages:
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 documentation_languages:
print("Creating documentation for: %s" % (i,))
generate_document(i)
generate_document(lang_name=i, lang=documentation_translations.get(i))
for i in changelog_languages:
print("Creating changelog for: %s" % (i,))
generate_document(lang_name=i, lang=changelog_translations.get(i), document_type="changelog")
print("Done")
install_null_translation("twblue-documentation")
import strings
import changelog
create_documentation()

View File

@ -1,176 +0,0 @@
import __builtin__
import os
import sys
import ctypes
import locale
import gettext
#import paths
import platform
# A fix for the mac locales
if platform.system() != 'Windows':
if locale.getlocale()[0] is None:
locale.setlocale(locale.LC_ALL, 'en_US')
#a few Windows locale constants
LOCALE_SLANGUAGE=0x2
LOCALE_SLANGDISPLAYNAME=0x6f
curLang="en"
def localeNameToWindowsLCID(localeName):
"""Retreave the Windows locale identifier (LCID) for the given locale name
@param localeName: a string of 2letterLanguage_2letterCountry or or just 2letterLanguage
@type localeName: string
@returns: a Windows LCID
@rtype: integer
"""
#Windows Vista is able to convert locale names to LCIDs
func_LocaleNameToLCID=getattr(ctypes.windll.kernel32,'LocaleNameToLCID',None)
if func_LocaleNameToLCID is not None:
localeName=localeName.replace('_','-')
LCID=func_LocaleNameToLCID(unicode(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]
if len(LCList)>0:
LCID=LCList[0]
else:
LCID=0
return LCID
def getLanguageDescription(language):
"""Finds out the description (localized full name) of a given local name"""
desc=None
if platform.system() == "Windows":
LCID=localeNameToWindowsLCID(language)
if LCID!=0:
buf=ctypes.create_unicode_buffer(1024)
if '_' not in language:
res=ctypes.windll.kernel32.GetLocaleInfoW(LCID,LOCALE_SLANGDISPLAYNAME,buf,1024)
else:
res=0
if res==0:
res=ctypes.windll.kernel32.GetLocaleInfoW(LCID,LOCALE_SLANGUAGE,buf,1024)
desc=buf.value
elif platform.system() == "Linux" or not desc:
desc={
"am":pgettext("languageName","Amharic"),
"an":pgettext("languageName","Aragonese"),
"es":pgettext("languageName","Spanish"),
"pt":pgettext("languageName","Portuguese"),
"ru":pgettext("languageName","Russian"),
"it":pgettext("languageName","italian"),
"tr":pgettext("languageName","Turkey"),
"gl":pgettext("languageName","Galician"),
"ca":pgettext("languageName","Catala"),
"eu":pgettext("languageName","Vasque"),
"pl":pgettext("languageName","polish"),
"ar":pgettext("languageName","Arabic"),
"ne":pgettext("languageName","Nepali"),
"sr":pgettext("languageName","Serbian (Latin)"),
}.get(language,None)
return desc
def getAvailableLanguages():
"""generates a list of locale names, plus their full localized language and country names.
@rtype: list of tuples
"""
#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)]
#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')
l.sort()
#For each locale, ask Windows for its human readable display name
d=[]
for i in l:
desc=getLanguageDescription(i)
label="%s, %s"%(desc,i) if desc else i
d.append(label)
#include a 'user default, windows' language, which just represents the default language for this user account
l.append("system")
# 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)
def makePgettext(translations):
"""Obtaina pgettext function for use with a gettext translations instance.
pgettext is used to support message contexts,
but Python 2.7's gettext module doesn't support this,
so NVDA must provide its own implementation.
"""
if isinstance(translations, gettext.GNUTranslations):
def pgettext(context, message):
message = unicode(message)
try:
# Look up the message with its context.
return translations._catalog[u"%s\x04%s" % (context, message)]
except KeyError:
return message
else:
def pgettext(context, message):
return unicode(message)
return pgettext
def setLanguage(lang):
system = platform.system()
global curLang
try:
if lang=="system":
if system == "Windows":
windowsLCID=ctypes.windll.kernel32.GetUserDefaultUILanguage()
localeName=locale.windows_locale[windowsLCID]
else:
localeName=locale.getlocale()[0]
trans=gettext.translation('socializer-doc', localedir="locales", languages=[localeName])
curLang=localeName
else:
trans=gettext.translation("socializer-doc", localedir="locales", languages=[lang])
curLang=lang
localeChanged=False
#Try setting Python's locale to lang
try:
locale.setlocale(locale.LC_ALL, lang)
localeChanged=True
except:
pass
if not localeChanged and '_' in lang:
#Python couldn'tsupport the language_country locale, just try language.
try:
locale.setlocale(locale.LC_ALL, lang.split('_')[0])
except:
pass
#Set the windows locale for this thread (NVDA core) to this locale.
if system == "Windows":
LCID=localeNameToWindowsLCID(lang)
ctypes.windll.kernel32.SetThreadLocale(LCID)
except IOError:
trans=gettext.translation("socializer-doc",fallback=True)
curLang="en"
trans.install(unicode=True)
# Install our pgettext function.
__builtin__.__dict__["pgettext"] = makePgettext(trans)
def getLanguage():
return curLang
def normalizeLanguage(lang):
"""
Normalizes a language-dialect string in to a standard form we can deal with.
Converts any dash to underline, and makes sure that language is lowercase and dialect is upercase.
"""
lang=lang.replace('-','_')
ld=lang.split('_')
ld[0]=ld[0].lower()
#Filter out meta languages such as x-western
if ld[0]=='x':
return None
if len(ld)>=2:
ld[1]=ld[1].upper()
return "_".join(ld)

View File

@ -1,535 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Socializer\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-29 13:33-0500\n"
"PO-Revision-Date: 2016-06-29 16:25-0600\n"
"Last-Translator: \n"
"Language-Team: Manuel Cortez <manuel@manuelcortez.net>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.6.11\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. Translators: the label for the Windows default NVDA interface language.
msgid "User default"
msgstr ""
msgid "socializer's manual "
msgstr "Manual de Socializer"
msgid "## Introduction"
msgstr "## Introducción"
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 ""
"Socializer es una aplicación para usar [vk.com](http://vk.com) de forma "
"fácil y accesible, con un consumo de CPU mínimo. Socializer te permitirá "
"interactuar con la red social VK, brindándote acceso a las características "
"más relevantes, tales como:"
msgid "* Basic post creation in your wall (including photos)."
msgstr ""
"* Creación básica de publicaciones en tu muro (incluyendo subida de fotos)"
msgid "* Audio addition, removal, download and search."
msgstr "* Añadir, descargar y buscar archivos de audio."
msgid "* audio albums management (create, delete and add audios)."
msgstr ""
"* Administración de albums de audio (crear, eliminar y añadir audios dentro "
"de albums)."
msgid "* Post comments."
msgstr "* Publicar comentarios."
msgid "* like, unlike and repost other's posts."
msgstr ""
"* Indicar que te gusta, que ya no te gusta o compartir publicaciones de "
"otros usuarios."
msgid ""
"* Open other's timelines so you could track someone's friends, posts or "
"audio files."
msgstr ""
"* Abrir líneas temporales de otros usuarios para poder ver sus "
"publicaciones, audios o amigos."
msgid "* Basic chat features."
msgstr "* Características básicas de chat."
msgid ""
"Note: When new features are added to socializer they will be added to this "
"section."
msgstr ""
"Nota: Cuando sean añadidas, las nuevas características se incluirán aquí."
msgid "## Running"
msgstr "## Abriendo socializer"
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."
msgstr ""
"Si estás usando una versión compilada (distribuible), descomprime el archivo "
"ZIP en un nuevo directorio que no contenga caracteres especiales, y abre el "
"archivo socializer.exe. Si no has configurado tu cuenta de VK, verás un "
"diálogo donde se te preguntará si deseas configurar una. Si presionas en sí, "
"podrás introducir tus datos. Toma en cuenta que la información proporcionada "
"ha de guardarse en un archivo de configuración, como texto plano. La "
"aplicación necesitará tu información para renovar el código de acceso cuando "
"expire."
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."
msgstr ""
"Nota: Cada que se brinde acceso a socializer, probablemente recibirás un "
"correo electrónico de VK diciéndote que puede que alguien haya entrado a tu "
"cuenta. Significa que un nuevo código de acceso ha sido generado entre VK y "
"Socializer mediante un proceso automático. Deberías ignorar estos avisos, a "
"no ser que hayas recibido un correo cuando no estés usando Socializer o "
"alguna otra aplicación. Puedes ver tus aplicaciones autorizadas en la página "
"de tu perfil en el sitio web de VK. Un nuevo código de acceso debe ser "
"generado cada 24 horas."
msgid "## Main interface"
msgstr "## Interfaz"
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:"
msgstr ""
"Si alguna vez has usado [TWBlue](https//github.com/manuelcortez/twblue) "
"anteriormente, te darás cuenta que la interfaz gráfica de socializer es muy "
"parecida. Una vez que hayas autorizado tu cuenta, Podrás ver una ventana con "
"los siguientes elementos:"
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."
msgstr ""
"* Una vista de árbol en la parte izquierda de laventana, donde podrás ver la "
"lista de buffers. Los buffers están divididos en tres categorías, "
"publicaciones, música y gente. Puedes expandir cada categoría para ver los "
"elementos hijos. Hay además buffers adicionales, líneas temporales y chats, "
"que serán usados para guardar líneas temporales para tus amigos, o chats "
"cuando recibas o envíes un mensaje."
msgid "* A button for making a post to your wall."
msgstr "* Un botón para publicar en tu muro."
msgid "* In audio buffers, Two buttons: Play and play all."
msgstr ""
"* En buffers de audio, un par de botones: Reproducir y reproducir todo."
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."
msgstr ""
"* En buffers para albums de audio, un botón llamado cargar álbum. De manera "
"predeterminada, los álbumes se encuentran vacíos, debes pulsar el botón "
"cargar álbum para descargar la información necesaria que permitirá mostrar "
"la música dentro del buffer del álbum."
msgid ""
"* A list where you will see the posts for the currently selected buffer."
msgstr "* Una lista donde podrás ver los elementos del buffer seleccionado."
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."
msgstr ""
"* En buffers de amigos, un botón que permite enviar un mensaje a la persona "
"seleccionada. Si es activado, el botón creará un buffer de chat "
"automáticamente."
msgid ""
"* A status bar where the program will put some useful information about what "
"it's doing at the moment."
msgstr ""
"* Una barra de estado, donde el programa escribirá información importante "
"sobre lo que se encuentra haciendo en cada momento."
msgid "* And a menu bar."
msgstr "* Y una barra de menú."
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:"
msgstr ""
"Cuando socializer inicia, intentará cargar los elementos en el buffer "
"principal, publicaciones en tu muro, canciones en tus buffers de audio (mis "
"audios, populares y recomendaciones), así como tus amigos. Por el momento "
"solo se pueden hacer pocas acciones para cada uno de estos tipos de elemento."
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."
msgstr ""
"* Archivos de audio: Puedes reproducir el audio seleccionado, ver los "
"detalles de la canción (incluyendo letras, si las tiene), añadirlo y "
"eliminarlo de tu biblioteca, y descargar la canción a tu disco duro. Puedes "
"encontrar archivos de audio en tus propios buffers de audio, en el buffer "
"principal y pueden estar incluidos como adjuntos en publicaciones. Puedes "
"abrir una línea temporal de audios para ver los audios de otros usuarios de "
"VK."
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."
msgstr ""
"* Publicaciones en el buffer principal: En el buffer principal, puedes "
"pulsar la tecla intro y socializer abrirá un diálogo que puede ser "
"diferente, dependiendo del tipo de publicación que estaba enfocada cuando se "
"presionó la tecla. Por ejemplo, abrirá la publicación si estabas en una "
"publicación \"normal\", una lista de personas si estabas en una publicación "
"que indicaba que alguien había añadido amigos, el visualizador de detalles "
"de audios si estabas en una publicación que indicaba que alguien había "
"añadido audios, etc."
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."
msgstr ""
"* publicaciones en el muro: Mostrará la publicación en un nuevo diálogo, que "
"te permitirá interactuar con el post, ver los adjuntos, ver y publicar "
"comentarios, así como indicar si te gusta, ya no te gusta y compartir la "
"publicación."
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."
msgstr ""
"* Puedes enviar un mensaje a alguien pulsando el botón Enviar mensaje, si "
"está disponible. Los usuarios con cuentas desactivadas no pueden recibir "
"mensajes."
msgid "### Making a post"
msgstr "### Haciendo una publicación"
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 ""
"Cuando pulses el botón para publicar, se mostrará un diálogo. Este diálogo "
"te permitirá publicar algo en tu muro. En este diálogo tienes que escribir "
"un mensaje. Puedes traducir el mensaje y corregir tus errores ortográficos. "
"También puedes publicar una dirección URL, y socializer intentará enviarla "
"como un adjunto a tu publicación, por lo que no tienes que preocuparte. "
"Cuando estés listo, solo presiona el botón enviar, y estará listo."
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 ""
"Si quieres añadir algunas fotos, presiona el botón adjuntar, seguidamente "
"encuentra el botón del elemento que quieres añadir. Después, selecciona el "
"archivo a adjuntar y lo podrás ver en la lista de archivos a cargar una vez "
"sea procesado por el programa. Cuando hayas terminado con los adjuntos, "
"presiona el botón aceptar, y continúa con tu publicación. Cuando esté todo "
"listo, pulsa el botón enviar. Tu publicación podría tomar un tiempo en ser "
"enviada, dependiendo de la cantidad y el tamaño de los adjuntos que "
"añadiste, pero debería aparecer publicada en tu muro y en el buffer "
"principal tan rápidamente como sea publicada."
msgid "### Working with posts in news feed"
msgstr "### Trabajando con publicaciones en el buffer principal."
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 ""
"Puedes pulsar la tecla intro en cualquier publicación de tu buffer principal "
"para abrir un nuevo diálogo con información. La información puede variar si "
"estás viendo una notificación de nuevos amigos (cuando alguien añade "
"amigos), un archivo de audio, o una publicación regular."
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 ""
"Si abres una publicación regular en tu buffer principal, serás capaz de leer "
"los comentarios en una lista, indicar si te gusta o ya no te gusta la "
"publicación, compartirla o añadir un nuevo comentario. Si la publicación "
"contiene adjuntos, encontrarás una lista con ellos. Puedes pulsar intro "
"sobre uno de ellos para abrir la acción predeterminada. La acción "
"predeterminada para cada archivo dependerá del tipo de archivo en el que te "
"enfoques."
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 ""
"Para las notificaciones de nuevos amigos, solo puedes ver las personas que "
"han sido añadidas. También hay algunas publicaciones que no se muestran por "
"defecto."
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 ""
"Además, puedes pulsar la tecla de aplicaciones o el botón derecho del ratón "
"para mostrar un menú de acciones rápidas que están disponibles para el "
"elemento seleccionado. Las acciones son diferentes para cada tipo de "
"publicación."
msgid "### Working with songs"
msgstr "### Trabajando con audios"
msgid "Note: the following applies to audio timelines too."
msgstr "Nota: Lo siguiente también es aplicable a líneas temporales de audio."
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 ""
"Si quieres reproducir o ver los detalles de un archivo de audio, debes "
"navegar hasta la vista de árbol y, utilizando las flechas de cursor, ubicar "
"algún buffer de audio (mis audios, populares o recomendaciones). Verás dos "
"botones extras, reproducir y reproducir todo. El botón reproducir "
"reproducirá el audio seleccionado, y el botón reproducir todo comenzará a "
"reproducir, a partir del audio seleccionado y hasta el final, todos los "
"audios del buffer. Puedes ir a la lista de canciones, buscar una canción que "
"te guste y pulsar el botón reproducir, o pulsar Control intro, que es un "
"atajo de teclado. Ten en cuenta que algunos atajos de teclado solo funcionan "
"cuando estás en la lista de elementos."
msgid ""
"You can play audio from any buffer, just press ctrl+return for making the "
"audio playback possible."
msgstr ""
"Puedes reproducir audios desde cualquier buffer, solo presiona Control intro "
"para hacer posible la reproducción."
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 ""
"Si alguien ha añadido más de un audio a su biblioteca, podrás ver algo como "
"lo siguiente: \"(alguien) ha añadido 4 audios: audio1, audio2, audio3 y "
"audio4\". Puedes pulsar intro en la publicación para abrir el diálogo del "
"visualizador de detalles de audios, donde podrás verlos todos en una lista. "
"De forma predeterminada, el primer audio detectado está seleccionado, lo que "
"significa que puedes pulsar tab para ver sus detalles, descargarlo y "
"añadirlo a la biblioteca. Si cambias la canción en la lista, notarás que la "
"información se actualizará y ahora los detalles y acciones a mostrar tendrán "
"efecto en el nuevo audio seleccionado."
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 ""
"Cuando un archivo de audio está siendo reproducido, puedes pulsar las teclas "
"f5 y f6 para bajar y subir volumen, respectivamente. También puedes pulsar "
"Control Shift Intro para pausar/reproducir la canción."
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 ""
"Si quieres ver algunos detalles para el audio seleccionado, pulsa intro "
"sobre él. Podrás leer información importante sobre la canción (título, "
"artista, duración y la letra, si está disponible). También podrás descargar "
"la canción a tu disco duro, solo tienes que pulsar el botón descargar en el "
"diálogo de detalles de audio."
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 ""
"Cuando la descarga inicie, puedes cerrar el visualizador de detalles de "
"audio y revisar la barra de estado para ver el progreso."
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 ""
"Además, puedes hacer una búsqueda de canciones usando la barra de menú, en "
"el menú buffer, buscar, luego audio. Mostrará un diálogo donde deberás "
"establecer tus preferencias de búsqueda."
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 ""
"Si presionas la tecla de aplicaciones podrás ver un menú desde el que puedes "
"realizar algunas acciones, por ejemplo mover la canción a un álbum, o "
"agregarlo/eliminarlo de tu biblioteca."
msgid "## menu Bar"
msgstr "## barra de menú"
msgid ""
"You can go to the menu bar by pressing ALT. Right now, there are three "
"menus, application, buffer and help:"
msgstr ""
"Puedes ir a la barra de menú pulsando la tecla ALT. Actualmente existen tres "
"menús: aplicación, buffer y ayuda."
msgid "### Application menu"
msgstr "### Menú aplicación"
msgid ""
"* Create. Here you can create some things in VK. The only supported item at "
"this moment is the audio album."
msgstr ""
"* Crear. Aquí puedes crear algunas cosas en VK. Actualmente solo se "
"encuentra soportada la creación de álbumes de audio."
msgid ""
"* Delete: Removes items from the VK servers. The only supported item here is "
"the audio album."
msgstr ""
"* eliminar. Elimina elementos desde el servidor de VK. Actualmente solo se "
"encuentra soportado el borrado de álbumes de audio."
msgid ""
"* you can set your preferences by opening the preferences dialog located in "
"this menu."
msgstr ""
"* Puedes establecer tus preferencias desde el diálogo de preferencias, "
"ubicado en este menú."
msgid "### Buffer menu"
msgstr "### Menú buffer"
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."
msgstr ""
"* Nueva línea temporal: Esta opción permite crear una línea temporal para "
"otro usuario de VK. Las líneas temporales pueden descargar publicaciones de "
"otros usuarios."
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."
msgstr ""
"* Buscar: permite hacer una búsqueda en VK. Por el momento solo se pueden "
"buscar archivos de audio. Las búsquedas de audio se añadirán en el buffer de "
"música y contendrán los últimos 299 resultados."
msgid ""
"* Update current buffer: perform an update operation in the selected buffer, "
"which will retrieve the new items."
msgstr ""
"* Actualizar buffer: Realiza una operación de actualización en el buffer "
"actual, lo que recuperará los nuevos elementos."
msgid ""
"* Load previous items: Get the previous items for the currently focused "
"buffer."
msgstr ""
"* Cargar elementos anteriores: Carga los elementos anteriormente publicados "
"en el buffer actual."
msgid ""
"* Remove buffer: Tries to remove the current buffer. Default buffers can't "
"be removed."
msgstr ""
"* Eliminar buffer: Intenta remover el buffer actual. Los buffers "
"predeterminados no pueden eliminarse."
msgid "The help menu is self explanatory."
msgstr "El menú ayuda se explica por sí solo."
msgid "## Contributing"
msgstr "## Contribuir"
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)."
msgstr ""
"Si notas algún error en este documento, alguna sección no cubierta o "
"simplemente quieres sugerir algo, puedes hacerlo mediante las formas de "
"contacto (lee la siguiente sección)."
msgid "## contact"
msgstr "## Contacto"
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."
msgstr ""
"Si tienes preguntas, no dudes en contactarme mediante [Twitter,](https://"
"twitter.com/manuelcortez00) o envíame un correo electrónico a "
"manuel(arroba)manuelcortez(punto)net. Solo asegúrate de remplazar las "
"palabras entre paréntesis por el símbolo original."

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -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.

File diff suppressed because it is too large Load Diff

View File

@ -1,67 +1,188 @@
# -*- coding: utf-8 -*-
documentation = [
_(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"""# 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"""* Supports two factor authentication (2FA)."""),
_(u"""* Post creation in user and community walls."""),
_(u"""* 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, audio or video 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"""## 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"""### 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"""### 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"""## 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 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."""),
"",
_(u"""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."""),
"",
_(u"""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."""),
"",
_(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, documents, 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. 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."""),
"",
_(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. 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(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, 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."""),
_(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"""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, 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,"""),
_(u"""* One list of items, which also accepts the menu key to display actions available for the selected item,"""),
_(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 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."""),
_(u"""* 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"""),
_(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 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."""),
"",
_(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, 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."""),
"",
_(u"""### Application menu"""),
"",
_(u"""* Create: opens a menu where you can create a new album. At the moment, only audio and video albums are supported."""),
_(u"""* 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."""),
_(u"""* blacklist: Opens a dialog which allows you to manage blocked people on VK."""),
_(u"""* 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."""),
_(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"""* 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."""),
"",
_(u"""### Buffer menu"""),
"",
_(u"""* 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."""),
_(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"""* Remove buffer: 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"""* Open logs directory: Opens windows explorer in the logs directory, useful to include your logs in a bug report."""),
_(u"""* Open config directory: Opens Windows explorer in your config directory."""),
_(u"""* 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."""),
"",
_(u"""## Keyboard shortcuts"""),
"",
_(u"""Socializer includes some keyboard shortcuts, available from any buffer. Here you have the list of the available shortcuts:"""),
"",
_(u"""* 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."""),
_(u"""* Alt+Up/down: Increase and decrease audio volume by 5%."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* Alt+Left: Play the previous song."""),
_(u"""* Alt+Right: Play the next song."""),
"",
_(u"""## configuration"""),
"",
_(u"""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."""),
"",
_(u"""### General tab"""),
"",
_(u"""* Language: allows you to switch the interface language for socializer. The application must be restarted after changing the language."""),
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
"",
_(u"""### Buffer settings tab"""),
"",
_(u"""* 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."""),
_(u"""* 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."""),
_(u"""* 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."""),
"",
_(u"""### Chat settings tab"""),
"",
_(u"""* 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."""),
_(u"""* 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."""),
"",
_(u"""### Optional buffers tab"""),
"",
_(u"""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."""),
"",
_(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 team, [join the Socializer's community in VK.](https://vk.com/socializer.club) You can also visit [The project website.](http://socializer.su)"""),
"",
_(u"""## Credits"""),
"",
_(u"""Socializer is developed and maintained by [Manuel Cortez.](https://manuelcortez.net)"""),
"",
_(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"""* Russian: Дарья Ратникова."""),
"",
_(u"""Special thanks to Дарья Ратникова, as she also manages the Socializer's community in VK, translates the website and the documentation into Russian."""),
]

5
doc/translate.py Normal file
View File

@ -0,0 +1,5 @@
from babel.messages.frontend import CommandLineInterface
CommandLineInterface().run(['pybabel', 'extract', '-o', '..\scripts\socializer-documentation.pot', '.'])
#CommandLineInterface().run(['pybabel','compile','-d','../src/locales'])
CommandLineInterface().run(['pybabel','update', '--input-file', 'socializer-documentation.pot', '--domain', 'socializer-documentation', '--output-dir', '../src/locales'])

View File

@ -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.

23
requirements.txt Normal file
View File

@ -0,0 +1,23 @@
wxpython
pywin32
markdown
vk_api
vkaudiotoken
bs4
configobj
pypubsub
requests
requests-oauthlib
future
arrow
backports.functools_lru_cache
googletrans
mutagen
mock
babel
nuitka
pyenchant
git+https://github.com/accessibleapps/libloader
git+https://github.com/accessibleapps/platform_utils
git+https://github.com/accessibleapps/sound_lib
git+https://github.com/accessibleapps/accessible_output2

View File

@ -1,58 +0,0 @@
#!/bin/bash
# Define paths for a regular use, if there are not paths for python32 or 64, these commands will be taken.
pythonpath32="/C/python27x86"
pandocpath="pandoc.exe"
help () {
echo -e "$0 | usage:"
echo -e "$0 | \t./build.sh [-py32path <path to python for 32 bits> | -h]"
}
# parsing options from the command line
while [[ $# > 1 ]]
do
key="$1"
shift
case $key in
-py32path)
pythonpath32="$1"
shift
;;
-help)
help
;;
*)
help
esac
done
cd ../src
if [ -d build/ ];
then
rm -rf build
fi
if [ -d dist/ ];
then
rm -rf dist
fi
if [ -d documentation/ ];
then
rm -rf documentation
fi
mkdir documentation
cp ../changelog.md documentation/changelog.md
cd documentation
$pandocpath -s changelog.md -o changelog.html
rm changelog.md
cd ..
cd ../doc
$pythonpath32/python.exe generator.py
mv -f en ../src/documentation/
mv -f es ../src/documentation/
cd ../src
$pythonpath32/python.exe "setup.py" "py2exe" "--quiet"
mv -f dist ../nightly/socializer
rm -rf build
cd ../nightly
$pythonpath32/python.exe make_zipversion.py

View File

@ -0,0 +1,26 @@
#! /usr/bin/env python# -*- coding: iso-8859-1 -*-
import shutil
import os
import accessible_output2
import sound_lib
import enchant
dist_folder = "socializer.dist"
accessible_output2_files = accessible_output2.find_datafiles()
final_folder = os.path.join(dist_folder, accessible_output2_files[0][0])
module_dir = os.path.dirname(accessible_output2_files[0][1][0])
shutil.copytree(module_dir, final_folder)
soundlib_files = sound_lib.find_datafiles()
final_folder = os.path.join(dist_folder, soundlib_files[0][0])
os.makedirs(final_folder, exist_ok=True)
for file in soundlib_files[0][1]:
shutil.copy(file, final_folder)
enchant_path = os.path.dirname(enchant.__file__)
final_folder = os.path.join(dist_folder, "enchant")
if os.path.exists(final_folder):
os.remove(final_folder)
os.makedirs(final_folder, exist_ok=True)
shutil.copytree(os.path.join(enchant_path, "data"), os.path.join(final_folder, "data"))

View File

@ -0,0 +1,32 @@
#! /usr/bin/env python
import os
import json
print("Generating update files for Socializer...")# Determine if we are going to write stable or alpha update file.
# Stable file is when we build tags and alpha otherwise.
version = os.environ.get("CI_COMMIT_TAG") or os.environ.get("CI_COMMIT_SHORT_SHA")
if os.environ.get("CI_COMMIT_TAG") == None:
version_type = "alpha"
else:
version_type = "stable"
print("Version detected: %s" % (version_type,))
# Read update description and URL'S
if version_type == "alpha":
description = os.environ.get("CI_COMMIT_MESSAGE")
urls = dict(Windows32="https://files.mcvsoftware.com/socializer/alpha/socializer_x86.zip", Windows64="https://files.mcvsoftware.com/socializer/alpha/socializer_x64.zip")
else:
with open("update-description",'r') as f:
description = f.read()
urls=dict(Windows32="https://files.manuelcortez.net/socializer/{v}/socializer_{v}_x86.zip".format(v=version[1:]), Windows64="https://files.manuelcortez.net/socializer/{v}/socializer_{v}_x64.zip".format(v=version[1:]))
# build the main dict object
data = dict(current_version=version, description=description, downloads=urls)
print("Generating file with the following arguments: %r" % (data,))
if version_type == "alpha":
updatefile = "alpha.json"
else:
updatefile = "stable.json"
f = open(updatefile, "w")
json.dump(data, f, ensure_ascii=False)
f.close()

View File

@ -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.

View File

@ -0,0 +1,17 @@
#! /usr/bin/env python# -*- coding: iso-8859-1 -*-
import shutil
import os
import sys
def create_archive():
os.chdir("..\\src")
print("Creating zip archive...")
folder = "socializer.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()

View File

@ -1,669 +0,0 @@
#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# Originally written by Barry Warsaw <barry@zope.com>
#
# Minimally patched to make it even more xgettext compatible
# by Peter Funk <pf@artcom-gmbh.de>
#
# 2002-11-22 Jürgen Hermann <jh@web.de>
# Added checks that _() only contains string literals, and
# command line args are resolved to module lists, i.e. you
# can now pass a filename, a module or package name, or a
# directory (including globbing chars, important for Win32).
# Made docstring fit in 80 chars wide displays using pydoc.
#
# for selftesting
try:
import fintl
_ = fintl.gettext
except ImportError:
_ = lambda s: s
__doc__ = _("""pygettext -- Python equivalent of xgettext(1)
Many systems (Solaris, Linux, Gnu) provide extensive tools that ease the
internationalization of C programs. Most of these tools are independent of
the programming language and can be used from within Python programs.
Martin von Loewis' work[1] helps considerably in this regard.
There's one problem though; xgettext is the program that scans source code
looking for message strings, but it groks only C (or C++). Python
introduces a few wrinkles, such as dual quoting characters, triple quoted
strings, and raw strings. xgettext understands none of this.
Enter pygettext, which uses Python's standard tokenize module to scan
Python source code, generating .pot files identical to what GNU xgettext[2]
generates for C and C++ code. From there, the standard GNU tools can be
used.
A word about marking Python strings as candidates for translation. GNU
xgettext recognizes the following keywords: gettext, dgettext, dcgettext,
and gettext_noop. But those can be a lot of text to include all over your
code. C and C++ have a trick: they use the C preprocessor. Most
internationalized C source includes a #define for gettext() to _() so that
what has to be written in the source is much less. Thus these are both
translatable strings:
gettext("Translatable String")
_("Translatable String")
Python of course has no preprocessor so this doesn't work so well. Thus,
pygettext searches only for _() by default, but see the -k/--keyword flag
below for how to augment this.
[1] http://www.python.org/workshops/1997-10/proceedings/loewis.html
[2] http://www.gnu.org/software/gettext/gettext.html
NOTE: pygettext attempts to be option and feature compatible with GNU
xgettext where ever possible. However some options are still missing or are
not fully implemented. Also, xgettext's use of command line switches with
option arguments is broken, and in these cases, pygettext just defines
additional switches.
Usage: pygettext [options] inputfile ...
Options:
-a
--extract-all
Extract all strings.
-d name
--default-domain=name
Rename the default output file from messages.pot to name.pot.
-E
--escape
Replace non-ASCII characters with octal escape sequences.
-D
--docstrings
Extract module, class, method, and function docstrings. These do
not need to be wrapped in _() markers, and in fact cannot be for
Python to consider them docstrings. (See also the -X option).
-h
--help
Print this help message and exit.
-k word
--keyword=word
Keywords to look for in addition to the default set, which are:
%(DEFAULTKEYWORDS)s
You can have multiple -k flags on the command line.
-K
--no-default-keywords
Disable the default set of keywords (see above). Any keywords
explicitly added with the -k/--keyword option are still recognized.
--no-location
Do not write filename/lineno location comments.
-n
--add-location
Write filename/lineno location comments indicating where each
extracted string is found in the source. These lines appear before
each msgid. The style of comments is controlled by the -S/--style
option. This is the default.
-o filename
--output=filename
Rename the default output file from messages.pot to filename. If
filename is `-' then the output is sent to standard out.
-p dir
--output-dir=dir
Output files will be placed in directory dir.
-S stylename
--style stylename
Specify which style to use for location comments. Two styles are
supported:
Solaris # File: filename, line: line-number
GNU #: filename:line
The style name is case insensitive. GNU style is the default.
-v
--verbose
Print the names of the files being processed.
-V
--version
Print the version of pygettext and exit.
-w columns
--width=columns
Set width of output to columns.
-x filename
--exclude-file=filename
Specify a file that contains a list of strings that are not be
extracted from the input files. Each string to be excluded must
appear on a line by itself in the file.
-X filename
--no-docstrings=filename
Specify a file that contains a list of files (one per line) that
should not have their docstrings extracted. This is only useful in
conjunction with the -D option above.
If `inputfile' is -, standard input is read.
""")
import os
import imp
import sys
import glob
import time
import getopt
import token
import tokenize
import operator
__version__ = '1.5'
default_keywords = ['_']
DEFAULTKEYWORDS = ', '.join(default_keywords)
EMPTYSTRING = ''
# The normal pot-file header. msgmerge and Emacs's po-mode work better if it's
# there.
pot_header = _('''\
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\\n"
"POT-Creation-Date: %(time)s\\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n"
"Language-Team: LANGUAGE <LL@li.org>\\n"
"MIME-Version: 1.0\\n"
"Content-Type: text/plain; charset=CHARSET\\n"
"Content-Transfer-Encoding: ENCODING\\n"
"Generated-By: pygettext.py %(version)s\\n"
''')
def usage(code, msg=''):
print >> sys.stderr, __doc__ % globals()
if msg:
print >> sys.stderr, msg
sys.exit(code)
escapes = []
def make_escapes(pass_iso8859):
global escapes
if pass_iso8859:
# Allow iso-8859 characters to pass through so that e.g. 'msgid
# "Höhe"' would result not result in 'msgid "H\366he"'. Otherwise we
# escape any character outside the 32..126 range.
mod = 128
else:
mod = 256
for i in range(256):
if 32 <= (i % mod) <= 126:
escapes.append(chr(i))
else:
escapes.append("\\%03o" % i)
escapes[ord('\\')] = '\\\\'
escapes[ord('\t')] = '\\t'
escapes[ord('\r')] = '\\r'
escapes[ord('\n')] = '\\n'
escapes[ord('\"')] = '\\"'
def escape(s):
global escapes
s = list(s)
for i in range(len(s)):
s[i] = escapes[ord(s[i])]
return EMPTYSTRING.join(s)
def safe_eval(s):
# unwrap quotes, safely
return eval(s, {'__builtins__':{}}, {})
def normalize(s):
# This converts the various Python string types into a format that is
# appropriate for .po files, namely much closer to C style.
lines = s.split('\n')
if len(lines) == 1:
s = '"' + escape(s) + '"'
else:
if not lines[-1]:
del lines[-1]
lines[-1] = lines[-1] + '\n'
for i in range(len(lines)):
lines[i] = escape(lines[i])
lineterm = '\\n"\n"'
s = '""\n"' + lineterm.join(lines) + '"'
return s
def containsAny(str, set):
"""Check whether 'str' contains ANY of the chars in 'set'"""
return 1 in [c in str for c in set]
def _visit_pyfiles(list, dirname, names):
"""Helper for getFilesForName()."""
# get extension for python source files
if not globals().has_key('_py_ext'):
global _py_ext
_py_ext = [triple[0] for triple in imp.get_suffixes()
if triple[2] == imp.PY_SOURCE][0]
# don't recurse into CVS directories
if 'CVS' in names:
names.remove('CVS')
# add all *.py files to list
list.extend(
[os.path.join(dirname, file) for file in names
if os.path.splitext(file)[1] == _py_ext]
)
def _get_modpkg_path(dotted_name, pathlist=None):
"""Get the filesystem path for a module or a package.
Return the file system path to a file for a module, and to a directory for
a package. Return None if the name is not found, or is a builtin or
extension module.
"""
# split off top-most name
parts = dotted_name.split('.', 1)
if len(parts) > 1:
# we have a dotted path, import top-level package
try:
file, pathname, description = imp.find_module(parts[0], pathlist)
if file: file.close()
except ImportError:
return None
# check if it's indeed a package
if description[2] == imp.PKG_DIRECTORY:
# recursively handle the remaining name parts
pathname = _get_modpkg_path(parts[1], [pathname])
else:
pathname = None
else:
# plain name
try:
file, pathname, description = imp.find_module(
dotted_name, pathlist)
if file:
file.close()
if description[2] not in [imp.PY_SOURCE, imp.PKG_DIRECTORY]:
pathname = None
except ImportError:
pathname = None
return pathname
def getFilesForName(name):
"""Get a list of module files for a filename, a module or package name,
or a directory.
"""
if not os.path.exists(name):
# check for glob chars
if containsAny(name, "*?[]"):
files = glob.glob(name)
list = []
for file in files:
list.extend(getFilesForName(file))
return list
# try to find module or package
name = _get_modpkg_path(name)
if not name:
return []
if os.path.isdir(name):
# find all python files in directory
list = []
os.path.walk(name, _visit_pyfiles, list)
return list
elif os.path.exists(name):
# a single file
return [name]
return []
class TokenEater:
def __init__(self, options):
self.__options = options
self.__messages = {}
self.__state = self.__waiting
self.__data = []
self.__lineno = -1
self.__freshmodule = 1
self.__curfile = None
def __call__(self, ttype, tstring, stup, etup, line):
# dispatch
## import token
## print >> sys.stderr, 'ttype:', token.tok_name[ttype], \
## 'tstring:', tstring
self.__state(ttype, tstring, stup[0])
def __waiting(self, ttype, tstring, lineno):
opts = self.__options
# Do docstring extractions, if enabled
if opts.docstrings and not opts.nodocstrings.get(self.__curfile):
# module docstring?
if self.__freshmodule:
if ttype == tokenize.STRING:
self.__addentry(safe_eval(tstring), lineno, isdocstring=1)
self.__freshmodule = 0
elif ttype not in (tokenize.COMMENT, tokenize.NL):
self.__freshmodule = 0
return
# class docstring?
if ttype == tokenize.NAME and tstring in ('class', 'def'):
self.__state = self.__suiteseen
return
if ttype == tokenize.NAME and tstring in opts.keywords:
self.__state = self.__keywordseen
def __suiteseen(self, ttype, tstring, lineno):
# ignore anything until we see the colon
if ttype == tokenize.OP and tstring == ':':
self.__state = self.__suitedocstring
def __suitedocstring(self, ttype, tstring, lineno):
# ignore any intervening noise
if ttype == tokenize.STRING:
self.__addentry(safe_eval(tstring), lineno, isdocstring=1)
self.__state = self.__waiting
elif ttype not in (tokenize.NEWLINE, tokenize.INDENT,
tokenize.COMMENT):
# there was no class docstring
self.__state = self.__waiting
def __keywordseen(self, ttype, tstring, lineno):
if ttype == tokenize.OP and tstring == '(':
self.__data = []
self.__lineno = lineno
self.__state = self.__openseen
else:
self.__state = self.__waiting
def __openseen(self, ttype, tstring, lineno):
if ttype == tokenize.OP and tstring == ')':
# We've seen the last of the translatable strings. Record the
# line number of the first line of the strings and update the list
# of messages seen. Reset state for the next batch. If there
# were no strings inside _(), then just ignore this entry.
if self.__data:
self.__addentry(EMPTYSTRING.join(self.__data))
self.__state = self.__waiting
elif ttype == tokenize.STRING:
self.__data.append(safe_eval(tstring))
elif ttype not in [tokenize.COMMENT, token.INDENT, token.DEDENT,
token.NEWLINE, tokenize.NL]:
# warn if we see anything else than STRING or whitespace
print >> sys.stderr, _(
'*** %(file)s:%(lineno)s: Seen unexpected token "%(token)s"'
) % {
'token': tstring,
'file': self.__curfile,
'lineno': self.__lineno
}
self.__state = self.__waiting
def __addentry(self, msg, lineno=None, isdocstring=0):
if lineno is None:
lineno = self.__lineno
if not msg in self.__options.toexclude:
entry = (self.__curfile, lineno)
self.__messages.setdefault(msg, {})[entry] = isdocstring
def set_filename(self, filename):
self.__curfile = filename
self.__freshmodule = 1
def write(self, fp):
options = self.__options
timestamp = time.strftime('%Y-%m-%d %H:%M+%Z')
# The time stamp in the header doesn't have the same format as that
# generated by xgettext...
print >> fp, pot_header % {'time': timestamp, 'version': __version__}
# Sort the entries. First sort each particular entry's keys, then
# sort all the entries by their first item.
reverse = {}
for k, v in self.__messages.items():
keys = v.keys()
keys.sort()
reverse.setdefault(tuple(keys), []).append((k, v))
rkeys = reverse.keys()
rkeys.sort()
for rkey in rkeys:
rentries = reverse[rkey]
rentries.sort()
for k, v in rentries:
isdocstring = 0
# If the entry was gleaned out of a docstring, then add a
# comment stating so. This is to aid translators who may wish
# to skip translating some unimportant docstrings.
if reduce(operator.__add__, v.values()):
isdocstring = 1
# k is the message string, v is a dictionary-set of (filename,
# lineno) tuples. We want to sort the entries in v first by
# file name and then by line number.
v = v.keys()
v.sort()
if not options.writelocations:
pass
# location comments are different b/w Solaris and GNU:
elif options.locationstyle == options.SOLARIS:
for filename, lineno in v:
d = {'filename': filename, 'lineno': lineno}
print >>fp, _(
'# File: %(filename)s, line: %(lineno)d') % d
elif options.locationstyle == options.GNU:
# fit as many locations on one line, as long as the
# resulting line length doesn't exceeds 'options.width'
locline = '#:'
for filename, lineno in v:
d = {'filename': filename, 'lineno': lineno}
s = _(' %(filename)s:%(lineno)d') % d
if len(locline) + len(s) <= options.width:
locline = locline + s
else:
print >> fp, locline
locline = "#:" + s
if len(locline) > 2:
print >> fp, locline
if isdocstring:
print >> fp, '#, docstring'
print >> fp, 'msgid', normalize(k)
print >> fp, 'msgstr ""\n'
def main():
global default_keywords
try:
opts, args = getopt.getopt(
sys.argv[1:],
'ad:DEhk:Kno:p:S:Vvw:x:X:',
['extract-all', 'default-domain=', 'escape', 'help',
'keyword=', 'no-default-keywords',
'add-location', 'no-location', 'output=', 'output-dir=',
'style=', 'verbose', 'version', 'width=', 'exclude-file=',
'docstrings', 'no-docstrings',
])
except getopt.error, msg:
usage(1, msg)
# for holding option values
class Options:
# constants
GNU = 1
SOLARIS = 2
# defaults
extractall = 0 # FIXME: currently this option has no effect at all.
escape = 0
keywords = []
outpath = ''
outfile = 'messages.pot'
writelocations = 1
locationstyle = GNU
verbose = 0
width = 78
excludefilename = ''
docstrings = 0
nodocstrings = {}
options = Options()
locations = {'gnu' : options.GNU,
'solaris' : options.SOLARIS,
}
# parse options
for opt, arg in opts:
if opt in ('-h', '--help'):
usage(0)
elif opt in ('-a', '--extract-all'):
options.extractall = 1
elif opt in ('-d', '--default-domain'):
options.outfile = arg + '.pot'
elif opt in ('-E', '--escape'):
options.escape = 1
elif opt in ('-D', '--docstrings'):
options.docstrings = 1
elif opt in ('-k', '--keyword'):
options.keywords.append(arg)
elif opt in ('-K', '--no-default-keywords'):
default_keywords = []
elif opt in ('-n', '--add-location'):
options.writelocations = 1
elif opt in ('--no-location',):
options.writelocations = 0
elif opt in ('-S', '--style'):
options.locationstyle = locations.get(arg.lower())
if options.locationstyle is None:
usage(1, _('Invalid value for --style: %s') % arg)
elif opt in ('-o', '--output'):
options.outfile = arg
elif opt in ('-p', '--output-dir'):
options.outpath = arg
elif opt in ('-v', '--verbose'):
options.verbose = 1
elif opt in ('-V', '--version'):
print _('pygettext.py (xgettext for Python) %s') % __version__
sys.exit(0)
elif opt in ('-w', '--width'):
try:
options.width = int(arg)
except ValueError:
usage(1, _('--width argument must be an integer: %s') % arg)
elif opt in ('-x', '--exclude-file'):
options.excludefilename = arg
elif opt in ('-X', '--no-docstrings'):
fp = open(arg)
try:
while 1:
line = fp.readline()
if not line:
break
options.nodocstrings[line[:-1]] = 1
finally:
fp.close()
# calculate escapes
make_escapes(options.escape)
# calculate all keywords
options.keywords.extend(default_keywords)
# initialize list of strings to exclude
if options.excludefilename:
try:
fp = open(options.excludefilename)
options.toexclude = fp.readlines()
fp.close()
except IOError:
print >> sys.stderr, _(
"Can't read --exclude-file: %s") % options.excludefilename
sys.exit(1)
else:
options.toexclude = []
# resolve args to module lists
expanded = []
for arg in args:
if arg == '-':
expanded.append(arg)
else:
expanded.extend(getFilesForName(arg))
args = expanded
# slurp through all the files
eater = TokenEater(options)
for filename in args:
if filename == '-':
if options.verbose:
print _('Reading standard input')
fp = sys.stdin
closep = 0
else:
if options.verbose:
print _('Working on %s') % filename
fp = open(filename)
closep = 1
try:
eater.set_filename(filename)
try:
tokenize.tokenize(fp.readline, eater)
except tokenize.TokenError, e:
print >> sys.stderr, '%s: %s, line %d, column %d' % (
e[0], filename, e[1][0], e[1][1])
finally:
if closep:
fp.close()
# write the output
if options.outfile == '-':
fp = sys.stdout
closep = 0
else:
if options.outpath:
options.outfile = os.path.join(options.outpath, options.outfile)
fp = open(options.outfile, 'w')
closep = 1
try:
eater.write(fp)
finally:
if closep:
fp.close()
if __name__ == '__main__':
main()
# some more test strings
_(u'a unicode string')
# this one creates a warning
_('*** Seen unexpected token "%(token)s"') % {'token': 'test'}
_('more' 'than' 'one' 'string')

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

81
scripts/upload.py Normal file
View File

@ -0,0 +1,81 @@
#! /usr/bin/env python
""" Upload socializer to the ftp server. This script has been created to be executed from a continuous integrations system.
Important note: for this script to work, the following conditions should be met:
* There must be ftp server data, via environment variables (FTP_SERVER, FTP_USERNAME and FTP_PASSWORD) or via arguments to the script call (in the prior order). Connection to this server is done via default ftp port via TLS.
* this code assumes it's going to connect to an FTP via TLS.
* If the version to upload is alpha, there's not need of an extra variable. Otherwise, CI_COMMIT_TAG should point to a version as vx.x, where v is a literal and x are numbers, example may be v0.18, v0.25, v0.3. This variable should be set in the environment.
* Inside the ftp server, the following directory structure will be expected: socializer.su/static/files/. The script will create the <version> folder or alpha if needed.
* The script will upload all .exe, .zip and .json files located in the root directory from where it was called. The json files are uploaded to socializer.su/static/files/update and other files are going to socializer.su/static/files/<version>.
"""
import sys
import os
import glob
import ftplib
transferred=0
class MyFTP_TLS(ftplib.FTP_TLS):
"""Explicit FTPS, with shared TLS session"""
def ntransfercmd(self, cmd, rest=None):
conn, size = ftplib.FTP.ntransfercmd(self, cmd, rest)
if self._prot_p:
conn = self.context.wrap_socket(conn,
server_hostname=self.host,
session=self.sock.session) # this is the fix
return conn, size
def convert_bytes(n):
K, M, G, T, P = 1 << 10, 1 << 20, 1 << 30, 1 << 40, 1 << 50
if n >= P:
return '%.2fPb' % (float(n) / T)
elif n >= T:
return '%.2fTb' % (float(n) / T)
elif n >= G:
return '%.2fGb' % (float(n) / G)
elif n >= M:
return '%.2fMb' % (float(n) / M)
elif n >= K:
return '%.2fKb' % (float(n) / K)
else:
return '%d' % n
def callback(progress):
global transferred
transferred = transferred+len(progress)
print("Uploaded {}".format(convert_bytes(transferred),))
ftp_server = os.environ.get("FTP_SERVER") or sys.argv[1]
ftp_username = os.environ.get("FTP_USERNAME") or sys.argv[2]
ftp_password = os.environ.get("FTP_PASSWORD") or sys.argv[3]
version = os.environ.get("CI_COMMIT_TAG") or "alpha"
version = version.replace("v", "")
print("Uploading files to the Socializer server...")
print("Connecting to %s" % (ftp_server,))
connection = ftplib.FTP(ftp_server)
print("Connected to FTP server {}".format(ftp_server,))
connection.login(user=ftp_username, passwd=ftp_password)
#connection.prot_p()
print("Logged in successfully")
connection.cwd("socializer")
if version not in connection.nlst():
print("Creating version directory {} because does not exists...".format(version,))
connection.mkd(version)
if "update" not in connection.nlst():
print("Creating update info directory because does not exists...")
connection.mkd("update")
connection.cwd(version)
print("Moved into version directory")
files = glob.glob("*.zip")+glob.glob("*.exe")+glob.glob("*.json")
print("These files will be uploaded into the version folder: {}".format(files,))
for file in files:
transferred = 0
print("Uploading {}".format(file,))
with open(file, "rb") as f:
if file.endswith("json"):
connection.storbinary('STOR ../update/%s' % file, f, callback=callback, blocksize=1024*1024)
else:
connection.storbinary('STOR %s' % file, f, callback=callback, blocksize=1024*1024)
print("Upload completed. exiting...")
connection.quit()

View File

@ -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)]

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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("<", "&lt;"))
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

View File

@ -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

View File

@ -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

View File

@ -1 +0,0 @@
from __future__ import absolute_import from builtins import str import subprocess, os from .base import Output class VoiceOver(Output): """Speech output supporting the Apple VoiceOver screen reader.""" def runAppleScript(self, command, process = 'voiceover'): return subprocess.Popen(['osascript', '-e', 'tell application "' + process + '"\n' + command + '\nend tell'], stdout = subprocess.PIPE).communicate()[0] name = 'VoiceOver' def speak(self, text, interrupt=0): if interrupt: self.silence() os.system('osascript -e \"tell application \\\"voiceover\\\" to output \\\"%s\\\"\" &' % text) def silence (self): self.runAppleScript('output ""') def is_active(self): return self.runAppleScript('return (name of processes) contains "VoiceOver"', 'system events').startswith('true') and not self.runAppleScript('try\nreturn bounds of vo cursor\non error\nreturn false\nend try').startswith('false') output_class = VoiceOver

View File

@ -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

View File

@ -1,4 +1,12 @@
[app-settings]
username = string(default="")
password = string(default="")
language = string(default="system")
use_proxy = boolean(default=False)
first_start = boolean(default=True)
debug_logging = boolean(default=False)
[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")

View File

@ -1,12 +1,20 @@
# -*- coding: utf-8 -*-
import platform
arch = platform.architecture()[0]
name = "Socializer"
version = "0.13"
author = u"Manuel Cortéz"
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"
author = "MCV Software"
authorEmail = "info@mcvsoftware.com"
copyright = "Copyright (C) 2016-2022, MCV Software"
description = name+" Is an accessible VK client for Windows."
url = "https://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
update_url = "https://files.mcvsoftware.com/socializer/update/alpha.json"
# Short_id of the last commit, this is set to none here because it will be set manually by the building tools.
version = "2021.09.22"
update_next_version = "4bdba42e"

View File

@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
import logging
from vkaudiotoken import CommonParams, TokenReceiverOfficial, supported_clients, TokenException, TwoFAHelper
from . import wxUI
log = logging.getLogger("authenticator.official")
class AuthenticationError(Exception): pass
def login(user, password):
""" Generates authentication workflow at VK servers. """
log.info("Authenticating user account.")
access_token = None
try:
params = CommonParams(supported_clients.VK_OFFICIAL.user_agent)
receiver = TokenReceiverOfficial(user, password, params, "GET_CODE")
access_token = receiver.get_token()["access_token"]
log.debug("got a valid access token for {}".format(user))
except TokenException as err:
if err.code == TokenException.TWOFA_REQ and 'validation_sid' in err.extra:
log.debug("User requires two factor verification. Calling methods to send an SMS...")
try:
TwoFAHelper(params).validate_phone(err.extra['validation_sid'])
except TokenException as err:
if err.code == TokenException.TWOFA_ERR:
wxUI.two_auth_limit()
raise AuthenticationError("Error authentication two factor auth.")
code, remember = wxUI.two_factor_auth()
receiver = TokenReceiverOfficial(user, password, params, code)
access_token = receiver.get_token()["access_token"]
return access_token

20
src/authenticator/wxUI.py Normal file
View File

@ -0,0 +1,20 @@
# -*- 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()
def two_auth_limit():
return wx.MessageDialog(None, _("It seems you have reached the limits to request authorization via SMS. Please try it again in a couple of hours."), _("Error requiring sms verification"), wx.ICON_ERROR).ShowModal()

5
src/babel.cfg Normal file
View File

@ -0,0 +1,5 @@
[python: **.py]
input_dirs = .
output_file=socializer.pot
msgid_bugs_address=manuel@manuelcortez.net
copyright_holder=Manuel Cortez

View File

@ -1,4 +1,5 @@
# -*- coding: cp1252 -*-
import os
import config_utils
import paths
import logging
@ -12,5 +13,4 @@ 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))

View File

@ -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

View File

@ -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)

View File

@ -1,499 +0,0 @@
# -*- coding: utf-8 -*-
import languageHandler
import arrow
import wx
import widgetUtils
import messages
import utils
import posts
import player
import output
import logging
import selector
from wxUI.tabs import home
from pubsub import pub
from sessionmanager import session
from mysc.thread_utils import call_threaded
from wxUI import commonMessages, menus
from vk import upload
from vk.exceptions import VkAPIMethodError
log = logging.getLogger("controller.buffers")
class baseBuffer(object):
""" a basic representation of a buffer. Other buffers should be derived from this class"""
def get_post(self):
return self.session.db[self.name]["items"][self.tab.list.get_selected()]
def __init__(self, parent=None, name="", session=None, composefunc=None, *args, **kwargs):
""" parent wx.Treebook: parent for the buffer panel,
name str: Name for saving this buffer's data in the local storage variable,
session sessionmanager.session.vkSession: Session for performing operations in the Vk API. This session should be logged in when this class is instanciated.
composefunc str: This function will be called for composing the result which will be put in the listCtrl. Composefunc should existss in the sessionmanager.session module.
args and kwargs will be passed to get_items()"""
super(baseBuffer, self).__init__()
self.args = args
self.kwargs = kwargs
self.create_tab(parent)
# Add the name to the new control so we could look for it when needed.
self.tab.name = name
self.session = session
self.compose_function = composefunc
self.update_function = "get_page"
self.name = name
self.connect_events()
self.user_key = "source_id"
self.post_key = "post_id"
self.can_get_items = True
def create_tab(self, parent):
""" Creates the Wx panel."""
self.tab = home.homeTab(parent)
def insert(self, item, reversed=False):
""" Add a new item to the list. Uses session.composefunc for parsing the dictionary and create a valid result for putting it in the list."""
item_ = getattr(session, self.compose_function)(item, self.session)
self.tab.list.insert_item(reversed, *item_)
def get_items(self, show_nextpage=False):
""" Retrieves items from the VK API. This function is called repeatedly by the main controller and users could call it implicitly as well with the update buffer option.
show_nextpage boolean: If it's true, it will try to load previous results.
"""
if self.can_get_items == False: return
retrieved = True # Control variable for handling unauthorised/connection errors.
try:
num = getattr(self.session, "get_newsfeed")(show_nextpage=show_nextpage, name=self.name, *self.args, **self.kwargs)
except VkAPIMethodError as err:
print(u"Error {0}: {1}".format(err.code, err.message))
retrieved = err.code
return retrieved
if show_nextpage == False:
if self.tab.list.get_count() > 0 and num > 0:
print "inserting a value"
v = [i for i in self.session.db[self.name]["items"][:num]]
v.reverse()
[self.insert(i, True) for i in v]
else:
[self.insert(i) for i in self.session.db[self.name]["items"][:num]]
else:
if num > 0:
[self.insert(i, False) for i in self.session.db[self.name]["items"][:num]]
return retrieved
def get_more_items(self):
self.get_items(show_nextpage=True)
def post(self, *args, **kwargs):
p = messages.post(title=_(u"Write your post"), caption="", text="")
if p.message.get_response() == widgetUtils.OK:
call_threaded(self.do_last, p=p)
def do_last(self, p):
msg = p.message.get_text().encode("utf-8")
privacy_opts = p.get_privacy_options()
attachments = ""
if hasattr(p, "attachments"):
attachments = self.upload_attachments(p.attachments)
urls = utils.find_urls_in_text(msg)
if len(urls) != 0:
if len(attachments) == 0: attachments = urls[0]
else: attachments += urls[0]
msg = msg.replace(urls[0], "")
self.session.post_wall_status(message=msg, friends_only=privacy_opts, attachments=attachments)
pub.sendMessage("posted", buffer=self.name)
p.message.Destroy()
def upload_attachments(self, attachments):
# To do: Check the caption and description fields for this kind of attachments.
local_attachments = ""
uploader = upload.VkUpload(self.session.vk.client)
for i in attachments:
if i["type"] == "photo":
photos = i["file"]
description = i["description"]
r = uploader.photo_wall(photos, caption=description)
id = r[0]["id"]
owner_id = r[0]["owner_id"]
# self.session.vk.client.photos.edit(photo_id=id, owner_id=owner_id, caption=description)
local_attachments += "photo{0}_{1},".format(owner_id, id)
return local_attachments
def connect_events(self):
widgetUtils.connect_event(self.tab.post, widgetUtils.BUTTON_PRESSED, self.post)
widgetUtils.connect_event(self.tab.list.list, widgetUtils.KEYPRESS, self.get_event)
widgetUtils.connect_event(self.tab.list.list, wx.EVT_LIST_ITEM_RIGHT_CLICK, self.show_menu)
widgetUtils.connect_event(self.tab.list.list, wx.EVT_LIST_KEY_DOWN, self.show_menu_by_key)
self.tab.set_focus_function(self.onFocus)
def show_menu(self, ev, pos=0, *args, **kwargs):
if self.tab.list.get_count() == 0: return
menu = self.get_menu()
if pos != 0:
self.tab.PopupMenu(menu, pos)
else:
self.tab.PopupMenu(menu, ev.GetPosition())
def show_menu_by_key(self, ev):
if self.tab.list.get_count() == 0:
return
if ev.GetKeyCode() == wx.WXK_WINDOWS_MENU:
self.show_menu(widgetUtils.MENU, pos=self.tab.list.list.GetPosition())
def get_menu(self):
m = menus.postMenu()
p = self.get_post()
if p.has_key("likes") == False:
m.like.Enable(False)
elif p["likes"]["user_likes"] == 1:
m.like.Enable(False)
m.dislike.Enable(True)
if p.has_key("comments") == False:
m.comment.Enable(False)
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_post, menuitem=m.open)
widgetUtils.connect_event(m, widgetUtils.MENU, self.do_like, menuitem=m.like)
widgetUtils.connect_event(m, widgetUtils.MENU, self.do_dislike, menuitem=m.dislike)
widgetUtils.connect_event(m, widgetUtils.MENU, self.do_comment, menuitem=m.comment)
return m
def do_like(self, *args, **kwargs):
post = self.get_post()
user = post[self.user_key]
id = post[self.post_key]
if post.has_key("type"):
type_ = post["type"]
else:
type_ = "post"
l = self.session.vk.client.likes.add(owner_id=user, item_id=id, type=type_)
self.session.db[self.name]["items"][self.tab.list.get_selected()]["likes"]["count"] = l["likes"]
self.session.db[self.name]["items"][self.tab.list.get_selected()]["likes"]["user_likes"] = 1
# Translators: This will be used when user presses like.
output.speak(_(u"You liked this"))
def do_dislike(self, *args, **kwargs):
post = self.get_post()
user = post[self.user_key]
id = post[self.post_key]
if post.has_key("type"):
type_ = post["type"]
else:
type_ = "post"
l = self.session.vk.client.likes.delete(owner_id=user, item_id=id, type=type_)
self.session.db[self.name]["items"][self.tab.list.get_selected()]["likes"]["count"] = l["likes"]
self.session.db[self.name]["items"][self.tab.list.get_selected()]["likes"]["user_likes"] = 2
# Translators: This will be user in 'dislike'
output.speak(_(u"You don't like this"))
def do_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")
post = self.get_post()
try:
user = post[self.user_key]
id = post[self.post_key]
self.session.vk.client.wall.addComment(owner_id=user, post_id=id, text=msg)
output.speak(_(u"You've posted a comment"))
except Exception as msg:
print msg
def get_event(self, ev):
if ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown() and ev.ShiftDown(): event = "pause_audio"
elif ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown(): event = "play_audio"
elif ev.GetKeyCode() == wx.WXK_RETURN: event = "open_post"
elif ev.GetKeyCode() == wx.WXK_F5: event = "volume_down"
elif ev.GetKeyCode() == wx.WXK_F6: event = "volume_up"
else:
event = None
ev.Skip()
if event != None:
try:
getattr(self, event)()
except AttributeError:
pass
def volume_down(self):
player.player.volume = player.player.volume-5
def volume_up(self):
player.player.volume = player.player.volume+5
def play_audio(self, *args, **kwargs):
post = self.session.db[self.name]["items"][self.tab.list.get_selected()]
if post.has_key("type") and post["type"] == "audio":
pub.sendMessage("play-audio", audio_object=post["audio"]["items"][0])
def open_post(self, *args, **kwargs):
post = self.session.db[self.name]["items"][self.tab.list.get_selected()]
if post.has_key("type") and post["type"] == "audio":
a = posts.audio(self.session, post["audio"]["items"])
a.dialog.get_response()
a.dialog.Destroy()
elif post.has_key("type") and post["type"] == "friend":
pub.sendMessage("open-post", post_object=post, controller_="friendship")
else:
pub.sendMessage("open-post", post_object=post, controller_="postController")
def pause_audio(self, *args, **kwargs):
player.player.pause()
def remove_buffer(self, mandatory): return False
def get_users(self):
post = self.session.db[self.name]["items"][self.tab.list.get_selected()]
if post.has_key("type") == False:
return [post["from_id"]]
else:
return [post["source_id"]]
def onFocus(self, *args,**kwargs):
""" Function executed when the item in a list is selected.
For this buffer it updates the date of posts in the list."""
post = self.session.db[self.name]["items"][self.tab.list.get_selected()]
original_date = arrow.get(post["date"])
created_at = original_date.humanize(locale=languageHandler.getLanguage())
self.tab.list.list.SetStringItem(self.tab.list.get_selected(), 2, created_at)
class feedBuffer(baseBuffer):
def get_items(self, show_nextpage=False):
if self.can_get_items == False: return
retrieved = True
try:
num = getattr(self.session, "get_page")(show_nextpage=show_nextpage, name=self.name, *self.args, **self.kwargs)
print num
except VkAPIMethodError as err:
print(u"Error {0}: {1}".format(err.code, err.message))
retrieved = err.code
return retrieved
if show_nextpage == False:
if self.tab.list.get_count() > 0 and num > 0:
print "inserting a value"
v = [i for i in self.session.db[self.name]["items"][:num]]
v.reverse()
[self.insert(i, True) for i in v]
else:
[self.insert(i) for i in self.session.db[self.name]["items"][:num]]
return retrieved
def remove_buffer(self, mandatory=False):
if "me_feed" == self.name:
output.speak(_(u"This buffer can't be deleted"))
return False
else:
if mandatory == False:
dlg = commonMessages.remove_buffer()
else:
dlg = widgetUtils.YES
if dlg == widgetUtils.YES:
self.session.db.pop(self.name)
return True
else:
return False
def __init__(self, *args, **kwargs):
super(feedBuffer, self).__init__(*args, **kwargs)
self.user_key = "from_id"
self.post_key = "id"
class audioBuffer(feedBuffer):
def create_tab(self, parent):
self.tab = home.audioTab(parent)
def connect_events(self):
widgetUtils.connect_event(self.tab.play, widgetUtils.BUTTON_PRESSED, self.play_audio)
widgetUtils.connect_event(self.tab.play_all, widgetUtils.BUTTON_PRESSED, self.play_all)
super(audioBuffer, self).connect_events()
def play_audio(self, *args, **kwargs):
selected = self.tab.list.get_selected()
pub.sendMessage("play-audio", audio_object=self.session.db[self.name]["items"][selected])
def open_post(self, *args, **kwargs):
selected = self.tab.list.get_selected()
audios = [self.session.db[self.name]["items"][selected]]
a = posts.audio(self.session, audios)
a.dialog.get_response()
a.dialog.Destroy()
def play_all(self, *args, **kwargs):
selected = self.tab.list.get_selected()
if selected == -1:
selected = 0
audios = [i for i in self.session.db[self.name]["items"][selected:]]
pub.sendMessage("play-audios", audios=audios)
def remove_buffer(self, mandatory=False):
if "me_audio" == self.name or "popular_audio" == self.name or "recommended_audio" == self.name:
output.speak(_(u"This buffer can't be deleted"))
return False
else:
if mandatory == False:
dlg = commonMessages.remove_buffer()
else:
dlg = widgetUtils.YES
if dlg == widgetUtils.YES:
self.session.db.pop(self.name)
return True
else:
return False
def get_more_items(self, *args, **kwargs):
# Translators: Some buffers can't use the get previous item feature due to API limitations.
output.speak(_(u"This buffer doesn't support getting more items."))
def onFocus(self, *args, **kwargs):
pass
def add_to_library(self, *args, **kwargs):
post = self.get_post()
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:
output.speak(_(u"Audio added to your library"))
def remove_from_library(self, *args, **kwargs):
post = self.get_post()
args = {}
args["audio_id"] = post["id"]
args["owner_id"] = self.session.user_id
result = self.session.vk.client.audio.delete(**args)
if int(result) == 1:
output.speak(_(u"Removed audio from library"))
def move_to_album(self, *args, **kwargs):
album = selector.audioAlbum(_(u"Select the album where you want to move this song"), self.session)
if album.item == None: return
id = self.get_post()["id"]
response = self.session.vk.client.audio.moveToAlbum(album_id=album.item, audio_ids=id)
if response == 1:
# Translators: Used when the user has moved an audio to an album.
output.speak(_(u"Moved"))
def get_menu(self):
p = self.get_post()
m = menus.audioMenu()
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_post, menuitem=m.open)
widgetUtils.connect_event(m, widgetUtils.MENU, self.play_audio, menuitem=m.play)
widgetUtils.connect_event(m, widgetUtils.MENU, self.move_to_album, menuitem=m.move)
# if owner_id is the current user, the audio is added to the user's audios.
if p["owner_id"] == self.session.user_id:
m.library.SetItemLabel(_(u"&Remove from library"))
widgetUtils.connect_event(m, widgetUtils.MENU, self.remove_from_library, menuitem=m.library)
else:
widgetUtils.connect_event(m, widgetUtils.MENU, self.add_to_library, menuitem=m.library)
return m
class audioAlbum(audioBuffer):
def create_tab(self, parent):
self.tab = home.audioAlbumTab(parent)
self.tab.play.Enable(False)
self.tab.play_all.Enable(False)
def connect_events(self):
super(audioAlbum, self).connect_events()
widgetUtils.connect_event(self.tab.load, widgetUtils.BUTTON_PRESSED, self.load_album)
def load_album(self, *args, **kwargs):
output.speak(_(u"Loading album..."))
self.can_get_items = True
self.tab.load.Enable(False)
wx.CallAfter(self.get_items)
self.tab.play.Enable(True)
self.tab.play_all.Enable(True)
class empty(object):
def __init__(self, name=None, parent=None, *args, **kwargs):
self.tab = home.empty(parent=parent, name=name)
self.name = name
def get_items(self, *args, **kwargs):
pass
def get_more_items(self, *args, **kwargs):
output.speak(_(u"This buffer doesn't support getting more items."))
def remove_buffer(self, mandatory=False): return False
class chatBuffer(baseBuffer):
def onFocus(self, *args, **kwargs):
msg = self.session.db[self.name]["items"][-1]
if msg["read_state"] == 0 and msg["id"] not in self.reads:
self.reads.append(msg["id"])
self.session.db[self.name]["items"][-1]["read_state"] = 1
def create_tab(self, parent):
self.tab = home.chatTab(parent)
def connect_events(self):
widgetUtils.connect_event(self.tab.send, widgetUtils.BUTTON_PRESSED, self.send_chat_to_user)
self.tab.set_focus_function(self.onFocus)
def get_items(self, show_nextpage=False):
if self.can_get_items == False: return
retrieved = True # Control variable for handling unauthorised/connection errors.
try:
num = getattr(self.session, "get_messages")(name=self.name, *self.args, **self.kwargs)
except VkAPIMethodError as err:
print(u"Error {0}: {1}".format(err.code, err.message))
retrieved = err.code
return retrieved
if show_nextpage == False:
if self.tab.list.get_count() > 0 and num > 0:
print "inserting a value"
v = [i for i in self.session.db[self.name]["items"][:num]]
v.reverse()
[self.insert(i, True) for i in v]
else:
[self.insert(i) for i in self.session.db[self.name]["items"][:num]]
else:
if num > 0:
[self.insert(i, False) for i in self.session.db[self.name]["items"][:num]]
return retrieved
def send_chat_to_user(self, *args, **kwargs):
text = self.tab.text.GetValue()
if text == "": return
response = self.session.vk.client.messages.send(user_id=self.kwargs["user_id"], message=text)
def __init__(self, *args, **kwargs):
super(chatBuffer, self).__init__(*args, **kwargs)
self.reads = []
class peopleBuffer(feedBuffer):
def create_tab(self, parent):
self.tab = home.peopleTab(parent)
def connect_events(self):
super(peopleBuffer, self).connect_events()
widgetUtils.connect_event(self.tab.new_chat, widgetUtils.BUTTON_PRESSED, self.new_chat)
def new_chat(self, *args, **kwargs):
user_id = self.session.db[self.name]["items"][self.tab.list.get_selected()]["id"]
pub.sendMessage("new-chat", user_id=user_id)
def onFocus(self, *args, **kwargs):
post = self.session.db[self.name]["items"][self.tab.list.get_selected()]
if post.has_key("last_seen") == False: return
original_date = arrow.get(post["last_seen"]["time"])
created_at = original_date.humanize(locale=languageHandler.getLanguage())
self.tab.list.list.SetStringItem(self.tab.list.get_selected(), 1, created_at)
def open_timeline(self, *args, **kwargs):
pass
def get_menu(self, *args, **kwargs):
m = menus.peopleMenu()
widgetUtils.connect_event(m, widgetUtils.MENU, self.new_chat, menuitem=m.message)
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_timeline, menuitem=m.timeline)
return m

View File

@ -0,0 +1,15 @@
from .empty import emptyBuffer
from .home import homeBuffer as baseBuffer
from .wall import wallBuffer as feedBuffer
from .communityWall import communityWallBuffer as communityBuffer
from .communityBoard import communityBoardBuffer as topicBuffer
from .documents import documentsBuffer as documentBuffer
from .communityDocuments import communityDocumentsBuffer as documentCommunityBuffer
from .audio import audioBuffer
from .audioAlbum import audioAlbumBuffer as audioAlbum
from .video import videoBuffer
from .videoAlbum import videoAlbumBuffer as videoAlbum
from .chat import chatBuffer
from .people import peopleBuffer
from .friendRequests import friendRequestsBuffer as requestsBuffer
from .communityPeople import communityPeopleBuffer

View File

@ -0,0 +1,309 @@
# -*- coding: utf-8 -*-
import os
import logging
import webbrowser
import wx
import presenters
import views
import interactors
import widgetUtils
from pubsub import pub
from vk_api import upload
from mutagen.id3 import ID3
from presenters import player
from wxUI.tabs import audio
from sessionmanager import utils
from mysc.thread_utils import call_threaded
from wxUI import commonMessages, menus
from controller import selector
from .wall import wallBuffer
log = logging.getLogger("controller.buffers.audio")
class audioBuffer(wallBuffer):
def create_tab(self, parent):
self.tab = audio.audioTab(parent)
self.tab.name = self.name
self.connect_events()
if self.name == "me_audio":
self.tab.post.Enable(True)
def get_event(self, ev):
if ev.GetKeyCode() == wx.WXK_RETURN:
if len(self.tab.list.get_multiple_selection()) < 2:
event = "play_all"
else:
event = "play_audio"
else:
event = None
ev.Skip()
if event != None:
try:
getattr(self, event)(skip_pause=True)
except AttributeError:
pass
def connect_events(self):
widgetUtils.connect_event(self.tab.play, widgetUtils.BUTTON_PRESSED, self.play_audio)
widgetUtils.connect_event(self.tab.play_all, widgetUtils.BUTTON_PRESSED, self.play_all)
pub.subscribe(self.change_label, "playback-changed")
super(audioBuffer, self).connect_events()
def play_audio(self, *args, **kwargs):
if player.player.check_is_playing() and not "skip_pause" in kwargs:
return pub.sendMessage("pause")
selected = self.tab.list.get_multiple_selection()
if len(selected) == 0:
return
elif len(selected) == 1:
pub.sendMessage("play", object=self.session.db[self.name]["items"][selected[0]])
else:
selected_audios = [self.session.db[self.name]["items"][item] for item in selected]
pub.sendMessage("play-all", list_of_songs=selected_audios)
return True
def play_next(self, *args, **kwargs):
selected = self.tab.list.get_selected()
if selected < 0:
selected = 0
if self.tab.list.get_count() <= selected+1:
newpos = 0
else:
newpos = selected+1
self.tab.list.select_item(newpos)
self.play_audio()
def play_previous(self, *args, **kwargs):
selected = self.tab.list.get_selected()
if selected <= 0:
selected = self.tab.list.get_count()
newpos = selected-1
self.tab.list.select_item(newpos)
self.play_audio()
def open_post(self, *args, **kwargs):
selected = self.tab.list.get_multiple_selection()
if len(selected) < 1:
return
audios = [self.session.db[self.name]["items"][audio] for audio in selected]
a = presenters.displayAudioPresenter(session=self.session, postObject=audios, interactor=interactors.displayAudioInteractor(), view=views.displayAudio())
def play_all(self, *args, **kwargs):
selected = self.tab.list.get_selected()
if selected == -1:
selected = 0
if self.name not in self.session.db:
return
audios = [i for i in self.session.db[self.name]["items"][selected:]]
pub.sendMessage("play-all", list_of_songs=audios)
return True
def remove_buffer(self, mandatory=False):
if "me_audio" == self.name or "popular_audio" == self.name or "recommended_audio" == self.name:
output.speak(_("This buffer can't be deleted"))
return False
else:
if mandatory == False:
dlg = commonMessages.remove_buffer()
else:
dlg = widgetUtils.YES
if dlg == widgetUtils.YES:
self.session.db.pop(self.name)
return True
else:
return False
def get_more_items(self, *args, **kwargs):
# Translators: Some buffers can't use the get previous item feature due to API limitations.
output.speak(_("This buffer doesn't support getting more items."))
def onFocus(self, event, *args, **kwargs):
event.Skip()
def add_to_library(self, *args, **kwargs):
call_threaded(self._add_to_library, *args, **kwargs)
def _add_to_library(self, *args, **kwargs):
selected = self.tab.list.get_multiple_selection()
if len(selected) < 1:
return
audios = [self.session.db[self.name]["items"][audio] for audio in selected]
errors_detected = 0
for i in audios:
args = {}
args["audio_id"] = i["id"]
if "album_id" in i:
args["album_id"] = i["album_id"]
args["owner_id"] = i["owner_id"]
try:
audio = self.session.vk.client.audio.add(**args)
except VkApiError:
errors_detected = errors_detected + 1
continue
if audio != None and int(audio) < 21:
errors_detected = errors_detected + 1
if errors_detected == 0:
if len(selected) == 1:
msg = _("Audio added to your library")
elif len(selected) > 1 and len(selected) < 5:
msg = _("{0} audios were added to your library.").format(len(selected),)
else:
msg = _("{audios} audios were added to your library.").format(audios=len(selected),)
output.speak(msg)
else:
output.speak(_("{0} errors occurred while attempting to add {1} audios to your library.").format(errors_detected, len(selected)))
def remove_from_library(self, *args, **kwargs):
call_threaded(self._remove_from_library, *args, **kwargs)
def _remove_from_library(self, *args, **kwargs):
selected = self.tab.list.get_multiple_selection()
if len(selected) < 1:
return
audios = [self.session.db[self.name]["items"][audio] for audio in selected]
errors_detected = 0
audios_removed = 0
for i in range(0, len(selected)):
args = {}
args["audio_id"] = audios[i]["id"]
args["owner_id"] = self.session.user_id
result = self.session.vk.client.audio.delete(**args)
if int(result) != 1:
errors_dtected = errors_detected + 1
else:
self.session.db[self.name]["items"].pop(selected[i]-audios_removed)
self.tab.list.remove_item(selected[i]-audios_removed)
audios_removed = audios_removed + 1
if errors_detected == 0:
if len(selected) == 1:
msg = _("Audio removed.")
elif len(selected) > 1 and len(selected) < 5:
msg = _("{0} audios were removed.").format(len(selected),)
else:
msg = _("{audios} audios were removed.").format(audios=len(selected),)
output.speak(msg)
else:
output.speak(_("{0} errors occurred while attempting to remove {1} audios.").format(errors_detected, len(selected)))
def move_to_album(self, *args, **kwargs):
if len(self.session.audio_albums) == 0:
return commonMessages.no_audio_albums()
album = selector.album(_("Select the album where you want to move this song"), self.session)
if album.item == None:
return
call_threaded(self._move_to_album, album.item, *args, **kwargs)
def _move_to_album(self, album, *args, **kwargs):
selected = self.tab.list.get_multiple_selection()
if len(selected) < 1:
return
audios = [self.session.db[self.name]["items"][audio] for audio in selected]
errors_detected = 0
for i in audios:
id = i["id"]
try:
response = self.session.vk.client.audio.add(playlist_id=album, audio_id=id, owner_id=i["owner_id"])
except VkApiError:
errors_detected = errors_detected + 1
if errors_detected == 0:
if len(selected) == 1:
msg = _("Audio added to playlist.")
elif len(selected) > 1 and len(selected) < 5:
msg = _("{0} audios were added to playlist.").format(len(selected),)
else:
msg = _("{audios} audios were added to playlist.").format(audios=len(selected),)
output.speak(msg)
else:
output.speak(_("{0} errors occurred while attempting to add {1} audios to your playlist.").format(errors_detected, len(selected)))
def get_menu(self):
p = self.get_post()
if p == None:
return
m = menus.audioMenu()
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_post, menuitem=m.open)
widgetUtils.connect_event(m, widgetUtils.MENU, self.play_audio, menuitem=m.play)
widgetUtils.connect_event(m, widgetUtils.MENU, self.move_to_album, menuitem=m.move)
widgetUtils.connect_event(m, widgetUtils.MENU, self.download, menuitem=m.download)
widgetUtils.connect_event(m, widgetUtils.MENU, self.select_all, menuitem=m.select)
widgetUtils.connect_event(m, widgetUtils.MENU, self.deselect_all, menuitem=m.deselect)
# if owner_id is the current user, the audio is added to the user's audios.
if p["owner_id"] == self.session.user_id:
m.library.SetItemLabel(_("&Remove"))
widgetUtils.connect_event(m, widgetUtils.MENU, self.remove_from_library, menuitem=m.library)
else:
widgetUtils.connect_event(m, widgetUtils.MENU, self.add_to_library, menuitem=m.library)
return m
def post(self, *args, **kwargs):
""" Uploads an audio to the current user's library from the computer. """
file = self.tab.get_file_to_upload()
if file == None:
return
audio_tags = ID3(file)
if "TIT2" in audio_tags:
title = audio_tags["TIT2"].text[0]
else:
title = _("Untitled")
if "TPE1" in audio_tags:
artist = audio_tags["TPE1"].text[0]
else:
artist = _("Unknown artist")
uploader = upload.VkUpload(self.session.vk.session_object)
call_threaded(uploader.audio, file, title=title, artist=artist)
def open_in_browser(self, *args, **kwargs):
post = self.get_post()
if post == None:
return
url = "https://vk.com/audio{user_id}_{post_id}".format(user_id=post["owner_id"], post_id=post["id"])
webbrowser.open_new_tab(url)
def change_label(self, stopped):
if hasattr(self.tab, "play"):
if stopped == False:
self.tab.play.SetLabel(_("P&ause"))
else:
self.tab.play.SetLabel(_("P&lay"))
def __del__(self):
pub.unsubscribe(self.change_label, "playback-changed")
def download(self, *args, **kwargs):
selected = self.tab.list.get_multiple_selection()
if len(selected) < 1:
return
audios = [self.session.db[self.name]["items"][audio] for audio in selected]
if len(audios) == 0:
return
elif len(audios) == 1:
multiple = False
filename = utils.safe_filename("{0} - {1}.mp3".format(audios[0]["title"], audios[0]["artist"]))
else:
multiple = True
filename = "" # No default filename for multiple files.
path = self.tab.get_download_path(filename=filename, multiple=multiple)
self.download_threaded(path, multiple, audios)
def download_threaded(self, path, multiple, audios):
if multiple == False:
url = audios[0]["url"]
pub.sendMessage("download-file", url=url, filename=path)
return
else:
downloads = []
for i in audios:
filename = utils.safe_filename("{0} - {1}.mp3".format(i["title"], i["artist"]))
filepath = os.path.join(path, filename)
downloads.append((utils.transform_audio_url(i["url"]), filepath))
pub.sendMessage("download-files", downloads=downloads)
def select_all(self, *args, **kwargs):
items = self.tab.list.list.GetItemCount()
for i in range(0, items):
self.tab.list.list.SetItemImage(i, 1)
def deselect_all(self, *args, **kwargs):
items = self.tab.list.list.GetItemCount()
for i in range(0, items):
self.tab.list.list.SetItemImage(i, 0)

View File

@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
import logging
import wx
import widgetUtils
import output
from wxUI.tabs import audioAlbum
from .audio import audioBuffer
log = logging.getLogger("controller.buffers.audioPlaylist")
class audioAlbumBuffer(audioBuffer):
""" this buffer was supposed to be used with audio albums
but is deprecated as VK removed its audio support for third party apps."""
def create_tab(self, parent):
self.tab = audioAlbum.audioAlbumTab(parent)
self.tab.play.Enable(False)
self.tab.play_all.Enable(False)
self.connect_events()
self.tab.name = self.name
if hasattr(self, "can_post") and self.can_post == False and hasattr(self.tab, "post"):
self.tab.post.Enable(False)
def connect_events(self):
super(audioAlbumBuffer, self).connect_events()
widgetUtils.connect_event(self.tab.load, widgetUtils.BUTTON_PRESSED, self.load_album)
def load_album(self, *args, **kwargs):
output.speak(_("Loading album..."))
self.can_get_items = True
self.tab.load.Enable(False)
wx.CallAfter(self.get_items)
self.tab.play.Enable(True)
self.tab.play_all.Enable(True)

View File

@ -0,0 +1,307 @@
# -*- coding: utf-8 -*-
import time
import random
import logging
import webbrowser
import wx
import presenters
import views
import interactors
import widgetUtils
import output
from pubsub import pub
from vk_api.exceptions import VkApiError
from extra import translator, SpellChecker
from wxUI.tabs import chat
from mysc.thread_utils import call_threaded
from wxUI import commonMessages, menus
from sessionmanager import renderers
from .home import homeBuffer
log = logging.getLogger("controller.buffers.chat")
class chatBuffer(homeBuffer):
def insert(self, item, reversed=False):
""" Add a new item to the list. Uses session.composefunc for parsing the dictionary and create a valid result for putting it in the list."""
# as this tab is based in a text control, we have to overwrite the defaults.
item_ = getattr(renderers, self.compose_function)(item, self.session)
# the self.chat dictionary will have (first_line, last_line) as keys and message ID as a value for looking into it when needed.
# Here we will get first and last line of a chat message appended to the history.
values = self.tab.add_message(item_[0], reverse=reversed)
self.chats[values] = item["id"]
def get_focused_post(self):
""" Gets chat message currently in focus"""
# this function replaces self.get_post for this buffer, as we rely in a TextCtrl control for getting chats.
# Instead of the traditional method to do the trick.
# Get text position here.
position = self.tab.history.PositionToXY(self.tab.history.GetInsertionPoint())
id_ = None
# The dictionary keys should be looked in reverse order as we are interested in the last result only.
for i in reversed(list(self.chats.keys())):
# Check if position[2] (line position) matches with something in self.chats
# (All messages, except the last one, should be able to be matched here).
# position[2]+1 is added because line may start with 0, while in wx.TextCtrl.GetNumberOfLines() it returns a value counting from 1.
if position[2]+1 >= i[0]:
id_ = self.chats[i]
# If we find our chat message, let's skip the rest of the loop.
break
# Retrieve here the object based in id_
if id_ != None:
for i in self.session.db[self.name]["items"]:
if i["id"] == id_:
return i
return False
get_post = get_focused_post
def onFocus(self, event, *args, **kwargs):
if event.GetKeyCode() == wx.WXK_UP or event.GetKeyCode() == wx.WXK_DOWN or event.GetKeyCode() == wx.WXK_START or event.GetKeyCode() == wx.WXK_PAGEUP or event.GetKeyCode() == wx.WXK_PAGEDOWN or event.GetKeyCode() == wx.WXK_END:
msg = self.get_focused_post()
if msg == False: # Handle the case where the last line of the control cannot be matched to anything.
return
# Mark unread conversations as read.
if "read_state" in msg and msg["read_state"] == 0 and "out" in msg and msg["out"] == 0:
self.session.soundplayer.play("message_unread.ogg")
call_threaded(self.session.vk.client.messages.markAsRead, peer_id=self.kwargs["peer_id"])
[i.update(read_state=1) for i in self.session.db[self.name]["items"]]
if "attachments" in msg and len(msg["attachments"]) > 0:
self.tab.attachments.list.Enable(True)
self.attachments = list()
self.tab.attachments.clear()
self.parse_attachments(msg)
else:
self.tab.attachments.list.Enable(False)
self.tab.attachments.clear()
event.Skip()
def create_tab(self, parent):
self.tab = chat.chatTab(parent)
self.attachments = list()
self.connect_events()
self.tab.name = self.name
if hasattr(self, "can_post") and self.can_post == False and hasattr(self.tab, "post"):
self.tab.post.Enable(False)
def connect_events(self):
widgetUtils.connect_event(self.tab.send, widgetUtils.BUTTON_PRESSED, self.send_chat_to_user)
widgetUtils.connect_event(self.tab.attachment, widgetUtils.BUTTON_PRESSED, self.add_attachment)
widgetUtils.connect_event(self.tab.text, widgetUtils.KEYPRESS, self.catch_enter)
widgetUtils.connect_event(self.tab.actions, widgetUtils.BUTTON_PRESSED, self.actions)
self.tab.set_focus_function(self.onFocus)
def catch_enter(self, event, *args, **kwargs):
shift=event.ShiftDown()
if event.GetKeyCode() == wx.WXK_RETURN and shift == False:
return self.send_chat_to_user()
t = time.time()
if event.GetUnicodeKey() != wx.WXK_NONE and t-self.last_keypress > 5:
self.last_keypress = t
call_threaded(self.session.vk.client.messages.setActivity, peer_id=self.kwargs["peer_id"], type="typing")
event.Skip()
def get_items(self, show_nextpage=False):
""" Update buffer with newest items or get older items in the buffer."""
if self.can_get_items == False: return
retrieved = True
try:
num = getattr(self.session, "get_page")(show_nextpage=show_nextpage, name=self.name, *self.args, **self.kwargs)
except VkApiError as err:
log.error("Error {0}: {1}".format(err.code, err.error))
retrieved = err.code
return retrieved
except:
log.exception("Connection error when updating buffer %s. Will try again in 2 minutes" % (self.name,))
return False
if not hasattr(self, "tab"):
# Create GUI associated to this buffer.
self.create_tab(self.parent)
# Add name to the new control so we could look for it when needed.
self.tab.name = self.name
if show_nextpage == False:
if self.tab.history.GetValue() != "" and num > 0:
v = [i for i in self.session.db[self.name]["items"][:num]]
[self.insert(i, False) for i in v]
else:
[self.insert(i) for i in self.session.db[self.name]["items"][:num]]
else:
if num > 0:
# At this point we save more CPU and mathematical work if we just delete everything in the chat history and readd all messages.
# Otherwise we'd have to insert new lines at the top and recalculate positions everywhere else.
# Firstly, we'd have to save the current focused object so we will place the user in the right part of the text after loading everything again.
focused_post = self.get_post()
self.chats = dict()
wx.CallAfter(self.tab.history.SetValue, "")
v = [i for i in self.session.db[self.name]["items"]]
[self.insert(i) for i in v]
# Now it's time to set back the focus in the post.
for i in self.chats.keys():
if self.chats[i] == focused_post["id"]:
line = i[0]
wx.CallAfter(self.tab.history.SetInsertionPoint, self.tab.history.XYToPosition(0, line))
output.speak(_("Items loaded"))
break
if self.unread == True and num > 0:
self.session.db[self.name]["items"][-1].update(read_state=0)
return retrieved
def get_more_items(self):
output.speak(_("Getting more items..."))
call_threaded(self.get_items, show_nextpage=True)
def add_attachment(self, *args, **kwargs):
a = presenters.attachPresenter(session=self.session, view=views.attachDialog(voice_messages=True), interactor=interactors.attachInteractor())
if len(a.attachments) != 0:
self.attachments_to_be_sent = a.attachments
def send_chat_to_user(self, *args, **kwargs):
text = self.tab.text.GetValue()
if text == "" and not hasattr(self, "attachments_to_be_sent"):
wx.Bell()
return
self.tab.text.SetValue("")
post_arguments = dict(random_id = random.randint(0, 100000), peer_id=self.kwargs["peer_id"])
if len(text) > 0:
post_arguments.update(message=text)
if hasattr(self, "attachments_to_be_sent") and len(self.attachments_to_be_sent) > 0:
attachments = self.attachments_to_be_sent[::]
else:
attachments = []
call_threaded(pub.sendMessage, "post", parent_endpoint="messages", child_endpoint="send", from_buffer=self.name, attachments_list=attachments, post_arguments=post_arguments)
if hasattr(self, "attachments_to_be_sent"):
del self.attachments_to_be_sent
def __init__(self, unread=False, *args, **kwargs):
super(chatBuffer, self).__init__(*args, **kwargs)
self.unread = unread
self.chats = dict()
self.peer_typing = 0
self.last_keypress = time.time()
def parse_attachments(self, post):
attachments = []
if "attachments" in post:
for i in post["attachments"]:
# We don't need the photos_list attachment, so skip it.
if i["type"] == "photos_list":
continue
try:
rendered_object = renderers.add_attachment(i)
except:
log.exception("Error parsing the following attachment on chat: %r" % (i,))
attachments.append(rendered_object)
self.attachments.append(i)
self.tab.attachments.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.open_attachment)
self.tab.insert_attachments(attachments)
def open_attachment(self, *args, **kwargs):
index = self.tab.attachments.get_selected()
attachment = self.attachments[index]
if attachment["type"] == "audio":
a = presenters.displayAudioPresenter(session=self.session, postObject=[attachment["audio"]], interactor=interactors.displayAudioInteractor(), view=views.displayAudio())
elif attachment["type"] == "audio_message":
link = attachment["audio_message"]["link_mp3"]
pub.sendMessage("play-message", message_url=link)
elif attachment["type"] == "link":
output.speak(_("Opening URL..."), True)
webbrowser.open_new_tab(attachment["link"]["url"])
elif attachment["type"] == "doc":
output.speak(_("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(_("Opening video in web browser..."), True)
webbrowser.open_new_tab(video_object["player"])
elif attachment["type"] == "photo":
output.speak(_("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 "photo_{0}".format(i,) in attachment["photo"]:
url = attachment["photo"]["photo_{0}".format(i,)]
break
if url != "":
webbrowser.open_new_tab(url)
if attachment["type"] == "wall":
pub.sendMessage("open-post", post_object=attachment["wall"], controller_="displayPost")
else:
log.debug("Unhandled attachment: %r" % (attachment,))
def clear_reads(self):
for i in self.session.db[self.name]["items"]:
if "read_state" in i and i["read_state"] == 0:
i["read_state"] = 1
def remove_buffer(self, mandatory=False):
""" Remove buffer if the current buffer is not the logged user's wall."""
if mandatory == False:
dlg = commonMessages.remove_buffer()
else:
dlg = widgetUtils.YES
if dlg == widgetUtils.YES:
self.session.db.pop(self.name)
return True
else:
return False
def open_in_browser(self, *args, **kwargs):
peer_id = self.kwargs["peer_id"]
url = "https://vk.com/im?sel={peer_id}".format(peer_id=peer_id)
webbrowser.open_new_tab(url)
def actions(self, *args, **kwargs):
menu = menus.toolsMenu()
widgetUtils.connect_event(menu, widgetUtils.MENU, self.translate_action, menuitem=menu.translate)
widgetUtils.connect_event(menu, widgetUtils.MENU, self.spellcheck_action, menuitem=menu.spellcheck)
self.tab.PopupMenu(menu, self.tab.actions.GetPosition())
def translate(self, text):
dlg = translator.gui.translateDialog()
if dlg.get_response() == widgetUtils.OK:
language_dict = translator.translator.available_languages()
for k in language_dict:
if language_dict[k] == dlg.dest_lang.GetStringSelection():
dst = k
msg = translator.translator.translate(text, dst)
dlg.Destroy()
return msg
def spellcheck(self, text):
checker = SpellChecker.spellchecker.spellChecker(text)
if hasattr(checker, "fixed_text"):
final_text = checker.fixed_text
return final_text
def translate_action(self, *args, **kwargs):
text = self.tab.text.GetValue()
if text == "":
wx.Bell()
return
translated = self.translate(text)
if translated != None:
self.tab.text.ChangeValue(translated)
self.tab.text.SetFocus()
def spellcheck_action(self, *args, **kwargs):
text = self.tab.text.GetValue()
fixed = self.spellcheck(text)
if fixed != None:
self.tab.text.ChangeValue(fixed)
self.tab.text.SetFocus()
def translate_message(self, *args, **kwargs):
pass
def spellcheck_message(self, *args, **kwargs):
pass

View File

@ -0,0 +1,68 @@
# -*- coding: utf-8 -*-
""" A buffer is a (virtual) list of items. All items belong to a category (wall posts, messages, persons...)"""
import logging
import webbrowser
import wx
import presenters
import views
import interactors
import widgetUtils
from pubsub import pub
from wxUI.tabs import communityBoard
from mysc.thread_utils import call_threaded
from .wall import wallBuffer
log = logging.getLogger("controller.buffers.communityBoard")
class communityBoardBuffer(wallBuffer):
def create_tab(self, parent):
self.tab = communityBoard.communityBoardTab(parent)
self.connect_events()
self.tab.name = self.name
if "can_create_topic" not in self.session.db["group_info"][self.kwargs["group_id"]*-1] or ("can_create_topic" in self.session.db["group_info"][self.kwargs["group_id"]*-1] and self.session.db["group_info"][self.kwargs["group_id"]*-1]["can_create_topic"] != True):
self.tab.post.Enable(False)
def onFocus(self, event, *args, **kwargs):
event.Skip()
def open_post(self, *args, **kwargs):
""" Opens the currently focused post."""
post = self.get_post()
if post == None:
return
a = presenters.displayTopicPresenter(session=self.session, postObject=post, group_id=self.kwargs["group_id"], interactor=interactors.displayPostInteractor(), view=views.displayTopic())
def open_in_browser(self, *args, **kwargs):
post = self.get_post()
if post == None:
return
# In order to load the selected topic we firstly have to catch the group_id, which is present in self.kwargs
# After getting the group_id we should make it negative
group_id = self.kwargs["group_id"]*-1
url = "https://vk.com/topic{group_id}_{topic_id}".format(group_id=group_id, topic_id=post["id"])
webbrowser.open_new_tab(url)
def post(self, *args, **kwargs):
menu = wx.Menu()
user1 = self.session.get_user(self.session.user_id)
user2 = self.session.get_user(-1*self.kwargs["group_id"])
user = menu.Append(wx.NewId(), _("Post as {user1_nom}").format(**user1))
group = menu.Append(wx.NewId(), _("Post as {user1_nom}").format(**user2))
menu.Bind(widgetUtils.MENU, lambda evt: self._post(evt, 1), group)
menu.Bind(widgetUtils.MENU, lambda evt: self._post(evt, 0), user)
self.tab.post.PopupMenu(menu, self.tab.post.GetPosition())
def _post(self, event, from_group):
owner_id = self.kwargs["group_id"]
user = self.session.get_user(-1*owner_id, key="user1")
title = _("Create topic in {user1_nom}").format(**user)
p = presenters.createPostPresenter(session=self.session, interactor=interactors.createPostInteractor(), view=views.createTopicDialog(title=title, message="", text="", topic_title=""))
if hasattr(p, "text") or hasattr(p, "privacy"):
title = p.view.title.GetValue()
msg = p.text
post_arguments = dict(title=title, text=msg, group_id=owner_id, from_group=from_group)
attachments = []
if hasattr(p, "attachments"):
attachments = p.attachments
call_threaded(pub.sendMessage, "post", parent_endpoint="board", child_endpoint="addTopic", from_buffer=self.name, attachments_list=attachments, post_arguments=post_arguments)

View File

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
import logging
from wxUI.tabs import communityDocuments
from .documents import documentsBuffer
log = logging.getLogger("controller.buffers.communityDocuments")
class communityDocumentsBuffer(documentsBuffer):
can_get_items = True
def create_tab(self, parent):
self.tab = communityDocuments.communityDocumentsTab(parent)
self.connect_events()
self.tab.name = self.name
if hasattr(self, "can_post") and self.can_post == False and hasattr(self.tab, "post"):
self.tab.post.Enable(False)

View File

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
import logging
import wx
import widgetUtils
from .people import peopleBuffer
log = logging.getLogger("controller.buffers.communityPeople")
class communityPeopleBuffer(peopleBuffer):
def get_menu(self, *args, **kwargs):
user = self.get_post()
m = wx.Menu()
if user.get("can_post") == True:
can_post = m.Append(wx.NewId(), _("&Post on user's wall"))
widgetUtils.connect_event(m, widgetUtils.MENU, self.post, menuitem=can_post)
if user.get("can_write_private_message") == True:
can_write_message = m.Append(wx.Id(), _("Send message"))
widgetUtils.connect_event(m, widgetUtils.MENU, self.new_chat, menuitem=can_write_message)
profile = m.Append(wx.NewId(), _("View profile"))
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_person_profile, menuitem=profile)
timeline = m.Append(wx.NewId(), _("Open timeline"))
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_timeline, menuitem=timeline)
open_in_browser = m.Append(wx.NewId(), _("Open in vk.com"))
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_in_browser, menuitem=open_in_browser)
return m

View File

@ -0,0 +1,69 @@
# -*- coding: utf-8 -*-
""" A buffer is a (virtual) list of items. All items belong to a category (wall posts, messages, persons...)"""
import logging
import wx
import presenters
import views
import interactors
import widgetUtils
import output
from pubsub import pub
from wxUI.tabs import communityWall
from mysc.thread_utils import call_threaded
from .wall import wallBuffer
log = logging.getLogger("controller.buffers.communityWall")
class communityWallBuffer(wallBuffer):
def __init__(self, *args, **kwargs):
super(communityWallBuffer, self).__init__(*args, **kwargs)
self.group_id = self.kwargs["owner_id"]
def create_tab(self, parent):
self.tab = communityWall.communityWallTab(parent)
self.connect_events()
self.tab.name = self.name
self.tab.post.Enable(False)
def connect_events(self):
super(communityWallBuffer, self).connect_events()
widgetUtils.connect_event(self.tab.load, widgetUtils.BUTTON_PRESSED, self.load_community)
def load_community(self, *args, **kwargs):
output.speak(_("Loading community..."))
self.can_get_items = True
self.tab.load.Enable(False)
wx.CallAfter(self.get_items)
def get_items(self, *args, **kwargs):
""" This method retrieves community information, useful to show different parts of the community itself."""
if self.can_get_items:
# Strangely, groups.get does not return counters so we need those to show options for loading specific posts for communities.
group_info = self.session.vk.client.groups.getById(group_ids=-1*self.kwargs["owner_id"], fields="counters")[0]
self.session.db["group_info"][self.group_id].update(group_info)
if "can_post" in self.session.db["group_info"][self.group_id] and self.session.db["group_info"][self.group_id]["can_post"] == True:
self.tab.post.Enable(True)
super(communityWallBuffer, self).get_items(*args, **kwargs)
def post(self, *args, **kwargs):
menu = wx.Menu()
user1 = self.session.get_user(self.session.user_id)
user2 = self.session.get_user(self.kwargs["owner_id"])
user = menu.Append(wx.NewId(), _("Post as {user1_nom}").format(**user1))
group = menu.Append(wx.NewId(), _("Post as {user1_nom}").format(**user2))
menu.Bind(widgetUtils.MENU, lambda evt: self._post(evt, 1), group)
menu.Bind(widgetUtils.MENU, lambda evt: self._post(evt, 0), user)
self.tab.post.PopupMenu(menu, self.tab.post.GetPosition())
def _post(self, event, from_group):
owner_id = self.kwargs["owner_id"]
user = self.session.get_user(owner_id, key="user1")
title = _("Post to {user1_nom}'s wall").format(**user)
p = presenters.createPostPresenter(session=self.session, interactor=interactors.createPostInteractor(), view=views.createPostDialog(title=title, message="", text=""))
if hasattr(p, "text") or hasattr(p, "privacy"):
post_arguments=dict(privacy=p.privacy, message=p.text, owner_id=owner_id, from_group=from_group)
attachments = []
if hasattr(p, "attachments"):
attachments = p.attachments
call_threaded(pub.sendMessage, "post", parent_endpoint="wall", child_endpoint="post", from_buffer=self.name, attachments_list=attachments, post_arguments=post_arguments)

View File

@ -0,0 +1,93 @@
# -*- coding: utf-8 -*-
""" A buffer is a (virtual) list of items. All items belong to a category (wall posts, messages, persons...)"""
import logging
import webbrowser
import arrow
import wx
import languageHandler
import widgetUtils
import output
from pubsub import pub
from wxUI.tabs import documents
from sessionmanager import utils
from mysc.thread_utils import call_threaded
from wxUI import menus
from .wall import wallBuffer
log = logging.getLogger("controller.buffers.documents")
class documentsBuffer(wallBuffer):
can_get_items = False
def create_tab(self, parent):
self.tab = documents.documentsTab(parent)
self.connect_events()
self.tab.name = self.name
if hasattr(self, "can_post") and self.can_post == False and hasattr(self.tab, "post"):
self.tab.post.Enable(False)
def onFocus(self, event, *args,**kwargs):
post = self.get_post()
if post == None:
return
original_date = arrow.get(post["date"])
created_at = original_date.humanize(locale=languageHandler.curLang[:2])
self.tab.list.list.SetItem(self.tab.list.get_selected(), 4, created_at)
event.Skip()
def connect_events(self):
super(documentsBuffer, self).connect_events()
# Check if we have a load button in the tab, because documents community buffers don't include it.
if hasattr(self.tab, "load"):
widgetUtils.connect_event(self.tab.load, widgetUtils.BUTTON_PRESSED, self.load_documents)
def load_documents(self, *args, **kwargs):
output.speak(_("Loading documents..."))
self.can_get_items = True
self.tab.load.Enable(False)
wx.CallAfter(self.get_items)
def get_menu(self):
p = self.get_post()
if p == None:
return
if p["owner_id"] == self.session.user_id:
added = True
else:
added = False
m = menus.documentMenu(added)
widgetUtils.connect_event(m, widgetUtils.MENU, self.add_remove_document, menuitem=m.action)
widgetUtils.connect_event(m, widgetUtils.MENU, self.download, menuitem=m.download)
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_in_browser, menuitem=m.open_in_browser)
return m
def add_remove_document(self, *args, **kwargs):
p = self.get_post()
if p == None:
return
if p["owner_id"] == self.session.user_id:
result = self.session.vk.client.docs.delete(owner_id=p["owner_id"], doc_id=p["id"])
if result == 1:
output.speak(_("The document has been successfully deleted."))
self.session.db[self.name]["items"].pop(self.tab.list.get_selected())
self.tab.list.remove_item(self.tab.list.get_selected())
else:
result = self.session.vk.client.docs.add(owner_id=p["owner_id"], doc_id=p["id"])
output.speak(_("The document has been successfully added."))
def download(self, *args, **kwargs):
post = self.get_post()
filename = utils.safe_filename(post["title"])
# If document does not end in .extension we must fix it so the file dialog will save it properly later.
if filename.endswith(post["ext"]) == False:
filename = filename+ "."+post["ext"]
filepath = self.tab.get_download_path(filename)
if filepath != None:
pub.sendMessage("download-file", url=post["url"], filename=filepath)
def open_in_browser(self, *args, **kwargs):
post = self.get_post()
if post == None:
return
url = "https://vk.com/doc{user_id}_{post_id}".format(user_id=post["owner_id"], post_id=post["id"])
webbrowser.open_new_tab(url)

View File

@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
""" A buffer is a (virtual) list of items. All items belong to a category (wall posts, messages, persons...)"""
import logging
import output
from wxUI.tabs import empty
log = logging.getLogger("controller.buffers.empty")
class emptyBuffer(object):
def __init__(self, name=None, parent=None, *args, **kwargs):
self.tab = empty.emptyTab(parent=parent, name=name)
self.name = name
def get_items(self, *args, **kwargs):
if not hasattr(self, "tab"):
# Create GUI associated to this buffer.
self.create_tab(self.parent)
# Add name to the new control so we could look for it when needed.
self.tab.name = self.name
pass
def get_more_items(self, *args, **kwargs):
output.speak(_("This buffer doesn't support getting more items."))
def remove_buffer(self, mandatory=False):
return False

View File

@ -0,0 +1,81 @@
# -*- coding: utf-8 -*-
import logging
import wx
from pubsub import pub
from vk_api.exceptions import VkApiError
from .people import peopleBuffer
log = logging.getLogger("controller.buffers.friendRequests")
class friendRequestsBuffer(peopleBuffer):
def get_items(self, show_nextpage=False):
if self.can_get_items == False: return
retrieved = True
try:
ids = self.session.vk.client.friends.getRequests(*self.args, **self.kwargs)
except VkApiError as err:
log.error("Error {0}: {1}".format(err.code, err.error))
retrieved = err.code
return retrieved
except:
log.exception("Connection error when updating buffer %s. Will try again in 2 minutes" % (self.name,))
return False
num = self.session.get_page(name=self.name, show_nextpage=show_nextpage, endpoint="get", parent_endpoint="users", count=1000, user_ids=", ".join([str(i) for i in ids["items"]]), fields="uid, first_name, last_name, last_seen")
if not hasattr(self, "tab"):
# Create GUI associated to this buffer.
self.create_tab(self.parent)
# Add name to the new control so we could look for it when needed.
self.tab.name = self.name
if show_nextpage == False:
if self.tab.list.get_count() > 0 and num > 0:
v = [i for i in self.session.db[self.name]["items"][:num]]
v.reverse()
[wx.CallAfter(self.insert, i, True) for i in v]
else:
[wx.CallAfter(self.insert, i) for i in self.session.db[self.name]["items"][:num]]
return retrieved
def accept_friendship(self, *args, **kwargs):
""" Adds a person to a list of friends. This method is done for accepting someone else's friend request.
https://vk.com/dev/friends.add
"""
person = self.get_post()
if person == None:
return
result = self.session.vk.client.friends.add(user_id=person["id"])
if result == 2:
msg = _("{0} {1} now is your friend.").format(person["first_name"], person["last_name"])
pub.sendMessage("notify", message=msg)
self.session.db[self.name]["items"].pop(self.tab.list.get_selected())
self.tab.list.remove_item(self.tab.list.get_selected())
def decline_friendship(self, *args, **kwargs):
""" Declines a freind request.
https://vk.com/dev/friends.delete
"""
person = self.get_post()
if person == None:
return
result = self.session.vk.client.friends.delete(user_id=person["id"])
if "out_request_deleted" in result:
msg = _("You've deleted the friends request to {0} {1}.").format(person["first_name"], person["last_name"])
elif "in_request_deleted" in result:
msg = _("You've declined the friend request of {0} {1}.").format(person["first_name"], person["last_name"])
pub.sendMessage("notify", message=msg)
self.session.db[self.name]["items"].pop(self.tab.list.get_selected())
self.tab.list.remove_item(self.tab.list.get_selected())
def keep_as_follower(self, *args, **kwargs):
""" Adds a person to The followers list of the current user.
https://vk.com/dev/friends.add
"""
person = self.get_post()
if person == None:
return
result = self.session.vk.client.friends.add(user_id=person["id"], follow=1)
if result == 2:
msg = _("{0} {1} is following you.").format(person["first_name"], person["last_name"])
pub.sendMessage("notify", message=msg)
self.session.db[self.name]["items"].pop(self.tab.list.get_selected())
self.tab.list.remove_item(self.tab.list.get_selected())

View File

@ -0,0 +1,332 @@
# -*- coding: utf-8 -*-
import logging
import webbrowser
import arrow
import wx
import presenters
import views
import interactors
import languageHandler
import widgetUtils
import output
from pubsub import pub
from vk_api.exceptions import VkApiError
from presenters import player
from wxUI.tabs import home
from sessionmanager import session, renderers
from mysc.thread_utils import call_threaded
from wxUI import commonMessages, menus
log = logging.getLogger("controller.buffers.home")
class homeBuffer(object):
""" a basic representation of a buffer. Other buffers should be derived from this class. This buffer represents the "news feed" """
def get_post(self):
""" Return the currently focused post."""
# Handle case where there are no items in the buffer.
if self.tab.list.get_count() == 0:
wx.Bell()
return None
return self.session.db[self.name]["items"][self.tab.list.get_selected()]
def __init__(self, parent=None, name="", session=None, composefunc=None, create_tab=True, *args, **kwargs):
""" Constructor:
@parent wx.Treebook: parent for the buffer panel,
@name str: Name for saving this buffer's data in the local storage variable,
@session sessionmanager.session.vkSession: Session for performing operations in the Vk API. This session should be logged in when this class is instanciated.
@composefunc str: This function will be called for composing the result which will be put in the listCtrl. Composefunc should exist in the sessionmanager.renderers module.
args and kwargs will be passed to get_items() without any filtering. Be careful there.
"""
super(homeBuffer, self).__init__()
self.parent = parent
self.args = args
self.kwargs = kwargs
self.session = session
self.compose_function = composefunc
self.name = name
if create_tab:
self.create_tab(self.parent)
#Update_function will be called every 3 minutes and it should be able to
# Get all new items in the buffer and sort them properly in the CtrlList.
# ToDo: Shall we allow dinamically set for update_function?
self.update_function = "get_page"
self.name = name
# source_key and post_key will point to the keys for sender and posts in VK API objects.
# They can be changed in the future for other item types in different buffers.
self.user_key = "source_id"
self.post_key = "post_id"
# When set to False, update_function won't be executed here.
self.can_get_items = True
def create_tab(self, parent):
""" Create the Wx panel."""
self.tab = home.homeTab(parent)
# Bind local events (they will respond to events happened in the buffer).
self.connect_events()
self.tab.name = self.name
if hasattr(self, "can_post") and self.can_post == False and hasattr(self.tab, "post"):
self.tab.post.Enable(False)
def insert(self, item, reversed=False):
""" Add a new item to the list. Uses renderers.composefunc for parsing the dictionary and create a valid result for putting it in the list."""
try:
item_ = getattr(renderers, self.compose_function)(item, self.session)
wx.CallAfter(self.tab.list.insert_item, reversed, *item_)
except:
log.exception(item)
def get_items(self, show_nextpage=False):
""" Retrieve items from the VK API. This function is called repeatedly by the main controller and users could call it implicitly as well with the update buffer option.
@show_nextpage boolean: If it's true, it will try to load previous results.
"""
if self.can_get_items == False: return
retrieved = True # Control variable for handling unauthorised/connection errors.
try:
num = getattr(self.session, "get_newsfeed")(show_nextpage=show_nextpage, name=self.name, *self.args, **self.kwargs)
except VkApiError as err:
log.error("Error {0}: {1}".format(err.code, err.error))
retrieved = err.code
return retrieved
except:
log.exception("Connection error when updating buffer %s. Will try again in 2 minutes" % (self.name,))
return False
if not hasattr(self, "tab"):
# Create GUI associated to this buffer.
self.create_tab(self.parent)
# Add name to the new control so we could look for it when needed.
if show_nextpage == False:
if self.tab.list.get_count() > 0 and num > 0:
v = [i for i in self.session.db[self.name]["items"][:num]]
v.reverse()
[wx.CallAfter(self.insert, i, True) for i in v]
else:
[wx.CallAfter(self.insert, i) for i in self.session.db[self.name]["items"][:num]]
else:
if num > 0:
[wx.CallAfter(self.insert, i, False) for i in self.session.db[self.name]["items"][-num:]]
return retrieved
def get_more_items(self):
""" Returns previous items in the buffer."""
self.get_items(show_nextpage=True)
def post(self, *args, **kwargs):
""" Create a post in the current user's wall.
This process is handled in two parts. This is the first part, where the GUI is created and user can send the post.
During the second part (threaded), the post will be sent to the API."""
p = presenters.createPostPresenter(session=self.session, interactor=interactors.createPostInteractor(), view=views.createPostDialog(title=_("Write your post"), message="", text=""))
if hasattr(p, "text") or hasattr(p, "privacy"):
post_arguments=dict(privacy=p.privacy, message=p.text)
attachments = []
if hasattr(p, "attachments"):
attachments = p.attachments
call_threaded(pub.sendMessage, "post", parent_endpoint="wall", child_endpoint="post", from_buffer=self.name, attachments_list=attachments, post_arguments=post_arguments)
def connect_events(self):
""" Bind all events to this buffer"""
widgetUtils.connect_event(self.tab.post, widgetUtils.BUTTON_PRESSED, self.post)
widgetUtils.connect_event(self.tab.list.list, widgetUtils.KEYPRESS, self.get_event)
widgetUtils.connect_event(self.tab.list.list, wx.EVT_CONTEXT_MENU, self.show_menu)
self.tab.set_focus_function(self.onFocus)
def show_menu(self, ev, pos=0, *args, **kwargs):
""" Show contextual menu when pressing menu key or right mouse click in a list item."""
if self.tab.list.get_count() == 0: return
menu = self.get_menu()
if pos != 0:
self.tab.PopupMenu(menu, pos)
else:
self.tab.PopupMenu(menu, self.tab.list.list.GetPosition())
def show_menu_by_key(self, ev):
""" Show contextual menu when menu key is pressed"""
if self.tab.list.get_count() == 0:
return
if ev.GetKeyCode() == wx.WXK_WINDOWS_MENU:
self.show_menu(widgetUtils.MENU, pos=self.tab.list.list.GetPosition())
def get_menu(self):
""" Returns contextual menu options. They will change according to the focused item"""
p = self.get_post()
if p == None:
return
# determine if the current user is able to delete the object.
if "can_delete" in p:
can_delete = True==p["can_delete"]
else:
can_delete = False
m = menus.postMenu(can_delete=can_delete)
if ("likes" in p) == False:
m.like.Enable(False)
elif p["likes"]["user_likes"] == 1:
m.like.Enable(False)
m.dislike.Enable(True)
if ("comments" in p) == False:
m.comment.Enable(False)
m.open_in_browser.Enable(False)
if "type" in p and p["type"] != "friend" and p["type"] != "audio" and p["type"] != "video" and p["type"] != "playlist" or self.name != "home_timeline":
m.open_in_browser.Enable(True)
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_post, menuitem=m.open)
widgetUtils.connect_event(m, widgetUtils.MENU, self.do_like, menuitem=m.like)
widgetUtils.connect_event(m, widgetUtils.MENU, self.do_dislike, menuitem=m.dislike)
widgetUtils.connect_event(m, widgetUtils.MENU, self.do_comment, menuitem=m.comment)
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_in_browser, menuitem=m.open_in_browser)
if hasattr(m, "view_profile"):
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_person_profile, menuitem=m.view_profile)
if hasattr(m, "delete"):
widgetUtils.connect_event(m, widgetUtils.MENU, self.delete, menuitem=m.delete)
return m
def do_like(self, *args, **kwargs):
""" Set like in the currently focused post."""
post = self.get_post()
if post == None:
return
user = post[self.user_key]
id = post[self.post_key]
if "type" in post:
type_ = post["type"]
else:
type_ = "post"
l = self.session.vk.client.likes.add(owner_id=user, item_id=id, type=type_)
self.session.db[self.name]["items"][self.tab.list.get_selected()]["likes"]["count"] = l["likes"]
self.session.db[self.name]["items"][self.tab.list.get_selected()]["likes"]["user_likes"] = 1
# Translators: This will be used when user presses like.
output.speak(_("You liked this"))
def do_dislike(self, *args, **kwargs):
""" Set dislike (undo like) in the currently focused post."""
post = self.get_post()
if post == None:
return
user = post[self.user_key]
id = post[self.post_key]
if "type" in post:
type_ = post["type"]
else:
type_ = "post"
l = self.session.vk.client.likes.delete(owner_id=user, item_id=id, type=type_)
self.session.db[self.name]["items"][self.tab.list.get_selected()]["likes"]["count"] = l["likes"]
self.session.db[self.name]["items"][self.tab.list.get_selected()]["likes"]["user_likes"] = 2
# Translators: This will be user in 'dislike'
output.speak(_("You don't like this"))
def do_comment(self, *args, **kwargs):
""" Make a comment into the currently focused post."""
post = self.get_post()
if post == None:
return
comment = presenters.createPostPresenter(session=self.session, interactor=interactors.createPostInteractor(), view=views.createPostDialog(title=_("Add a comment"), message="", text="", mode="comment"))
if hasattr(comment, "text") or hasattr(comment, "privacy"):
msg = comment.text
try:
user = post[self.user_key]
id = post[self.post_key]
self.session.vk.client.wall.addComment(owner_id=user, post_id=id, text=msg)
output.speak(_("You've posted a comment"))
except Exception as msg:
log.error(msg)
def delete(self, *args, **kwargs):
post = self.get_post()
if ("type" in post and post["type"] == "post") or self.name != "newsfeed":
question = commonMessages.remove_post()
if question == widgetUtils.NO:
return
if "owner_id" in self.kwargs:
result = self.session.vk.client.wall.delete(owner_id=self.kwargs["owner_id"], post_id=post[self.post_key])
else:
result = self.session.vk.client.wall.delete(post_id=post[self.post_key])
pub.sendMessage("post_deleted", post_id=post[self.post_key])
self.session.db[self.name]["items"].pop(self.tab.list.get_selected())
self.tab.list.remove_item(self.tab.list.get_selected())
def get_event(self, ev):
""" Parses keyboard input in the ListCtrl and executes the event associated with user keypresses."""
if ev.GetKeyCode() == wx.WXK_RETURN: event = "open_post"
else:
event = None
ev.Skip()
if event != None:
try:
getattr(self, event)()
except AttributeError:
pass
def volume_down(self):
""" Decreases player volume by 2%"""
player.player.volume = player.player.volume-2
def volume_up(self):
""" Increases player volume by 2%"""
player.player.volume = player.player.volume+2
def play_audio(self, *args, **kwargs):
""" Play audio in currently focused buffer, if possible."""
post = self.get_post()
if post == None:
return
if "type" in post and post["type"] == "audio":
pub.sendMessage("play", object=post["audio"]["items"][0])
return True
def open_person_profile(self, *args, **kwargs):
""" Views someone's profile."""
selected = self.get_post()
if selected == None:
return
# Check all possible keys for an user object in VK API.
keys = ["from_id", "source_id", "id"]
for i in keys:
if i in selected:
pub.sendMessage("user-profile", person=selected[i])
break
def open_post(self, *args, **kwargs):
""" Opens the currently focused post."""
post = self.get_post()
if post == None:
return
if "type" in post and post["type"] == "audio":
a = presenters.displayAudioPresenter(session=self.session, postObject=post["audio"]["items"], interactor=interactors.displayAudioInteractor(), view=views.displayAudio())
elif "type" in post and post["type"] == "friend":
pub.sendMessage("open-post", post_object=post, controller_="displayFriendship", vars=dict(caption=_("{user1_nom} added the following friends")))
else:
pub.sendMessage("open-post", post_object=post, controller_="displayPost")
def pause_audio(self, *args, **kwargs):
""" pauses audio playback."""
pub.sendMessage("pause")
def remove_buffer(self, mandatory):
""" Function for removing a buffer. Returns True if removal is successful, False otherwise"""
return False
def get_users(self):
""" Returns source user in the post."""
post = self.get_post()
if post == None:
return
if ("type" in post) == False:
return [post["from_id"]]
else:
return [post["source_id"]]
def onFocus(self, event, *args,**kwargs):
""" Function executed when the item in a list is selected.
For this buffer it updates the date of posts in the list."""
post = self.get_post()
if post == None:
return
original_date = arrow.get(post["date"])
created_at = original_date.humanize(locale=languageHandler.curLang[:2])
self.tab.list.list.SetItem(self.tab.list.get_selected(), 2, created_at)
event.Skip()
def open_in_browser(self, *args, **kwargs):
post = self.get_post()
if post == None:
return
url = "https://vk.com/wall{user_id}_{post_id}".format(user_id=post["source_id"], post_id=post["post_id"])
webbrowser.open_new_tab(url)

View File

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
import logging
from wxUI.tabs import notification
from .wall import wallBuffer
log = logging.getLogger("controller.buffers")
class notificationBuffer(wallBuffer):
def create_tab(self, parent):
self.tab = notification.notificationTab(parent)
self.connect_events()
self.tab.name = self.name
def onFocus(self, event, *args, **kwargs):
event.Skip()

View File

@ -0,0 +1,225 @@
# -*- coding: utf-8 -*-
""" A buffer is a (virtual) list of items. All items belong to a category (wall posts, messages, persons...)"""
import time
import logging
import webbrowser
import arrow
import wx
import presenters
import views
import interactors
import languageHandler
import widgetUtils
from pubsub import pub
from wxUI.tabs import people
from wxUI.dialogs import timeline
from mysc.thread_utils import call_threaded
from wxUI import commonMessages, menus
from .wall import wallBuffer
log = logging.getLogger("controller.buffers.friends")
class peopleBuffer(wallBuffer):
def post(self, *args, **kwargs):
user = self.get_post()
if "can_post" not in user: # retrieve data if not present in the object.
user = self.session.vk.client.users.get(user_ids=user["id"], fields="can_post")[0]
if user.get("can_post") == True:
user_str = self.session.get_user(user["id"], key="user1")
title = _("Post to {user1_nom}'s wall").format(**user_str)
p = presenters.createPostPresenter(session=self.session, interactor=interactors.createPostInteractor(), view=views.createPostDialog(title=title, message="", text=""))
if hasattr(p, "text") or hasattr(p, "privacy"):
post_arguments=dict(privacy=p.privacy, message=p.text, owner_id=user["id"])
attachments = []
if hasattr(p, "attachments"):
attachments = p.attachments
call_threaded(pub.sendMessage, "post", parent_endpoint="wall", child_endpoint="post", from_buffer=self.name, attachments_list=attachments, post_arguments=post_arguments)
def create_tab(self, parent):
self.tab = people.peopleTab(parent)
self.connect_events()
self.tab.name = self.name
if hasattr(self, "can_post") and self.can_post == False and hasattr(self.tab, "post"):
self.tab.post.Enable(False)
def connect_events(self):
super(peopleBuffer, self).connect_events()
widgetUtils.connect_event(self.tab.new_chat, widgetUtils.BUTTON_PRESSED, self.new_chat)
def new_chat(self, *args, **kwargs):
user = self.get_post()
if user == None:
return
user_id = user["id"]
pub.sendMessage("new-chat", user_id=user_id)
def onFocus(self, *args, **kwargs):
post = self.get_post()
if post == None:
return
if post.get("can_post") == True:
self.tab.post.Enable(True)
else:
self.tab.post.Enable(False)
# Check if we are allowed to contact people. this might be false for communitiy members.
if post.get("can_write_private_message") == True:
self.tab.new_chat.Enable(True)
else:
self.tab.new_chat.Enable(False)
if ("last_seen" in post) == False: return
original_date = arrow.get(post["last_seen"]["time"])
now = arrow.now()
original_date.to(now.tzinfo)
diffdate = now-original_date
if diffdate.days == 0 and diffdate.seconds <= 360:
online_status = _("Online")
else:
# Translators: This is the date of last seen
online_status = _("Last seen {0}").format(original_date.humanize(locale=languageHandler.curLang[:2]),)
self.tab.list.list.SetItem(self.tab.list.get_selected(), 1, online_status)
def open_timeline(self, *args, **kwargs):
user = self.get_post()
if user == None:
return
a = timeline.timelineDialog([self.session.get_user(user["id"])["user1_gen"]], show_selector=False)
if a.get_response() == widgetUtils.OK:
buffer_type = a.get_buffer_type()
user_id = user["id"]
pub.sendMessage("create-timeline", user_id=user_id, buffer_type=buffer_type)
def get_menu(self, *args, **kwargs):
""" display menu for people buffers (friends and requests)"""
# If this is an incoming requests buffer, there is a flag in the peopleMenu that shows a few new options.
# So let's make sure we call it accordingly.
if self.name == "friend_requests":
m = menus.peopleMenu(is_request=True)
# Connect the accept and decline methods from here.
widgetUtils.connect_event(m, widgetUtils.MENU, self.accept_friendship, menuitem=m.accept)
widgetUtils.connect_event(m, widgetUtils.MENU, self.decline_friendship, menuitem=m.decline)
widgetUtils.connect_event(m, widgetUtils.MENU, self.keep_as_follower, menuitem=m.keep_as_follower)
elif self.name == "subscribers":
m = menus.peopleMenu(is_subscriber=True)
widgetUtils.connect_event(m, widgetUtils.MENU, self.accept_friendship, menuitem=m.add)
else:
m = menus.peopleMenu(is_request=False)
widgetUtils.connect_event(m, widgetUtils.MENU, self.decline_friendship, menuitem=m.decline)
widgetUtils.connect_event(m, widgetUtils.MENU, self.block_person, menuitem=m.block)
# It is not allowed to send messages to people who is not your friends, so let's disable it if we're in a pending or outgoing requests buffer.
if "friend_requests" in self.name:
m.message.Enable(False)
widgetUtils.connect_event(m, widgetUtils.MENU, self.new_chat, menuitem=m.message)
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_timeline, menuitem=m.timeline)
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_person_profile, menuitem=m.view_profile)
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_in_browser, menuitem=m.open_in_browser)
return m
def open_post(self, *args, **kwargs): pass
def play_audio(self, *args, **kwargs): return False
def pause_audio(self, *args, **kwargs): pass
def accept_friendship(self, *args, **kwargs):
pass
def decline_friendship(self, *args, **kwargs):
person = self.get_post()
if person == None:
return
user = self.session.get_user(person["id"])
question = commonMessages.remove_friend(user)
if question == widgetUtils.NO:
return
result = self.session.vk.client.friends.delete(user_id=person["id"])
if "friend_deleted" in result:
msg = _("You've removed {user1_nom} from your friends.").format(**user,)
pub.sendMessage("notify", message=msg)
self.session.db[self.name]["items"].pop(self.tab.list.get_selected())
self.tab.list.remove_item(self.tab.list.get_selected())
def block_person(self, *args, **kwargs):
person = self.get_post()
if person == None:
return
user = self.session.get_user(person["id"])
question = commonMessages.block_person(user)
if question == widgetUtils.NO:
return
result = self.session.vk.client.account.ban(owner_id=person["id"])
if result == 1:
msg = _("You've blocked {user1_nom} from your friends.").format(**user,)
pub.sendMessage("notify", message=msg)
self.session.db[self.name]["items"].pop(self.tab.list.get_selected())
self.tab.list.remove_item(self.tab.list.get_selected())
def keep_as_follower(self, *args, **kwargs):
pass
def add_person(self, person):
# This tracks if the user already exists here, in such case we just will update the last_seen variable
existing = False
for i in self.session.db[self.name]["items"]:
if person["id"] == i["id"]:
existing = True
i["last_seen"]["time"] = person["last_seen"]["time"]
break
# Add the new user to the buffer just if it does not exists previously.
if existing == False:
# Ensure the user won't loose the focus after the new item is added.
focused_item = self.tab.list.get_selected()+1
self.session.db[self.name]["items"].insert(0, person)
self.insert(person, True)
# Selects back the previously focused item.
self.tab.list.select_item(focused_item)
def remove_person(self, user_id):
# Make sure the user is present in the buffer, otherwise don't attempt to remove a None Value from the list.
user = None
focused_user = self.get_post()
for i in self.session.db[self.name]["items"]:
if i["id"] == user_id:
user = i
break
if user != None:
person_index = self.session.db[self.name]["items"].index(user)
focused_item = self.tab.list.get_selected()
self.session.db[self.name]["items"].pop(person_index)
self.tab.list.remove_item(person_index)
if user != focused_user:
# Let's find the position of the previously focused user.
focus = None
for i in range(0, len(self.session.db[self.name]["items"])):
if focused_user["id"] == self.session.db[self.name]["items"][i]["id"]:
self.tab.list.select_item(i)
return
elif user == focused_user and person_index < self.tab.list.get_count():
self.tab.list.select_item(person_index)
else:
self.tab.list.select_item(self.tab.list.get_count()-1)
def get_friend(self, user_id):
for i in self.session.db["friends_"]["items"]:
if i["id"] == user_id:
return i
log.exception("Getting user manually...")
user = self.session.vk.client.users.get(user_ids=event.user_id, fields="last_seen")[0]
return user
def update_online(self):
online_users = self.session.vk.client.friends.getOnline()
now = time.time()
for i in self.session.db[self.name]["items"]:
if i["id"] in online_users:
i["last_seen"]["time"] = now
else:
log.exception("Removing an user from online status manually... %r" % (i))
self.remove_person(i["id"])
def open_in_browser(self, *args, **kwargs):
post = self.get_post()
if post == None:
return
url = "https://vk.com/id{user_id}".format(user_id=post["id"])
webbrowser.open_new_tab(url)

View File

@ -0,0 +1,125 @@
# -*- coding: utf-8 -*-
import logging
import webbrowser
import wx
import widgetUtils
import output
from wxUI.tabs import video
from wxUI import commonMessages, menus
from controller import selector
from .wall import wallBuffer
log = logging.getLogger("controller.buffers.video")
class videoBuffer(wallBuffer):
""" This buffer represents video elements, and it can be used for showing videos for the logged user or someone else."""
def create_tab(self, parent):
self.tab = video.videoTab(parent)
self.connect_events()
self.tab.name = self.name
if hasattr(self, "can_post") and self.can_post == False and hasattr(self.tab, "post"):
self.tab.post.Enable(False)
def connect_events(self):
widgetUtils.connect_event(self.tab.play, widgetUtils.BUTTON_PRESSED, self.play_audio)
super(videoBuffer, self).connect_events()
def play_audio(self, *args, **kwargs):
""" Due to inheritance this method should be called play_audio, but play the currently focused video.
Opens a webbrowser pointing to the video's URL."""
selected = self.tab.list.get_selected()
if self.tab.list.get_count() == 0:
return
if selected == -1:
selected = 0
output.speak(_("Opening video in webbrowser..."))
webbrowser.open_new_tab(self.session.db[self.name]["items"][selected]["player"])
# print self.session.db[self.name]["items"][selected]
return True
def open_post(self, *args, **kwargs):
pass
def remove_buffer(self, mandatory=False):
if "me_video" == self.name:
output.speak(_("This buffer can't be deleted"))
return False
else:
if mandatory == False:
dlg = commonMessages.remove_buffer()
else:
dlg = widgetUtils.YES
if dlg == widgetUtils.YES:
self.session.db.pop(self.name)
return True
else:
return False
def get_more_items(self, *args, **kwargs):
# Translators: Some buffers can't use the get previous item feature due to API limitations.
output.speak(_("This buffer doesn't support getting more items."))
def onFocus(self, event, *args, **kwargs):
event.Skip()
def add_to_library(self, *args, **kwargs):
post = self.get_post()
if post == None:
return
args = {}
args["video_id"] = post["id"]
if "album_id" in post:
args["album_id"] = post["album_id"]
args["owner_id"] = post["owner_id"]
video = self.session.vk.client.video.add(**args)
if video != None and int(video) > 21:
output.speak(_("Video added to your library"))
def remove_from_library(self, *args, **kwargs):
post = self.get_post()
if post == None:
return
args = {}
args["video_id"] = post["id"]
args["owner_id"] = self.session.user_id
result = self.session.vk.client.video.delete(**args)
if int(result) == 1:
output.speak(_("Removed video from library"))
self.tab.list.remove_item(self.tab.list.get_selected())
def move_to_album(self, *args, **kwargs):
if len(self.session.video_albums) == 0:
return commonMessages.no_video_albums()
post= self.get_post()
if post == None:
return
album = selector.album(_("Select the album where you want to move this video"), self.session, "video_albums")
if album.item == None: return
id = post["id"]
response = self.session.vk.client.video.addToAlbum(album_ids=album.item, video_id=id, target_id=self.session.user_id, owner_id=self.get_post()["owner_id"])
if response == 1:
# Translators: Used when the user has moved an video to an album.
output.speak(_("Moved"))
def get_menu(self):
""" We'll use the same menu that is used for audio items, as the options are exactly the same"""
p = self.get_post()
if p == None:
return
m = menus.audioMenu()
widgetUtils.connect_event(m, widgetUtils.MENU, self.move_to_album, menuitem=m.move)
# if owner_id is the current user, the audio is added to the user's audios.
if p["owner_id"] == self.session.user_id:
m.library.SetItemLabel(_("&Remove"))
widgetUtils.connect_event(m, widgetUtils.MENU, self.remove_from_library, menuitem=m.library)
else:
widgetUtils.connect_event(m, widgetUtils.MENU, self.add_to_library, menuitem=m.library)
return m
def open_in_browser(self, *args, **kwargs):
post = self.get_post()
if post == None:
return
url = "https://vk.com/video{user_id}_{video_id}".format(user_id=post["owner_id"], video_id=post["id"])
webbrowser.open_new_tab(url)

View File

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
import logging
import wx
import widgetUtils
import output
from wxUI.tabs import videoAlbum
from .video import videoBuffer
log = logging.getLogger("controller.buffers")
class videoAlbumBuffer(videoBuffer):
def create_tab(self, parent):
self.tab = video.videoAlbumTab(parent)
self.tab.play.Enable(False)
self.connect_events()
self.tab.name = self.name
if hasattr(self, "can_post") and self.can_post == False and hasattr(self.tab, "post"):
self.tab.post.Enable(False)
def connect_events(self):
super(videoAlbumBuffer, self).connect_events()
widgetUtils.connect_event(self.tab.load, widgetUtils.BUTTON_PRESSED, self.load_album)
def load_album(self, *args, **kwargs):
output.speak(_("Loading album..."))
self.can_get_items = True
self.tab.load.Enable(False)
wx.CallAfter(self.get_items)
self.tab.play.Enable(True)

View File

@ -0,0 +1,104 @@
# -*- coding: utf-8 -*-
""" A buffer is a (virtual) list of items. All items belong to a category (wall posts, messages, persons...)"""
import logging
import webbrowser
import wx
import presenters
import views
import interactors
import widgetUtils
import output
from pubsub import pub
from vk_api.exceptions import VkApiError
from mysc.thread_utils import call_threaded
from wxUI import commonMessages
from .home import homeBuffer
log = logging.getLogger("controller.buffers.wall")
class wallBuffer(homeBuffer):
""" This buffer represents an user's wall. It may be used either for the current user or someone else."""
def get_items(self, show_nextpage=False):
""" Update buffer with newest items or get older items in the buffer."""
if self.can_get_items == False: return
retrieved = True
try:
num = getattr(self.session, "get_page")(show_nextpage=show_nextpage, name=self.name, *self.args, **self.kwargs)
except VkApiError as err:
log.error("Error {0}: {1}".format(err.code, err.error))
retrieved = err.code
return retrieved
except:
log.exception("Connection error when updating buffer %s. Will try again in 2 minutes" % (self.name,))
return False
if not hasattr(self, "tab"):
# Create GUI associated to this buffer.
self.create_tab(self.parent)
# Add name to the new control so we could look for it when needed.
self.tab.name = self.name
if show_nextpage == False:
if self.tab.list.get_count() > 0 and num > 0:
v = [i for i in self.session.db[self.name]["items"][:num]]
v.reverse()
[wx.CallAfter(self.insert, i, True) for i in v]
else:
[wx.CallAfter(self.insert, i) for i in self.session.db[self.name]["items"][:num]]
else:
if num > 0:
[wx.CallAfter(self.insert, i, False) for i in self.session.db[self.name]["items"][-num:]]
return retrieved
def remove_buffer(self, mandatory=False):
""" Remove buffer if the current buffer is not the logged user's wall."""
if "me_feed" == self.name:
output.speak(_("This buffer can't be deleted"))
return False
else:
if mandatory == False:
dlg = commonMessages.remove_buffer()
else:
dlg = widgetUtils.YES
if dlg == widgetUtils.YES:
self.session.db.pop(self.name)
return True
else:
return False
def __init__(self, *args, **kwargs):
super(wallBuffer, self).__init__(*args, **kwargs)
self.user_key = "from_id"
self.post_key = "id"
self.can_post = True
self.can_write_private_message = True
# if this is an user timeline we must check permissions to hide buttons when needed.
if "owner_id" in self.kwargs and self.kwargs["owner_id"] > 0 and "feed" in self.name:
permissions = self.session.vk.client.users.get(user_ids=self.kwargs["owner_id"], fields="can_post, can_see_all_posts, can_write_private_message")
self.can_post = permissions[0]["can_post"]
self.can_see_all_posts = permissions[0]["can_see_all_posts"]
self.can_write_private_message = permissions[0]["can_write_private_message"]
log.debug("Checked permissions on buffer {0}, permissions were {1}".format(self.name, permissions))
def post(self, *args, **kwargs):
""" Create a post in the wall for the specified user
This process is handled in two parts. This is the first part, where the GUI is created and user can send the post.
During the second part (threaded), the post will be sent to the API."""
if "owner_id" not in self.kwargs:
return super(wallBuffer, self).post()
owner_id = self.kwargs["owner_id"]
user = self.session.get_user(owner_id, key="user1")
title = _("Post to {user1_nom}'s wall").format(**user)
p = presenters.createPostPresenter(session=self.session, interactor=interactors.createPostInteractor(), view=views.createPostDialog(title=title, message="", text=""))
if hasattr(p, "text") or hasattr(p, "privacy"):
post_arguments=dict(privacy=p.privacy, message=p.text, owner_id=owner_id)
attachments = []
if hasattr(p, "attachments"):
attachments = p.attachments
call_threaded(pub.sendMessage, "post", parent_endpoint="wall", child_endpoint="post", from_buffer=self.name, attachments_list=attachments, post_arguments=post_arguments)
def open_in_browser(self, *args, **kwargs):
post = self.get_post()
if post == None:
return
url = "https://vk.com/wall{user_id}_{post_id}".format(user_id=post["from_id"], post_id=post["id"])
webbrowser.open_new_tab(url)

View File

@ -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()

View File

@ -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

View File

@ -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"))

View File

@ -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])

View File

@ -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])

View File

@ -2,22 +2,25 @@
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

View File

@ -1,4 +1,6 @@
import spellchecker
from __future__ import absolute_import
from __future__ import unicode_literals
from . import spellchecker
import platform
if platform.system() == "Windows":
from wx_ui import *
from .wx_ui import *

View File

@ -1,34 +1,36 @@
# -*- coding: utf-8 -*-
import os
import logging
import wx_ui
from . import wx_ui
import widgetUtils
import output
import config
import languageHandler
import enchant
import paths
from . import twitterFilter
from enchant.checker import SpellChecker
from enchant.errors import DictNotFoundError
from enchant import tokenize
log = logging.getLogger("extra.SpellChecker.spellChecker")
class spellChecker(object):
def __init__(self, text, dictionary):
def __init__(self, text):
super(spellChecker, self).__init__()
log.debug("Creating the SpellChecker object. Dictionary: %s" % (dictionary,))
self.active = True
try:
if config.app["app-settings"]["language"] == "system":
log.debug("Using the system language")
self.checker = SpellChecker(languageHandler.curLang, filters=[tokenize.EmailFilter, tokenize.URLFilter])
self.dict = enchant.DictWithPWL(languageHandler.curLang[:2], os.path.join(paths.config_path(), "wordlist.dict"))
else:
log.debug("Using language: %s" % (languageHandler.getLanguage(),))
self.checker = SpellChecker(languageHandler.curLang, filters=[tokenize.EmailFilter, tokenize.URLFilter])
self.checker.set_text(text)
self.dict = enchant.DictWithPWL(languageHandler.getLanguage()[:2], os.path.join(paths.config_path(), "wordlist.dict"))
except DictNotFoundError:
print "no dict"
log.exception("Dictionary for language %s not found." % (dictionary,))
log.exception("Dictionary for language %s not found." % (languageHandler.getLanguage(),))
wx_ui.dict_not_found_error()
self.active = False
self.checker = SpellChecker(self.dict, filters=[twitterFilter.TwitterFilter, tokenize.EmailFilter, tokenize.URLFilter])
self.checker.set_text(text)
if self.active == True:
log.debug("Creating dialog...")
self.dialog = wx_ui.spellCheckerDialog()
@ -36,13 +38,14 @@ class spellChecker(object):
widgetUtils.connect_event(self.dialog.ignoreAll, widgetUtils.BUTTON_PRESSED, self.ignoreAll)
widgetUtils.connect_event(self.dialog.replace, widgetUtils.BUTTON_PRESSED, self.replace)
widgetUtils.connect_event(self.dialog.replaceAll, widgetUtils.BUTTON_PRESSED, self.replaceAll)
widgetUtils.connect_event(self.dialog.add, widgetUtils.BUTTON_PRESSED, self.add)
self.check()
self.dialog.get_response()
self.fixed_text = self.checker.get_text()
def check(self):
try:
self.checker.next()
next(self.checker)
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))
self.dialog.set_title(textToSay)
@ -68,6 +71,6 @@ class spellChecker(object):
self.checker.replace_always(self.dialog.get_selected_suggestion())
self.check()
def clean(self):
if hasattr(self, "dialog"):
self.dialog.Destroy()
def add(self, ev):
self.checker.add()
self.check()

View File

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
from enchant.tokenize import Filter
class TwitterFilter(Filter):
"""Filter skipping over twitter usernames and hashtags.
This filter skips any words matching the following regular expression:
^[#@](\S){1, }$
That is, any words that resemble users and hashtags.
"""
_pattern = re.compile(r"^[#@](\S){1,}$")
def _skip(self,word):
if self._pattern.match(word):
return True
return False

View File

@ -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,31 +25,33 @@ 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, _(u"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, _(u"Context"))
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, _(u"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.ignoreAll = wx.Button(panel, -1, _(u"I&gnore all"))
self.replace = wx.Button(panel, -1, _(u"&Replace"))
self.replaceAll = wx.Button(panel, -1, _(u"Replace a&ll"))
self.replaceAll = wx.Button(panel, -1, _(u"R&eplace all"))
self.add = wx.Button(panel, -1, _(u"&Add to personal dictionary"))
close = wx.Button(panel, wx.ID_CANCEL)
btnBox = wx.BoxSizer(wx.HORIZONTAL)
btnBox.Add(self.ignore, 0, wx.ALL, 5)
btnBox.Add(self.ignoreAll, 0, wx.ALL, 5)
btnBox.Add(self.replace, 0, wx.ALL, 5)
btnBox.Add(self.replaceAll, 0, wx.ALL, 5)
btnBox.Add(self.add, 0, wx.ALL, 5)
btnBox.Add(close, 0, wx.ALL, 5)
sizer.Add(wordBox, 0, wx.ALL, 5)
sizer.Add(contextBox, 0, wx.ALL, 5)
@ -57,6 +60,7 @@ class spellCheckerDialog(wx.Dialog):
panel.SetSizer(sizer)
self.SetClientSize(sizer.CalcMin())
def get_response(self):
return self.ShowModal()

View File

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
import translator
import platform
if platform.system() == "Windows":
import wx_ui as gui
from . import wx_ui as gui
from . import translator

View File

@ -1,10 +1,22 @@
# -*- coding: utf-8 -*-
from microsofttranslator import Translator
import logging
from googletrans import Translator, LANGUAGES
def translate(text="", source="auto", target="en"):
t = Translator("twblue", "4KZA26GYIfmVAqQA/z16Hlucbg64hVSDTIpRjT2FqIU=")
return t.translate(text, target)
log = logging.getLogger("extras.translator")
# create a single translator instance
# see https://github.com/ssut/py-googletrans/issues/234
t = None
def translate(text="", target="en"):
global t
log.debug("Received translation request for language %s, text=%s" % (target, text))
if t == None:
t = Translator()
vars = dict(text=text, dest=target)
return t.translate(**vars).text
supported_langs = None
languages = {
"af": _(u"Afrikaans"),
@ -71,7 +83,7 @@ languages = {
"ps": _(u"Pashto"),
"fa": _(u"Persian"),
"pl": _(u"Polish"),
"pt-PT": _(u"Portuguese"),
"pt": _(u"Portuguese"),
"pa": _(u"Punjabi"),
"ro": _(u"Romanian"),
"ru": _(u"Russian"),
@ -101,8 +113,4 @@ languages = {
}
def available_languages():
l = languages.keys()
d = languages.values()
l.insert(0, '')
d.insert(0, _(u"autodetect"))
return sorted(zip(l, d))
return dict(sorted(languages.items(), key=lambda x: x[1]))

View File

@ -16,24 +16,24 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
############################################################
import translator
from . import translator
import wx
import widgetUtils
from widgetUtils import BaseDialog
class translateDialog(widgetUtils.BaseDialog):
class translateDialog(BaseDialog):
def __init__(self):
languages = []
language_dict = translator.available_languages()
for k in language_dict:
languages.append(language_dict[k])
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)
staticDest = wx.StaticText(panel, -1, _(u"Target language"))
self.dest_lang = wx.ComboBox(panel, -1, choices=languages, style = wx.CB_READONLY)
self.dest_lang.SetFocus()
self.dest_lang.SetSelection(0)
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)

View File

@ -1,9 +0,0 @@
# -*- coding: utf-8 -*-
import sys
import fix_requests
import fix_win32com
def setup():
fix_requests.fix()
if hasattr(sys, "frozen"):
fix_win32com.fix()

View File

@ -1,11 +0,0 @@
# -*- coding: utf-8 -*-
import requests
import paths
import os
import logging
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"),))

View File

@ -1,5 +0,0 @@
import win32com.client
def fix():
if win32com.client.gencache.is_readonly == True:
win32com.client.gencache.is_readonly = False
win32com.client.gencache.Rebuild()

78
src/installer.nsi Normal file
View File

@ -0,0 +1,78 @@
!include "MUI2.nsh"
!include "LogicLib.nsh"
!include "x64.nsh"
Unicode true
CRCCheck on
ManifestSupportedOS all
XPStyle on
Name "Socializer"
OutFile "socializer_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.24"
VIAddVersionKey FileVersion "0.24"
VIProductVersion "0.24.0.0"
VIFileVersion "0.24.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"
${If} ${RunningX64}
File /r program64\*
${Else}
File /r program32\*
${EndIf}
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.24"
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
${If} ${RunningX64}
StrCpy $instdir "$programfiles64\socializer"
${EndIf}
FunctionEnd

View File

@ -0,0 +1,8 @@
from .base import *
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
View 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)

Some files were not shown because too many files have changed in this diff Show More