Notepad/enter/Coding Tips (Classical)/Project Vault/Setup Guides/Setting up GDrive for Expor...

4.1 KiB
Raw Blame History

Journals & Docs

  1. Install pandoc: https://pandoc.org/installing.html 142
  2. Reboot your computer if this is windows (the installer updates $PATH on windows and a reboot is required to take effect)
  3. Make a new folder, and make a copy of your documents to this folder. Hold down shift and right click an empty area in the file explorer and click on “Open PowerShell here”
  4. Try running pandoc --help, if you get a bunch of help text, then pandoc is properly installed. Paste the following into the console and it should be able to convert all of the docx files in this folder to markdown.

Windows:

For pandoc script in Windows:

Get-ChildItem . -Filter *.docx | Foreach-Object { pandoc --from docx --to markdown $_ -o $_.Name.Replace('.docx', '.md') }
  • Pandoc manual also found here

For no-wrap clean .md files without 80-character wrap in Windows:

Get-ChildItem . -Filter *.docx | Foreach-Object { pandoc --from docx --to markdown --wrap=none $_ -o $_.Name.Replace('.docx', '.md') }

for Linux & Mac

  1. place a script with the following content in the folder with the files youd like to convert:
find -name "*.docx" -type f -exec sh -c ' for f; do pandoc -f docx -t markdown -o "${f%.*}.md" "$f" done ' find-sh {} +
  1. Then execute the script via terminal like this: ./name-of-script

  2. If you want to remove the original file, add the following line rm "$f" before the done command

  3. To add option for images add in the/media folder with this script

You have to pass option in pandoc.
This will convert .docx in .md extracting images in /media folder

gci -r -i *.docx |foreach{$md=$_.directoryname+"\"+$_.basename+".md";pandoc -f docx -s --extract-media=./ $_.name -o $md}
  1. Import into Obsidian

Obsidian uses Markdown .md files as the primary format for notes. This makes it easy to import Markdown files into Obsidian. Many apps can edit Markdown files or export to this format.

There are several ways to add Markdown files to your Obsidian vault:

  1. Drag and drop files or folders into the File explorer window
  2. Use your system file browser (e.g. Windows Explorer or Finder on macOS), and move your files directly into the Obsidian vault folder.
  • Converting from other flavors of Markdown

Subject-based folders

Colab Python Notebooks

  • You can download these and store within obsidian to connect to your git repo

Photos and image upload

https://www.youtube.com/watch?v=Wjrdr0NU4Sk