<%* const title = tp.file.title; const uri = 'obsidian://open?vault=Vault&file=' + encodeURI(title); const fullstring = '[' + title + ']' + '(' + uri + ')'; navigator.clipboard.writeText(fullstring); %>
/* Formatting for Bible verses (h6 headers) in Obsidian */ | |
.markdown-preview-view h6, | |
.cc-pretty-preview .markdown-preview-view h6 | |
{ | |
position: relative; | |
left: -4%; | |
top: 18px; | |
line-height: 0px; | |
margin-top: -20px; | |
margin-right: 3px; |
#!/bin/bash | |
# ------------------------------------------------- | |
# Before running the script, make sure that you understand it. Running code you find on the Internet may damage your system. | |
# ------------------------------------------------- | |
# In Amazing marvin, set the path to this script as "Start time tracking task" in the "System Triggers strategy" like this: | |
# /Path/to/this/script $TASK_TITLE | |
# Replace "YourSecretToken" with your Toggl API token below. | |
# ------------------------------------------------- | |
curl -v -u YourSecretToken:api_token \ |
name: Release Obsidian plugin | |
on: | |
push: | |
tags: | |
- "*" | |
env: | |
PLUGIN_NAME: FINDME # Change this to match the id of your plugin. |
#!/bin/bash | |
# Author: Joschua | |
# Gist script link: https://gist.github.com/selfire1/f9ddddedc19a59eb6b3103ab51dec11d | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
// Author: Joschua // Original gist: https://gist.github.com/selfire1/bd1ebf8fd5af629f45a43cef99623236
// Set the amount of search results to fetch maxResults = 3 // Opens a dialogue for book to search for bookQuery = await tp.system.prompt("Enter book to search for 📚🔎");
// Calls the Google Book API to fetch book data
<%*
// Append to Daily
var dailyDate = "DATE"; //date of the daily note to append to/create (eg."2022-05-20" or 'tp.file.now("YYYY-MM-DD")'
const append = * TEXT
; //text to append
const folder = app.vault.getAbstractFileByPath("20 Journals"); if (!tp.file.exists(dailyDate)) { await tp.file.create_new(append,dailyDate, false, folder) } else { const originalContent = await app.vault.read(tp.file.find_tfile(dailyDate));
<%* // Select active line // Source: https://gist.github.com/GitMurf/c52dfef13162d88375975e4eefedf3a7 const editor = app.workspace.activeLeaf.view.editor; const curLineNum = editor.getCursor().line; editor.setSelection({ line: curLineNum, ch: 0 }, { line: curLineNum, ch: editor.getLine(curLineNum).length }); let copiedStr = editor.getSelection(); copiedStr = copiedStr.trim();
// Replace formatting
on run argv | |
-- Variables | |
set _cmd to (item 1 of argv) | |
tell application "Finder" to set _bounds to bounds of window of desktop | |
set _xPos to (item 1 of _bounds) | |
set _yPos to (item 2 of _bounds) | |
set _ySize to (item 3 of _bounds) | |
set _xSize to (item 4 of _bounds) | |
-- get bounds | |
-- do split: app1, app2, set split |