SheetGenie is a command line script that automates the process of collecting data from an API and appending it to an Excel sheet. You can also create and organize sheet tabs, and navigate through entire projects full of workbooks. Formatting configurations and commands are also in progress.
For Windows you have to run sheet_genie
with either:
./sheet_genie
or
mix escript sheet_genie
Create Project:
sheet_genie new [NAME]
Create a new Excel workbook:
sheet_genie workbook new [NAME]
# or alternatively
sheet_genie wb new [NAME]
List all workbooks:
sheet_genie workbook list
# or alternatively
sheet_genie wb list
Set active workbook:
sheet_genie workbook open [NAME]
# or alternatively
sheet_genie wb select [NAME]
Create a new worksheet tab:
sheet_genie worksheet new [NAME]
# or alternatively
sheet_genie ws new [NAME]
List all worksheets:
sheet_genie workbook list
# or alternatively
sheet_genie wb list
Set active worksheet tab:
sheet_genie worksheet open [NAME]
# or alternatively
sheet_genie ws select [NAME]
Create Schema:
This is your template for extracting items from the API. The NAME is the key you're trying to extract from the API and the TYPE is the datatype (i.e. string, number, text, etc.). You can add as many of these as you want.
sheet_genie schema new [NAME]:[TYPE] [NAME]:[TYPE]...
Example:
sheet_genie schema new title:string description:string id:number
Add data to worksheet:
This will add append the API data based on the schema that is passed in. It will append it to the current worksheet selected inside of the current Excel workbook (.xlsx) selected.
sheet_genie append api [API_URL] [SCHEMA]
Example:
sheet_genie append api http://localhost:4000/bug_reports my_schema
In order to run Elixir applications, you must first have Elixir and the Erlang VM installed on your machine. To do this, you must first have a package manager such as Homebrew (Mac), Chocolatey (Windows), or any Linux distro's package manager.
-
Install Homebrew:
- Open your Terminal and run the following command to install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Open your Terminal and run the following command to install Homebrew:
-
Install Erlang and Elixir:
- Once Homebrew is installed, run the following commands to install Erlang and Elixir:
brew install erlang brew install elixir
- Once Homebrew is installed, run the following commands to install Erlang and Elixir:
- Install Chocolatey:
- Open PowerShell as an Administrator and run the following command to install Chocolatey:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
- Open PowerShell as an Administrator and run the following command to install Chocolatey:
- Install Erlang and Elixir:
- Once Chocolatey is installed, run the following commands to install Erlang and Elixir:
choco install erlang choco install elixir
- Once Chocolatey is installed, run the following commands to install Erlang and Elixir:
-
Install Erlang and Elixir:
- Depending on your Linux distribution, follow the respective instructions below:
Ubuntu/Debian:
sudo apt update sudo apt install -y esl-erlang elixir
Fedora:
sudo dnf install -y erlang elixir
Arch Linux:
sudo pacman -S erlang elixir
The program can be built and installed using the respective setup file for your operating system.
Important: You ONLY need the install script. No need to clone the repository
since the script will handle that.
# For macOS
./install_mac.sh
# For Linux
./install_linux.sh
# For Windows
install_windows.bat
If the setup doesn't run then try adding this before running the install script:
chmod +x install_mac.sh
MIT License
Copyright (c) 2024 RyanBlaney
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.