The unofficial CLI reader of the Cosense.
This project uses Cosense API.
pip install cosense
If you install the CLI tool created by Python for the first time, this program may be not operation.
Please execute the below on your PowerShell before execute this program.
$env:PATH += ";" + (Get-Item (python -m site --user-site)).parent.fullname + "\Scripts"
(Reference: https://zenn.dev/kumazo/articles/35215498b86939)
Windows support is not enough. So sometimes layout is broken and occur any problem.
If you are Windows hacker, Please contribute our repository ;)
cosense search help-jp
import cosense
client = cosense.Client()
project = client.get("/help-jp/")
- Access your Cosense project page
- Check Cookies information (In Chrome, press F12 and show the "Application" tab)
- Copy value of
connect.sid
# Replace the "your token" to "connect.sid"
cosense search "your project name" --auth "your token"
import cosense
# Define sid on value of "connect.sid"
sid = "s%3Ag8zuk3JlDhp1t2o45eE5Aj3kK3yHkT_N.ipbmkRVRIP..."
your_project_name = "project"
client = cosense.Client(sid = sid)
project = client.get(f"/{your_project_name}/")
This project is published under the MIT lisence.
And this repository is based on kaisugi/scrapbox-python.