chore: redact personal ops from public tree
Move catalog, dossier sync, and SearXNG to private oo-workspace; keep generic CRM name/title helpers and anonymized docs/examples.
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ func TestRootRegistersSubjects(t *testing.T) {
|
||||
want := []string{
|
||||
"calendar", "projects", "tasks", "users", "whoami",
|
||||
"contacts", "persons", "companies",
|
||||
"opportunities", "cases", "crm-tasks", "applications", "crm", "mails", "catalog", "invoices",
|
||||
"opportunities", "cases", "crm-tasks", "crm", "mails", "invoices",
|
||||
}
|
||||
got := make(map[string]bool, len(rootCmd.Commands()))
|
||||
for _, c := range rootCmd.Commands() {
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ var outputFormat = "table"
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "oo",
|
||||
Short: "OnlyOffice Workspace CLI — subject-based command tree",
|
||||
Long: "oo is a thin CLI over github.com/eslider/go-onlyoffice.\nCommands are grouped by OnlyOffice subject (calendar, projects, tasks, users, persons, companies, opportunities, cases, crm-tasks, applications, catalog, invoices).",
|
||||
Long: "oo is a thin CLI over github.com/eslider/go-onlyoffice.\nCommands are grouped by OnlyOffice subject (calendar, projects, tasks, users, persons, companies, opportunities, cases, crm-tasks, mails, invoices).",
|
||||
Version: version,
|
||||
SilenceUsage: true,
|
||||
SilenceErrors: false,
|
||||
|
||||
+1
-2
@@ -6,7 +6,6 @@ import (
|
||||
"strings"
|
||||
|
||||
onlyoffice "github.com/eslider/go-onlyoffice"
|
||||
"github.com/eslider/go-onlyoffice/catalog"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -361,7 +360,7 @@ With --company-id, only persons linked to that company are scanned.`,
|
||||
}
|
||||
}
|
||||
}
|
||||
cf, cl := catalog.CleanPersonNames(fn, ln, dn, org, emails)
|
||||
cf, cl := onlyoffice.CleanPersonNames(fn, ln, dn, org, emails)
|
||||
needName := cf != fn || cl != ln
|
||||
linkID := companyID
|
||||
if linkID == 0 {
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ Always pass --opportunity when a deal exists (entity link at create). Updating
|
||||
--opportunity later often fails with HTTP 400 — see docs/crm-associations.md.
|
||||
|
||||
Example:
|
||||
oo invoices create --number INV-2026-01 --contact CONTACT_ID --item 12 \
|
||||
oo invoices create --number INV-2026-01 --contact CONTACT_ID --item ITEM_ID \
|
||||
--price 300 --opportunity OPPORTUNITY_ID --line-description "Service package" \
|
||||
--terms "…payment terms…"
|
||||
`,
|
||||
|
||||
+5
-12
@@ -244,23 +244,16 @@ Does not send. Open /addons/mail/#drafts to review.
|
||||
number := strings.TrimSpace(fmt.Sprint(inv["number"]))
|
||||
cost := formatInvoiceCostEUR(inv["cost"])
|
||||
if subject == "" {
|
||||
subject = fmt.Sprintf("Rechnung %s — Service package (%s EUR)", number, cost)
|
||||
subject = fmt.Sprintf("Invoice %s (%s EUR)", number, cost)
|
||||
}
|
||||
if body == "" {
|
||||
body = fmt.Sprintf(`Guten Tag,
|
||||
body = fmt.Sprintf(`Hello,
|
||||
|
||||
anbei übersende ich die Rechnung %s über %s EUR
|
||||
für das Service package (OS image inkl. Backup, Monitoring, RustDesk,
|
||||
gemeinsamem Datenträger und Netzwerkzugriff).
|
||||
please find attached invoice %s for %s EUR.
|
||||
|
||||
Zahlungsziel: 14 Tage netto.
|
||||
Payment terms: see invoice notes.
|
||||
|
||||
Steuerhinweis: siehe Notizen auf der Rechnung
|
||||
(Reverse Charge / § 13b UStG).
|
||||
|
||||
Mit freundlichen Grüßen
|
||||
|
||||
Example Author`, number, cost)
|
||||
Best regards`, number, cost)
|
||||
}
|
||||
draft, err := c.SaveMailDraft(cmd.Context(), onlyoffice.SaveMailDraftParams{
|
||||
From: from,
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
// oo crm cleanup
|
||||
// oo mails accounts | folders | list | get | draft | attach | draft-invoice | delete
|
||||
// oo invoices list | get | create | update | pdf | pdf-cleanup | status | delete | items …
|
||||
// oo applications sync
|
||||
// oo catalog scan-contacts | scan-projects | scan-thunderbird | merge | match | apply
|
||||
//
|
||||
// CRM association rules: docs/crm-associations.md
|
||||
//
|
||||
|
||||
+4
-7
@@ -8,7 +8,6 @@ import (
|
||||
"strings"
|
||||
|
||||
onlyoffice "github.com/eslider/go-onlyoffice"
|
||||
"github.com/eslider/go-onlyoffice/catalog"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -143,7 +142,7 @@ full title is composed as "CC | Company | Title".`,
|
||||
}
|
||||
title := args[0]
|
||||
if country != "" || company != "" {
|
||||
title = catalog.FormatProjectTitle(country, company, args[0])
|
||||
title = onlyoffice.FormatProjectTitle(country, company, args[0])
|
||||
}
|
||||
p, err := c.CreateProject(onlyoffice.NewProjectRequest{
|
||||
Title: title,
|
||||
@@ -381,9 +380,9 @@ func prjContactsLinkGitCmd() *cobra.Command {
|
||||
Short: "Link CRM persons matched from git shortlog (+ optional companies)",
|
||||
Long: `Runs git shortlog -sne --all in --git-root, matches author emails to CRM
|
||||
persons (FindPersonByEmail), and links found contacts to the project.
|
||||
Does not create new persons — approve/apply them via catalog first.
|
||||
Does not create new persons — create/link them in CRM first.
|
||||
|
||||
Also links --company-id contacts (e.g. Acme + end-client company).`,
|
||||
Also links --company-id contacts (employer and/or client company).`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
if gitRoot == "" && len(companyIDs) == 0 {
|
||||
@@ -425,10 +424,8 @@ func prjContactsLinkAuthorsCmd() *cobra.Command {
|
||||
Long: `Same as link-git, but reads authors from a file produced by:
|
||||
|
||||
git shortlog -sne --all > authors.txt
|
||||
# or via ssh:
|
||||
ssh ops-host 'git -C /path shortlog -sne --all' > authors.txt
|
||||
|
||||
Then: oo projects contacts link-authors 59 --from authors.txt --company-id 9`,
|
||||
Then: oo projects contacts link-authors 59 --from authors.txt --company-id COMPANY_ID`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
if authorsFile == "" && len(companyIDs) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user