Python script: RSS feed from Git commit log

The Python script below creates an RSS file from a git commit log. I'm using an expanded version of this script to generate the RSS feed for my notes.group42.ca site. It can be used as a starting template or demo of the GitPython and feedgen modules. Although the script is runnable the resulting RSS file is only useful as sample output.

To use the script the following modules must be installed:

  • GitPython
  • feedgen

Links

Bidirectional File Sychronization with Unison: My First Experience

The rsync command is my go-to utility for sync'ing files from one folder to another, but it has issues with bidirectional synchronization (Search "rsync bidirectional sync" for explanations of the problem). Fortunately there are other options.

In the discussions I looked at a program named Unison was consistently suggested for bidirectional syncs. If you're a MacOS user like me, it can be installed with Homebrew. I gave it a try for synchronizing markdown files between two directories on the same computer. It's working perfectly.

Thoughts and observations on Unison:

Personal Script Directories

Have you written shell scripts or helper programs and wondered how to organize them? Or been frustrated with always updating path or aliases? Here are two tips that helped me.

  • Create a /bin or /script directory in your home directory and add it to your path. Use it for your custom scripts and other executables you want to treat as shell commands.
  • Use Symlinks (symbolic link files) for scripts or binaries that won't go directly into the bin directory. For example, scripts or binaries that are part of a repository or project structure.

While these may seem obvious, it took a tip from a colleague before I organized this way. I've never looked back. Read on for more details

Introducing Group 42 Notes

Group42.ca has a new notes section: https://notes.group42.ca!

Group 42 Notes is my latest attempt to curate useful information for myself and others.

It's off to a modest start with entries for Bash, Git, Homebrew, and the REAPER DAW (Digital Audio Workstation). I've also moved the Drupal 6 and Drupal 7 Ref sections there. The rest of the Tech Ref section will soon follow.

Notes.Group42.ca website screen shot

Ansible / Checklvst Integration

Anisble and Checklvst communicatingChecklvst, https://checkvist.com, is a web-based list editor (I like its keyboard-driven user experience). Given some of my Ansible playbooks generate to-do lists and Checklvst has an API, I wondered how hard integration could be?

Ansible Impressions

Ansible thoughtsAfter using Ansible as a personal DevOps tool for a couple of months, here are some impressions.

Context

  • Outside of work (web development) I look after six Drupal 7 and WordPress sites on shared hosting
  • My local development is done on a MacBook using apache (with some dabbling in Lando/Docker). I've done some wildcarding with dnsmasq and vhosts to streamline local dev site configuration. CMS code is in git repos.
  • My Ansible work is a personal project and I'm the only stakeholder
  • I learned Ansible doing this work

Avoid the Changing Ansible Timestamp Gotcha

Tagged:

Ansible variables are evaluated each time they're used. This means the following playbook vars declaration will always return the current time where ever it's used in the playbook!:

vars:
  timestamp: "{{ lookup('pipe', 'date +%Y-%m-%d-%H%M') }}"

This is not the desired situation if the timestamp is used as part of a filename. For example: filename: "backup-{{timestamp}}.sql".

Fortunately, there's an easy solution.

Ansible Starter Setup

Ansible LogoAnsible is an open source IT automation tool. I tend to describe it as a task-runner with a host database (which Ansible calls the inventory). A big selling point is no agent software is needed on managed remote hosts. Details at the Ansible website: https://www.ansible.com/use-cases

tl;dr: If you're just beginning with Ansible this might help: https://github.com/dale42/ansible-starter

Drupal Site Reset BASH Script

I'm experimenting with Drupal 8 and some its new features like migration and configuration management. A reset script is a convenient timesaver and many people have shared their techniques for doing so. Having benefited from other's generosity I wanted to return the favour by sharing my current work-in-progress.

This script:

H5P - Portable Interactive Content in Drupal

H5PH5P is an open source platform-independent authoring and display system for interactive content. Presentations, quizzes, and other interactive content can be created and displayed using building blocks known as H5P content types (different from Drupal content types). Once a piece of content is created it's easily exported to another H5P system. The development environment is open and well documented, allowing the creation of custom H5P content types.

Pages

Subscribe to Group 42 RSS