Skip to content

Commit

Permalink
feat: update para plugin to 1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
quanru committed Jul 10, 2023
1 parent a5d4e3a commit e5908e8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .obsidian/plugins/obsidian42-brat/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"pluginSubListFrozenVersion": [],
"themesList": [],
"updateAtStartup": false,
"updateAtStartup": true,
"updateThemesAtStartup": false,
"ribbonIconEnabled": true,
"loggingEnabled": false,
Expand Down
39 changes: 17 additions & 22 deletions .obsidian/plugins/periodic-para/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7924,23 +7924,23 @@ var Task = class {
const filename = (_a = this.app.workspace.getActiveFile()) == null ? void 0 : _a.basename;
const parsed = this.date.parse(filename);
const condition = this.date.days(parsed);
const tasks = this.dataview.pages("").file.tasks.where(
let tasks = [];
const dailyTasks = this.dataview.pages("").file.tasks.where(
(t) => this.filter(t, {
date: "RECORD" /* RECORD */,
...condition
})
);
const component = new import_obsidian6.Component();
component.load();
this.dataview.taskList(tasks, false, el, component);
tasks = [...dailyTasks];
const files = this.date.files(parsed);
const pages = Object.values(files).flat();
if (pages.length) {
const tasks2 = this.dataview.pages(`"${pages.join('" or "')}"`).file.tasks.where((task) => task);
const component2 = new import_obsidian6.Component();
component2.load();
this.dataview.taskList(tasks2, false, el, component2);
const nonDailyTasks = this.dataview.pages(`"${pages.join('" or "')}"`).file.tasks.where((task) => task);
tasks = [...dailyTasks, ...nonDailyTasks];
}
const component = new import_obsidian6.Component();
component.load();
this.dataview.taskList(tasks, false, el, component);
};
this.listByTag = async (source, el, ctx) => {
var _a;
Expand All @@ -7960,19 +7960,14 @@ var Task = class {
const where = tags.map((tag, index) => {
return `contains(tags, "#${tag}") ${index === tags.length - 1 ? "" : "OR"}`;
}).join(" ");
const markdown = await this.dataview.tryQueryMarkdown(`
const { values: tasks } = await this.dataview.tryQuery(`
TASK
FROM -"Templates"
WHERE ${where} AND file.path != "${filepath}"
SORT completed ASC
`);
component.load();
return import_obsidian6.MarkdownRenderer.renderMarkdown(
markdown,
containerEl,
ctx.sourcePath,
component
);
return this.dataview.taskList(tasks, false, el, component);
};
this.app = app;
this.settings = settings;
Expand Down Expand Up @@ -8057,23 +8052,23 @@ var Bullet = class {
const where = tags.map((tag, index) => {
return `(contains(L.tags, "${tag}")) ${index === tags.length - 1 ? "" : "OR"}`;
}).join(" ");
const markdown = await this.dataview.tryQueryMarkdown(
const result = await this.dataview.tryQuery(
`
TABLE WITHOUT ID rows.L.text AS "Text", rows.file.link AS "File"
TABLE WITHOUT ID rows.L.text AS "Bullet", rows.file.link AS "File"
FROM (${from}) AND -"Templates"
FLATTEN file.lists AS L
WHERE ${where} AND !L.task AND file.path != "${filepath}"
GROUP BY file.link
SORT rows.file.link DESC
`
);
const formattedMarkdown = markdown.replaceAll("\\\\", "\\").replaceAll("\n<", "<");
component.load();
return import_obsidian8.MarkdownRenderer.renderMarkdown(
formattedMarkdown,
return this.dataview.table(
result.headers,
result.values,
el.createEl("div"),
ctx.sourcePath,
component
component,
ctx.sourcePath
);
};
this.app = app;
Expand Down
2 changes: 1 addition & 1 deletion .obsidian/plugins/periodic-para/manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":"periodic-para","name":"Periodic PARA","version":"1.1.4","minAppVersion":"0.15.0","description":"This is a plugin to assist in practicing the PARA system with periodic notes.","author":"YiBing Lin <quanruzhuoxiu@gmail.com>","authorUrl":"https://quanru.github.io","fundingUrl":"https://www.buymeacoffee.com/leyang","isDesktopOnly":false}
{"id":"periodic-para","name":"Periodic PARA","version":"1.1.5","minAppVersion":"0.15.0","description":"This is a plugin to assist in practicing the PARA system with periodic notes.","author":"YiBing Lin <quanruzhuoxiu@gmail.com>","authorUrl":"https://quanru.github.io","fundingUrl":"https://www.buymeacoffee.com/leyang","isDesktopOnly":false}

0 comments on commit e5908e8

Please sign in to comment.