Skip to content

Obsidian Sync

Installation

Search for "wucai" or "五彩" in Obsidian's community plugins.

If you are using Obsidian's built - in browser, it may cause authorization failure. Please temporarily turn off the browser plugin in Obsidian before proceeding.

  • For example, the Obsidian - Surfing plugin may cause authorization failure.
  • The solution is to disable this plugin first, complete the WuCai Highlight login authorization, and then enable the plugin.

Separate Folder

It is recommended to configure a separate synchronization folder for WuCai Highlight, not sharing it with your other materials to prevent data from being overwritten.

Synchronization Directory

By default, WuCai Highlight uses the folder "WuCai" for synchronization. This option can be modified in the WuCai Highlight plugin options in Obsidian.

The synchronization folder can be a sub - directory of a certain file, such as "Inbox/WuCai".

Variables Available in Templates

To minimize errors, WuCai Highlight uses lowercase letters and underscores for naming. When using variables, it is recommended to copy them from here instead of typing them manually.

jinja
{{title}}           : Title (string)
{{url}}             : Original link (string)
{{wucaiurl}}        : WuCai Highlight link (string)
{{author}}          : Author (string), preferentially take the value of orgname, if not available, return the value of orgauthor
{{orgname}}         : Organization name (string), for official accounts, it is the official account name (version >= 24.10.18)
{{orgauthor}}       : Author (string), for official accounts, it is the editor's name (version >= 24.10.18)
{{domain}}          : Domain name of the original link (string), such as mp.weixin.qq.com
{{domain2}}         : Second - level domain name of the original link (string), such as qq.com
{{createat}}        : Creation time (string), such as 2023 - 02 - 08 21:03
{{createat_ts}}     : Creation time (timestamp format, int)
{{updateat_ts}}     : Modification time (timestamp format, int)
{{updateat}}        : Update time (string), such as 2023 - 02 - 08 21:03
{{updateat_ts}}     : Update time (timestamp format, int)
{{publishat_ts}}    : Publication time of the article (timestamp format, int)
{{noteid}}          : Note ID (string)
{{tags}}            : List of article tags (string), supports converting tags to double - links
{{alltags}}         : Tags in (article + page notes) (string), supports the double - link function for tags
{{alltagsv2}}       : Tags in (article + page notes)+ all highlight tags, this value is used in YAML as a List (version >= 24.9.2)
{{trimtags}}        : List of article tags, with the "#" removed from the tags, this value is used in YAML as a List
{{mergedtags}}      : Article tags + page note tags, used in YAML as a List
{{pagenote}}        : Page note (string)
{{isstar}}          : Whether it is starred (boolean), true for starred, otherwise not
{{isdailynote}}     : Whether it is a daily note (boolean), it is recommended to use the notetype field
{{notetype}}        : Note type (string), page, dailynote (version >= 23.10.20)
{{ispagemirror}}    : Whether it is a clipped page (boolean), true for clipped, otherwise not
{{highlightcount}}  : Number of highlights (integer), the number of highlights on the current web page
{{annotationcount}}  : Number of thoughts (integer), (version >= 24.7.9)
{{mdcontent}}		    : Full - text clipping in markdown format
{{highlights}}           : List of highlights (list)
    {{item.type}}        : Highlight type (string), which are highlight, image, math (mathematical formula), quote (quotation), (version >= 23.10.20)
    {{item.refid}}       : Highlight ID (string), such as b76ebe3
    {{item.refurl}}      : Highlight jump link (string), (version >= 23.10.20)
    {{item.note}}        : Highlighted text (string)
    {{item.notelinks}}   : Hyperlinks in the highlight (list), each element is an object, such as {url:"link", title:"title"}, (version >= 24.8.21)
    {{item.imageurl}}    : Image highlight (string)
    {{item.annotation}}  : Thoughts on the highlight (string)
    {{item.color}}       : Highlight color (string)
    {{item.slotid}}      : Slot value corresponding to the color, 1 - 6 correspond to 6 colors
    {{item.updateat_ts}} : Update time of the highlight (int) (version >= 23.10.20)
    {{item.createat_ts}} : Creation time of the highlight (int) (version >= 23.10.20)
    {{item.tags}}        : Tags of the highlight, such as #read #todo (version >= 24.7.9)

Among them, slotid has 6 values from 1 to 6, representing 6 colors. WuCai Highlight has 6 color themes. Under each color theme, the colors corresponding to the same slotid are similar, as shown in the following figure.

alt text

Variables Available in Titles

jinja
{{title}}       : Title (string)
{{createat_ts}} : Timestamp (integer)
{{domain}}      : Domain name of the current web page (string), such as mp.weixin.qq.com
{{domain2}}     : The last two - part interception of the domain name of the current web page, for example, mp.weixin.qq.com will become qq.com
{{notetype}}    : Document type (string), such as dailynote or page

Synchronization Logic Explanation

The synchronization between WuCai Highlight and Obsidian is one - way.

Data will be synchronized from WuCai Highlight to Obsidian, but not from Obsidian to WuCai Highlight.

Deleting files in Obsidian will not affect WuCai Highlight.

How to Synchronize Full - text Clipping Content to Obsidian

  • Ensure that the WuCai Highlight - Obsidian plugin version is >= 23.8.31
  • Ensure that the Obsidian template contains the clipping variable mdcontent
jinja
{% if not isdailynote %}
## Full - text Clipping
{% block mdcontent %}
{{mdcontent}}
{% endblock %}
{% endif %}

How to Set Some Articles Not to Synchronize to Obsidian

Configure in the WuCai Highlight backend

alt text

Manually Upgrade the WuCai Highlight - Obsidian Plugin

alt text