From 5ea52ac49c95403e740b3159460b18ad98f60980 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 22 Apr 2026 16:56:54 -0700 Subject: [PATCH] chore: rename project to notcrawl --- .github/release-drafter.yml | 4 ++-- .github/workflows/homebrew-tap.yml | 16 +++++++-------- .github/workflows/publish-apt.yml | 2 +- .github/workflows/publish-rpm.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/validation.yml | 6 +++--- .gitignore | 4 ++-- .goreleaser.yml | 22 ++++++++++----------- CONTRIBUTING.md | 4 ++-- Makefile | 6 +++--- README.md | 28 +++++++++++++-------------- SPEC.md | 4 ++-- cmd/{notioncrawl => notcrawl}/main.go | 22 ++++++++++----------- config.example.toml | 8 ++++---- docs/distribution.md | 4 ++-- go.mod | 2 +- internal/config/config.go | 4 ++-- internal/markdown/export.go | 4 ++-- internal/markdown/export_test.go | 4 ++-- internal/notionapi/api.go | 4 ++-- internal/notiondesktop/desktop.go | 4 ++-- internal/share/share.go | 4 ++-- internal/share/share_test.go | 4 ++-- internal/store/store.go | 2 +- internal/store/store_test.go | 2 +- scripts/release-notes.sh | 2 +- 26 files changed, 85 insertions(+), 85 deletions(-) rename cmd/{notioncrawl => notcrawl}/main.go (94%) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 2439ba9..5b514b2 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,4 +1,4 @@ -name-template: "notioncrawl v$RESOLVED_VERSION" +name-template: "notcrawl v$RESOLVED_VERSION" tag-template: "v$RESOLVED_VERSION" change-template: "- $TITLE (#$NUMBER) @$AUTHOR" change-title-escapes: '\<*_&' @@ -101,7 +101,7 @@ autolabeler: - '/.*/' template: | - ## notioncrawl v$RESOLVED_VERSION + ## notcrawl v$RESOLVED_VERSION local-first Notion crawling into SQLite, normalized Markdown, and git-backed snapshots. diff --git a/.github/workflows/homebrew-tap.yml b/.github/workflows/homebrew-tap.yml index fac5ddf..af094d9 100644 --- a/.github/workflows/homebrew-tap.yml +++ b/.github/workflows/homebrew-tap.yml @@ -48,12 +48,12 @@ jobs: VERSION="${TAG#v}" SOURCE_URL="https://github.com/${SOURCE_REPO}/archive/refs/tags/${TAG}.tar.gz" - curl -fsSL "${SOURCE_URL}" -o /tmp/notioncrawl-src.tar.gz - SHA256="$(shasum -a 256 /tmp/notioncrawl-src.tar.gz | awk '{print $1}')" + curl -fsSL "${SOURCE_URL}" -o /tmp/notcrawl-src.tar.gz + SHA256="$(shasum -a 256 /tmp/notcrawl-src.tar.gz | awk '{print $1}')" mkdir -p Formula - cat > Formula/notioncrawl.rb < Formula/notcrawl.rb < :build def install - system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/notioncrawl" + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/notcrawl" pkgshare.install "config.example.toml" doc.install "README.md", "LICENSE", "SPEC.md" end test do - assert_match "Usage of notioncrawl:", shell_output("#{bin}/notioncrawl --help") + assert_match "Usage of notcrawl:", shell_output("#{bin}/notcrawl --help") end end EOF @@ -80,13 +80,13 @@ jobs: TAG: ${{ github.event.release.tag_name || inputs.tag_name }} run: | set -euo pipefail - git add Formula/notioncrawl.rb + git add Formula/notcrawl.rb if git diff --cached --quiet; then echo "No tap changes to commit." exit 0 fi git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git commit -m "chore: update notioncrawl formula for ${TAG}" + git commit -m "chore: update notcrawl formula for ${TAG}" git pull --rebase origin main git push diff --git a/.github/workflows/publish-apt.yml b/.github/workflows/publish-apt.yml index 91f1fbb..da32b34 100644 --- a/.github/workflows/publish-apt.yml +++ b/.github/workflows/publish-apt.yml @@ -45,7 +45,7 @@ jobs: - name: Publish to Cloudsmith APT repository env: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} - CLOUDSMITH_REPO: vincentkoc/notioncrawl + CLOUDSMITH_REPO: vincentkoc/notcrawl CLOUDSMITH_APT_TARGETS: ${{ vars.CLOUDSMITH_APT_TARGETS }} CLOUDSMITH_DISTRIBUTION: ${{ vars.CLOUDSMITH_DISTRIBUTION }} CLOUDSMITH_RELEASE: ${{ vars.CLOUDSMITH_RELEASE }} diff --git a/.github/workflows/publish-rpm.yml b/.github/workflows/publish-rpm.yml index 2de0d9b..c75835a 100644 --- a/.github/workflows/publish-rpm.yml +++ b/.github/workflows/publish-rpm.yml @@ -45,7 +45,7 @@ jobs: - name: Publish to Cloudsmith RPM repository env: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} - CLOUDSMITH_REPO: vincentkoc/notioncrawl + CLOUDSMITH_REPO: vincentkoc/notcrawl CLOUDSMITH_RPM_DISTRIBUTION: ${{ vars.CLOUDSMITH_RPM_DISTRIBUTION }} CLOUDSMITH_RPM_RELEASE: ${{ vars.CLOUDSMITH_RPM_RELEASE }} run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48a9d79..f0f55e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,7 +52,7 @@ jobs: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} run: | set -euo pipefail - REPO="vincentkoc/notioncrawl" + REPO="vincentkoc/notcrawl" if [ -n "${CLOUDSMITH_API_KEY}" ]; then echo "CLOUDSMITH_ENABLED=1" >> "$GITHUB_ENV" echo "CLOUDSMITH_REPO_EFFECTIVE=${REPO}" >> "$GITHUB_ENV" diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 6cc619a..4336c1f 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -28,11 +28,11 @@ jobs: run: go test ./... - name: Build CLI - run: go build ./cmd/notioncrawl + run: go build ./cmd/notcrawl - name: Smoke test CLI help run: | set -euo pipefail - output="$(go run ./cmd/notioncrawl --help 2>&1)" + output="$(go run ./cmd/notcrawl --help 2>&1)" printf '%s\n' "$output" - printf '%s' "$output" | grep -q "Usage of notioncrawl:" + printf '%s' "$output" | grep -q "Usage of notcrawl:" diff --git a/.gitignore b/.gitignore index 780d777..8ce9f98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ bin/ dist/ -/notioncrawl +/notcrawl *.db *.db-* *.log .DS_Store -.notioncrawl/ +.notcrawl/ diff --git a/.goreleaser.yml b/.goreleaser.yml index 02e0464..db797c7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,11 +1,11 @@ version: 2 -project_name: notioncrawl +project_name: notcrawl builds: - - id: notioncrawl - main: ./cmd/notioncrawl - binary: notioncrawl + - id: notcrawl + main: ./cmd/notcrawl + binary: notcrawl env: - CGO_ENABLED=0 goos: @@ -22,7 +22,7 @@ builds: archives: - id: bundles ids: - - notioncrawl + - notcrawl name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" files: - README.md @@ -47,10 +47,10 @@ changelog: nfpms: - id: linux-packages ids: - - notioncrawl - package_name: notioncrawl + - notcrawl + package_name: notcrawl file_name_template: "{{ .ConventionalFileName }}" - homepage: https://github.com/vincentkoc/notioncrawl + homepage: https://github.com/vincentkoc/notcrawl maintainer: Vincent Koc description: Local-first Notion crawler into SQLite and normalized Markdown. license: MIT @@ -62,8 +62,8 @@ nfpms: priority: optional contents: - src: ./README.md - dst: /usr/share/doc/notioncrawl/README.md + dst: /usr/share/doc/notcrawl/README.md - src: ./LICENSE - dst: /usr/share/doc/notioncrawl/LICENSE + dst: /usr/share/doc/notcrawl/LICENSE - src: ./config.example.toml - dst: /usr/share/doc/notioncrawl/config.example.toml + dst: /usr/share/doc/notcrawl/config.example.toml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b0f6718..48bf085 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to notioncrawl +# Contributing to notcrawl Keep real Notion workspace data, secrets, tokens, cookies, and exported private content out of git. @@ -7,7 +7,7 @@ Useful local checks: ```bash go test ./... -go build ./cmd/notioncrawl +go build ./cmd/notcrawl ``` Implementation notes: diff --git a/Makefile b/Makefile index c99c87b..680195d 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,15 @@ -BINARY ?= bin/notioncrawl +BINARY ?= bin/notcrawl .PHONY: build test run fmt release-notes release-snapshot release-check build: - go build -o $(BINARY) ./cmd/notioncrawl + go build -o $(BINARY) ./cmd/notcrawl test: go test ./... run: - go run ./cmd/notioncrawl $(ARGS) + go run ./cmd/notcrawl $(ARGS) fmt: gofmt -w $$(find . -name '*.go' -not -path './.git/*') diff --git a/README.md b/README.md index a6d63da..c34aa0d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# notioncrawl +# notcrawl -`notioncrawl` mirrors Notion workspace data into local SQLite and normalized +`notcrawl` mirrors Notion workspace data into local SQLite and normalized Markdown so you can search, query, diff, and share your Notion memory without depending on the Notion UI. @@ -25,28 +25,28 @@ to without holding Notion credentials. ## Quick Start ```bash -go build -o bin/notioncrawl ./cmd/notioncrawl -bin/notioncrawl init -bin/notioncrawl doctor -bin/notioncrawl sync --source desktop -bin/notioncrawl export-md -bin/notioncrawl search "launch plan" +go build -o bin/notcrawl ./cmd/notcrawl +bin/notcrawl init +bin/notcrawl doctor +bin/notcrawl sync --source desktop +bin/notcrawl export-md +bin/notcrawl search "launch plan" ``` For API sync: ```bash export NOTION_TOKEN="secret_..." -bin/notioncrawl sync --source api +bin/notcrawl sync --source api ``` Default paths: -- config: `~/.notioncrawl/config.toml` -- database: `~/.notioncrawl/notioncrawl.db` -- cache: `~/.notioncrawl/cache` -- Markdown archive: `~/.notioncrawl/pages` -- git share repo: `~/.notioncrawl/share` +- config: `~/.notcrawl/config.toml` +- database: `~/.notcrawl/notcrawl.db` +- cache: `~/.notcrawl/cache` +- Markdown archive: `~/.notcrawl/pages` +- git share repo: `~/.notcrawl/share` ## Commands diff --git a/SPEC.md b/SPEC.md index 913e999..c6d032a 100644 --- a/SPEC.md +++ b/SPEC.md @@ -1,4 +1,4 @@ -# notioncrawl Spec +# notcrawl Spec ## Goals @@ -13,7 +13,7 @@ ## Product Summary -`notioncrawl` is a Go CLI that turns Notion workspace memory into a local +`notcrawl` is a Go CLI that turns Notion workspace memory into a local SQLite archive plus normalized Markdown files. V1 scope: diff --git a/cmd/notioncrawl/main.go b/cmd/notcrawl/main.go similarity index 94% rename from cmd/notioncrawl/main.go rename to cmd/notcrawl/main.go index 4107ef1..42571e1 100644 --- a/cmd/notioncrawl/main.go +++ b/cmd/notcrawl/main.go @@ -10,17 +10,17 @@ import ( "os" "strings" - "github.com/vincentkoc/notioncrawl/internal/config" - "github.com/vincentkoc/notioncrawl/internal/markdown" - "github.com/vincentkoc/notioncrawl/internal/notionapi" - "github.com/vincentkoc/notioncrawl/internal/notiondesktop" - "github.com/vincentkoc/notioncrawl/internal/share" - "github.com/vincentkoc/notioncrawl/internal/store" + "github.com/vincentkoc/notcrawl/internal/config" + "github.com/vincentkoc/notcrawl/internal/markdown" + "github.com/vincentkoc/notcrawl/internal/notionapi" + "github.com/vincentkoc/notcrawl/internal/notiondesktop" + "github.com/vincentkoc/notcrawl/internal/share" + "github.com/vincentkoc/notcrawl/internal/store" ) func main() { if err := run(context.Background(), os.Args[1:], os.Stdout, os.Stderr); err != nil { - fmt.Fprintln(os.Stderr, "notioncrawl:", err) + fmt.Fprintln(os.Stderr, "notcrawl:", err) os.Exit(1) } } @@ -30,7 +30,7 @@ func run(ctx context.Context, args []string, stdout, stderr io.Writer) error { printHelp(stdout) return nil } - global := flag.NewFlagSet("notioncrawl", flag.ContinueOnError) + global := flag.NewFlagSet("notcrawl", flag.ContinueOnError) global.SetOutput(stderr) configPath := global.String("config", "", "config file path") dbPath := global.String("db", "", "database path override") @@ -225,7 +225,7 @@ func runPublish(ctx context.Context, stdout io.Writer, cfg config.Config, args [ remote := fs.String("remote", cfg.Share.Remote, "git remote") repo := fs.String("repo", cfg.Share.RepoPath, "share repo path") branch := fs.String("branch", cfg.Share.Branch, "share branch") - message := fs.String("message", "archive: notioncrawl snapshot", "commit message") + message := fs.String("message", "archive: notcrawl snapshot", "commit message") push := fs.Bool("push", false, "push after commit") noCommit := fs.Bool("no-commit", false, "write snapshot without committing") if err := fs.Parse(args); err != nil { @@ -333,8 +333,8 @@ func isReadOnlyQuery(query string) bool { } func printHelp(w io.Writer) { - fmt.Fprint(w, `Usage of notioncrawl: - notioncrawl [global flags] [args] + fmt.Fprint(w, `Usage of notcrawl: + notcrawl [global flags] [args] Global flags: --config PATH config file path diff --git a/config.example.toml b/config.example.toml index 8a3a2ed..897c111 100644 --- a/config.example.toml +++ b/config.example.toml @@ -1,6 +1,6 @@ -db_path = "~/.notioncrawl/notioncrawl.db" -cache_dir = "~/.notioncrawl/cache" -markdown_dir = "~/.notioncrawl/pages" +db_path = "~/.notcrawl/notcrawl.db" +cache_dir = "~/.notcrawl/cache" +markdown_dir = "~/.notcrawl/pages" [notion.desktop] enabled = true @@ -15,5 +15,5 @@ version = "2022-06-28" [share] remote = "" branch = "main" -repo_path = "~/.notioncrawl/share" +repo_path = "~/.notcrawl/share" stale_after = "1h" diff --git a/docs/distribution.md b/docs/distribution.md index ab87b52..cfc1b4c 100644 --- a/docs/distribution.md +++ b/docs/distribution.md @@ -1,13 +1,13 @@ # Distribution -`notioncrawl` ships through GitHub Releases, Homebrew tap updates, and optional +`notcrawl` ships through GitHub Releases, Homebrew tap updates, and optional Cloudsmith APT/RPM repositories. ## Local Checks ```bash go test ./... -go build ./cmd/notioncrawl +go build ./cmd/notcrawl make release-notes TAG=v0.1.0 ``` diff --git a/go.mod b/go.mod index 17ce8aa..ab0f648 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/vincentkoc/notioncrawl +module github.com/vincentkoc/notcrawl go 1.26.0 diff --git a/internal/config/config.go b/internal/config/config.go index 7b1f2e1..9b839d3 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -12,7 +12,7 @@ import ( ) const ( - defaultDirName = ".notioncrawl" + defaultDirName = ".notcrawl" defaultDesktopPath = "~/Library/Application Support/Notion/notion.db" ) @@ -51,7 +51,7 @@ type ShareConfig struct { func Default() Config { base := filepath.ToSlash(filepath.Join("~", defaultDirName)) return Config{ - DBPath: filepath.ToSlash(filepath.Join(base, "notioncrawl.db")), + DBPath: filepath.ToSlash(filepath.Join(base, "notcrawl.db")), CacheDir: filepath.ToSlash(filepath.Join(base, "cache")), MarkdownDir: filepath.ToSlash(filepath.Join(base, "pages")), Notion: NotionConfig{ diff --git a/internal/markdown/export.go b/internal/markdown/export.go index 56924f6..a5b4bfd 100644 --- a/internal/markdown/export.go +++ b/internal/markdown/export.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "github.com/vincentkoc/notioncrawl/internal/notiontext" - "github.com/vincentkoc/notioncrawl/internal/store" + "github.com/vincentkoc/notcrawl/internal/notiontext" + "github.com/vincentkoc/notcrawl/internal/store" ) type Exporter struct { diff --git a/internal/markdown/export_test.go b/internal/markdown/export_test.go index 347e3b8..1da45f8 100644 --- a/internal/markdown/export_test.go +++ b/internal/markdown/export_test.go @@ -7,12 +7,12 @@ import ( "strings" "testing" - "github.com/vincentkoc/notioncrawl/internal/store" + "github.com/vincentkoc/notcrawl/internal/store" ) func TestExporterWritesMarkdown(t *testing.T) { ctx := context.Background() - st, err := store.Open(filepath.Join(t.TempDir(), "notioncrawl.db")) + st, err := store.Open(filepath.Join(t.TempDir(), "notcrawl.db")) if err != nil { t.Fatal(err) } diff --git a/internal/notionapi/api.go b/internal/notionapi/api.go index 1b27256..89ace6b 100644 --- a/internal/notionapi/api.go +++ b/internal/notionapi/api.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/vincentkoc/notioncrawl/internal/notiontext" - "github.com/vincentkoc/notioncrawl/internal/store" + "github.com/vincentkoc/notcrawl/internal/notiontext" + "github.com/vincentkoc/notcrawl/internal/store" ) const SourceName = "api" diff --git a/internal/notiondesktop/desktop.go b/internal/notiondesktop/desktop.go index 50c0ec5..5bc2ae0 100644 --- a/internal/notiondesktop/desktop.go +++ b/internal/notiondesktop/desktop.go @@ -10,8 +10,8 @@ import ( "strings" "time" - "github.com/vincentkoc/notioncrawl/internal/notiontext" - "github.com/vincentkoc/notioncrawl/internal/store" + "github.com/vincentkoc/notcrawl/internal/notiontext" + "github.com/vincentkoc/notcrawl/internal/store" _ "modernc.org/sqlite" ) diff --git a/internal/share/share.go b/internal/share/share.go index 104f376..7b35096 100644 --- a/internal/share/share.go +++ b/internal/share/share.go @@ -15,7 +15,7 @@ import ( "strings" "time" - "github.com/vincentkoc/notioncrawl/internal/store" + "github.com/vincentkoc/notcrawl/internal/store" ) var exportTables = []string{ @@ -64,7 +64,7 @@ func Publish(ctx context.Context, st *store.Store, opts PublishOptions) (Publish opts.Branch = "main" } if opts.Message == "" { - opts.Message = "archive: notioncrawl snapshot" + opts.Message = "archive: notcrawl snapshot" } if err := ensureRepo(ctx, opts.RepoPath, opts.Remote, opts.Branch); err != nil { return PublishSummary{}, err diff --git a/internal/share/share_test.go b/internal/share/share_test.go index 669744b..43c6918 100644 --- a/internal/share/share_test.go +++ b/internal/share/share_test.go @@ -6,8 +6,8 @@ import ( "path/filepath" "testing" - "github.com/vincentkoc/notioncrawl/internal/markdown" - "github.com/vincentkoc/notioncrawl/internal/store" + "github.com/vincentkoc/notcrawl/internal/markdown" + "github.com/vincentkoc/notcrawl/internal/store" ) func TestPublishAndImportSnapshot(t *testing.T) { diff --git a/internal/store/store.go b/internal/store/store.go index 65ca843..fcab30a 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -160,7 +160,7 @@ func (s *Store) init(ctx context.Context) error { return err } if current > schemaVersion { - return fmt.Errorf("database schema version %d is newer than this notioncrawl build supports (%d)", current, schemaVersion) + return fmt.Errorf("database schema version %d is newer than this notcrawl build supports (%d)", current, schemaVersion) } if _, err := s.db.ExecContext(ctx, `insert or replace into meta(key, value) values('schema_version', ?)`, schemaVersion); err != nil { return err diff --git a/internal/store/store_test.go b/internal/store/store_test.go index 9cd58f2..54506d0 100644 --- a/internal/store/store_test.go +++ b/internal/store/store_test.go @@ -7,7 +7,7 @@ import ( ) func TestStoreUpsertsAndSearchesPage(t *testing.T) { - st, err := Open(filepath.Join(t.TempDir(), "notioncrawl.db")) + st, err := Open(filepath.Join(t.TempDir(), "notcrawl.db")) if err != nil { t.Fatal(err) } diff --git a/scripts/release-notes.sh b/scripts/release-notes.sh index 802a674..011b7db 100755 --- a/scripts/release-notes.sh +++ b/scripts/release-notes.sh @@ -33,7 +33,7 @@ section() { } cat <