Skip to content

πŸ’ƒ a Collection of scripts and libraries to speed up sotware development process

License

Notifications You must be signed in to change notification settings

artistudioxyz/aspri

Last Commit Code Size Go Mod Version Latest Tag Build Status Stars

ASPRI (Asisten Pribadi)

πŸ’ƒ a Collection of scripts and libraries to speed up sotware development process

πŸ“ Installation

You can install aspri by using one of these method

Install from binary

  • Download the latest binary from release branch
  • Extract the binary to your $PATH directory
  • Make sure the binary is executable

Install using go get

  • Run : go get github.com/artistudioxyz/aspri

Install from source

  • Re-initiate go.mod : rm go.mod && go mod init aspri
  • Go Install : go install
    • to Generate binary for other OS : ./build.sh

Note

  • Please add your Go install directory to your system's shell path. Learn More
  • Tutorial in bahasa can be found here

πŸ“Ÿ Commands

Contribution :

  • Calculate Contribution : --contribution --date-start {date} --date-end {date} --path {workdir}

ChatGPT :

  • Start Chat : --chatgpt --api-key {API_KEY}
    • The chat support multiple line, don't forget to end it with ~ to get an answer.
    • Get the api key from here

Docker :

  • Stop and Remove Container : --docker --prune -id {identifier}
  • Compose restart (down & up) : --docker-compose --restart -f {filename}

File :

  • Asset minifier (.js and .css) : --minify --path {workdir}
  • Count files containing text : --file --count --path {workdir} --text {text} --exclude {dirname}
  • Directory Stats : --dir --stats --path {workdir}
  • Extract Urls : --extract-url --path {workdir} --url {url}
  • Find files older than : --file --find --older-than --days {days} --regex {regex} --path {workdir} --dry-run
  • Find files younger than : --file --find --younger-than --days {days} --regex {regex} --path {workdir} --dry-run
  • Remove Directories or Files Nested by Filenames :
    • Remove Directories --dir --remove --dirname {dirname} --path {workdir}
    • Remove Files --file --remove --f {filename} --path {workdir}
  • Remove Files Nested Except Extensions : --file --remove --ext {.php} --except {composer.json} --path {workdir}
  • Remove Files older than x days matching regex nested : --file --remove --older-than --days {days} --regex {regex} --path {workdir} --dry-run
  • Remove Directory older than x days : --dir --remove --older-than --days {days} --level {0} --path {workdir} --dry-run
  • Search and Replace :
    • in Directory : --search-replace --path {dir} --from {text} --to {text}
    • in File : --search-replace -f {filename} --from {text} --to {text}
  • Standardize directory name : --dir --standardize --path {workdir}
  • Support Multiple Params
    • Dirname : --dirname {dirname}
    • Filename : -f {filename}
    • Except : --except {except}
    • Extension : --ext {ext}

Git :

  • Commit and Push : --git -m {message}
  • Gone : --git --gone
  • Reset to previous state (Ignore changes and Remove untracked files) : --git --reset
  • Reset Cache : --git --reset-cache

Markdown :

  • Extract markdown content by heading : --md --path {workdir} --heading {heading}
  • Extract markdown headings : --md --path {workdir} --heading {heading}
  • Remove Link from Markdown File : --md --remove-link --path {workdir}

NoIP :

  • Update Hostname : --noip --update -u {username} -p {password} --hostname {hostname}

PHP :

  • List all class in directory nested : --php --list-class --path {workdir}
  • List all function in directory nested : --php --list-function --path {workdir}
  • List function call in directory nested : --php --list-function-call --path {workdir} --functionname {functionname}
  • Support Multiple Params
    • FunctionName : --functionname {FunctionName}

PHPCS :

  • PHPCS Install Ruleset : --phpcs --install

Rsync

  • Generate Rsync command based on rsync.json : --rsync

Miscellaneous :

  • Self Update : --self-update

Quotes :

  • Quote of the day : --quote-of-the-day

Syncthing :

  • Remove all conflicts files after certain days : --syncthing --remove-conflicts --days {days} --dry-run

WordPress :

  • Refactor Dot Framework : --wp-refactor --path {workdir} --from {namespace} --to {namespace} --type {plugin|theme}
  • WP Clean Project Files for Production : --wp-clean --path {workdir} --type {wordpress|github}
  • WP Plugin Build Check : --wp-plugin-build-check --path {workdir}
    • Build WP Plugin : --wp-plugin-build --path {workdir} --type {wordpress|github}
    • Release WP Plugin : --wp-plugin-release --path {workdir} --to {version}
  • WP Theme Build Check : --wp-theme-build-check --path {workdir}
    • Build WP Plugin : --wp-theme-build --path {workdir} --type {wordpress|github}
  • WP Tag Trunk for Subversion (SVN) : --wp-tag-trunk --path {workdir}

YouTube

  • Extract YouTube Video Data : --youtube --extract --path {filepath}

βš’οΈ Built with

⭐️ Support & Contribution

  • Help support me by giving a 🌟 or donate