Gelper

It's pronounced Gelper and not Jelqer!

NOTE: Click the weird, feather-thingy, coloured-orange, on the top-left of the page to go back.

Pronunciation

Before using Gelper, you should know how to pronounce it, right? Here's the correct pronunciation versus the incorrect pronunciation:

  • Correct: Gell-per
  • Incorrect: Jell-qer
  • Incorrect: Jell-per
  • Yes! Jelper and Jelqer are both incorrect pronunciations!

    P.S. Don't click the hyperlink on 'Jelqer'

    Requirements

    You need a Github account, a Github repository, and Git SCM.

    Make sure to correctly configure Git.

    Now, download Gelper

    '/?' or 'list-flags'

    Shows a list of available flags.

    The '--f' flag

    This will 'pull' all the changes from your Github repository (make sure) you are in its parent folder.

    After pulling, it will merge and rebase, then update refs.

    Now you can commit and push without conflict (if there was a merge conflict!)

    Multi Start

    This is like the QS (Quick-start) feature, but buffed. MS allows you to commit and add multiple files in one line. Or add multiple files with a single commit message.

    gelper2 --m dir/file1.txt dir/new_name.out :: "rename 'dir/file1.txt' -> 'dir/new_name.out'"
    

    And this will commit with that message for both files.

    Quick Start

    In the new and improved, latest Gelper2 was added the Quick Start (QS) feature.

    The QS feature made other features such as configuration redundant, ergo those have been deprecated. Please download '1.1.0 stable' if you wish to use the Legacy Gelper.

    The QS feature enables you to quickly add and commit files. You need to use the QS mode via the '--q' flag. Here's how:

    gelper2 --q 'filename.extension' :: "message to commit to github repo"
    

    The syntax looks amazing. Version 2.0.1 is expected to replace the double-colon to something like '|>' or '--'.

    Anyways, the 'filename.extension' should be the path to your file. Here's how it would look if you were adding 'file.c' in 'src/files/c/'.

    gelper2 --q 'src/files/c/file.c' :: "Add C file -- file.c"
    

    Other than this, you can use '!push' at the end to automatically push all staged commits. Here's how that would look:

    gelper2 --q 'src/files/c/file.c' :: "Add C file -- file.c" !push
    

    Automatic Repository Cloning

    Gelper has a feature to enable automatic cloning, as in you do not need to enter the whole 'githubusername/repositoryname'. Instead, you can only type in the repository name, and, depending on the config, it will fill in the username for you.

    Here's how:

    gelper2 --global-user GithubUsername
    

    Now, whenever you type '--dc', or '--dc-ng', it will automatically use 'GithubUsername'. Remember to replace 'GithubUsername' with your actual username.

    Because mine is 'mickoissicko,' I will use 'mickoissicko'. Now, if I:

    gelper2 --dc githelper
    

    Let's say you want to copy an external repository without removing your configuration (can be done via --reset.)

    Here's an example:

    gelper2 --fc username/repository
    

    This will clone 'username/repository'. (Use the real ones.) And same goes for '--fc-ng,' which does it without the '.git' tag.

    Cloning Reserved Repositories

    Github has repositories such as '.github.io' or 'usr' which are special.

    They allow you to host your own website, or add a README to your profile. However, Gelper (from 2.2.5+) now has a feature for avoiding repetition and cloning these with ease!

    And yes, you can make use of the configuration file! (To clone automatically.)

    Associated flags:

  • --cgp, --ccgp
  • --cga, --ccga
  • CGP means Clone Github Pages, CCGP means Custom-Clone Github Pages.

    CCGP allows you to manually specify username (if you do have a .gelper/config.txt file and you do not want to delete it).

    CGA means Clone Github About. CCGA, similarly, means Custom-Clone Github About. Same usage as above.

    Assuming you have '--global-user' set:

    gelper2 --cga
    

    And if you do not:

    gelper2 --cga mickoissicko
    

    See. It makes it better: you only need to type your username!

    CGA for about, CGP for website!

    Here's a CCGP or CCGA demonstration:

    gelper2 --ccgp random_guy69
    

    Remember: CCGP or CCGA (should) be used if you have the 'config.txt' file, or '--global-user' set to a username! Otherwise, use CGA/CGP to clone manually. Why type extra letters when there is no need?!

    Cloning (without configuration)

    Gelper, quite like Git, can easily (now) in v2.1.4 do most of the things Git does. Out of those, the most prominent are cloning, committing, and pushing!

    Start Gelper with '--c' to clone. It displays a prompt. In it, enter your Github username, and the repository name (not link!!).

    You can also use '--dc' to directly clone. This one does not display the prompt. Instead, you can use it like:

    gelper2 --dc mickoissicko/githelper
    

    And that will clone the 'githelper' repository.

    You can also use '--dc-ng' to truncate '.git' from the repository link. This will clone only the repository without the '.git' extension in the end.

    gelper2 --dc-ng mickoissicko/githelper
    

    Archlinux User Repository

    Gelper (natively) supports the AUR. And will support other repositories like the AUR soon! To utilise this feature, you can run Gelper with '--aur'.

    Again, just using the '--aur' flag will display a prompt 'Software:' and you would have to specify the software name, like 'sharexin.'

    It operates in the '/home/USER/aur.gelper_tmp/' directory, deleted upon exit unless you append '-nc', like '--aur-nc,' which doesn't delete upon exit, meaning you can rebuild later.

    Other than that, you can use the '--daur' flag. Which directly builds software from the AUR. Remember: you need a working 'makepkg.'

    gelper2 --daur sharexin
    

    This copies 'sharexin' (a software in the AUR,) builds it, then deletes the temporary directory upon exit.

    gelper2 --daur-nc sharexin
    

    This copes 'sharexin', builds it, but leaves the build files and the directory, meaning if you run the above command again, it will check for the software, and ask you if you want to rebuild it.

    If you have trouble with '--daur' // '--daur-nc', add '-ng' to the flag. For example:

    gelper2 --daur-ng-nc sharexin
    
    This builds 'sharexin,' and leaves the temporary directory undeleted.
    gelper2 --daur-ng sharexin
    
    This deletes the temporary directory upon exit.

    The '-ng' flag truncates the '.git' from an AUR link at the end. It's added as an alternative to building with '.git' from the AUR.

    Flags

    Gelper uses command-line arguments (commonly called 'flags'), to determine how you want to execute it.

    Advantages:

  • Easier
  • Minimal setup
  • Minimal configuration
  • No need for extra files like '.githelper' or 'cfg/pref.yml'
  • There are two flags at the moment: '--d' and '--k'. You can't really tell what they do but let me explain:

    '--d' flag

    The '--d' flag stands for 'detached'. It runs Gelper in a new session, meaning:

  • Direct launch
  • No configuration
  • When running Gelper, 'addfiles' and 'commit' will be created if they do not exist. You will be prompted for their creation. In the end, both of the files will be removed. Use '--k', or 'keepfile' to keep those files; to not remove them.

    After making the files and including commit info etc. you will be prompted if you want to push these changes after the program processes the files, adds to git, and commits. You can select either 'y' for yes or 'n' for no.

    '--k' flag

    '--k' stands for 'keep files'. You can add it after '--d' so the program doesn't auto-delete 'addfiles' and 'commit' files after adding/committing.

    Setting an alias

    Configuration is very, very easy. Gelper utilises the human-friendly data-serialisation YAML format!

    To start off, make an alias for Gelper. Here's how:

    On Windows, edit the Path system environment variable, and add the Gelper executable path, without the executable. Now you can run Gelper with 'gelper' or whatever the name of the executable is.

    On Linux, open your DOT Shell file. I use the Fish shell, so for me it would be: '~/.config/fish/config.fish'. Anyways, add this line in the configuration file:

    alias gelper="/path/to/gelper/executable/file"
    

    That path has to be absolute. Why absolute? To save you pain. Here's why:

    alias gelper="../../path/to/gelper/executable/file"
    

    But if you do not want to do that, you can just place the executable in the location of your DOT Files, and easily do:

    alias gelper="gelper"
    

    And remember, it has to be the executable's full name, extensions matter. Let's say it is named 'gelper.bin', then it would be 'gelper.bin'. It is also case-sensitive.

    Anyways, replace the 'path/to/gelper/executable/file' with the path to the executable. You can place yours in '~/Documents/executables/gelper', and set that as the path.

    To avoid conflicts, remove the tilde, and append (instead) '/home/USERNAME', where the USERNAME (case-sensitive), is the username of your Linux PC.

    Cleaning

    You can delete the configuration files via the '--reset' flag.

    You can remove the AUR temporary folder (which is not deleted if you use the 'nc' [noclean] option) via the '--clean' flag.

    Deprecation notice

    Please note: the below guide is deprecated and for version 1.1.0 or 1.1.1-stable!

    Configuration

    Remember: Gelper must be run inside a Github repository!

    Starting off, navigate to the folder where the executable is stored, and run this command:

    gelper -cfg
    

    That command will generated a YAML configuration file with the name 'pref.yml'.

    Now, open 'pref.yml' and the contents of it should look like this:

    # By default, some flags are true/false
    MakeFiles: True
    Cleanup: True
    AutoPush: Off
    # The AutoPush flag pushes the changes automatically in the end
    #
    # Change the value of MakeFiles to false if: 
    # You do not want the program to automatically make 'commit' and 'addfiles' files
    # Change it to true if you do want that behaviour
    #
    # The cleanup flag just deletes those files upon exit
    

    Read the comments. They should give you an idea of how to use it. Remember, it is case-sensitive, so 'True' has to be exactly 'True' or 'False', and not 'true' or 'false'. Similarly, you can't see 'Off' to 'True'. It has to be 'On'.

    The MakeFiles flag automatically generates the 'commit' and 'addfiles' files, whereas if it were 'False', then it would not generate those files, and instead, you'd be prompted for their creation. You can choose no and manually create them.

    The Cleanup flag, as said in the comments, deletes those files upon exit.

    The AutoPush flag automatically pushes your changes to Github when you are done editing and press 'Y' in the prompt.

    It is Off by default to avoid any rash decisions. If 'Off', then Gelper prompts you if you want to push changes or no. You can select 'n' as no, and push those changes later after reviewing them (if you really want to).

    Commit & Addfiles

    When you start Gelper, and if the MakeFiles flag is 'True' it will make two files: commit and addfiles.

    If the flag is 'False', then you will be prompted for their creation. If you select no, then you can manually create them later.

    In the commit file, you can specify the message for each file you will be committing.

    In the addfiles file, you can specify which files you want to stage for commit.

    An example

    Let's say you run Gelper in the Github repository you wish to edit. Make sure to run it in the root folder to avoid relative paths or having to add paths like '../files/a_file.ext'.

    Anyways, let's say you want to add these files to the Github repository:

  • MyFile.txt
  • HisFile.txt
  • OurFile.communism
  • TheirFile.saddness
  • Here's how you would do that. Given that you've run Gelper, and the 'commit' and 'addfiles' files have been created, you can start by editing 'addfiles' first:

    MyFile.txt
    HisFile.txt
    OurFile.communism
    TheirFile.saddness
    

    Now, let's edit the 'commit' file:

    Added my file
    Added his file
    Added our file
    Added their file
    

    Gelper avoids the unnessescary jargon. Remember, line numbers matter. Here's what I mean:

    addfiles: On Line 1, we added 'MyFile.txt'.

    commit: On Line 1, we added the message for 'MyFile.txt'.

    So yes, no need to specify filename in 'commit'. Makes workflow fast!