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.
- Download the mailbagit-plugins folder from GitHub. Save it wherever on your computer you like, expand the ZIP file, and copy the file path.
- 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 themailbagit-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 themailbagit-plugins
folder:echo '\nexport MAILBAGIT_PLUGIN_DIR=path/to/mailbagit-plugins' >> ~/.zshrc
- On a Windows computer, enter the following into a Command Prompt window, replacing
- Add Google Chrome to your PATH
- Verify the location of Chrome on your comptuer.
- On Windows, look for a file named
chrome
,chrome.exe
orgoogle-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/
- On Windows, look for a file named
- 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
- Verify the location of Chrome on your comptuer.
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
.
- 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