const currentPage = dv.current().file;
const dailyPages = dv.pages('"0-Daily"').sort(k=>k.file.name, "asc");
const currentPageName = currentPage.name;
const index = dailyPages.findIndex((e) => {return e.file.name === currentPageName});
if (index < 1) {
	dv.table(["File", "Created", "Size"],[]);
} else {
	const lastIndex = index - 1;
	const lastPage = dailyPages[lastIndex].file;
	const allPages = dv.pages().values;
	const searchPages = [];
	
	const lastTime = dv.parse(lastPage.name);
	const currentTime = dv.parse(currentPage.name);
 
	for (let page of allPages) {
		const pageFile = page.file;
		if (pageFile.cday > lastTime && pageFile.cday <= currentTime) {
		  searchPages.push(pageFile);
		}
	}
	dv.table(["File", "Created", "Size"], searchPages.sort((a, b) => a.ctime > b.ctime ? 1 : -1).map(b => [b.link, b.ctime, b.size]));
}
 

获取当前输入法的 ID

GitHub - hnakamur/inputsource: Command line tool to select text input source on Mac OS X 10.5 (Leopard) or later.

首先下载 Inputsource ,解压后将 Inputsource 移动到 /usr/local/bin/ 。

然后唤出终端

/usr/local/bin/Inputsource

获取目前输入法的 input source ID 。

举例:经济

com.apple.inputmethod.Kotoeri.Japanese

= 系统日文输入法平假名模式。

也可以通过

im-select

来获取响应的输入法 id。jkj

fcitx 自动切换输入法

GitHub - xcodebuild/fcitx-remote-for-osx: A simulate fcitx-remote to handle osx input method in command line