Complete CLI tool with 4 core commands: - xapi login: Configure OAuth credentials via editor - xapi status: Test authentication - xapi search: Search tweets with preview/execute modes - xapi create: Post tweets with preview/execute modes Features: - OAuth 1.0a authentication with HMAC-SHA1 signing - OAuth 2.0 Client ID/Secret support (for future features) - TOML-based configuration - Editor integration for config management - Helpful error messages for permission issues - Quota-aware design (no caching to avoid complexity) Built for developers on Free/Basic X API tiers.
32 lines
1.0 KiB
Bash
32 lines
1.0 KiB
Bash
# Maintainer: maxtheweb <max@maxtheweb.com>
|
|
pkgname=xapi
|
|
pkgver=0.1.0
|
|
pkgrel=1
|
|
pkgdesc="The quota-intelligent X API CLI tool - smart quota management for developers"
|
|
arch=('x86_64' 'aarch64')
|
|
url="https://git.maxtheweb.com/maxtheweb/xapi-cli"
|
|
license=('MIT')
|
|
makedepends=('go')
|
|
depends=()
|
|
optdepends=('nvim: recommended text editor for configuration'
|
|
'vim: alternative text editor'
|
|
'nano: lightweight text editor')
|
|
source=("$pkgname-cli-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
|
|
sha256sums=('SKIP')
|
|
|
|
build() {
|
|
cd "$pkgname-cli-$pkgver"
|
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
|
export CGO_CFLAGS="${CFLAGS}"
|
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
|
export CGO_LDFLAGS="${LDFLAGS}"
|
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
|
go build -o xapi .
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname-cli-$pkgver"
|
|
install -Dm755 xapi "$pkgdir"/usr/bin/xapi
|
|
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
|
|
} |