時価総額: $2.8611T -0.270%
ボリューム(24時間): $79.8495B 13.390%
  • 時価総額: $2.8611T -0.270%
  • ボリューム(24時間): $79.8495B 13.390%
  • 恐怖と貪欲の指数:
  • 時価総額: $2.8611T -0.270%
暗号
トピック
暗号化
ニュース
暗号造園
動画
トップニュース
暗号
トピック
暗号化
ニュース
暗号造園
動画
bitcoin
bitcoin

$86704.569562 USD

0.44%

ethereum
ethereum

$2054.519007 USD

2.14%

tether
tether

$1.000198 USD

0.01%

xrp
xrp

$2.421278 USD

-0.81%

bnb
bnb

$638.988699 USD

2.50%

solana
solana

$139.305622 USD

1.55%

usd-coin
usd-coin

$1.000003 USD

-0.02%

dogecoin
dogecoin

$0.184621 USD

6.26%

cardano
cardano

$0.727769 USD

1.88%

tron
tron

$0.226526 USD

-0.08%

chainlink
chainlink

$15.029314 USD

2.90%

toncoin
toncoin

$3.658590 USD

0.34%

unus-sed-leo
unus-sed-leo

$9.776464 USD

0.08%

stellar
stellar

$0.288665 USD

2.25%

avalanche
avalanche

$21.396133 USD

1.98%

暗号通貨のニュース記事

Obsidianから概念データベースにTo Doリストを同期する

2025/03/23 10:14

多くの高度な機能、プラグイン、コミュニティサポートを備えた素晴らしいノートテイキングユーティリティであるため、Obsidianを非常に多く使用し始めました。

Obsidianから概念データベースにTo Doリストを同期する

I've started using Obsidian quite a lot, as it's a fantastic note-taking utility with a lot of advanced features, plugins, and community support. I know others who use Notion, and while I've been trying to get to grips with it, there are some things I'd like to keep in both services at all times. That's why I wrote a Python script that allows me to synchronize my to-do list from Obsidian to a Notion database.

多くの高度な機能、プラグイン、コミュニティサポートを備えた素晴らしいノートテイキングユーティリティであるため、Obsidianを非常に多く使用し始めました。私は概念を使用している他の人を知っており、私はそれを把握しようとしている間、私が常に両方のサービスで保持したいことがいくつかあります。だからこそ、私はTo DoリストをObsidianから概念データベースに同期できるようにするPythonスクリプトを書きました。

In order to use this script, you'll need to follow the instructions outlined below in order to generate an integration token for your Notion database. You can then give your integration access to your selected database, and it will be able to read and write to it as it needs to. Notion has a lot of different integrations readily available, but we're going to be creating our own combined with a pre-made template.

このスクリプトを使用するには、概念データベースの統合トークンを生成するために、以下に概説する手順に従う必要があります。その後、選択したデータベースへの統合アクセスを提供でき、必要に応じて読み書きできるようになります。概念には、すぐに利用できる多くの異なる統合がありますが、事前に作られたテンプレートと組み合わせて独自の統合を作成する予定です。

As well, this is mostly a proof of concept. While it may be useful to some in its current state, this article is designed to help you get to grips with the Notion API and build your own integrations.

同様に、これは主に概念実証です。現在の状態の一部にとっては有用かもしれませんが、この記事は、概念APIを把握し、独自の統合を構築するのに役立つように設計されています。

Setting up API access in Notion

概念でAPIアクセスを設定します

Notion's API is easy to use

概念のAPIは使いやすいです

First and foremost, Notion's API is really easy to use and quite well-documented. It can be quite hard to get started if you're not too familiar, so we'll walk you through the steps in order to create your own integration. The pictures above can also be used as a reference to ensure that you are creating the integration correctly.

何よりもまず、NotionのAPIは非常に使いやすく、非常によく文書化されています。あなたがあまり馴染みがなければ始めるのは非常に難しいかもしれませんので、独自の統合を作成するために、ステップを説明します。上の写真は、統合を正しく作成していることを確認するための参照として使用することもできます。

Next, we'll need to create the Notion database that your notes will be stored in. We're going to use the To-do List template on Notion, though we'll need to remove some additional fields. This template turns each task into its own page so that you can enter additional information.

次に、メモが保存される概念データベースを作成する必要があります。概念でTo-Doリストテンプレートを使用しますが、追加のフィールドを削除する必要があります。このテンプレートは、各タスクを独自のページに変えて、追加情報を入力できるようにします。

Now that we have our template ready, click the "..." button (to the left of "New") and click "Customize To-dos". Click "Tasks" to remove it from the database. This will allow us to modify the fields in the template, where we can remove the "Assign" and "Due" fields. I also renamed "Task name" to simply "Name".

テンプレートの準備ができたので、[...]ボタン(「新しい」の左側)をクリックし、[To-Dosのカスタマイズ]をクリックします。 [タスク]をクリックして、データベースから削除します。これにより、テンプレート内のフィールドを変更することができ、「割り当て」および「デュー」フィールドを削除できます。また、「タスク名」を単純に「名前」に変更しました。

Finally, we'll finish by adding our integration to the page, so that it can edit the page. Go to the very top right of the page, where there's another "..." button. Click that, hover over "Connections" and scroll down to the integration that we created. Click it, and confirm that you want to give it access to the page.

最後に、ページを編集できるように、統合をページに追加して終了します。別の「...」ボタンがあるページの右上に移動します。それをクリックして、「接続」の上にホバリングし、作成した統合までスクロールダウンします。それをクリックして、ページにアクセスすることを確認してください。

Now with our page set up, we can move on to deploying the script to synchronize our Obsidian notes with Notion!

ページをセットアップすると、スクリプトを展開して、黒曜石のノートを概念と同期させることができます!

Setting up our script

スクリプトを設定します

You need your database ID, integration token, and Markdown file name

データベースID、統合トークン、マークダウンファイル名が必要です

The script that I've written can be found on GitHub, and it's pretty easy to get set up. You'll need to have Python installed on your machine, and you'll need to place the downloaded script in the same folder as your Obsidian notes. The only required Python library that doesn't already come preinstalled is the requests library, which you can install with the following command:

私が書いたスクリプトはGitHubで見つけることができ、セットアップを簡単にすることができます。マシンにPythonをインストールする必要があり、ダウンロードしたスクリプトをObsidian Notesと同じフォルダーに配置する必要があります。まだプリインストールされていない必要なPythonライブラリは、次のコマンドでインストールできるリクエストライブラリのみです。

pip3 install requests

PIP3インストールリクエスト

Next, you'll need to replace the NOTION_TOKEN, DATABASE_ID, and TASKS variables defined at the start of the file with your details. The token is the integration token that we created earlier, and the database ID is found in the URL of the Notion database we created. The database ID is everything after "notion.so/" and everything before "?v=..." For example, a database ID might look like the following:

次に、ファイルの開始時に定義されたnotion_token、database_id、およびタスク変数を詳細に置き換える必要があります。トークンは、以前に作成した統合トークンであり、データベースIDは作成した概念データベースのURLにあります。データベースIDは、「notion.so/」の後のすべてです。たとえば、データベースIDは次のようになる場合があります。

1bd1ef8871068079b3f7e7a515dc292b

1BD1EF8871068079B3F7E7A515DC292B

Finally, replace "tasks.md" with the actual name of the markdown file that you use to track your tasks. I used tasks.md to test this script, but if you already have a daily tracker, you can change the name to match the file where they're stored.

最後に、タスクを追跡するために使用するマークダウンファイルの実際の名前に「tasks.md」を置き換えます。 Tasks.mdを使用してこのスクリプトをテストしましたが、すでに毎日のトラッカーを持っている場合は、名前を変更して保存されているファイルを一致させることができます。

Running the script

スクリプトを実行します

Now that we have everything in place, we can run the script! Simply open a terminal in the folder and run the following command:

すべてが整ったので、スクリプトを実行できます!フォルダ内の端子を開き、次のコマンドを実行するだけです。

python3 synctasks.py

This will then connect to your Notion database with your integration token, read your markdown file, and synchronize its contents with the server. You can also automate the running of the script so that it synchronizes multiple times a day. It will remove tasks that you delete from your notes, and it will also update the status if you change them from incomplete to completed (or vice versa).

これにより、統合トークンで概念データベースに接続し、マークダウンファイルを読み取り、その内容をサーバーと同期させます。また、スクリプトの実行を自動化して、1日に複数回同期することもできます。メモから削除するタスクが削除されます。また、不完全から完了(または逆)に変更すると、ステータスを更新します。

This is a very basic script that will get you started with the Notion API, and you can expand on its functionality to do a lot more than just manage

これは非常に基本的なスクリプトであり、概念APIから始めて、その機能を拡張して、単に管理する以上のことを行うことができます

免責事項:info@kdj.com

提供される情報は取引に関するアドバイスではありません。 kdj.com は、この記事で提供される情報に基づいて行われた投資に対して一切の責任を負いません。暗号通貨は変動性が高いため、十分な調査を行った上で慎重に投資することを強くお勧めします。

このウェブサイトで使用されているコンテンツが著作権を侵害していると思われる場合は、直ちに当社 (info@kdj.com) までご連絡ください。速やかに削除させていただきます。

2025年03月25日 に掲載されたその他の記事