Itās been a while since Iāve posted code of any description, but Iāve been working on a couple of things recently that Iām going to make publicly available on my GitLab page (and my mirror repository at code.jnf.me)
Backblaze B2 Version Cleaner
I wrote last week about transitioning my cloud backup to Backblazeās B2 service, and I also mentioned a feature of it thatās nice but also slightly problematic to me: it keeps an unlimited version history of all files.
Thatās good, because it gives me the ability to go back in time should I ever need to, but over time the size of this version history will add up – and Iām paying for that storage.
So, Iāve written a script that will remove old versions once a newer version of the same file has reached a certain (configurable)Ā āsafe age.ā
For my purposes I use 30 days, so a month after Iāve overwritten or deleted a file the old version is discarded. If I havenāt seen fit to roll back the clock before then my chance is gone.
VBA SharePoint List Library
This one I created for work. Getting data from a SharePoint list into Excel is easy, but I needed to write Excel data to a list. I assumed thereād be a VBA function that did this for me, but as it turns out I was mistaken – so I wrote one!
At the time of writing this is inĀ āproof of conceptā stage. It works, but itās too limited for primetime (it can only create new list items, not update existing ones, and each new item can only have a single field).
Out of necessity Iāll be developing this one pretty quickly though, so check back regularly! Once itās more complete Iāll be opening it up to community contributions.
I have no plans to add functions that read from SharePoint to this library, but once I have the basic framework down that wouldnāt be too hard to add if youāre so inclined. Just make sure you contribute back!