Skip to main content

rubenwardy's blog

Posts

61-69 of 69 posts

Getting user profile data from external phpBB forums

I recently wrote and released a python module to allow fetching of profile data.

You can install it using pip:

pip install beautifulsoup4 phpbb-parser

Here’s how you import and use a profile:

import phpbb_parser as parser

username = "rubenwardy"
profile = parser.get_profile("https://forum.minetest.net", username)

if profile:
    signature = profile.signature.text
    location = profile.get("location") or "unknown"
    github = profile.get("github") or "none"

    print(username + " from " + location + " has github " + github)
    print("Signatue: " + signature.text)
else:
    print("Could not get profile!")

profile.signature is a beautifulsoup4 object.

Next: Linking a user account to an external phpBB forum.

Read more of "Getting user profile data from external phpBB forums"

The cover of "Employee Task Management System"

Employee Task Management System

I was contacted by a client to create a system which calculates the workload for employees based on their assignment to tasks and appointments.

The system needs to solve two problems: Firstly, different staff members work different numbers of hours, which makes it hard to allocate tasks fairly and proportionally. Secondly, the client wanted to use the system to analyse past workloads and to anticipate future workload, in order to improve her system of work.

Read more of "Employee Task Management System"

Convert folder of images to PDF with filenames

Here is a shell script specific for GNU/Linux based operating systems to use. On different operating systems the convert commands will be the same, but the for loop will be different due to a different batch file syntax.

rm /tmp/imageex -r
mkdir /tmp/imageex
for filename in *.png; do
    echo "Processing $filename"
    convert $filename -background White \
        label:$filename -gravity Center \
         -append -pointsize 14 \
        /tmp/imageex/$filename.png
done
echo "Exporting to PDF..."
convert /tmp/imageex/*.png output.pdf
echo "Done."

Read more of "Convert folder of images to PDF with filenames"

3D Projection

Hello 2015! Recently I have created an implementation of the 3D projection algorithm. It is just wireframe models. It works pretty well, except it doesn’t do frustum culling. You still see things that are behind you, but upside down.

The source code of this implementation is available under the WTFPL or CC0 licenses - you can choose which one you want to use. Use WASD to move, arrow keys to rotate, space to ascend and shift to descend.

Read more of "3D Projection"

The cover of "Lichess"

Lichess

Lichess is an online chess game and community. It is free and open source, ad-free and subscription-free. You can play against your friends, random strangers and the computer. You can create teams to compete in tournaments. There are tournaments going on all the time.

Read more of "Lichess"

61-69 of 69 posts