Discourse API - CLI/Lib
Go to file
2024-09-11 20:47:11 +02:00
.vscode osr latest 2024-09-11 20:47:11 +02:00
commands osr latest 2024-09-11 20:47:11 +02:00
config init v2.5 2024-06-29 21:53:26 +02:00
docs init v2.5 2024-06-29 21:53:26 +02:00
lib osr latest 2024-09-11 20:47:11 +02:00
scripts init v2.5 2024-06-29 21:53:26 +02:00
src osr latest 2024-09-11 20:47:11 +02:00
temp init v2.5 2024-06-29 21:53:26 +02:00
templates/discourse/machines init v2.5 2024-06-29 21:53:26 +02:00
tests init v2.5 2024-06-29 21:53:26 +02:00
_cli.d.ts init v2.5 2024-06-29 21:53:26 +02:00
_cli.js init v2.5 2024-06-29 21:53:26 +02:00
_cli.js.map init v2.5 2024-06-29 21:53:26 +02:00
.gitignore init v2.5 2024-06-29 21:53:26 +02:00
.npmignore init v2.5 2024-06-29 21:53:26 +02:00
clear_history.sh init v2.5 2024-06-29 21:53:26 +02:00
constants.d.ts init v2.5 2024-06-29 21:53:26 +02:00
constants.js init v2.5 2024-06-29 21:53:26 +02:00
constants.js.map init v2.5 2024-06-29 21:53:26 +02:00
discourse-sync.json init v2.5 2024-06-29 21:53:26 +02:00
index.d.ts init v2.5 2024-06-29 21:53:26 +02:00
index.js init v2.5 2024-06-29 21:53:26 +02:00
index.js.map init v2.5 2024-06-29 21:53:26 +02:00
index.md init v2.5 2024-06-29 21:53:26 +02:00
LICENSE init v2.5 2024-06-29 21:53:26 +02:00
main.d.ts init v2.5 2024-06-29 21:53:26 +02:00
main.js osr latest 2024-09-11 20:47:11 +02:00
main.js.map init v2.5 2024-06-29 21:53:26 +02:00
options.d.ts init v2.5 2024-06-29 21:53:26 +02:00
options.js init v2.5 2024-06-29 21:53:26 +02:00
options.js.map init v2.5 2024-06-29 21:53:26 +02:00
package-lock.json osr latest 2024-09-11 20:47:11 +02:00
package.json osr latest 2024-09-11 20:47:11 +02:00
README.md init v2.5 2024-06-29 21:53:26 +02:00
tmp-a.json osr latest 2024-09-11 20:47:11 +02:00
tmp.json osr latest 2024-09-11 20:47:11 +02:00
tsconfig.json init v2.5 2024-06-29 21:53:26 +02:00
types.d.ts osr latest 2024-09-11 20:47:11 +02:00
types.js init v2.5 2024-06-29 21:53:26 +02:00
types.js.map init v2.5 2024-06-29 21:53:26 +02:00

Discourse library and CLI for OSR content

Commands

info

Print configuration and commands

osr-discourse info

deploy

Create/Update post from directory, using OSR-Specs

usage


osr-discourse deploy --src="./*" 

sync <file>

Sync file

usage


osr-discourse sync <file> 

    --src="<filepath.HTML|MD|OSR / glob / pipe>" 
    --cat=<category id> 
    --owner="user_name|user_id" 
    --config=<OSR Config Hash> 
    --timestamp=<default=now>
    --download-assets=true|false
    --tags=<tag ids | tag names>
    

sync-kb

Create/Update/Sync kb from directory

usage


osr-discourse sync --src="./*" 

list

List posts per category or search query

usage


osr-discourse list --query="discourse-query"  --dst="output.[json|xls|csv]" --fields="[post-fields]"

oa-user-import

Imports oa-users from dump file

usage


osr-discourse oa-user --src="raw.json"

ig-user-sync

Imports IG users from dump file

usage


osr-discourse ig-user sync --src="raw.json"

osr-commons-sync

Sync all osr-commons ( taxonomy )

usage


osr-discourse osr-sync --src="path to commons (JSON)"

pm

Notify all users, using Discourse private message

usage


osr-discourse pm --src="path to message (MD|HTML)" --groups="osr groups"

invite

Send invite to a list of users, common MC/OSR CSV format

usage


osr-discourse invite --src="path to message (MD|HTML)" --src="path to CSV"

Library / API

References

Todos

//////////////////////// // // 1. Fetch Tags // 2. Populate Tags // 3. Download (oa-bot) // 4. Sync - Assets (osr-machines) // 5. Ensure/Find user // // Content //
// Body (descr full) // each step // footer (refs) // set tags // set ts // // Post // -> sync lib // -> translate -> lib // -> digest // -> notifications // -> index // -> update ext refs // -> market place // -> sync externals (git, ...)