Automatically Rotating Images with php2Bluesky

I have a PHP application that I use to post to my X, Mastodon and Bluesky accounts. This works well but I noticed the last time I posted an image from my iPhone that while it was fine on X and Mastodon on Bluesky the image was upside down (see above and here)!

Interestingly this only happens when posting via the Bluesky API, if you upload the same from the web interface, for example, it works fine.

Enter EXIF

When you take a picture with a modern digital camera, such as an iPhone, it embeds into that … Read the rest

Restricting who can reply to a Bluesky post with php2Bluesky

I had an email from a php2Bluesky user who wanted to know how you could set the restrictions on who could reply to a post. This was something that php2Bluesky didn’t support, but I thought it would be good to, so I have updated the code. Here’s how to use that feature.

Thread Gates

Looking at the Bluesky web app there were six different options you could select to set who could respond to a post:

  • Everyone (the default)
  • Nobody
  • Your followers
  • People you follow
  • People you mention
  • Anyone in a list you provide.

I did a bit of research … Read the rest

How to turn PHP code into a package that will work with Composer

I’ve learned a lot while developing my php2Bluesky package spurred on by my own desire to make a decent product and by suggestions from users. One such itch I needed to scratch was to take my static code and turn it into something that I could use with Composer, the de facto way of handling dependancies in PHP.

I have to admit that not everyone was thrilled about my proposed move to Composer, as many seemed to prefer not to use it and to manage updates and load the code manually. This meant that I also needed to make … Read the rest

Setting a Bluesky Post’s Language with php2Bluesky

A while back I pushed an update to php2Bluesky that allows for multiple language posts and forgot to post the change so I am correcting that now!

Setting the language

By default the language of your posts is set to English but you can override this in one of two ways. Either specify the language when creating the instance of php2Bluesky or pass it when posting. It must be an array even if you are passing a single language.

Setting the Language Globally

If you want all your posts to be labelled in a language other then English then you … Read the rest

Storing Data in a PHP Project

Over the last year I have been reevaluating how and were I store the data for my projects. Traditionally I have added a new database in MySQL for each but I thought that was a bit overkill for some of the smaller, single user, projects that I was working on.

There are several options for storing your data, but each comes with its own trade-offs in setup time, performance, and scalability. Here I look at the ones I have used in my prejects โ€” flat files, SQLite, and MySQL โ€” and see where each one shines (and where … Read the rest

Adding labels to media with php2Bluesky

Someone mentioned to me that you can add labels to posts in Bluesky and I have to admit that I had not idea what they were referring to. Looking at them I can understand why I’d not come across them – I’d not had any need for them but what are labels?

Bluesky Labels

A Bluesky label is a tag you can add to your own post to warn others (and moderation tools) that your content may include things like nudity, violence, sexual content, or graphic imagery. They:

  • Enable users to filter or blur posts based on content type.
  • Help
Read the rest

Uploading Videos with php2Bluesky

Ever since I launched php2Bluesky a couple of years ago, I have wanted to add the ability to upload video as well as images. Initially, that wasn’t possible as Bluesky didn’t support videos, and then they did, but it wasn’t in the API. Now, however, it is all systems go, and so I have updated the library to support videos.

How to Upload a Video

First things first. In order to start uploading videos all you need to do is update the library. The way you call the library remains exactly the same, so you would do the following to … Read the rest

Decoding the Evernote Webhook

Evernote doesn’t like you using the search functionality in the API to look for changes that occur to a note. Instead you are encouraged to get notification of changes using webhooks. This works by receiving an HTTP post from Evernote every time that a note is created or updated and by reading the payload associated with that webhook you can get some basic information on it.

What does the Webhook look like?

The very first thing to know about Evernote webhooks is that in order to receive them you need to have registered for an API key and also … Read the rest

Family History Database Searches

Amongst all my many hobbies is researching my family history, which I have been doing on and off (well, more off actually) for the last 30 years. Over that time, how you research has changed enormously with so many records now being available online. Also, when I first started, the only way to record your information was on paper, but now there are numerous software packages that have largely replaced the need for paper.

Data Mining

The main issue with recording your family history information in a software package is that you are beholden to the developer’s choice of what … Read the rest

What Should I Watch Next?

Back last December I wrote about a project that I had written called What Should I Play Next? where it would randomly choose something from my record collection to play. This month’s project, part of my ๐Ÿ‘จโ€๐Ÿ’ป12 Apps in 12 Months challenge, is the visual equivalent.

The Plex API

When I want to watch a film I am sometimes constrained by the amount of time I have and usually have some feeling of the genre I want so I wanted something that catered for that plus could also exclude things that I had watched before.

While I do subscribe to … Read the rest