A simple CLI productivity tool to quickly display the syntax of a desired piece of code

Overview

Iforgor

Iforgor is a customisable and easy to use command line tool to manage code samples. It's a good way to quickly get your hand on syntax you dont remember right from your terminal without wasting time looking on the internet.

Installation

Method :

Creates symlinks of iforgor.py and the snippets folder to /usr/local/bin. So that it can be run from anywhere on the terminal.

Requirements :

  • Python.
  • Git.
  • The colorama python module.

Step by step procedure :

  1. Open a terminal and cd into the directory you want to install the program into.

  2. Run "git clone https://github.com/Solirs/iforgor/"

  3. Cd into the newly created "iforgor" directory

  4. Run "./setup.sh" as root (it has to be run as root since it needs to create files in /usr/local/bin), add the ungit argument to remove github related files and folders like the readme and license.

  5. Run "iforgor -h"

If it works, the install was successful. You can then delete setup.sh

Uninstall:

To uninstall, simply delete the 'iforgor' and 'snippets' symlinks in /usr/local/bin.

Then delete the iforgor folder.

Iforgor 101

To display a piece of code, run the following.

iforgor LANGUAGE SNIPPET

The language argument represents a folder in the "snippets" directory. You can add any language you want by creating a folder in it.

The snippet argument represents a *.txt file in the specified language directory that containd the code sample you want to display. You can add any code sample by creating a *.txt in a desired language folder.

So if you want to add a function sample for the, lets say Rust language for example. You will have to create a directory named "rust" in the snippets folder. And create a function.txt file in the rust folder with the code you want inside.

You can then print it out by running iforgor rust function

Pro tips:

  • Languages and snippets are case insensitive. So you can run 'iforgor lAnGuAgE sNiPpeT'.

  • You dont need to do the setup process, but its required if you want to be able to run iforgor easily from anywhere.

  • There are default snippets yes, but iforgor is designed to be customized, dont hesitate to add your own custom snippets and languages.

Screenshots:

alt text

Compatibility

Linux

This should work on pretty much any linux distro, but i can make mistakes, so dont hesitate opening an issue if you face problems.

Iforgor was tested on:

Debian 11 : Working

Void Linux : Working

Arch Linux : Working

BSDs and other unix based operating systems.

Those are less certain to work, but you can still give it a try.

Tested on:

FreeBSD : Working

OpenBSD : Working

Want to contribute ?

Sure. All help is accepted.

The code is very commented if you want to take a look at it.

PLEASE dont forget to star the project if you find it interesting, it helps out a ton.

You might also like...
Interactive Redis: A Terminal Client for Redis with AutoCompletion and Syntax Highlighting.
Interactive Redis: A Terminal Client for Redis with AutoCompletion and Syntax Highlighting.

Interactive Redis: A Cli for Redis with AutoCompletion and Syntax Highlighting. IRedis is a terminal client for redis with auto-completion and syntax

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.

mycli A command line client for MySQL that can do auto-completion and syntax highlighting. HomePage: http://mycli.net Documentation: http://mycli.net/

Simple Python Library to display text with color in Python Terminal
Simple Python Library to display text with color in Python Terminal

pyTextColor v1.0 Introduction pyTextColor is a simple Python Library to display colorful outputs in Terminal, etc. Note: Your Terminal or any software

TerminalGV is a very simple client to display stats about your SNCF TGV/TER train in your terminal.
TerminalGV is a very simple client to display stats about your SNCF TGV/TER train in your terminal.

TerminalGV So I got bored in the train, TerminalGV is a very simple client to display stats about your SNCF TGV/TER train in your terminal. The "on-tr

Dead simple CLI tool to try Python packages - It's never been easier! :package:
Dead simple CLI tool to try Python packages - It's never been easier! :package:

try - It's never been easier to try Python packages try is an easy-to-use cli tool to try out Python packages. Features Install specific package versi

Simple CLI tool to track your cryptocurrency portfolio in real time.
Simple CLI tool to track your cryptocurrency portfolio in real time.

Simple tool to track your crypto portfolio in realtime. It can be used to track any coin on the BNB network, even obscure coins that are not listed or trackable by major portfolio tracking applications.

A simple cli tool to commit Conventional Commits

convmoji A simple cli tool to commit Conventional Commits. Requirements Install pip install convmoji convmoji --help Examples A conventianal commit co

A simple CLI tool for tracking Pikud Ha'oref alarms.
A simple CLI tool for tracking Pikud Ha'oref alarms.

Pikud Ha'oref Alarm Tracking A simple CLI tool for tracking Pikud Ha'oref alarms. Polls the unofficial API endpoint every second for incoming alarms.

Comments
  • compatibility issue with openbsd [easy fix]

    compatibility issue with openbsd [easy fix]

    hi there is a small compatibility issue with OpenBSD, in your python files where the shebang calls on #!/usr/bin/python3, however in OpenBSD's default install python3 is located in /usr/local/bin/python3. you can fix this in the setup.sh by having an if statement that checks if the operating system is OpenBSD and if it is changing the shebang to /usr/local/bin/python3, a way to find the OS in lowercase charterers is by using uname | tr '[:upper:]' '[:lower:]'. hope you are doing well.

    opened by shrigma 4
  • Personally tested Operating systems added

    Personally tested Operating systems added

    i tested the programs installer on both arch and OpenBSD. Arch:

    • works out of the box OpenBSD:
    • you need to install the colorama python library manually
    opened by shrigma 0
Owner
Solaris
Solaris
CLI for SQLite Databases with auto-completion and syntax highlighting

litecli Docs A command-line client for SQLite databases that has auto-completion and syntax highlighting. Installation If you already know how to inst

dbcli 1.8k Dec 31, 2022
Postgres CLI with autocompletion and syntax highlighting

A REPL for Postgres This is a postgres client that does auto-completion and syntax highlighting. Home Page: http://pgcli.com MySQL Equivalent: http://

dbcli 10.8k Jan 2, 2023
🎈 `st` is a CLI to quickly kick-off your new Streamlit project

?? st - a friendly Streamlit CLI st is a CLI that helps you kick-off a new Streamlit project so you can start crafting the app as soon as possible! Ho

Arnaud 18 Dec 19, 2022
A CLI for creating styled-components for React projects quickly

new-component Ian Cleary (iancleary) Description Welcome! This is a CLI for creating styled-components for React projects quickly. Note: I've rewrote

Ian Cleary (he/him/his) 1 Feb 15, 2022
Sink is a CLI tool that allows users to synchronize their local folders to their Google Drives. It is similar to the Git CLI and allows fast and reliable syncs with the drive.

Sink is a CLI synchronisation tool that enables a user to synchronise local system files and folders with their Google Drives. It follows a git C

Yash Thakre 16 May 29, 2022
[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

null 166 Dec 30, 2022
flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

null 14 Sep 11, 2022
AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

Rafael Torres 2 Dec 10, 2021
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

Ayush Soni 1 Nov 5, 2021
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

null 1 Feb 5, 2022