bbedit-recovery

0.0.2 • Public • Published

BBEdit Recovery

Code Climate maintainability Code Climate issues Github code size GitHub issues GitHub last commit GitHub License GitHub forks GitHub stars

So over the last few years as a developer I've experienced three instances of MacBook swollen battery syndrome. I do not know if I'm just scripting too much, too many projects with npx calls for React 🤪 , or just bad luck. Either way I've found over time I was manually copying over my BBEdit settings to my NAS so I could easily setup my replacement/loaner and in the process thought there has got to be a better way then manual and could this help anyone else 🤔 .

To resolve this headache and since I've enjoyed writing more in Node I thought it be fun to write a Node CLI. Currently this is very basic but in my free time (if ever 🙄 ) I'm thinking of building in launchd support that pushes to a repository and/or NAS.

Installation

NPM:

npm i bbedit-recovery

install dependencies

cd bbedit-recovery && npm i

NPM link

After dependencies are added run:

npm link

If you're done run to remove

npm unlink

How to use

This package can take three CLI commands:

bbedit-recovery
bbedit-recover

or the shorthand:

bbrec

by default with no options passed this will create a directory named bbedit-recovery and copy over all directories that are not empty and files. This location can be echoed with the pwd command in the terminal if you're unsure where files will go.

Options

What's a CLI without options, right? Currently this takes two dest and name but I can assure you there will be more in the future.

Destination

You can specify where the files will be copied to by passing either the commands --name or the shorthand -n. This expects and tests for a directory. If a directory isn't valid it will error out.

Example:

bbedit-recover -dest /Users/$USER/supercalifragilisticexpialidocious

shorthand:

bbrec -d /Users/$USER/supercalifragilisticexpialidocious

Desktop and Documents

If you'd like to copy files to your Desktop directory:

bbedit-recover -d Desktop

If you'd like to copy files to your Documents directory:

bbedit-recover -dest Documents

ewww.. a shorthand for Documents:

bbedit-recover -d Docs

Name

Well, I'm hurt that you do not like the name bbedit-recovery. Fine, so be it, there is an option to change it just for you:

bbedit-recover -dest /Users/$USER/Desktop/supercalifragilisticexpialidocious -name recovery

shorthand:

bbrec -d /Users/$USER/Desktop/supercalifragilisticexpialidocious -n recover

Intro

What's a CLI without a groovy terminal banner:

bbedit-recovery intro

Help

Documentation writing is soooo boring. If I add a feature and forget to update the README.md you can get a listing of the commands:

bbedit-recovery --help

Future Plans

  • [ ] Add exclusion parameters
  • [ ] Run off a launchd
  • [ ] Ability to push to a repo

Package Sidebar

Install

npm i bbedit-recovery

Weekly Downloads

0

Version

0.0.2

License

ISC

Unpacked Size

9.13 kB

Total Files

10

Last publish

Collaborators

  • codingchewie