update: Add quickadd

Allow user to :
- Quickly create tasks on different parts of the vault
- Quickly import tasks from todoist to different part of the vault
This commit is contained in:
Mathis Gauthey
2024-01-04 10:55:04 +01:00
parent 64c6a44ddb
commit 5401f82472
4 changed files with 20329 additions and 0 deletions

428
.obsidian/plugins/quickadd/data.json vendored Normal file
View File

@@ -0,0 +1,428 @@
{
"choices": [
{
"id": "70c319ad-181f-41a1-8b99-f5e66d75f768",
"name": "Import from Todoist",
"type": "Multi",
"command": true,
"choices": [
{
"id": "5125ae25-fa9f-40da-ad0b-a846c47f8ef9",
"name": "Import from Todoist to Cursor",
"type": "Capture",
"command": true,
"appendLink": false,
"captureTo": "",
"captureToActiveFile": true,
"createFileIfItDoesntExist": {
"enabled": false,
"createWithTemplate": false,
"template": ""
},
"format": {
"enabled": true,
"format": "{{MACRO:TaskSync}}"
},
"insertAfter": {
"enabled": false,
"after": "",
"insertAtEnd": false,
"considerSubsections": false,
"createIfNotFound": false,
"createIfNotFoundLocation": "top"
},
"prepend": false,
"task": false,
"openFileInNewTab": {
"enabled": false,
"direction": "vertical",
"focus": true
},
"openFile": false,
"openFileInMode": "default"
},
{
"id": "3ab3c912-c837-441e-b411-98205f9172d1",
"name": "Import from Todoist to Project",
"type": "Capture",
"command": true,
"appendLink": false,
"captureTo": "2-Areas/",
"captureToActiveFile": false,
"createFileIfItDoesntExist": {
"enabled": true,
"createWithTemplate": true,
"template": "5-Templates/Areas.md"
},
"format": {
"enabled": true,
"format": "{{MACRO:ProjectSync}}"
},
"insertAfter": {
"enabled": true,
"after": "## Projects 🎯",
"insertAtEnd": true,
"considerSubsections": false,
"createIfNotFound": false,
"createIfNotFoundLocation": "top"
},
"prepend": false,
"task": false,
"openFileInNewTab": {
"enabled": false,
"direction": "vertical",
"focus": true
},
"openFile": true,
"openFileInMode": "default"
},
{
"id": "995f7631-c67b-40f0-8ea7-8538c5b216fa",
"name": "Import from Todoist to One-Off Tasks",
"type": "Capture",
"command": true,
"appendLink": false,
"captureTo": "-Daily-Notes/{{DATE}}",
"captureToActiveFile": false,
"createFileIfItDoesntExist": {
"enabled": true,
"createWithTemplate": true,
"template": "5-Templates/Daily-Notes.md"
},
"format": {
"enabled": true,
"format": "{{MACRO:TaskSync}}"
},
"insertAfter": {
"enabled": true,
"after": "## Notes 📝",
"insertAtEnd": true,
"considerSubsections": false,
"createIfNotFound": false,
"createIfNotFoundLocation": "top"
},
"prepend": false,
"task": false,
"openFileInNewTab": {
"enabled": false,
"direction": "vertical",
"focus": true
},
"openFile": false,
"openFileInMode": "default"
},
{
"id": "90f4db1e-6678-4b18-8a4f-267b840bf636",
"name": "Import from Todoist to Someday Maybe",
"type": "Capture",
"command": true,
"appendLink": false,
"captureTo": "Someday Maybe 💭.md",
"captureToActiveFile": false,
"createFileIfItDoesntExist": {
"enabled": false,
"createWithTemplate": false,
"template": ""
},
"format": {
"enabled": true,
"format": "{{MACRO:SomedaySync}}"
},
"insertAfter": {
"enabled": true,
"after": "## Inbox",
"insertAtEnd": true,
"considerSubsections": false,
"createIfNotFound": false,
"createIfNotFoundLocation": "top"
},
"prepend": false,
"task": false,
"openFileInNewTab": {
"enabled": false,
"direction": "vertical",
"focus": true
},
"openFile": true,
"openFileInMode": "default"
},
{
"id": "0a3555d1-4392-4ae8-9b74-ee1f83de60d2",
"name": "Import from Todoist to Passions",
"type": "Capture",
"command": true,
"appendLink": false,
"captureTo": "Passions Backlog 🎮.md",
"captureToActiveFile": false,
"createFileIfItDoesntExist": {
"enabled": false,
"createWithTemplate": false,
"template": ""
},
"format": {
"enabled": true,
"format": "{{MACRO:PassionSync}}"
},
"insertAfter": {
"enabled": true,
"after": "## Wishlist",
"insertAtEnd": false,
"considerSubsections": false,
"createIfNotFound": false,
"createIfNotFoundLocation": "top"
},
"prepend": false,
"task": false,
"openFileInNewTab": {
"enabled": false,
"direction": "vertical",
"focus": true
},
"openFile": true,
"openFileInMode": "default"
}
],
"collapsed": false
},
{
"id": "dad7b11b-b288-4838-81b7-680152ca1766",
"name": "Create Something",
"type": "Multi",
"command": true,
"choices": [
{
"id": "8b997f24-c23d-4911-8f5d-360903ef9c69",
"name": "Create Project",
"type": "Capture",
"command": true,
"appendLink": false,
"captureTo": "2-Areas/",
"captureToActiveFile": false,
"createFileIfItDoesntExist": {
"enabled": true,
"createWithTemplate": true,
"template": "5-Templates/Areas.md"
},
"format": {
"enabled": true,
"format": "[[{{VALUE}}]] {{DATE}}"
},
"insertAfter": {
"enabled": true,
"after": "## Projects 🎯",
"insertAtEnd": true,
"considerSubsections": false,
"createIfNotFound": false,
"createIfNotFoundLocation": "bottom"
},
"prepend": false,
"task": true,
"openFileInNewTab": {
"enabled": false,
"direction": "vertical",
"focus": true
},
"openFile": true,
"openFileInMode": "default"
},
{
"id": "123bcf64-17f4-4405-8e7c-05a26daabdfa",
"name": "Create One-Off Task",
"type": "Capture",
"command": true,
"appendLink": false,
"captureTo": "-Daily-Notes/{{DATE}}",
"captureToActiveFile": false,
"createFileIfItDoesntExist": {
"enabled": true,
"createWithTemplate": true,
"template": "5-Templates/Daily-Notes.md"
},
"format": {
"enabled": true,
"format": "{{VALUE}} {{DATE}}"
},
"insertAfter": {
"enabled": true,
"after": "## Notes 📝\\n",
"insertAtEnd": true,
"considerSubsections": false,
"createIfNotFound": false,
"createIfNotFoundLocation": "top"
},
"prepend": false,
"task": true,
"openFileInNewTab": {
"enabled": false,
"direction": "vertical",
"focus": true
},
"openFile": true,
"openFileInMode": "default"
},
{
"id": "96917cbb-f169-4448-aa0f-767258a15e02",
"name": "Create Someday Maybe",
"type": "Capture",
"command": true,
"appendLink": false,
"captureTo": "Someday Maybe 💭.md",
"captureToActiveFile": false,
"createFileIfItDoesntExist": {
"enabled": false,
"createWithTemplate": false,
"template": ""
},
"format": {
"enabled": true,
"format": "- {{VALUE}} {{DATE}}"
},
"insertAfter": {
"enabled": true,
"after": "## Inbox",
"insertAtEnd": true,
"considerSubsections": false,
"createIfNotFound": false,
"createIfNotFoundLocation": "top"
},
"prepend": false,
"task": false,
"openFileInNewTab": {
"enabled": false,
"direction": "vertical",
"focus": true
},
"openFile": true,
"openFileInMode": "default"
},
{
"id": "4e069106-0b50-4db3-8a84-8daba5d26caf",
"name": "Create Passion",
"type": "Capture",
"command": true,
"appendLink": false,
"captureTo": "Passions Backlog 🎮.md",
"captureToActiveFile": false,
"createFileIfItDoesntExist": {
"enabled": false,
"createWithTemplate": false,
"template": ""
},
"format": {
"enabled": true,
"format": "{{VALUE}}"
},
"insertAfter": {
"enabled": true,
"after": "## Wishlist",
"insertAtEnd": false,
"considerSubsections": false,
"createIfNotFound": false,
"createIfNotFoundLocation": "top"
},
"prepend": false,
"task": true,
"openFileInNewTab": {
"enabled": false,
"direction": "vertical",
"focus": true
},
"openFile": true,
"openFileInMode": "default"
}
]
}
],
"macros": [
{
"name": "TaskSync",
"id": "0808cd06-f809-434f-91b9-db4aca7dfb2c",
"commands": [
{
"name": "tasksync::SelectFromAllTasks",
"type": "UserScript",
"id": "ea8aebe5-e3b2-4e74-8bd5-496e68703195",
"path": "_Scripts/tasksync.js",
"settings": {}
}
],
"runOnStartup": false
},
{
"name": "JournalSync",
"id": "6572ca9c-7948-4004-b466-dbc5d3b90f05",
"commands": [
{
"name": "journalsync::SelectFromAllTasks",
"type": "UserScript",
"id": "b363a144-1e37-4093-b9db-ff32c4373bab",
"path": "_Scripts/journalsync.js",
"settings": {}
}
],
"runOnStartup": false
},
{
"name": "PassionSync",
"id": "056d1b13-02cb-4e52-9e7b-9db7ba22c28e",
"commands": [
{
"name": "passionsync::SelectFromAllTasks",
"type": "UserScript",
"id": "65d06f67-4d48-42b7-8d30-8a923d0fef19",
"path": "_Scripts/passionsync.js",
"settings": {}
}
],
"runOnStartup": false
},
{
"name": "SomedaySync",
"id": "ac956cf2-1acb-4196-96ea-962b3408babb",
"commands": [
{
"name": "somedaysync::SelectFromAllTasks",
"type": "UserScript",
"id": "5041ee03-8382-4959-98cc-4ef920a5bba7",
"path": "_Scripts/somedaysync.js",
"settings": {}
}
],
"runOnStartup": false
},
{
"name": "ProjectSync",
"id": "ade00d0a-42d1-4dd3-9bdf-1b3ad5d1cdc8",
"commands": [
{
"name": "projectsync::SelectFromAllTasks",
"type": "UserScript",
"id": "e8d6634f-68b1-49e1-b5e6-976189b1a2b6",
"path": "_Scripts/projectsync.js",
"settings": {}
}
],
"runOnStartup": false
}
],
"inputPrompt": "single-line",
"devMode": false,
"templateFolderPath": "5-Templates",
"announceUpdates": true,
"version": "1.4.0",
"disableOnlineFeatures": true,
"ai": {
"OpenAIApiKey": "",
"defaultModel": "Ask me",
"defaultSystemPrompt": "As an AI assistant within Obsidian, your primary goal is to help users manage their ideas and knowledge more effectively. Format your responses using Markdown syntax. Please use the [[Obsidian]] link format. You can write aliases for the links by writing [[Obsidian|the alias after the pipe symbol]]. To use mathematical notation, use LaTeX syntax. LaTeX syntax for larger equations should be on separate lines, surrounded with double dollar signs ($$). You can also inline math expressions by wrapping it in $ symbols. For example, use $$w_{ij}^{\text{new}}:=w_{ij}^{\text{current}}+etacdotdelta_jcdot x_{ij}$$ on a separate line, but you can write \"($eta$ = learning rate, $delta_j$ = error term, $x_{ij}$ = input)\" inline.",
"promptTemplatesFolderPath": "",
"showAssistant": true
},
"migrations": {
"migrateToMacroIDFromEmbeddedMacro": true,
"useQuickAddTemplateFolder": true,
"incrementFileNameSettingMoveToDefaultBehavior": true,
"mutualExclusionInsertAfterAndWriteToBottomOfFile": true,
"setVersionAfterUpdateModalRelease": true
}
}

19652
.obsidian/plugins/quickadd/main.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
{
"id": "quickadd",
"name": "QuickAdd",
"version": "1.4.0",
"minAppVersion": "0.13.19",
"description": "Quickly add new pages or content to your vault.",
"author": "Christian B. B. Houmann",
"authorUrl": "https://bagerbach.com",
"fundingUrl": "https://www.buymeacoffee.com/chhoumann",
"isDesktopOnly": false
}

238
.obsidian/plugins/quickadd/styles.css vendored Normal file
View File

@@ -0,0 +1,238 @@
/* src/styles.css */
.configureMacroDiv {
display: grid;
grid-template-rows: 1fr;
min-width: 12rem;
}
.configureMacroDivItem {
display: flex;
align-content: center;
justify-content: space-between;
margin-bottom: 10px;
}
.configureMacroDivItemButton {
display: flex;
align-content: center;
justify-content: center;
margin-bottom: 10px;
}
.macroContainer {
display: grid;
grid-template-rows: repeat(auto-fill, 120px);
grid-gap: 40px;
overflow-y: auto;
max-height: 30em;
padding: 2em;
}
@media screen and (max-width: 540px) {
.macroContainer1 {
grid-template-columns: repeat(1, 1fr);
}
.macroContainer2 {
grid-template-columns: repeat(1, 1fr);
}
.macroContainer3 {
grid-template-columns: repeat(1, 1fr);
}
.wideInputPromptInputEl {
width: 20rem;
max-width: 100%;
height: 3rem;
}
}
@media screen and (max-width: 540px) and (max-width: 780px) {
.macroContainer1 {
grid-template-columns: repeat(1, 1fr);
}
.macroContainer2 {
grid-template-columns: repeat(2, 1fr);
}
.macroContainer3 {
grid-template-columns: repeat(2, 1fr);
}
.wideInputPromptInputEl {
width: 30rem;
max-width: 100%;
height: 20rem;
}
}
@media screen and (min-width: 781px) {
.macroContainer1 {
grid-template-columns: repeat(1, 1fr);
}
.macroContainer2 {
grid-template-columns: repeat(2, 1fr);
}
.macroContainer3 {
grid-template-columns: repeat(2, 1fr);
}
.wideInputPromptInputEl {
width: 40rem;
max-width: 100%;
height: 20rem;
}
}
.addMacroBarContainer {
display: flex;
align-content: center;
justify-content: space-around;
margin-top: 20px;
}
.captureToActiveFileContainer {
display: flex;
align-content: center;
justify-content: space-between;
margin-bottom: 10px;
}
.choiceNameHeader {
text-align: center;
}
.choiceNameHeader:hover {
cursor: pointer;
}
.folderInputContainer {
display: flex;
align-content: center;
justify-content: space-between;
margin-bottom: 8px;
gap: 4px;
}
.selectMacroDropdownContainer {
display: flex;
align-content: center;
justify-content: center;
}
.quickAddModal .modal {
min-width: 35%;
overflow-y: auto;
max-height: 70%;
}
.checkboxRowContainer {
margin: 30px 0px;
display: grid;
grid-template-rows: auto;
align-content: center;
gap: 5px;
}
.checkboxRow {
display: flex;
justify-content: space-between;
align-content: center;
}
.checkboxRow .checkbox-container {
flex-shrink: 0;
}
.checkboxRow span {
font-size: 16px;
word-break: break-all;
}
.submitButtonContainer {
display: flex;
align-content: center;
justify-content: center;
}
.chooseFolderWhenCreatingNoteContainer {
display: flex;
align-content: center;
justify-content: space-between;
margin-bottom: 10px;
}
.chooseFolderFromSubfolderContainer {
margin: 20px 0 0 0;
}
.clickable:hover {
cursor: pointer;
}
.quickAddCommandListItem {
display: flex;
flex: 1 1 auto;
align-items: center;
justify-content: space-between;
}
.quickCommandContainer {
display: flex;
justify-content: flex-end;
align-content: center;
margin-bottom: 1em;
gap: 4px;
}
.yesNoPromptButtonContainer {
display: flex;
align-items: center;
justify-content: space-around;
margin-top: 2rem;
}
.yesNoPromptParagraph {
text-align: center;
}
.qaFileSuggestionItem {
display: flex;
flex-direction: column;
width: 100%;
}
.qaFileSuggestionItem .suggestion-main-text {
font-weight: bold;
}
.qaFileSuggestionItem .suggestion-sub-text {
font-style: italic;
}
.choiceListItem {
display: flex;
font-size: 16px;
align-items: center;
margin: 12px 0 0 0;
transition: 1000ms ease-in-out;
}
.choiceListItemName {
flex: 1 0 0;
}
.choiceListItemName p {
margin: 0;
display: inline;
}
.quickadd-choice-suggestion p {
margin: 0;
}
.macroDropdownContainer {
display: flex;
align-content: center;
justify-content: center;
margin-bottom: 10px;
gap: 10px;
}
.macro-choice-buttonsContainer {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
gap: 10px;
}
@media only screen and (max-width: 600px) {
.macroDropdownContainer {
flex-direction: column;
align-items: center;
}
.macroDropdownContainer .macro-choice-buttonsContainer {
gap: 20px;
}
}
.quickadd-update-modal-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.quickadd-update-modal {
min-width: 35%;
max-height: 70%;
}
.quickadd-update-modal img {
width: 100%;
height: auto;
margin: 5px;
}
.quickadd-bmac-container {
display: flex;
justify-content: center;
align-items: center;
}