main
iOS 3 years ago
parent 5f09f9541d
commit b903be723a

@ -181,7 +181,7 @@
"offset": 2 "offset": 2
}, },
"current": { "current": {
"day": 1, "day": 4,
"month": 1, "month": 1,
"year": 2022 "year": 2022
}, },
@ -704,7 +704,12 @@
"month": 8, "month": 8,
"day": 1 "day": 1
}, },
"category": "ID_3b8a489a19da" "category": "ID_3b8a489a19da",
"end": {
"year": 2022,
"month": 8,
"day": 1
}
}, },
{ {
"id": "ID_487a2a8a0bfb", "id": "ID_487a2a8a0bfb",
@ -1158,7 +1163,7 @@
"name": "Task" "name": "Task"
} }
], ],
"date": 1643526126905, "date": 1643700551122,
"displayWeeks": false "displayWeeks": false
} }
], ],

@ -12,8 +12,8 @@
"checkpointList": [ "checkpointList": [
{ {
"path": "/", "path": "/",
"date": "2022-01-30", "date": "2022-02-01",
"size": 816604 "size": 819411
} }
], ],
"activityHistory": [ "activityHistory": [
@ -110,7 +110,15 @@
}, },
{ {
"date": "2022-01-30", "date": "2022-01-30",
"value": 8453 "value": 9992
},
{
"date": "2022-01-31",
"value": 2804
},
{
"date": "2022-02-01",
"value": 940
} }
] ]
} }

@ -1640,7 +1640,7 @@
"links": 0 "links": 0
}, },
"00.01 Admin/Test sheet.md": { "00.01 Admin/Test sheet.md": {
"size": 4537, "size": 5007,
"tags": 0, "tags": 0,
"links": 0 "links": 0
}, },
@ -1789,11 +1789,6 @@
"tags": 0, "tags": 0,
"links": 0 "links": 0
}, },
"00.01 Admin/Templates/NewFile1.md": {
"size": 175,
"tags": 0,
"links": 0
},
"00.01 Admin/Templates/layout$path.md": { "00.01 Admin/Templates/layout$path.md": {
"size": 40, "size": 40,
"tags": 0, "tags": 0,
@ -2100,7 +2095,7 @@
"links": 1 "links": 1
}, },
"01.02 Home/Household.md": { "01.02 Home/Household.md": {
"size": 1070, "size": 1181,
"tags": 3, "tags": 3,
"links": 2 "links": 2
}, },
@ -2230,9 +2225,9 @@
"links": 7 "links": 7
}, },
"00.01 Admin/Memos/2022-01-30.md": { "00.01 Admin/Memos/2022-01-30.md": {
"size": 1219, "size": 1417,
"tags": 0, "tags": 0,
"links": 7 "links": 8
}, },
"00.02 Inbox/Frédéric de Hohenstaufen.md": { "00.02 Inbox/Frédéric de Hohenstaufen.md": {
"size": 1792, "size": 1792,
@ -2248,58 +2243,80 @@
"size": 4143, "size": 4143,
"tags": 1, "tags": 1,
"links": 2 "links": 2
},
"00.01 Admin/Memos/2022-01-31.md": {
"size": 1042,
"tags": 0,
"links": 6
},
"00.01 Admin/Templates/SendMail.md": {
"size": 179,
"tags": 0,
"links": 0
},
"00.01 Admin/Memos/2022-02-01.md": {
"size": 940,
"tags": 0,
"links": 4
} }
}, },
"commitTypes": { "commitTypes": {
"/": { "/": {
"Refactor": 30, "Refactor": 36,
"Create": 28, "Create": 31,
"Link": 78, "Link": 83,
"Expand": 59 "Expand": 66
} }
}, },
"dailyCommits": { "dailyCommits": {
"/": { "/": {
"0": 0, "0": 2,
"1": 0, "1": 0,
"2": 0, "2": 0,
"3": 0, "3": 0,
"4": 0, "4": 0,
"5": 0, "5": 0,
"6": 0, "6": 1,
"7": 9, "7": 10,
"8": 17, "8": 22,
"9": 5, "9": 5,
"10": 19, "10": 19,
"11": 10, "11": 10,
"12": 4, "12": 4,
"13": 10, "13": 12,
"14": 25, "14": 25,
"15": 10, "15": 10,
"16": 5, "16": 5,
"17": 12, "17": 13,
"18": 3, "18": 7,
"19": 15, "19": 15,
"20": 32, "20": 32,
"21": 1, "21": 1,
"22": 17, "22": 18,
"23": 1 "23": 5
} }
}, },
"weeklyCommits": { "weeklyCommits": {
"/": { "/": {
"Mon": 50, "Mon": 60,
"Tue": 3, "Tue": 7,
"Wed": 11, "Wed": 11,
"Thu": 6, "Thu": 6,
"Fri": 12, "Fri": 12,
"Sat": 0, "Sat": 0,
"Sun": 113 "Sun": 120
} }
}, },
"recentCommits": { "recentCommits": {
"/": { "/": {
"Expanded": [ "Expanded": [
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-02-01.md\"> 2022-02-01 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Templates/SendMail.md\"> SendMail </a>",
"<a class=\"internal-link\" href=\"01.02 Home/Household.md\"> Household </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-31.md\"> 2022-01-31 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Test sheet.md\"> Test sheet </a>",
"<a class=\"internal-link\" href=\"SendFile.md\"> SendFile </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-30.md\"> 2022-01-30 </a>",
"<a class=\"internal-link\" href=\"01.02 Home/@Main Dashboard.md\"> @Main Dashboard </a>", "<a class=\"internal-link\" href=\"01.02 Home/@Main Dashboard.md\"> @Main Dashboard </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-29.md\"> 2022-01-29 </a>", "<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-29.md\"> 2022-01-29 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-30.md\"> 2022-01-30 </a>", "<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-30.md\"> 2022-01-30 </a>",
@ -2343,14 +2360,7 @@
"<a class=\"internal-link\" href=\"02.03 Zürich/Dante.md\"> Dante </a>", "<a class=\"internal-link\" href=\"02.03 Zürich/Dante.md\"> Dante </a>",
"<a class=\"internal-link\" href=\"02.03 Zürich/Franzos.md\"> Franzos </a>", "<a class=\"internal-link\" href=\"02.03 Zürich/Franzos.md\"> Franzos </a>",
"<a class=\"internal-link\" href=\"02.03 Zürich/Gestuet Homberg.md\"> Gestuet Homberg </a>", "<a class=\"internal-link\" href=\"02.03 Zürich/Gestuet Homberg.md\"> Gestuet Homberg </a>",
"<a class=\"internal-link\" href=\"02.03 Zürich/Le Raymond Bar.md\"> Le Raymond Bar </a>", "<a class=\"internal-link\" href=\"02.03 Zürich/Le Raymond Bar.md\"> Le Raymond Bar </a>"
"<a class=\"internal-link\" href=\"00.01 Admin/Templates/Template Place.md\"> Template Place </a>",
"<a class=\"internal-link\" href=\"Grande.md\"> Grande </a>",
"<a class=\"internal-link\" href=\"La Stanza.md\"> La Stanza </a>",
"<a class=\"internal-link\" href=\"Baur's.md\"> Baur's </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/delete.md\"> delete </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-25.md\"> 2022-01-25 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-26.md\"> 2022-01-26 </a>"
], ],
"Created": [ "Created": [
"<a class=\"internal-link\" href=\"Poul ak Nwa.md\"> Poul ak Nwa </a>", "<a class=\"internal-link\" href=\"Poul ak Nwa.md\"> Poul ak Nwa </a>",
@ -2380,7 +2390,10 @@
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-29.md\"> 2022-01-29 </a>", "<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-29.md\"> 2022-01-29 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-30.md\"> 2022-01-30 </a>", "<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-30.md\"> 2022-01-30 </a>",
"<a class=\"internal-link\" href=\"00.02 Inbox/Frédéric de Hohenstaufen - Ou le rêve excommunié (1194-1250) - Poche.md\"> Frédéric de Hohenstaufen - Ou le rêve excommunié (1194-1250) - Poche </a>", "<a class=\"internal-link\" href=\"00.02 Inbox/Frédéric de Hohenstaufen - Ou le rêve excommunié (1194-1250) - Poche.md\"> Frédéric de Hohenstaufen - Ou le rêve excommunié (1194-1250) - Poche </a>",
"<a class=\"internal-link\" href=\"Hungarian Mushroom Soup.md\"> Hungarian Mushroom Soup </a>" "<a class=\"internal-link\" href=\"Hungarian Mushroom Soup.md\"> Hungarian Mushroom Soup </a>",
"<a class=\"internal-link\" href=\"Untitled.md\"> Untitled </a>",
"<a class=\"internal-link\" href=\"2022-01-31.md\"> 2022-01-31 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-02-01.md\"> 2022-02-01 </a>"
], ],
"Renamed": [ "Renamed": [
"<a class=\"internal-link\" href=\"03.03 Food & Wine/Poul ak Nwa.md\"> Poul ak Nwa </a>", "<a class=\"internal-link\" href=\"03.03 Food & Wine/Poul ak Nwa.md\"> Poul ak Nwa </a>",
@ -2399,7 +2412,10 @@
"<a class=\"internal-link\" href=\"03.03 Food & Wine/Molletes.md\"> Molletes </a>", "<a class=\"internal-link\" href=\"03.03 Food & Wine/Molletes.md\"> Molletes </a>",
"<a class=\"internal-link\" href=\"00.02 Inbox/Frédéric de Hohenstaufen.md\"> Frédéric de Hohenstaufen </a>", "<a class=\"internal-link\" href=\"00.02 Inbox/Frédéric de Hohenstaufen.md\"> Frédéric de Hohenstaufen </a>",
"<a class=\"internal-link\" href=\"03.01 Reading list/Americanah.md\"> Americanah </a>", "<a class=\"internal-link\" href=\"03.01 Reading list/Americanah.md\"> Americanah </a>",
"<a class=\"internal-link\" href=\"03.03 Food & Wine/Hungarian Mushroom Soup.md\"> Hungarian Mushroom Soup </a>" "<a class=\"internal-link\" href=\"03.03 Food & Wine/Hungarian Mushroom Soup.md\"> Hungarian Mushroom Soup </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Templates/SendFile.md\"> SendFile </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-31.md\"> 2022-01-31 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Templates/SendMail.md\"> SendMail </a>"
], ],
"Tagged": [ "Tagged": [
"<a class=\"internal-link\" href=\"Poul ak Nwa.md\"> Poul ak Nwa </a>", "<a class=\"internal-link\" href=\"Poul ak Nwa.md\"> Poul ak Nwa </a>",
@ -2422,15 +2438,23 @@
"<a class=\"internal-link\" href=\"02.03 Zürich/@Café Zürich.md\"> @Café Zürich </a>", "<a class=\"internal-link\" href=\"02.03 Zürich/@Café Zürich.md\"> @Café Zürich </a>",
"<a class=\"internal-link\" href=\"02.03 Zürich/Baur's.md\"> Baur's </a>", "<a class=\"internal-link\" href=\"02.03 Zürich/Baur's.md\"> Baur's </a>",
"<a class=\"internal-link\" href=\"02.03 Zürich/Recommendation list (Zürich).md\"> Recommendation list (Zürich) </a>", "<a class=\"internal-link\" href=\"02.03 Zürich/Recommendation list (Zürich).md\"> Recommendation list (Zürich) </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-23.md\"> 2022-01-23 </a>" "<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-23.md\"> 2022-01-23 </a>",
"<a class=\"internal-link\" href=\"SendFile.md\"> SendFile </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Templates/NewFile1.md\"> NewFile1 </a>"
], ],
"Deleted": [ "Deleted": [
"<a class=\"internal-link\" href=\"Untitled.md\"> Untitled </a>", "<a class=\"internal-link\" href=\"Untitled.md\"> Untitled </a>",
"<a class=\"internal-link\" href=\"unlinked files output.md\"> unlinked files output </a>", "<a class=\"internal-link\" href=\"unlinked files output.md\"> unlinked files output </a>",
"<a class=\"internal-link\" href=\"Untitled.md\"> Untitled </a>", "<a class=\"internal-link\" href=\"Untitled.md\"> Untitled </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-22.md\"> 2022-01-22 </a>" "<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-22.md\"> 2022-01-22 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Templates/SendFile.md\"> SendFile </a>"
], ],
"Linked": [ "Linked": [
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-02-01.md\"> 2022-02-01 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-31.md\"> 2022-01-31 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-30.md\"> 2022-01-30 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-31.md\"> 2022-01-31 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-31.md\"> 2022-01-31 </a>",
"<a class=\"internal-link\" href=\"03.03 Food & Wine/Hungarian Mushroom Soup.md\"> Hungarian Mushroom Soup </a>", "<a class=\"internal-link\" href=\"03.03 Food & Wine/Hungarian Mushroom Soup.md\"> Hungarian Mushroom Soup </a>",
"<a class=\"internal-link\" href=\"Hungarian Mushroom Soup.md\"> Hungarian Mushroom Soup </a>", "<a class=\"internal-link\" href=\"Hungarian Mushroom Soup.md\"> Hungarian Mushroom Soup </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-30.md\"> 2022-01-30 </a>", "<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-30.md\"> 2022-01-30 </a>",
@ -2476,12 +2500,7 @@
"<a class=\"internal-link\" href=\"Grande.md\"> Grande </a>", "<a class=\"internal-link\" href=\"Grande.md\"> Grande </a>",
"<a class=\"internal-link\" href=\"La Stanza.md\"> La Stanza </a>", "<a class=\"internal-link\" href=\"La Stanza.md\"> La Stanza </a>",
"<a class=\"internal-link\" href=\"02.03 Zürich/Grande.md\"> Grande </a>", "<a class=\"internal-link\" href=\"02.03 Zürich/Grande.md\"> Grande </a>",
"<a class=\"internal-link\" href=\"02.03 Zürich/Dante.md\"> Dante </a>", "<a class=\"internal-link\" href=\"02.03 Zürich/Dante.md\"> Dante </a>"
"<a class=\"internal-link\" href=\"02.03 Zürich/Le Raymond Bar.md\"> Le Raymond Bar </a>",
"<a class=\"internal-link\" href=\"Baur's.md\"> Baur's </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-25.md\"> 2022-01-25 </a>",
"<a class=\"internal-link\" href=\"00.01 Admin/Memos/2022-01-26.md\"> 2022-01-26 </a>",
"<a class=\"internal-link\" href=\"Molletes.md\"> Molletes </a>"
], ],
"Removed Tags from": [ "Removed Tags from": [
"<a class=\"internal-link\" href=\"06.02 Investments/Le Miel de Paris.md\"> Le Miel de Paris </a>" "<a class=\"internal-link\" href=\"06.02 Investments/Le Miel de Paris.md\"> Le Miel de Paris </a>"

@ -14171,7 +14171,8 @@ function goToEditorLocation(editor, fileLocation, highlight) {
if (fileLocation) { if (fileLocation) {
let pos = editor.offsetToPos(fileLocation); let pos = editor.offsetToPos(fileLocation);
if (highlight) { if (highlight) {
editor.setSelection({ ch: 0, line: pos.line }, { ch: 1000, line: pos.line }); const lineContent = editor.getLine(pos.line);
editor.setSelection({ ch: 0, line: pos.line }, { ch: lineContent.length, line: pos.line });
} }
else { else {
editor.setCursor(pos); editor.setCursor(pos);
@ -14227,6 +14228,21 @@ function populateOpenInItems(menu, location, settings) {
}); });
} }
} }
function findOpenMapView(app) {
const maps = app.workspace.getLeavesOfType(MAP_VIEW_NAME);
if (maps && maps.length > 0)
return maps[0].view;
}
function getEditor(app, leafToUse) {
return __awaiter(this, void 0, void 0, function* () {
let view = leafToUse && leafToUse.view instanceof obsidian.MarkdownView ?
leafToUse.view :
app.workspace.getActiveViewOfType(obsidian.MarkdownView);
if (view)
return view.editor;
return null;
});
}
class LocationSuggest extends obsidian.EditorSuggest { class LocationSuggest extends obsidian.EditorSuggest {
constructor(app, settings) { constructor(app, settings) {
@ -14339,7 +14355,8 @@ class UrlConvertor {
return { return {
location: new leafletSrc.LatLng(parseFloat(result[1]), parseFloat(result[2])), location: new leafletSrc.LatLng(parseFloat(result[1]), parseFloat(result[2])),
index: result.index, index: result.index,
matchLength: result[0].length matchLength: result[0].length,
ruleName: rule.name
}; };
} }
catch (e) { } catch (e) { }
@ -17718,7 +17735,7 @@ function matchInlineLocation(content) {
// Old syntax of ` `location: ... ` `. This syntax doesn't support a name so we leave an empty capture group // Old syntax of ` `location: ... ` `. This syntax doesn't support a name so we leave an empty capture group
const locationRegex1 = /\`()location:\s*\[?([0-9.\-]+)\s*,\s*([0-9.\-]+)\]?\`/g; const locationRegex1 = /\`()location:\s*\[?([0-9.\-]+)\s*,\s*([0-9.\-]+)\]?\`/g;
// New syntax of `[name](geo:...)` and an optional tags as `tag:tagName` separated by whitespaces // New syntax of `[name](geo:...)` and an optional tags as `tag:tagName` separated by whitespaces
const locationRegex2 = /\[(.*?)\]\(geo:([0-9.\-]+),([0-9.\-]+)\)[ \t]*((?:tag:[\w\/\-]+\s+)*)/g; const locationRegex2 = /\[(.*?)\]\(geo:([0-9.\-]+),([0-9.\-]+)\)[ \t]*((?:tag:[\w\/\-]+[\s\.]+)*)/g;
const matches1 = content.matchAll(locationRegex1); const matches1 = content.matchAll(locationRegex1);
const matches2 = content.matchAll(locationRegex2); const matches2 = content.matchAll(locationRegex2);
return Array.from(matches1).concat(Array.from(matches2)); return Array.from(matches1).concat(Array.from(matches2));
@ -18288,7 +18305,7 @@ class MapView extends obsidian.ItemView {
} }
} }
yield leafToUse.openFile(file); yield leafToUse.openFile(file);
const editor = yield this.getEditor(leafToUse); const editor = yield getEditor(this.app, leafToUse);
if (editor && editorAction) if (editor && editorAction)
yield editorAction(editor); yield editorAction(editor);
}); });
@ -18311,16 +18328,6 @@ class MapView extends obsidian.ItemView {
tags = tags.sort(); tags = tags.sort();
return tags; return tags;
} }
getEditor(leafToUse) {
return __awaiter(this, void 0, void 0, function* () {
let view = leafToUse && leafToUse.view instanceof obsidian.MarkdownView ?
leafToUse.view :
this.app.workspace.getActiveViewOfType(obsidian.MarkdownView);
if (view)
return view.editor;
return null;
});
}
updateMarkersWithRelationToFile(fileRemoved, fileAddedOrChanged, skipMetadata) { updateMarkersWithRelationToFile(fileRemoved, fileAddedOrChanged, skipMetadata) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
if (!this.display.map || !this.isOpen) if (!this.display.map || !this.isOpen)
@ -18561,9 +18568,11 @@ class SettingsTab extends obsidian.PluginSettingTab {
if (this.refreshPluginOnHide) { if (this.refreshPluginOnHide) {
const mapViews = this.app.workspace.getLeavesOfType(MAP_VIEW_NAME); const mapViews = this.app.workspace.getLeavesOfType(MAP_VIEW_NAME);
for (const leaf of mapViews) { for (const leaf of mapViews) {
const mapView = leaf.view; if (leaf.view) {
mapView.refreshMap(); const mapView = leaf.view;
mapView.updateMapSources(); mapView.refreshMap();
mapView.updateMapSources();
}
} }
} }
} }
@ -18873,6 +18882,93 @@ class SettingsTab extends obsidian.PluginSettingTab {
} }
} }
class NewNoteDialog extends obsidian.SuggestModal {
constructor(app, settings) {
super(app);
this.lastSearchTime = 0;
this.delayInMs = 250;
this.lastSearch = '';
this.lastSearchResults = [];
this.settings = settings;
this.suggestor = new LocationSuggest(this.app, this.settings);
this.urlConvertor = new UrlConvertor(this.app, this.settings);
this.setPlaceholder('Type a search query or paste a supported URL');
this.setInstructions([{ command: 'enter', purpose: 'to use' }]);
}
getSuggestions(query) {
let result = [];
const urlResult = this.parseLocationAsUrl(query);
if (urlResult)
result.push(urlResult);
if (query == this.lastSearch) {
result = result.concat(this.lastSearchResults);
}
this.getSearchResultsWithDelay(query);
return result;
}
renderSuggestion(value, el) {
el.setText(value.name);
}
onChooseSuggestion(value, evt) {
this.newNote(value.location, evt);
}
newNote(location, ev) {
return __awaiter(this, void 0, void 0, function* () {
const locationString = `${location.lat},${location.lng}`;
const newFileName = formatWithTemplates(this.settings.newNoteNameFormat);
const file = yield newNote(this.app, 'singleLocation', this.settings.newNotePath, newFileName, locationString, this.settings.newNoteTemplate);
// If there is an open map view, use it to decide how and where to open the file.
// Otherwise, open the file from the active leaf
const mapView = findOpenMapView(this.app);
if (mapView) {
mapView.goToFile(file, ev.ctrlKey, handleNewNoteCursorMarker);
}
else {
const leaf = this.app.workspace.activeLeaf;
yield leaf.openFile(file);
const editor = yield getEditor(this.app);
if (editor)
yield handleNewNoteCursorMarker(editor);
}
});
}
getSearchResultsWithDelay(query) {
return __awaiter(this, void 0, void 0, function* () {
// TODO merge this with LocationSuggest
if (query === this.lastSearch || query.length < 3)
return;
const timestamp = Date.now();
this.lastSearchTime = timestamp;
const Sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
yield Sleep(this.delayInMs);
if (this.lastSearchTime != timestamp) {
// Search is canceled by a newer search
return null;
}
// After the sleep our search is still the last -- so the user stopped and we can go on
const results = yield this.suggestor.searchProvider.search({ query: query });
const suggestions = results.map(result => ({
name: result.label,
location: new leafletSrc.LatLng(result.y, result.x),
type: 'searchResult'
}));
this.lastSearchResults = suggestions;
this.lastSearch = query;
this.updateSuggestions();
return suggestions;
});
}
parseLocationAsUrl(query) {
const result = this.urlConvertor.parseLocationFromUrl(query);
if (result)
return {
name: `Parsed from ${result.ruleName}: ${result.location.lat}, ${result.location.lng}`,
location: result.location,
type: 'url'
};
}
}
class MapViewPlugin extends obsidian.Plugin { class MapViewPlugin extends obsidian.Plugin {
constructor() { constructor() {
super(...arguments); super(...arguments);
@ -18917,13 +19013,21 @@ class MapViewPlugin extends obsidian.Plugin {
}); });
this.addCommand({ this.addCommand({
id: 'insert-geolink', id: 'insert-geolink',
name: 'Insert Geolocation', name: 'Insert Inline Geolocation',
editorCallback: (editor, view) => { editorCallback: (editor, view) => {
const positionBeforeInsert = editor.getCursor(); const positionBeforeInsert = editor.getCursor();
editor.replaceSelection('[](geo:)'); editor.replaceSelection('[](geo:)');
editor.setCursor({ line: positionBeforeInsert.line, ch: positionBeforeInsert.ch + 1 }); editor.setCursor({ line: positionBeforeInsert.line, ch: positionBeforeInsert.ch + 1 });
} }
}); });
this.addCommand({
id: 'new-geolocation-note',
name: 'New geolocation note',
callback: () => {
const dialog = new NewNoteDialog(this.app, this.settings);
dialog.open();
}
});
this.addSettingTab(new SettingsTab(this.app, this)); this.addSettingTab(new SettingsTab(this.app, this));
this.app.workspace.on('file-menu', (menu, file, _source, leaf) => { this.app.workspace.on('file-menu', (menu, file, _source, leaf) => {
if (file instanceof obsidian.TFile) { if (file instanceof obsidian.TFile) {

@ -1,7 +1,7 @@
{ {
"id": "obsidian-map-view", "id": "obsidian-map-view",
"name": "Map View", "name": "Map View",
"version": "1.1.0", "version": "1.2.0",
"minAppVersion": "0.12.10", "minAppVersion": "0.12.10",
"description": "An interactive map view.", "description": "An interactive map view.",
"isDesktopOnly": false "isDesktopOnly": false

@ -415,15 +415,15 @@
} }
], ],
"01.02 Home/Household.md": [ "01.02 Home/Household.md": [
{
"title": "[[Household]]: *Paper* recycling collection",
"time": "2022-02-01",
"rowNumber": 60
},
{ {
"title": "[[Household]]: *Cardboard* recycling collection", "title": "[[Household]]: *Cardboard* recycling collection",
"time": "2022-02-08", "time": "2022-02-08",
"rowNumber": 62 "rowNumber": 63
},
{
"title": "[[Household]]: *Paper* recycling collection",
"time": "2022-02-15",
"rowNumber": 60
} }
], ],
"01.03 Family/Pia Bousquié.md": [ "01.03 Family/Pia Bousquié.md": [
@ -475,13 +475,6 @@
"rowNumber": 73 "rowNumber": 73
} }
], ],
"00.01 Admin/Memos/2022-01-29.md": [
{
"title": "09:35 [[Lifestyle]], [[2022-01-29|Memo]]: check made.com and where furnitures are at",
"time": "2022-02-06",
"rowNumber": 85
}
],
"00.01 Admin/Memos/2022-01-30.md": [ "00.01 Admin/Memos/2022-01-30.md": [
{ {
"title": "12:38 [[IT & Computer]], [[2022-01-30|Memo]]: Repair Toshiba hard drive", "title": "12:38 [[IT & Computer]], [[2022-01-30|Memo]]: Repair Toshiba hard drive",
@ -493,6 +486,13 @@
"time": "2022-02-20", "time": "2022-02-20",
"rowNumber": 86 "rowNumber": 86
} }
],
"00.01 Admin/Memos/2022-01-31.md": [
{
"title": "13:04 Organise [[MRCK]]'s birthday",
"time": "2022-02-05",
"rowNumber": 85
}
] ]
}, },
"debug": false, "debug": false,

@ -0,0 +1,12 @@
{
"launchers": [
{
"commandName": "Send an email",
"shortcutName": "Compose Email",
"inputTypes": [
"Entire Document"
],
"separator": ","
}
]
}

File diff suppressed because one or more lines are too long

@ -1,7 +1,7 @@
{ {
"id": "remotely-save", "id": "remotely-save",
"name": "Remotely Save", "name": "Remotely Save",
"version": "0.2.13", "version": "0.2.14",
"minAppVersion": "0.12.15", "minAppVersion": "0.12.15",
"description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.", "description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.",
"author": "fyears", "author": "fyears",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -4,5 +4,5 @@
"description": "Paste URL \"into\" selected text.", "description": "Paste URL \"into\" selected text.",
"isDesktopOnly": false, "isDesktopOnly": false,
"js": "main.js", "js": "main.js",
"version": "1.6.0" "version": "1.7.0"
} }

@ -140,18 +140,18 @@
} }
}, },
{ {
"id": "08f0d93aaf374024", "id": "376a5e6cea64517f",
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "DICE_ROLLER_VIEW", "type": "advanced-tables-toolbar",
"state": {} "state": {}
} }
}, },
{ {
"id": "376a5e6cea64517f", "id": "2259fdbdb3c96018",
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "advanced-tables-toolbar", "type": "DICE_ROLLER_VIEW",
"state": {} "state": {}
} }
} }
@ -161,14 +161,14 @@
"active": "5d83a9eff6edc0aa", "active": "5d83a9eff6edc0aa",
"lastOpenFiles": [ "lastOpenFiles": [
"01.02 Home/@Main Dashboard.md", "01.02 Home/@Main Dashboard.md",
"00.01 Admin/Memos/2022-02-01.md",
"00.01 Admin/Memos/2022-01-31.md",
"00.01 Admin/Test sheet.md",
"00.01 Admin/Templates/NewFile.md",
"00.01 Admin/Templates/SendMail.md",
"00.01 Admin/Obsidian plugins.md",
"00.01 Admin/Button gallery.md",
"00.01 Admin/Memos/2022-01-30.md", "00.01 Admin/Memos/2022-01-30.md",
"00.01 Admin/Memos/2022-01-29.md", "02.03 Zürich/Blaue Ente.md"
"00.01 Admin/Memos/2022-01-28.md",
"00.01 Admin/Templates/Template Daily.md",
"01.01 Life Orga/@Life Organisation.md",
"01.01 Life Orga/Family.md",
"01.01 Life Orga/Finances.md",
"05.02 Networks/Server Cloud.md",
"06.02 Investments/VC Investments.md"
] ]
} }

@ -83,7 +83,7 @@ This section does serve for quick memos.
&emsp; &emsp;
- [x] 09:12 [[Life Admin]], [[2022-01-29|Memo]]: Book plane tickets for Valentine's weekend 📅 2022-01-30 ✅ 2022-01-29 - [x] 09:12 [[Life Admin]], [[2022-01-29|Memo]]: Book plane tickets for Valentine's weekend 📅 2022-01-30 ✅ 2022-01-29
- [x] 09:13 [[Life Admin]], [[2022-01-29|Memo]]: Book tickets to London for B's birthday 📅 2022-01-30 ✅ 2022-01-30 - [x] 09:13 [[Life Admin]], [[2022-01-29|Memo]]: Book tickets to London for B's birthday 📅 2022-01-30 ✅ 2022-01-30
- [ ] 09:35 [[Lifestyle]], [[2022-01-29|Memo]]: check made.com and where furnitures are at 📆2022-02-06 - [x] 09:35 [[Lifestyle]], [[2022-01-29|Memo]]: check made.com and where furnitures are at 📅 2022-02-06 ✅ 2022-01-31
- 10:56 ![[Pasted Image 20220129105544.jpeg]]<br>1st Zürich haircut #zürich #everydaylife - 10:56 ![[Pasted Image 20220129105544.jpeg]]<br>1st Zürich haircut #zürich #everydaylife
#### Sub-header 2 #### Sub-header 2

@ -13,9 +13,9 @@ Stress: 30
FrontHeadBar: 10 FrontHeadBar: 10
EarHeadBar: 40 EarHeadBar: 40
BackHeadBar: 20 BackHeadBar: 20
Water: 1 Water: 2
Coffee: 1 Coffee: 1
Steps: 3513 Steps: 7198
--- ---
@ -85,6 +85,10 @@ This section does serve for quick memos.
- 10:11 ![[Pasted Image 20220130101126.jpeg]]<br>Boubinou's fav' snack - 10:11 ![[Pasted Image 20220130101126.jpeg]]<br>Boubinou's fav' snack
- [ ] 12:38 [[IT & Computer]], [[2022-01-30|Memo]]: Repair Toshiba hard drive 📆2022-02-12 - [ ] 12:38 [[IT & Computer]], [[2022-01-30|Memo]]: Repair Toshiba hard drive 📆2022-02-12
- [ ] 15:20 [[IT & Computer]], [[2022-01-30|Memo]]: Figure out how the Obsidian plugin called Remotely Save works or delete it 📆2022-02-20 - [ ] 15:20 [[IT & Computer]], [[2022-01-30|Memo]]: Figure out how the Obsidian plugin called Remotely Save works or delete it 📆2022-02-20
- 16:54 Check August Macke (1887-1914), impressionisme/fauvisme
- 16:57 Check Max Bill (1908-1994), cubisme, abstract
- 17:03 Femme a tete de roses, 1953, S. Dali
- 17:06 Check Arnold Böcklin (1827-1901)
--- ---
@ -94,7 +98,8 @@ This section does serve for quick memos.
&emsp; &emsp;
Loret ipsum Kunsthaus Zürich
Finished [[Americanah]]
&emsp; &emsp;
&emsp; &emsp;

@ -0,0 +1,99 @@
---
Date: 2022-01-31
DocType: Note
Hierarchy:
TimeStamp:
location:
CollapseMetaTable: Yes
Sleep: 7
Happiness: 85
Gratefulness: 85
Stress: 35
FrontHeadBar: 10
EarHeadBar: 40
BackHeadBar: 30
Water: 3.15
Coffee: 6
Steps: 9306
---
%% Parent:: [[Life Admin]] %%
---
[[2022-01-30|<< Previous]] &emsp; &emsp; &emsp; &emsp; [[@Main Dashboard|Back]] &emsp; &emsp; &emsp; &emsp; [[2022-02-01|Next >>]]
---
&emsp;
```button
name Record today's health
type command
action MetaEdit: Run MetaEdit
id EditMetaData
```
^button-2022-01-31Edit
```button
name Save
type command
action Save current file
id Save
```
^button-2022-01-31NSave
&emsp;
# 2022-01-31
&emsp;
```ad-abstract
title: Summary
collapse: open
Note Description
```
&emsp;
```toc
style: number
```
&emsp;
---
&emsp;
### Memos
&emsp;
This section does serve for quick memos.
&emsp;
#### Memos
%% ### %%
&emsp;
- 08:25 Started [[Frédéric de Hohenstaufen]]
- [ ] 13:04 Organise [[MRCK]]'s birthday 📆2022-02-05
---
&emsp;
### Notes
&emsp;
Loret ipsum
&emsp;
&emsp;

@ -0,0 +1,97 @@
---
Date: 2022-02-01
DocType: Note
Hierarchy:
TimeStamp:
location:
CollapseMetaTable: Yes
Sleep: 7
Happiness: 70
Gratefulness: 85
Stress: 50
FrontHeadBar: 15
EarHeadBar: 60
BackHeadBar: 40
Water: 0.25
Coffee: 1
Steps:
---
%% Parent:: [[Life Admin]] %%
---
[[2022-01-31|<< Previous]] &emsp; &emsp; &emsp; &emsp; [[@Main Dashboard|Back]] &emsp; &emsp; &emsp; &emsp; [[2022-02-02|Next >>]]
---
&emsp;
```button
name Record today's health
type command
action MetaEdit: Run MetaEdit
id EditMetaData
```
^button-2022-02-01Edit
```button
name Save
type command
action Save current file
id Save
```
^button-2022-02-01NSave
&emsp;
# 2022-02-01
&emsp;
```ad-abstract
title: Summary
collapse: open
Note Description
```
&emsp;
```toc
style: number
```
&emsp;
---
&emsp;
### Memos
&emsp;
This section does serve for quick memos.
&emsp;
#### Memos
%% ### %%
&emsp;
---
&emsp;
### Notes
&emsp;
Loret ipsum
&emsp;
&emsp;

@ -11,6 +11,12 @@ CollapseMetaTable: Yes
&emsp; &emsp;
```dataviewjs
let subject = dv.page("MRCK").file.name;
let content = await dv.io.load(dv.page("MRCK").file.path);
dv.el("center", '[Send as email](readdle-spark://compose?body=' + encodeURI(content) + '&subject=' + encodeURI(subject) + ')')
```
```button ```button
name Save name Save
type command type command

@ -1,5 +0,0 @@
<%*
const {templaterFunc} = this.app.plugins.plugins["customjs"].api
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
tp.file.content.replace(/[\w\W]+?\n+?/,"")
%>

@ -0,0 +1,5 @@
<%*
const subject = tp.file.title
const body = tp.file.content
tR += "[Send as email](readdle-spark://compose?body=" + encodeURI(body) + ""&subject=" + encodeURI(subject) + ")"
%>

@ -7,6 +7,9 @@ Number2: 3
TimeStamp: 2022-01-15 TimeStamp: 2022-01-15
--- ---
await dv.io.load(dv.page("02.02 Paris/Abri"))
`jsx-<LoadiFrameButton title="" src="https://wallpapercave.com/wp/s1uSZJA.jpg" />` `jsx-<LoadiFrameButton title="" src="https://wallpapercave.com/wp/s1uSZJA.jpg" />`
`jsx- <WithFrontMatter render={({JSXExample})=><h1>The value of hello is "{JSXExample}"</h1>}/>` `jsx- <WithFrontMatter render={({JSXExample})=><h1>The value of hello is "{JSXExample}"</h1>}/>`
@ -49,11 +52,16 @@ shoppingFunc.getItems2Change({app: app, dv: dv, luxon: luxon, that:this, theme:
```button ```button
name Create Note name Create Note
type append template type append template
action NewFile1 action SendMail
color blue color blue
templater true templater true
``` ```
const subject = tp.file.title
const body = tp.file.content
tR += "[Send as email](readdle-spark://compose?body=" + encodeURI(body) + ""&subject=" + encodeURI(subject) + ")"
%>
const {templaterFunc} = this.app.plugins.plugins["customjs"].api const {templaterFunc} = this.app.plugins.plugins["customjs"].api
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType) templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%> %>

@ -58,7 +58,8 @@ This section on different household obligations.
#### Garbage collection #### Garbage collection
- [ ] [[Household]]: *Paper* recycling collection 🔁 every 2 weeks on Tuesday 📅 2022-02-01 - [ ] [[Household]]: *Paper* recycling collection 🔁 every 2 weeks on Tuesday 📅 2022-02-15
- [x] [[Household]]: *Paper* recycling collection 🔁 every 2 weeks on Tuesday 📅 2022-02-01 ✅ 2022-01-31
- [x] [[Household]]: *Paper* recycling collection 🔁 every 2 weeks on Tuesday 📅 2022-01-18 ✅ 2022-01-17 - [x] [[Household]]: *Paper* recycling collection 🔁 every 2 weeks on Tuesday 📅 2022-01-18 ✅ 2022-01-17
- [ ] [[Household]]: *Cardboard* recycling collection 🔁 every 2 weeks on Tuesday 📅 2022-02-08 - [ ] [[Household]]: *Cardboard* recycling collection 🔁 every 2 weeks on Tuesday 📅 2022-02-08
- [x] [[Household]]: *Cardboard* recycling collection 🔁 every 2 weeks on Tuesday 📅 2022-01-25 ✅ 2022-01-24 - [x] [[Household]]: *Cardboard* recycling collection 🔁 every 2 weeks on Tuesday 📅 2022-01-25 ✅ 2022-01-24

@ -38,18 +38,6 @@ id CreateNote
``` ```
^button-ParisNewNote ^button-ParisNewNote
```button ```button
name Save name Save
type command type command

@ -36,18 +36,7 @@ type append template
action NewFile action NewFile
id CreateNote id CreateNote
``` ```
^button-ParisNewNote ^button-ZurichNewNote
```button ```button
@ -56,7 +45,7 @@ type command
action Save current file action Save current file
id Save id Save
``` ```
^button-ParisSave ^button-ZurichSave
&emsp; &emsp;

@ -23,3 +23,7 @@
2022/01/30 Flight Bday B 2022/01/30 Flight Bday B
expenses:Travels:CHF CHF154.70 expenses:Travels:CHF CHF154.70
assets:Cash:CHF assets:Cash:CHF
2022/01/30 Kunsthaus
expenses:Culture:CHF CHF23.00
assets:Cash:CHF
Loading…
Cancel
Save