Skip to content

jtruitt1/mailbagit-plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This repo hosts plugins and other ancillary programs for Mailbagit:

  • pdf_chrome.py, which overwrites the pdf-chrome derivative option to produce a single-page PDF.
  • add-profile.py, which can be run on a completed Mailbag to ready it for metadata entry in Bagger.

See the Mailbagit plugin instructions for information and context.

Install PDF Plugin

  1. Download the mailbagit-plugins folder from GitHub. Save it wherever on your computer you like, expand the ZIP file, and copy the file path.
  2. Set the shell environment variable for Mailbagit plugins.
    • On a Windows computer, enter the following into a Command Prompt window, replacing \path\to\mailbagit-plugins with the location of the mailbagit-plugins folder:
      setx MAILBAGIT_PLUGIN_DIR "path\to\mailbagit-plugins"
    • On a Mac computer, enter the following into a Terminal window, replacing path/to/mailbagit-plugins with the location of the mailbagit-plugins folder:
       echo '\nexport MAILBAGIT_PLUGIN_DIR=path/to/mailbagit-plugins' >> ~/.zshrc
  3. Add Google Chrome to your PATH
    1. Verify the location of Chrome on your comptuer.
      • On Windows, look for a file named chrome, chrome.exe or google-chrome in one of the following places:
        C:\Program Files\Google\Chrome\Application
        C:\Program Files (x86)\Google\Chrome\Application\
        
      • On Mac, look for a file named Google Chrome in
        /Applications/Google Chrome.app/Contents/MacOS/
        
    2. Add this location to your PATH
      • On Windows, see this great guide with screenshots from StackOverflow.
      • On Mac, enter the following into the Terminal:
        echo 'export PATH=$PATH:/Applications/Google\ Chrome.app/Contents/MacOS/' >> ~/.zshrc

Adding a Bagger Profile to the completed bag

Mailbagit doesn't have built in support for adding extensive metadata to the bags it creates. Bagger does, but can't add profiles to bags after they've been created. This Python script allows us to circumvent that by injecting a profile name into the metadata. Once the script is run, you can open the mailbag in Bagger and add whatever metadata you want.

By default, the program will add a profile named Swarthmore-FHL. To replace this with your own preferred Bagger profile, replace the text in line 22 of add-profile.py.

Usage

  • On Windows, run the following command, replacing path\to\bag with the location of the bag:
python3 %MAILBAGIT_PLUGIN_DIR%\add-profile.py \path\to\bag
  • On Mac, run the following command, replacing path/to/bag with the location of the bag:
python3 $MAILBAGIT_PLUGIN_DIR/add-profile.py path/to/bag

About

Plugins for the brilliant Mailbagit utility

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages