chore: rename project to notcrawl

This commit is contained in:
Vincent Koc 2026-04-22 16:56:54 -07:00
parent 90f483c1c8
commit 5ea52ac49c
No known key found for this signature in database
26 changed files with 85 additions and 85 deletions

View File

@ -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.

View File

@ -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 <<EOF
class Notioncrawl < Formula
cat > Formula/notcrawl.rb <<EOF
class Notcrawl < Formula
desc "Local-first Notion crawler into SQLite and normalized Markdown"
homepage "https://github.com/${SOURCE_REPO}"
url "${SOURCE_URL}"
@ -64,13 +64,13 @@ jobs:
depends_on "go" => :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

View File

@ -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 }}

View File

@ -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: |

View File

@ -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"

View File

@ -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:"

4
.gitignore vendored
View File

@ -1,8 +1,8 @@
bin/
dist/
/notioncrawl
/notcrawl
*.db
*.db-*
*.log
.DS_Store
.notioncrawl/
.notcrawl/

View File

@ -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 <vincent@vincentkoc.com>
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

View File

@ -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:

View File

@ -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/*')

View File

@ -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

View File

@ -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:

View File

@ -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] <command> [args]
fmt.Fprint(w, `Usage of notcrawl:
notcrawl [global flags] <command> [args]
Global flags:
--config PATH config file path

View File

@ -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"

View File

@ -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
```

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/vincentkoc/notioncrawl
module github.com/vincentkoc/notcrawl
go 1.26.0

View File

@ -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{

View File

@ -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 {

View File

@ -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)
}

View File

@ -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"

View File

@ -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"
)

View File

@ -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

View File

@ -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) {

View File

@ -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

View File

@ -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)
}

View File

@ -33,7 +33,7 @@ section() {
}
cat <<EOF
## notioncrawl v${version}
## notcrawl v${version}
local-first Notion crawling into SQLite, normalized Markdown, and git-backed snapshots.
EOF