Skip to content

admidori/cosense-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cosense-cli

CI PyPI version MIT License

The unofficial CLI reader of the Cosense. This project uses Cosense API.

Installation

pip install cosense

For Windows users

If you install the CLI tool created by Python for the first time, this program may not be operational. Please execute the below on your PowerShell before executing this program.

$env:PATH += ";" + (Get-Item (python -m site --user-site)).parent.fullname + "\Scripts"

(Reference: https://zenn.dev/kumazo/articles/35215498b86939)

Basic Use

Commandline

cosense search help-jp

Use Cosense API in Python

import cosense

client = cosense.Client()
project = client.get("/help-jp/")

Advance Use (For private project)

Check your token

  1. Access your Cosense project page
  2. Check Cookies information (In Chrome, press F12 and show the "Application" tab)
  3. Copy the value of connect.sid

Commandline

# Replace the "your token" with "connect.sid"
cosense search "your project name" --auth "your token"

Use Cosense API in Python

import cosense

# Define sid on the 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}/")

License

This project is published under the MIT license. This repository is based on kaisugi/scrapbox-python.

About

The unofficial CLI reader of the Cosense

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages