google-labs-jules[bot] 1dffa2a6f9 feat: Initial integration of ATProtoSocial (Bluesky) protocol
This commit introduces the initial implementation for supporting the ATProtoSocial (Bluesky) protocol within your application.

Key changes and features I implemented:

1.  **Core Protocol Structure:**
    *   I added new directories `src/sessions/atprotosocial` and `src/controller/atprotosocial`.
    *   I populated these with foundational files (`session.py`, `utils.py`, `handler.py`, `compose.py`, etc.), mirroring the Mastodon implementation structure but adapted for ATProtoSocial.

2.  **Authentication:**
    *   I implemented login and authorization using Bluesky SDK (handle and app password) in `sessions/atprotosocial/session.py`.
    *   I integrated this into your session management UI (`sessionManagerDialog.py`) to allow adding ATProtoSocial accounts.

3.  **Posting Capabilities:**
    *   I implemented sending text posts, posts with images, replies, and quoting posts in `sessions/atprotosocial/session.py` and `utils.py`.
    *   I updated `compose.py` to reflect ATProtoSocial's panel configuration (character limits, media support, quoting).

4.  **Notifications:**
    *   I implemented fetching and processing of notifications (likes, reposts, follows, mentions, replies, quotes) in `sessions/atprotosocial/session.py`.
    *   Notifications are formatted for display.

5.  **Timelines:**
    *   I implemented fetching and processing for home timeline and user-specific timelines in `sessions/atprotosocial/session.py`.
    *   This includes handling of posts, reposts, and replies within your application's buffer and message cache system.

6.  **User Actions:**
    *   I implemented core user actions: follow, unfollow, mute, unmute, block, unblock in `sessions/atprotosocial/utils.py`.
    *   I integrated these actions into the controller layer (`controller/atprotosocial/handler.py`) and exposed them via `session.get_user_actions()`.

7.  **User Management & Profile:**
    *   I implemented fetching user profiles, follower lists, following lists, and user search in `sessions/atprotosocial/utils.py` and `controller/atprotosocial/userList.py`.

8.  **UI Integration (Initial Pass):**
    *   I adapted your session management UI for ATProtoSocial account creation.
    *   I updated main controller logic to load the ATProtoSocial handler and create basic buffers (Home, Notifications).
    *   I modified menu item labels based on the active session type (e.g., "Post" vs "Toot", "Like" vs "Favorite").
    *   I integrated core actions like reposting and liking into existing UI flows.
    *   I added basic integration for timeline refresh and loading more items.
    *   I added placeholder integration for viewing user profiles and user-specific timelines.

**Current Status & Next Steps:**

This represents a significant portion of the ATProtoSocial integration. The backend logic for most core features is in place. The immediate next steps, which were part of the original plan but not yet completed, would be:

*   **Refining UI elements:** Fully implementing dedicated dialogs (compose, user profile), custom panels for new buffer types, and ensuring accurate rendering of ATProtoSocial posts and notifications.
*   **Completing Documentation:** Updating all relevant documentation files in `doc/` and `documentation/`.
*   **Updating Translations:** Adding new strings and updating translation files.
*   **Adding Tests:** Creating unit and integration tests for the new protocol.

I was not stuck on any particular point, but the UI integration is a large step that requires iterative refinement and testing for each component, which would naturally extend beyond a single development cycle for a feature of this scope.
2025-05-26 14:11:01 +00:00
2025-03-08 11:51:43 -06:00
2025-03-08 13:57:30 -06:00
2021-12-27 23:26:40 +01:00
2025-03-08 14:11:46 -06:00

TWBlue

Release status badge

TWBlue is a free and open source application that allows you to interact with the main features of mastodon from the comfort of a windows software, with 2 different interfaces specially designed for screen reader users.

See TWBlue's webpage for more details.

Running TWBlue from source

This document describes how to run tw blue from source and how to build a binary version which doesn't need Python and the other dependencies to run.

Required dependencies.

Although most dependencies can be found in the windows-dependencies directory, we provide links to their official websites. If you are cloning with git, don't forget to initialize and update the submodules to get the windows-dependencies folder. You can use these two commands to perform this task from git bash:

    git submodule init  
    git submodule update

Dependencies packaged in windows installers

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:\python310\scripts`

You can also add the scripts folder to your path environment variable or choose the corresponding option when installing Python.  
Note: pip and setuptools are included in the Python installer since version 2.7.9.

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 Tw Blue root folder where the requirements file is located, for example:

`pip install -r D:\repos\TwBlue\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, version 2.87
  • Microsoft Visual c++ 2019 redistributable dlls.
  • VLC plugins and DLL libraries.

Dependencies required to build the installer

Dependencies to make the spell checker multilingual

In order to add the support for spell checking in more languages than english you need to add some additional dictionaries to pyenchant. These are located on the dictionaries folder under windows-dependencies. Simply copy them to the share/enchant/myspell folder located in your enchant installation. They will be automatically copied when building a binary version.

Running TW Blue from source

Now that you have installed all these packages, you can run TW Blue 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, navigate to the doc folder inside this repo. After that, run these commands:

`python documentation_importer.py`  
`python generator.py`  

The documentation will be generated, placing each language in a separate folder in the doc directory. Move these folders (for example de, en, es, fr, it, ...) to src/documentation, creating the directory if necessary.
Also, copy the license.txt file located in the root of the repo to the documentation folder.

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 TW Blue website if you download the zip files or the snapshot 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 TWBlue on your computer, you must create the installer first. Follow these steps:

  • Navigate to the src directory, and create a binary version: C:\python310\python setup.py build
  • Move the dist directory to the scripts folder in this repo, and rename it to twblue64
  • Go to the scripts folder, right click on the twblue.nsi file, and choose compyle unicode NSIS script
  • This may take a while. After the process, you will find the installer in the scripts folder

How to generate a translation template

To manage translations in TWBlue, you can install the Babel package. You can extract message catalogs and generate the main template file with the following command:

pybabel extract -o twblue.pot --msgid-bugs-address "manuel@manuelcortez.net" --copyright-holder "MCV software" --input-dirs ..\src

Take into account, though, that we use weblate to track translation work for TWBlue. If you wish to be part of our translation team, please open an issue so we can create an account for you in Weblate.

Description
TWBlue, an accessible, open source and multiplatform twitter application.
Readme 109 MiB
Languages
Python 98.7%
PowerShell 0.9%
NSIS 0.4%