├── .DS_Store ├── .gitattributes ├── README.md ├── forge_of_foes_jelly_snippits.txt ├── pandoc_markdown_to_pdf_with_latex ├── .DS_Store ├── README.md ├── example.md ├── md_to_pdf.app │ └── Contents │ │ ├── Info.plist │ │ ├── MacOS │ │ └── Automator Application Stub │ │ ├── Resources │ │ ├── ApplicationStub.icns │ │ ├── Assets.car │ │ └── InfoPlist.loctable │ │ ├── _CodeSignature │ │ └── CodeResources │ │ └── document.wflow ├── md_to_pdf.sh ├── md_to_pdf.tex └── output.pdf ├── two-columns.css ├── two_column_output_example.pdf └── two_column_print_to_pdf.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mshea/obsidian_toolbox/3c0dc3240e9c24b35084a194014e1c846701ccd1/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Obsidian Toolbox 2 | 3 | This repo contains various projects tied to [Obsidian](https://obsidian.md). 4 | 5 | ## Forge of Foes Jelly Snippits 6 | 7 | File: forge_of_foes_jelly_snippits.txt 8 | 9 | This text file contains snippits formatted for the [Jelly Snippits](https://github.com/rabirabirara/obsidian-jelly-snippets) Obsidian plugin so you can add Forge of Foes stat lines directly into your Obsidian notes. 10 | 11 | For example you can type "fof6" and activate your snippit. I have a command to do it on my phone or you can set space or tab to fill it in by configuring Jelly Snippits. When activated, it drops in a one-line stat block like this: "CR 6 AC/DC 15 HP 112 (84-140) Atk/Prof +7 DPR 41 Atks 3 x 14 (3d6 + 4)". For CRs below 1 use "fof0125" for CR 1/8, "fof025" for CR 1/4, and "fof05" for CR 1/2. 12 | 13 | You can reformat this text file to fit any other snippits and you can find the full Forge of Foes stat blocks in JSON for other programmatic purposes at [Crit-Tech's Lazy GM Reference Document repo](https://github.com/crit-tech/LGMRD). 14 | 15 | **two_column_print_to_pdf.md**. This file contains instructions for setting up a stylesheet so the Obsidian Print to PDF function exports a nicely formatted two-column printout great for printed game notes. two_column_output_example.pdf is an example output from this technique. 16 | 17 | **pandoc_markdown_to_pdf_with_latex**. Is a more in-depth process for setting up a print to PDF. I'm keeping it around but the two-column approach above is easier and just as good. -------------------------------------------------------------------------------- /forge_of_foes_jelly_snippits.txt: -------------------------------------------------------------------------------- 1 | fof0125 |+| CR 1/8 AC/DC 11 HP 9 (7-11) Atk/Prof +3 DPR 3 Atks 1 × 4 (1d6 + 1) 2 | -==- 3 | fof025 |+| CR 1/4 AC/DC 11 HP 13 (10-16) Atk/Prof +3 DPR 5 Atks 1 × 5 (1d6 + 2) 4 | -==- 5 | fof05 |+| CR 1/2 AC/DC 12 HP 22 (17-28) Atk/Prof +4 DPR 8 Atks 2 × 4 (1d4 + 2) 6 | -==- 7 | fof1 |+| CR 1 AC/DC 12 HP 33 (25-41) Atk/Prof +5 DPR 12 Atks 2 × 6 (1d8 + 2) 8 | -==- 9 | fof2 |+| CR 2 AC/DC 13 HP 45 (34-56) Atk/Prof +5 DPR 17 Atks 2 × 9 (2d6 + 2) 10 | -==- 11 | fof3 |+| CR 3 AC/DC 13 HP 65 (49-81) Atk/Prof +5 DPR 23 Atks 2 × 12 (2d8 + 3) 12 | -==- 13 | fof4 |+| CR 4 AC/DC 14 HP 84 (64-106) Atk/Prof +6 DPR 28 Atks 2 × 14 (3d8 + 1) 14 | -==- 15 | fof5 |+| CR 5 AC/DC 15 HP 95 (71-119) Atk/Prof +7 DPR 35 Atks 3 × 12 (3d6 + 2) 16 | -==- 17 | fof6 |+| CR 6 AC/DC 15 HP 112 (84-140) Atk/Prof +7 DPR 41 Atks 3 × 14 (3d6 + 4) 18 | -==- 19 | fof7 |+| CR 7 AC/DC 15 HP 130 (98-162) Atk/Prof +7 DPR 47 Atks 3 × 16 (3d8 + 3) 20 | -==- 21 | fof8 |+| CR 8 AC/DC 15 HP 136 (102-170) Atk/Prof +7 DPR 53 Atks 3 × 18 (3d10 + 2) 22 | -==- 23 | fof9 |+| CR 9 AC/DC 16 HP 145 (109-181) Atk/Prof +8 DPR 59 Atks 3 × 10 (3d10 + 3) 24 | -==- 25 | fof10 |+| CR 10 AC/DC 17 HP 155 (116-194) Atk/Prof +9 DPR 65 Atks 4 × 16 (3d8 + 3) 26 | -==- 27 | fof11 |+| CR 11 AC/DC 17 HP 165 (124-206) Atk/Prof +9 DPR 71 Atks 4 × 18 (3d10 + 2) 28 | -==- 29 | fof12 |+| CR 12 AC/DC 17 HP 175 (131-219) Atk/Prof +9 DPR 77 Atks 4 × 19 (3d10 + 3) 30 | -==- 31 | fof13 |+| CR 13 AC/DC 18 HP 184 (138-230) Atk/Prof +10 DPR 83 Atks 4 × 21 (4d8 + 3) 32 | -==- 33 | fof14 |+| CR 14 AC/DC 19 HP 196 (147-245) Atk/Prof +11 DPR 89 Atks 4 × 22 (4d10) 34 | -==- 35 | fof15 |+| CR 15 AC/DC 19 HP 210 (158-263) Atk/Prof +11 DPR 95 Atks 5 × 19 (3d10 + 3) 36 | -==- 37 | fof16 |+| CR 16 AC/DC 19 HP 229 (172-286) Atk/Prof +11 DPR 101 Atks 5 × 21 (4d8 + 3) 38 | -==- 39 | fof17 |+| CR 17 AC/DC 20 HP 246 (185-308) Atk/Prof +12 DPR 107 Atks 5 × 22 (3d12 + 3) 40 | -==- 41 | fof18 |+| CR 18 AC/DC 21 HP 266 (200-333) Atk/Prof +13 DPR 113 Atks 5 × 23 (4d10 + 1) 42 | -==- 43 | fof19 |+| CR 19 AC/DC 21 HP 285 (214-356) Atk/Prof +13 DPR 119 Atks 5 × 24 (4d10 + 2) 44 | -==- 45 | fof20 |+| CR 20 AC/DC 21 HP 300 (225-375) Atk/Prof +13 DPR 132 Atks 5 × 26 (4d12) 46 | -==- 47 | fof21 |+| CR 21 AC/DC 22 HP 325 (244-406) Atk/Prof +14 DPR 150 Atks 5 × 30 (4d12 + 4) 48 | -==- 49 | fof22 |+| CR 22 AC/DC 23 HP 350 (263-438) Atk/Prof +15 DPR 168 Atks 5 × 34 (4d12 + 8) 50 | -==- 51 | fof23 |+| CR 23 AC/DC 23 HP 375 (281-469) Atk/Prof +15 DPR 186 Atks 5 × 37 (6d10 + 4) 52 | -==- 53 | fof24 |+| CR 24 AC/DC 23 HP 400 (300-500) Atk/Prof +15 DPR 204 Atks 5 × 41 (6d10 + 8) 54 | -==- 55 | fof25 |+| CR 25 AC/DC 24 HP 430 (323-538) Atk/Prof +16 DPR 222 Atks 5 × 44 (6d10 + 11) 56 | -==- 57 | fof26 |+| CR 26 AC/DC 25 HP 460 (345-575) Atk/Prof +17 DPR 240 Atks 5 × 48 (6d10 + 15) 58 | -==- 59 | fof27 |+| CR 27 AC/DC 25 HP 490 (368-613) Atk/Prof +17 DPR 258 Atks 5 × 52 (6d10 + 19) 60 | -==- 61 | fof28 |+| CR 28 AC/DC 25 HP 540 (405-675) Atk/Prof +17 DPR 276 Atks 5 × 55 (6d10 + 22) 62 | -==- 63 | fof29 |+| CR 29 AC/DC 26 HP 600 (450-750) Atk/Prof +18 DPR 294 Atks 5 × 59 (6d10 + 26) 64 | -==- 65 | fof30 |+| CR 30 AC/DC 27 HP 666 (500-833) Atk/Prof +19 DPR 312 Atks 5 × 62 (6d10 + 29) 66 | -==- -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mshea/obsidian_toolbox/3c0dc3240e9c24b35084a194014e1c846701ccd1/pandoc_markdown_to_pdf_with_latex/.DS_Store -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/README.md: -------------------------------------------------------------------------------- 1 | # Printing Markdown to Two-Column PDFs 2 | 3 | This project contains files to convert markdown files to a two-column PDF suitable for printing on a single page. 4 | 5 | It's intended to help someone writing notes for RPG games using the steps from [Return of the Lazy Dungeon Master](https://shop.slyflourish.com/products/return-of-the-lazy-dungeon-master) in Markdown and export it to a nice two-column single-page sheet so you can print it and put it in your trapper keeper. 6 | 7 | ## Easier Option – Styling Print to PDF 8 | 9 | Instead of installing and setting up all the scripts below, you can set a two-column stylesheet for the default "Print to PDF" of Obsidian. 10 | 11 | 1. Go to your Obsidian settings. 12 | 2. Go to "Appearance". 13 | 3. Scroll to the bottom and look for CSS snippets. 14 | 4. Click the folder icon. This will open up the folder in your desktop OS. 15 | 5. Open a text editor and create a new file with the filename of "two-column.css". 16 | 6. Paste the following CSS snippet into this new file: 17 | 18 | ``` 19 | @media print { 20 | .markdown-preview-view { 21 | column-count: 2; 22 | column-gap: 2em; 23 | font-family: "Computer Modern"; 24 | line-height: 1.2em; 25 | } 26 | } 27 | ``` 28 | 29 | The snippet file should disappear and now appear as an option under your existing snippets. Turn it on. 30 | 31 | Now, anytime you print to PDF, it will print a two-column version of the file. You can change the font-family in the CSS to change your font and use the scaling in the Print to PDF option to help it be both readable and, ideally, fit on one page. 32 | 33 | ## Complicated Setup for Pandoc and Latex 34 | 35 | You'll want some experience with shell scripting, markdown, latex, and Automator to get the following setup to work. There are many other ways to implement this setup beyond the one below. Use what ideas and materials here you wish to get your own setup working. 36 | 37 | ## Requirements 38 | 39 | This project requires a few different components: 40 | 41 | - [Pandoc](https://github.com/jgm/pandoc/blob/main/INSTALL.md). 42 | - A Latex interpreter for your machine such as [MacTex](https://tug.org/mactex/). 43 | - [Automator](https://en.wikipedia.org/wiki/Automator_(macOS)) for the Mac. 44 | 45 | I don't use this on a PC so I can't offer the PC equivalent but I know Pandoc is available for Windows so there's likely a similar process that works for PC. 46 | 47 | This project contains several different components: 48 | 49 | - **"example.md"**. an example markdown file. 50 | - **md_to_pdf.tex**. The Latex template for exporting markdown to PDF. 51 | - **md_to_pdf.sh**. The Pandoc batch script. 52 | - **md_to_pdf.app**. The automator file. 53 | - **output.pdf**. An example of what the output looks like using the included latex template. 54 | 55 | ## YMMV 56 | 57 | This is a pretty complicated setup so I can't guarantee it's easy to use but enough people have asked me about it that I wanted to make it available here. 58 | 59 | When I first set this up I used Chat GPT to help me out so below you'll find the instructions I received. 60 | 61 | Good luck! 62 | 63 | ## Longer Instructions 64 | 65 | Here are the instructions for creating an Automator script on macOS that opens a file, and sends it to a Pandoc shell script for converting a Markdown file to PDF using a LaTeX template: 66 | 67 | ### Prerequisites 68 | 69 | - Ensure you have Pandoc installed. You can install it via Homebrew with `brew install pandoc`. 70 | - Install LaTeX. This is necessary for PDF generation. You can install MacTeX with `brew install --cask mactex`. 71 | 72 | ### Creating the Pandoc Shell Script 73 | 74 | 1. Create a new shell script file, `convert_to_pdf.sh`, in your desired directory. 75 | 2. Open a text editor and add the following script: 76 | 77 | ```bash 78 | #!/bin/bash 79 | pandoc "$1" -o output.pdf --template=your-template.latex 80 | ``` 81 | Replace `your-template.latex` with the path to your LaTeX template file. 82 | 83 | 3. Save the script and make it executable: 84 | ```bash 85 | chmod +x convert_to_pdf.sh 86 | ``` 87 | 88 | ### Creating the Automator Script 89 | 90 | 1. Open Automator on your Mac. 91 | 2. Choose "Application" as the type for your new Automator document. 92 | 3. Drag and drop "Run Shell Script" from the Actions pane into the workflow. 93 | 4. Set "Pass input" to "as arguments". 94 | 5. In the shell script box, enter the full path to your shell script, passing the argument: 95 | 96 | ```bash 97 | /path/to/convert_to_pdf.sh "$@" 98 | ``` 99 | 100 | Replace `/path/to/convert_to_pdf.sh` with the actual path to your shell script. 101 | 102 | 6. Save the Automator Application. Choose a convenient location and name it, e.g., `MarkdownToPDF.app`. 103 | 104 | ### Usage 105 | 106 | To convert a Markdown file to PDF: 107 | - Drag and drop the Markdown file onto the `MarkdownToPDF.app` icon. 108 | - The script will process the file and generate a PDF named `output.pdf` in the same directory as the shell script. 109 | 110 | Include these instructions in your GitHub repository to guide users through setting up the workflow. 111 | 112 | ### Using the Shell Commands Plugin for Obsidian 113 | 114 | You can also use the [Shell Commands](https://github.com/Taitava/obsidian-shellcommands) plugin for Obsidian to export markdown files to PDF. 115 | 116 | You'll still need Pandoc, MacTeX, and the Latex template and above. 117 | 118 | Install the Shell Commands plugin and create a new shell script. 119 | 120 | Use the following shell script, replacing paths with your own when necessary. 121 | 122 | ``` 123 | /usr/local/bin/pandoc {{file_path:absolute}} --pdf-engine=/Library/TeX/texbin/pdflatex -s --template=/your/template/path/session_notes_template.tex -o "/your/output/path/output.pdf" --variable columns=2 124 | ``` 125 | 126 | Give it an alias name and, in the shell script's configuration, turn it on for the File Menu so you can right click on a file and export to PDF. 127 | -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/example.md: -------------------------------------------------------------------------------- 1 | # 2024-04-24 – Empire of the Ghouls 2 | 3 | ## Characters 4 | 5 | - Bruno (PP 15) – There are many layers to the dark gods worshipped by the ghouls – Akma Apophis is the oldest of them. 6 | - Durrim (PP 20) – Akma Apophis may be a mask of Hel – or vice versa. The ghouls worshipped both as separate gods yet both domains cross over. 7 | - HB (PP 18) – Camazotz loves the strife of the ghouls and their gods. Let them burn. 8 | - Ved Pinion (PP 19) – To see Ved Ivis in action is to see what Pinion might have become. Pinion had a whole life without murder. Ivis has had no such life. 9 | - Verci (PP ) – To have hunted the Shoggoth and destroyed it is amazing. But you sense something else here too. 10 | - Wynasia (PP 11) – Never have you been in the heart of a den of such evil in your life. This whole cavern could collapse and the world would be better for it. 11 | 12 | ## Strong Start 13 | 14 | In the shrine of Akma Aphosis, the caretaker awakens. 15 | 16 | ## Scenes 17 | 18 | - Temple of Akma Aphosis. The three bowls – DC 18 Religion or Arcana to convert them from the death of Akma Aphosis to the life of Aten. Each gives the equivalent of a long rest. 19 | 20 | ## Secrets and Clues 21 | 22 | - The god Akma-Apophis is one of the most powerful and ancient deities of the Ghoul Imperium – though less venerated than the Hunger God, Vardesain, or the cult of the Red Mother. 23 | - Ghouls worship many deities and many masks of those deities. 24 | - The Bone Cathedral was once a temple to Akma-Aphosis but later became a cathedral to the Hunger God Vardesain. 25 | - High Priest Radomir Marrowblight holds the Book of Worlds and the Book of Souls which he uses to conduct ancient rites of Akma Aphosis. 26 | - Smiling Margarette is fanatically loyal the Duke Radomir Marrowblight. Her Fifth Legion of Darakul, known as the Dread Feast, guard the ceremony. 27 | - High Priest Radomir has sealed the vault with death magic that turns both living and dead into dust. 28 | - Ixian ghouls have begun attacking other ghouls in Vandekhul. 29 | - The emperor still waits behind his walls of soldiers – the Crimson Blades and Armor of Titans. 30 | - The Dread Feast hates the Crimson Blades and Armor of Titans. They are fanatically loyal to Smiling Margaritte who is loyal to the duke. 31 | - Intelligence came to darakhuls through noble blood – the processing and devouring of noble and holy blood. 32 | 33 | ## Notable NPCs 34 | 35 | - Keslek the Caretaker – former priest of Akma Apophis now tossed aside to rot in the cellars for these new priests and their new rituals. 36 | 37 | ## Monsters – LBM 42 to 63 38 | 39 | - Serpents of Apophis CR 6 AC/DC 15 HP 112 Atk/Prof +7 DPR 41 Atks 3 × 1d6 + 11 – Grapple and restrain, acidic bites. 40 | - The Caretaker CR 8 AC/DC 15 HP 136 Atk/Prof +7 DPR 53 Atks 3 × 1d6 + 15 – Circle of death for 53 or 27. 41 | - Dread Feast Darakhul CR 6 AC/DC 15 HP 112 Atk/Prof +7 DPR 41 Atks 3 × 1d6 + 11 42 | - Smiling Margaritte CR 12 AC/DC 17 HP 175 Atk/Prof +9 DPR 77 Atks 4 × 1d6 + 16 43 | - High Priest Radomir Marrowblight CR 12 AC/DC 17 HP 175 Atk/Prof +9 DPR 77 Atks 4 × 1d6 + 16 44 | - Duke Moretto Lichmark CR 10 AC/DC 17 HP 155 Atk/Prof +9 DPR 65 Atks 4 × 1d6 + 13 45 | - Iron Ghoul CR 4 AC/DC 14 HP 84 Atk/Prof +6 DPR 28 Atks 2 × 1d6 + 11 46 | - Qorgeth, the Writhing Prince, Pale Maw, the Devourer, is the 47 | lord of worms and decay TOB 2023 80 48 | 49 | ## Treasure 50 | 51 | - 14,910 gp, 1,728 pp (**32,190gp**), 5,000 gp diamond, [Ioun Stone (Leadership)](https://open5e.com/magic-items/ioun-stone), [Ring of Regeneration](https://open5e.com/magic-items/ring-of-regeneration) 52 | - The Left Eye – Gemstone of disintegrate 53 | - The Right Eye – Power Word Kill 54 | - The Three Bowls. 55 | 56 | -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/md_to_pdf.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMIsApplet 6 | 7 | AMStayOpen 8 | 9 | BuildMachineOSBuild 10 | 22A380019 11 | CFBundleAllowMixedLocalizations 12 | 13 | CFBundleDevelopmentRegion 14 | English 15 | CFBundleDocumentTypes 16 | 17 | 18 | CFBundleTypeExtensions 19 | 20 | * 21 | 22 | CFBundleTypeName 23 | Automator workflow file 24 | CFBundleTypeOSTypes 25 | 26 | **** 27 | 28 | CFBundleTypeRole 29 | Viewer 30 | 31 | 32 | CFBundleExecutable 33 | Automator Application Stub 34 | CFBundleIconFile 35 | ApplicationStub 36 | CFBundleIdentifier 37 | com.apple.automator.markdown-to-pdf 38 | CFBundleInfoDictionaryVersion 39 | 6.0 40 | CFBundleName 41 | markdown_to_pdf 42 | CFBundlePackageType 43 | APPL 44 | CFBundleShortVersionString 45 | 1.3 46 | CFBundleSignature 47 | ???? 48 | CFBundleSupportedPlatforms 49 | 50 | MacOSX 51 | 52 | CFBundleURLTypes 53 | 54 | CFBundleVersion 55 | 523 56 | DTCompiler 57 | com.apple.compilers.llvm.clang.1_0 58 | DTPlatformBuild 59 | 60 | DTPlatformName 61 | macosx 62 | DTPlatformVersion 63 | 14.4 64 | DTSDKBuild 65 | 23E200 66 | DTSDKName 67 | macosx14.4.internal 68 | DTXcode 69 | 1500 70 | DTXcodeBuild 71 | 15E6079e 72 | LSMinimumSystemVersion 73 | 10.9 74 | LSUIElement 75 | 76 | NSAppleEventsUsageDescription 77 | This workflow needs to control other applications to run. 78 | NSAppleMusicUsageDescription 79 | This workflow needs access to your music to run. 80 | NSAppleScriptEnabled 81 | YES 82 | NSCalendarsUsageDescription 83 | This workflow needs access to your calendars to run. 84 | NSCameraUsageDescription 85 | This workflow needs access to your camera to run. 86 | NSContactsUsageDescription 87 | This workflow needs access to your contacts to run. 88 | NSHomeKitUsageDescription 89 | This workflow needs access to your HomeKit Home to run. 90 | NSMicrophoneUsageDescription 91 | This workflow needs access to your microphone to run. 92 | NSPhotoLibraryUsageDescription 93 | This workflow needs access to your photos to run. 94 | NSPrincipalClass 95 | NSApplication 96 | NSRemindersUsageDescription 97 | This workflow needs access to your reminders to run. 98 | NSServices 99 | 100 | NSSiriUsageDescription 101 | This workflow needs access to Siri to run. 102 | NSSystemAdministrationUsageDescription 103 | This workflow needs access to administer this system in order to run. 104 | UTExportedTypeDeclarations 105 | 106 | UTImportedTypeDeclarations 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/md_to_pdf.app/Contents/MacOS/Automator Application Stub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mshea/obsidian_toolbox/3c0dc3240e9c24b35084a194014e1c846701ccd1/pandoc_markdown_to_pdf_with_latex/md_to_pdf.app/Contents/MacOS/Automator Application Stub -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/md_to_pdf.app/Contents/Resources/ApplicationStub.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mshea/obsidian_toolbox/3c0dc3240e9c24b35084a194014e1c846701ccd1/pandoc_markdown_to_pdf_with_latex/md_to_pdf.app/Contents/Resources/ApplicationStub.icns -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/md_to_pdf.app/Contents/Resources/Assets.car: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mshea/obsidian_toolbox/3c0dc3240e9c24b35084a194014e1c846701ccd1/pandoc_markdown_to_pdf_with_latex/md_to_pdf.app/Contents/Resources/Assets.car -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/md_to_pdf.app/Contents/Resources/InfoPlist.loctable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mshea/obsidian_toolbox/3c0dc3240e9c24b35084a194014e1c846701ccd1/pandoc_markdown_to_pdf_with_latex/md_to_pdf.app/Contents/Resources/InfoPlist.loctable -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/md_to_pdf.app/Contents/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Resources/ApplicationStub.icns 8 | 9 | RYTqh+7iocnEIV8iTs9EgJjEkO4= 10 | 11 | Resources/Assets.car 12 | 13 | 2w3tVqOo5nzPcvzUkUuSnGwYA2A= 14 | 15 | Resources/InfoPlist.loctable 16 | 17 | 71fUaDHmKoEjKlKkMLLNl4Pivgg= 18 | 19 | 20 | files2 21 | 22 | Resources/ApplicationStub.icns 23 | 24 | hash 25 | 26 | RYTqh+7iocnEIV8iTs9EgJjEkO4= 27 | 28 | hash2 29 | 30 | odOqeBevxysHIbR5V5qgZz11qTuV9cL5jKaIcUw3R0I= 31 | 32 | 33 | Resources/Assets.car 34 | 35 | hash 36 | 37 | 2w3tVqOo5nzPcvzUkUuSnGwYA2A= 38 | 39 | hash2 40 | 41 | /KAt2FTS4OhX8ow5H1P4iYTpc+Ro+KDnYwfAYG6uvrA= 42 | 43 | 44 | Resources/InfoPlist.loctable 45 | 46 | hash 47 | 48 | 71fUaDHmKoEjKlKkMLLNl4Pivgg= 49 | 50 | hash2 51 | 52 | tyC+7QMvGJZKI4nDnLOsiKfB+pRASNJx8BuCkMwIJj4= 53 | 54 | 55 | document.wflow 56 | 57 | cdhash 58 | 59 | apEbkPRks7ngqiM1eVI5D6ABE3o= 60 | 61 | requirement 62 | cdhash H"b946eff533da74ee1295440fd0eb3e532bb3dd36" or cdhash H"6a911b90f464b3b9e0aa23357952390fa001137a" 63 | 64 | 65 | rules 66 | 67 | ^Resources/ 68 | 69 | ^Resources/.*\.lproj/ 70 | 71 | optional 72 | 73 | weight 74 | 1000 75 | 76 | ^Resources/.*\.lproj/locversion.plist$ 77 | 78 | omit 79 | 80 | weight 81 | 1100 82 | 83 | ^Resources/Base\.lproj/ 84 | 85 | weight 86 | 1010 87 | 88 | ^version.plist$ 89 | 90 | 91 | rules2 92 | 93 | .*\.dSYM($|/) 94 | 95 | weight 96 | 11 97 | 98 | ^(.*/)?\.DS_Store$ 99 | 100 | omit 101 | 102 | weight 103 | 2000 104 | 105 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 106 | 107 | nested 108 | 109 | weight 110 | 10 111 | 112 | ^.* 113 | 114 | ^Info\.plist$ 115 | 116 | omit 117 | 118 | weight 119 | 20 120 | 121 | ^PkgInfo$ 122 | 123 | omit 124 | 125 | weight 126 | 20 127 | 128 | ^Resources/ 129 | 130 | weight 131 | 20 132 | 133 | ^Resources/.*\.lproj/ 134 | 135 | optional 136 | 137 | weight 138 | 1000 139 | 140 | ^Resources/.*\.lproj/locversion.plist$ 141 | 142 | omit 143 | 144 | weight 145 | 1100 146 | 147 | ^Resources/Base\.lproj/ 148 | 149 | weight 150 | 1010 151 | 152 | ^[^/]+$ 153 | 154 | nested 155 | 156 | weight 157 | 10 158 | 159 | ^embedded\.provisionprofile$ 160 | 161 | weight 162 | 20 163 | 164 | ^version\.plist$ 165 | 166 | weight 167 | 20 168 | 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/md_to_pdf.app/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 523 7 | AMApplicationVersion 8 | 2.10 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.cocoa.path 25 | 26 | 27 | AMActionVersion 28 | 1.2.1 29 | AMApplication 30 | 31 | Finder 32 | 33 | AMParameterProperties 34 | 35 | defaultLocation 36 | 37 | isPathPopUp 38 | 39 | variableUUIDsInMenu 40 | 41 | 42 | granularity 43 | 44 | multipleSelection 45 | 46 | promptMessage 47 | 48 | 49 | AMProvides 50 | 51 | Container 52 | List 53 | Types 54 | 55 | com.apple.cocoa.path 56 | 57 | 58 | ActionBundlePath 59 | /System/Library/Automator/Ask for Finder Items.action 60 | ActionName 61 | Ask for Finder Items 62 | ActionParameters 63 | 64 | defaultLocation 65 | ~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Mike's Obsidian Vault 66 | granularity 67 | 0 68 | multipleSelection 69 | 70 | promptMessage 71 | Choose a Finder Item: 72 | 73 | BundleIdentifier 74 | com.apple.Automator.AskForFinderItems 75 | CFBundleVersion 76 | 1.2.1 77 | CanShowSelectedItemsWhenRun 78 | 79 | CanShowWhenRun 80 | 81 | Category 82 | 83 | AMCategoryFilesAndFolders 84 | 85 | Class Name 86 | AMAskForFinderItemsAction 87 | InputUUID 88 | B7E7BAAD-CF84-46DB-918F-482F4D1C53CA 89 | Keywords 90 | 91 | Find 92 | Item 93 | File 94 | Folder 95 | Ask 96 | Choose 97 | Prompt 98 | 99 | OutputUUID 100 | EB2B9500-9CDC-4537-B586-0D9B8CC5FA0F 101 | UUID 102 | 35A8CFC0-65E9-4E06-9976-FD43C1B4C9B0 103 | UnlocalizedApplications 104 | 105 | Finder 106 | 107 | arguments 108 | 109 | 0 110 | 111 | default value 112 | 0 113 | name 114 | granularity 115 | required 116 | 0 117 | type 118 | 0 119 | uuid 120 | 0 121 | 122 | 1 123 | 124 | default value 125 | 126 | name 127 | multipleSelection 128 | required 129 | 0 130 | type 131 | 0 132 | uuid 133 | 1 134 | 135 | 2 136 | 137 | default value 138 | ~/Desktop 139 | name 140 | defaultLocation 141 | required 142 | 0 143 | type 144 | 0 145 | uuid 146 | 2 147 | 148 | 3 149 | 150 | default value 151 | Choose a Finder Item: 152 | name 153 | promptMessage 154 | required 155 | 0 156 | type 157 | 0 158 | uuid 159 | 3 160 | 161 | 162 | isViewVisible 163 | 1 164 | location 165 | 398.750000:221.000000 166 | nibPath 167 | /System/Library/Automator/Ask for Finder Items.action/Contents/Resources/Base.lproj/main.nib 168 | 169 | isViewVisible 170 | 1 171 | 172 | 173 | action 174 | 175 | AMAccepts 176 | 177 | Container 178 | List 179 | Optional 180 | 181 | Types 182 | 183 | com.apple.cocoa.string 184 | 185 | 186 | AMActionVersion 187 | 2.0.3 188 | AMApplication 189 | 190 | Automator 191 | 192 | AMParameterProperties 193 | 194 | COMMAND_STRING 195 | 196 | CheckedForUserDefaultShell 197 | 198 | inputMethod 199 | 200 | shell 201 | 202 | source 203 | 204 | 205 | AMProvides 206 | 207 | Container 208 | List 209 | Types 210 | 211 | com.apple.cocoa.string 212 | 213 | 214 | ActionBundlePath 215 | /System/Library/Automator/Run Shell Script.action 216 | ActionName 217 | Run Shell Script 218 | ActionParameters 219 | 220 | COMMAND_STRING 221 | # Get the selected file path from the previous action 222 | file="$1" 223 | 224 | # Set the output path to the desktop 225 | output_path="$HOME/Desktop" 226 | 227 | # Generate the PDF using pandoc 228 | /usr/local/bin/pandoc "$file" --pdf-engine=/Library/TeX/texbin/pdflatex -s --template=/Users/michaelshea/Documents/latex_templates/session_notes_template.tex -o "$output_path/output.pdf" --variable columns=2 229 | 230 | # Check if the PDF was generated successfully 231 | if [ "$?" -eq 0 ]; then 232 | echo "PDF generated successfully at $output_path/output.pdf" 233 | else 234 | echo "Error: Failed to generate PDF" 235 | exit 1 236 | fi 237 | 238 | CheckedForUserDefaultShell 239 | 240 | inputMethod 241 | 1 242 | shell 243 | /bin/zsh 244 | source 245 | 246 | 247 | BundleIdentifier 248 | com.apple.RunShellScript 249 | CFBundleVersion 250 | 2.0.3 251 | CanShowSelectedItemsWhenRun 252 | 253 | CanShowWhenRun 254 | 255 | Category 256 | 257 | AMCategoryUtilities 258 | 259 | Class Name 260 | RunShellScriptAction 261 | InputUUID 262 | 4DE2C304-243F-4EE6-AF2F-6D48C257E9C2 263 | Keywords 264 | 265 | Shell 266 | Script 267 | Command 268 | Run 269 | Unix 270 | 271 | OutputUUID 272 | E00F8C7A-7D56-4929-862C-A78BE0CB1D24 273 | UUID 274 | D40FAA70-D2BA-4DE8-92BD-B79DFC9DCD85 275 | UnlocalizedApplications 276 | 277 | Automator 278 | 279 | arguments 280 | 281 | 0 282 | 283 | default value 284 | 0 285 | name 286 | inputMethod 287 | required 288 | 0 289 | type 290 | 0 291 | uuid 292 | 0 293 | 294 | 1 295 | 296 | default value 297 | 298 | name 299 | CheckedForUserDefaultShell 300 | required 301 | 0 302 | type 303 | 0 304 | uuid 305 | 1 306 | 307 | 2 308 | 309 | default value 310 | 311 | name 312 | source 313 | required 314 | 0 315 | type 316 | 0 317 | uuid 318 | 2 319 | 320 | 3 321 | 322 | default value 323 | 324 | name 325 | COMMAND_STRING 326 | required 327 | 0 328 | type 329 | 0 330 | uuid 331 | 3 332 | 333 | 4 334 | 335 | default value 336 | /bin/sh 337 | name 338 | shell 339 | required 340 | 0 341 | type 342 | 0 343 | uuid 344 | 4 345 | 346 | 347 | isViewVisible 348 | 1 349 | location 350 | 398.750000:403.000000 351 | nibPath 352 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/Base.lproj/main.nib 353 | 354 | isViewVisible 355 | 1 356 | 357 | 358 | connectors 359 | 360 | B79EC498-8FED-40D7-BA67-4127804A6CDC 361 | 362 | from 363 | 35A8CFC0-65E9-4E06-9976-FD43C1B4C9B0 - 35A8CFC0-65E9-4E06-9976-FD43C1B4C9B0 364 | to 365 | D40FAA70-D2BA-4DE8-92BD-B79DFC9DCD85 - D40FAA70-D2BA-4DE8-92BD-B79DFC9DCD85 366 | 367 | 368 | workflowMetaData 369 | 370 | workflowTypeIdentifier 371 | com.apple.Automator.application 372 | 373 | 374 | 375 | -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/md_to_pdf.sh: -------------------------------------------------------------------------------- 1 | # Get the selected file path from the previous action 2 | file="$1" 3 | 4 | # Set the output path to the desktop 5 | output_path="$HOME/Desktop" 6 | 7 | # Generate the PDF using pandoc 8 | /usr/local/bin/pandoc "$file" --pdf-engine=/Library/TeX/texbin/pdflatex -s --template=/Users/username/Documents/latex_templates/md_to_pdf.tex -o "$output_path/output.pdf" --variable columns=2 9 | 10 | # Check if the PDF was generated successfully 11 | if [ "$?" -eq 0 ]; then 12 | echo "PDF generated successfully at $output_path/output.pdf" 13 | else 14 | echo "Error: Failed to generate PDF" 15 | exit 1 16 | fi 17 | -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/md_to_pdf.tex: -------------------------------------------------------------------------------- 1 | \documentclass[10pt]{article} 2 | \usepackage[left=0.5in,right=0.5in,top=0.5in,bottom=0.5in]{geometry} 3 | \usepackage{multicol} 4 | \usepackage{fancyhdr} 5 | \usepackage{titlesec} 6 | \usepackage{enumitem} 7 | \usepackage[draft]{hyperref} 8 | 9 | \fancyhead{} % Clear all header fields 10 | \fancyfoot{} % Clear all footer fields 11 | \renewcommand{\headrulewidth}{0pt} % Remove the line below the header 12 | 13 | \titleformat{\section} 14 | {\normalfont\Large\bfseries}{}{0em}{} 15 | [\titlerule] 16 | 17 | \titleformat{\subsection} 18 | {\normalfont\large\bfseries}{}{0em}{} 19 | 20 | \renewcommand{\thesection}{} 21 | \renewcommand{\thesubsection}{} 22 | 23 | \providecommand{\tightlist}{% 24 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 25 | 26 | \setlist[itemize]{leftmargin=*} 27 | 28 | \begin{document} 29 | \pagestyle{fancy} 30 | \begin{multicols}{2} 31 | $body$ 32 | \end{multicols} 33 | \end{document} 34 | -------------------------------------------------------------------------------- /pandoc_markdown_to_pdf_with_latex/output.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mshea/obsidian_toolbox/3c0dc3240e9c24b35084a194014e1c846701ccd1/pandoc_markdown_to_pdf_with_latex/output.pdf -------------------------------------------------------------------------------- /two-columns.css: -------------------------------------------------------------------------------- 1 | @media print { 2 | .markdown-preview-view { 3 | column-count: 2; 4 | column-gap: 2em; 5 | font-family: "Computer Modern"; 6 | line-height: 1.2em; 7 | } 8 | 9 | .markdown-preview-view h1, 10 | .markdown-preview-view h2 { 11 | font-weight: normal; 12 | font-family: serif; 13 | color: #aa0000; 14 | } 15 | 16 | .markdown-preview-view h1 { 17 | font-size: 1.6em; 18 | } 19 | 20 | .markdown-preview-view h2 { 21 | font-size: 1.4em; 22 | } 23 | 24 | .markdown-preview-view strong { 25 | color: #990000; 26 | } 27 | 28 | .markdown-preview-view li { 29 | break-inside: avoid; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /two_column_output_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mshea/obsidian_toolbox/3c0dc3240e9c24b35084a194014e1c846701ccd1/two_column_output_example.pdf -------------------------------------------------------------------------------- /two_column_print_to_pdf.md: -------------------------------------------------------------------------------- 1 | # Print to Two-Column PDF with Obsidian 2 | 3 | For game notes, I like to print my notes on a single sheet of paper in two columns. 4 | 5 | Using a custom stylesheet with Obsidian, you can customize the PDF output of Obsidian's PDF export to support this two-column format. 6 | 7 | Here are the steps: 8 | 9 | 1. Open a text editor somewhere and paste in the following stylesheet: 10 | 11 | ``` 12 | @media print { 13 | .markdown-preview-view { 14 | column-count: 2; 15 | column-gap: 2em; 16 | font-family: "Computer Modern"; 17 | line-height: 1.2em; 18 | } 19 | } 20 | ``` 21 | 22 | 2. Save this file to your desktop as "two-column.css". 23 | 3. Open your Obsidian settings. 24 | 4. Go to "Appearance" and open it. 25 | 5. Scroll to the bottom and look for "CSS snippets". 26 | 6. Click the folder icon. This will open up the folder in your desktop OS. 27 | 7. Drag the "two-column.css" file to the snippets folder. The file should disappear as Obsidian absorbs it into its warm embrace. 28 | 8. The snippet should appear as an option under your existing snippets. Toggle it on. 29 | 30 | Now, anytime you print to PDF, it will print a two-column version of the file. You can change the font-family and add other styles as you like. I found the ones in the script work best for me. Use the scaling option when you print to PDF to maximize it to a single page. If it ends up too small, your simply have too many notes. Just cut a few and it'll be perfect. 31 | 32 | See two_column_output_example.pdf for an example of the PDF output from this setup. 33 | --------------------------------------------------------------------------------