Introducing AnonymizeReviewer: Remove Author Metadata from Word Docs Without Losing Edits
When youโre collaborating on a Microsoft Word document, tracked changes and comments are essential tools. However, when it's time to share those files outside your team, another concern often arises: the names behind every comment and edit are embedded directly within the document.
There are times when anonymity is important. Whether youโre simplifying client reviews, preparing materials for a broader audience, or just removing unnecessary distractions, Word doesn't make it easy to cleanly strip names without accepting all changes or removing valuable context.
To solve that problem, I created AnonymizeReviewer, a lightweight Python script that lets you anonymize Word files while preserving everything that matters.
Microsoft Word includes a feature called โRemove personal information on save.โ While helpful in theory, it behaves inconsistently depending on your version and settings. It also doesnโt catch all the places author names can appear.
Here are some of the areas where Word stores author names:
Manually scrubbing each of these is time-consuming and prone to error. Itโs easy to miss something. Thatโs why I built a more dependable solution.
AnonymizeReviewer reads the .docx file as a zip archive, scans its internal XML files, and replaces all instances of the original author name with a placeholder or alternate name of your choosing. It does this without altering the tracked changes or comments themselves.
Key features include:
First, clone the repository and install the Python dependency:
To run in interactive mode with file picker prompts:
To run with arguments:
To batch-process all .docx files in a folder:
Files that already end in โ - Anonymized.docxโ will be skipped automatically to avoid duplication.
This tool originated from a real-world use case. I needed a way to hand off tracked-change documents for client review without exposing internal names. Word did not provide a clean solution, and most online options were either unreliable or required uploading sensitive files.
By targeting the actual structure of a .docx file and addressing all areas where names can be stored, AnonymizeReviewer fills that gap, giving you control over what you share.
The project is available on GitHub at https://github.com/gregvarghese/AnonymizeReviewer
Pull requests and feedback are welcome. If you have ideas for additional features, such as redacting specific comment content or cleaning embedded metadata beyond names, I would love to hear them.
This project is licensed under the MIT License.
The software is provided as is, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement.
Supercharge Your Laravel Development and Get AI to Understand Your Models
Hey there, Laravel enthusiasts! Today, I'm diving into a nifty trick that'll make getting AI to understand your Laravel model structures a breeze. We'll harness the power of bash scripting and AI to analyze our migrations quickly and efficiently. Let's get started!
As our Laravel projects grow, so does the complexity of our database structures. Migrations pile up, relationships intertwine, and before you know it, you're drowning in a sea ofย Schema::createย andย upย functions. Wouldn't it be great to get a bird's-eye view of our models without manually sifting through dozens of files? What if you could get AI to understand your Laravel project without adding every file to the chat window?
Here's where our dynamic duo comes in a clever bash one-liner and your favorite AI chat tool (like ChatGPT or Claude). We'll use bash to extract the relevant parts of our migrations and then feed that information to an AI for analysis and insights.
Here's the one-liner code to copy and paste:
First, let's break down our bash sorcery to understand what's going on in an easier-to-read format:
Just add | pbcopy to have it copied directly to your clipboard on Mac:
This command does the following:
Please copy the entire output from your terminal and paste it into your AI chat of choice with your preferred prompt. I usually start with this prompt:
Generate a diagram
Here are some additional prompts you can optionally pair with the output to extract valuable insights and improvements:
There you have it, folks! With this simple bash one-liner and the power of AI, you can transform how you analyze and understand your Laravel database structures and output code. Give it a try on your next project, and watch your productivity soar!
Remember, tools like these are meant to augment your skills, not replace them. Always review AI suggestions critically and trust your developer instincts.
How to Take Ownership of Files and Folders Using PowerShell
Ever had to take ownership of a bunch of files and folders? It's a pain, right? Well, not anymore!
Picture this: You've just gotten an external hard drive from a dead computer and need to access the files. But wait! You don't have the correct permissions. I had to do this, and setting the file permissions through Explorer was failing randomly. It appears that the folders all had different permissions, and the propagation was failing.
I've got a PowerShell script that'll save you time. It does two things:
First, here's the script. Don't worry, I'll break it down for you:
Let's break this down a bit:
There you have it, folks! A powerful little script to take control of your files and folders. No more permission headaches, no more "access denied" nightmares โ just pure, unadulterated file access bliss.
Got questions? Hit me up in the comments. And don't forget to share this with your IT buddies โ they'll thank you later!
Happy scripting!
How to enable MacFuse/PCloud Drive on Mac Sonoma 14.2.1
I recently upgraded to Mac Sonoma 14.2.1 and MacFuse stopped loading which affected my ability to load PCloud and NTFS drives. I spent a few days trying to troubleshoot everything and in the end it turned out I had to disable Mac System Integrity Protection to get everything to load. I'm sharing in case it helps anyone else.
To disable SIP on your Mac Sonoma for extensions like MacFuse and pCloud Drive:
Note: Disabling SIP poses security risks. Re-enable it once you've installed the necessary extensions. Only disable SIP when necessary and understand the potential risks involved.
How to Delete a Row in Excel Using the Elgato Stream Deck
Recently I was working on a massive Excel Spreadsheet and needed to manually review each entry and clean up rows that were no longer needed. The Elgato Stream Deck came in handy for a quick shortcut so I thought I'd share it in case anyone else can use it.
I took this opportunity to practice creating the first of what I hope are many training videos. This took me around 30 minutes to do from start to finish as I had to learn the video editing software including how to record, how to split and edit, and how to add text overlays. Hopefully the next videos will be faster but it was a fun exercise and I hope someone else finds it useful.
How to Delete Folder with Special Character in Windows 10/11
I ran into an issue where a folder was created by some application with a special Unicode character that Windows Explorer doesn't seem to play nicely with. I also was unable to tell what the character was since nothing would reveal it. The folder's there, but you can't rename or delete it. If I tried to remove or delete it, I'd get an error saying the folder doesn't exist:
I have LockHunter installed but it wasn't able to delete it for some reason. The easiest way I found to delete the folder was to use Git Bash and then use the appropriate commands to rename or delete the folder.
Browse to the folder where the offending folder is located. For example purposes, I'll use c:\temp\folder1
Rename:
Delete:
If you don't have Git Bash or are not a developer/power user, you can download the portable version from https://git-scm.com/download/win to use temporarily. Once you decompress the files to a folder, you'll find git-bash.exe which you can double-click to run and use the above commands.
How to deploy a React app to Amazon S3 using Gitlab CI/CD
I've been trying to build more CI/CD scripts using Gitlab to automate pipeline deployments for work. Here's a useful one for building and deploying a React app to Amazon S3.
You'll need to add a variable called S3_BUCKET_NAME to your repo or replace the variable with your bucket path.
How to Setup CI/CD of Jigsaw Site to Digital Ocean Droplet Using Bitbucket Pipelines
I created a new personal resume site and decided I wanted to build a static site since it wouldn't be frequently updated. I evaluated Nuxt, Gatsby, and a few others but settled on Jigsaw, a static site generator based on Laravel. I had never used it before and figured this would be a good learning experience while building something I needed. I was pleasantly surprised by how easy it is to use and setup, so kudos to the Tighten team for putting together such an elegant solution.
I wanted to get a CI/CD pipeline configured to handle the site's deployment but couldn't find any working tutorials, so I'm sharing my solution in case it helps others. I'm using Bitbucket for this since it's a personal private repo, so I'm using Bitbucket Pipelines.
After you enable pipelines for your project, you'll need to configure a Pipelines Repository Variable in your project. Go to the settings tab in your repo, and then select Repository variables:
Add 3 variables:
Generate an SSH key (or use your own) and add it to your server under the SSH Keys tab in Pipelines:
I generated a new key and then added it to ~/.ssh/authorized_keys for the account.
Add this YAML snippet to your bitbucket-pipelines.yml in your root. This will use PHP 7.4, install rsync, node + npm, composer, and build the production version of the site to deploy to the specified folder.
The -aVP switch for rsync is to give me verbose progress feedback so I can see what's happening. If you don't need the detail, switch it to -a.
I received a few errors when rsync ran. In case you run into them as well, here's the list and fixes. The first was:
rsync: failed to set times on "$FOLDER": Operation not permitted (1)
I added --no-t to resolve that and then got a new error:
rsync: failed to set permissions on "$FOLDER": Operation not permitted (1)
which was fixed with adding the switch --no-perms. My final rsync command became:
How to Setup a CI/CD Pipeline for Storybook.js using Gitlab
I just spent a few hours setting up a Gitlab pipeline to deploy a Storybook.js site. Of course the end result ended up being much simpler than I made it out to be. Like everything else on my blog, I'm sharing in case anyone else can use the information to save time.
Just put this in your gitlab-ci.yml and it'll take care of caching the node modules and building your static version of Storybook to deploy.
How to Clear Archive & Read-only flags on Files in Windows in Bulk
I ran into an issue where I had to move files from one system to another and was running into issues because files had been set as read-only, had the archive flag set, or both. It was causing the system to skip files which wasn't acceptable. Normally you could just use Windows to clear it in bulk, but that could potentially mess up file permissions. I needed a way to automatically just clear all flags but respect permissions.
I did some searching and didn't find a utility that would do the job and most of the solutions I found required Powershell which wasn't available on the system I was on. I ended up writing a quick console application in C# to do the trick. I've made it free and open sourced it in case anyone wants to use it.
If you need just the app, you can find the release build here with instructions. The app also prompts for input to make things a bit easier to use. There's no install, no tracking or metrics, or anything else related to privacy concerns in this app. It's a simple throwaway utility to get the job done and move on.
https://github.com/gregvarghese/clearflags/releases/tag/1.0.0
If you want to see the source code, that is available here:
https://github.com/gregvarghese/clearflags/
Please note that I did this in about 10 minutes for my own use so error handling is pretty much non-existent. I mention this because I did run into one issue where Windows was somehow seeing a folder with files in it as a file and it couldn't be deleted or renamed and the utility couldn't get past it until it was resolved. I didn't spend much time debugging and just used my Mac to rename the folder and Windows was able to recognize it after the change, so the utility was able to continue processing.