- What are "Queries" in Logseq?
- Queries are for asking questions from your knowledge base and the outside world.
- How to write simple queries?
- By using
{{query }}
, the format is something like this:
{{query Something you're looking for}}
- By using
- How to write simple queries?
- Queries are for asking questions from your knowledge base and the outside world.
- **Query Operators **
These three operators can be applied around any query filters.
- and
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Updated: Aug. 20, 2024 | |
// Run: node testRegex.js whatever.txt | |
// Live demo: https://jina.ai/tokenizer | |
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0) | |
// COPYRIGHT: Jina AI | |
const fs = require('fs'); | |
const util = require('util'); | |
// Define variables for magic numbers | |
const MAX_HEADING_LENGTH = 7; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
patch: | |
# 菜单 | |
menu: | |
page_size: 8 # 候选词个数 | |
# alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⑩ ] # 修改候选项标签 | |
# alternative_select_keys: ASDFGHJKL # 如编码字符占用数字键,则需另设选字键 | |
# ascii_mode、inline、no_inline、vim_mode 等等设定,可参考 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml | |
# 中西文切换 | |
# | |
# 【good_old_caps_lock】 CapsLock 切换到大写或切换中英。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> {{ highlight_text }} | |
date:: [[{{highlight_date}}]] \ | |
{% if highlight_location_url %}location:: {{highlight_location_url}}{% elif highlight_location %}location:: {{highlight_location}}{% endif %} \ | |
{% if highlight_note %} | |
{{ highlight_note }} | |
{% endif %} | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
from notion_client import Client | |
from notion_client.helpers import iterate_paginated_api | |
# Flomo 在 Notion 中的同步数据库需要增加两个字段: | |
# - 得到电子书:formula 字段,公式为 `contains(prop("Tags"), "得到/电子书")` | |
# - 书名:formula 字段,公式为 `replaceAll(prop("Tags"), "得到/电子书/", "")` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Logseq Default Query 6-pack | |
;; --------------------------- | |
;; | |
;; Pontus Sundén (@psu) | |
;; October 28, 2022 | |
;; | |
;; Attribution | |
;; - https://gist.github.com/sawhney17/3a1b04936f35df80253431a61cb74737 | |
;; | |
;; --------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function collapseNamespaceRefs() { | |
function onEnter(e) { | |
const el = e.target; | |
el.textContent = el.dataset.origText; | |
} | |
function onLeave(e) { | |
const el = e.target; | |
const text = el.dataset.origText; | |
el.textContent = `..${text.substring(text.lastIndexOf("/") + 1)}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "httparty" | |
require "nokogiri" | |
require "open-uri" | |
require "uri" | |
RAINDROP_AUTH_TOKEN="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | |
READWISE_AUTH_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
LAST_SAVED_HIGHLIGHT=000000000 # <- Keeps track of import position (Updates automatically) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from pathlib import Path | |
from typing import Union, Tuple, List, NamedTuple, Dict | |
import sys | |
class Block(NamedTuple): | |
name: str | |
created: int | |
updated: int |
NewerOlder