Hello,
Figured I’d share an improvement upon a video I found which detailed a method for capturing webpages into Obsidian. I was inspired by Notion’s WebClipper and wanted to click once to put files in a drop-box in my Vault. Code mainly taken from here and modified very slightly to fit Obsidian.
- List item
Later on I plan on sprucing up this script with regex or list matching so that it can search for new files and place them in a specific Zettelkasten inbox (e.g. look for “python”, put in Programming/Python/Articles)
You will need:
- AutoHotKey (AHK)
- Some form of Markdown Web Clipper. I have used MarkDownload ((MarkDownload - Markdown Web Clipper – Get this Extension for 🦊 Firefox (en-US)).
- A text editor of your choosing (go notepad++!)
- A way to schedule tasks (Task Scheduler in Windows)
- I’m not sure how to do this yet on Mac/Linux though I’m sure it’s possible.
After installing AutoHotKey:
-
(Optional) Create an Autohotkey Scri
-
Open a text editor of your choosing, and paste the following code into it.
-
Change the “srcPath” variable to your browser’s downloads folder (for me, I just set this to be C:\Users\Me\Downloads). Don’t forget the quotes!
-
Change the “destPath” variable to fit the destination folder - I set this to “C:\Users\Me\ObsidianMain\Main\A INBOX” for my Folder “A INBOX” in my vault “Main”.
-
Save the file as MarkdownMover.ahk.
-
Run MarkdownMover.ahk with AutoHotkey - every 60 seconds any .md files in your downloads will be moved to a designated folder in your vault. If you want to get fancy you could have multiple folders that you move to, with regex or list matching as mentioned above.
Semi-Optional steps to have the ahk script launch on logon.
5. Open Windows Task Scheduler (not task manager)
6. Create a New Basic Task which runs your AHK file. Set it to run on Logon or Daily (I’m not sure how AHK handles repeated launches, so I chose logon)
7. Enjoy living in luxury.
#Persistent
srcPath := "REPLACEME"
destPath := "REPLACEME"
SetTimer, TheMover, % 1*60*1000 ; check once every minute
Return
TheMover:
Loop, Files,% srcPath "\*.md"
FileMove,% A_LoopFileFullPath,% destPath
Return