Python script for converting your Finder tags into a csv file
Find a file
2025-01-05 13:21:20 +01:00
generate_csv.py First commit: adding scripts for converting tags to csv, and making a simple plot using Plotly 2025-01-05 13:14:15 +01:00
LICENSE Initial commit 2025-01-05 06:58:03 -05:00
mactags2csv.py First commit: adding scripts for converting tags to csv, and making a simple plot using Plotly 2025-01-05 13:14:15 +01:00
README.md Changed README.md 2025-01-05 13:21:20 +01:00

MacOS Tagged Files Analyzer

I wrote two Python scripts to help you analyze files tagged in MacOS for educational process in data mining and visualizing charts. The first script generates a CSV file containing details of tagged files, while the second script creates an interactive line graph to visualize the growth of files over time based on their tags.

You can use it to see the expansion of your tagged files over time, e.g personal photos or images, or your video library.

Scripts

generate_csv.py

This script scans your MacOS system for files with tags, excluding specific tags you define. It then generates a CSV file (tagged_files.csv) containing the following details for each file:

  • Tag: The tags associated with the file.
  • File Name: The name of the file.
  • Date Created: The creation date of the file.
  • File Size: The size of the file.
  • File Type: The type of the file.

mactags2csv.py

This script takes the CSV file generated by generate_csv.py and creates an interactive line graph using Plotly. The graph shows the cumulative number of files over time, grouped by their tags. The graph is exported as an HTML file (file_growth_graph.html) for easy viewing.

Usage

  1. Generate the CSV file:

    • Run generate_csv.py to create the tagged_files.csv file.
    • Modify the exclude_tags list in the script to exclude specific tags from the results.
  2. Generate the graph:

    • Run mactags2csv.py to create the interactive line graph.
    • The graph will be saved as file_growth_graph.html and will automatically open in your default web browser.

Requirements

  • Python 3.x
  • pandas
  • plotly

You can install the required Python packages using pip:

pip install pandas plotly