Skip to content

Neo-Desktop/go-fiche

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoFiche! Build Status GitHub issues GitHub license

Logo

A Go fork of Fiche

Command line pastebin for sharing terminal output.


Server-side usage

Installation From Source

  1. Clone:

    git clone https://github.com/Neo-Desktop/go-fiche.git
    
  2. Build:

    go get github.com/ahmetb/govvv
    govvv build
    
  3. Install:

    cp go-fiche /usr/local/bin
    

Usage

Usage of go-fiche:
  -B, --buffer int        This parameter defines size of the buffer used for getting data from the user. Maximum size (in bytes) of all input files is defined by this value. (default 32768)
  -d, --domain string     This will be used as a prefix for an output received by the client. Value will be prepended with http[s]. (default "localhost")
  -h, --help              Prints this help message
  -S, --https             If set, Go-Fiche returns url with https prefix instead of http.
  -l, --log string        Log file. This file has to be user-writable.
  -o, --output string     Relative or absolute path to the directory where you want to store user-posted pastes. (default "./code")
  -p, --port int          Port in which the service should listen on. (default 9999)

These are command line arguments. You don't have to provide any of them to run the application. Default settings will be used in such case. See section below for more info.

Settings


Output directory -o

Relative or absolute path to the directory where you want to store user-posted pastes.

go-fiche -o ./code
go-fiche -o /home/www/code/

Default value: ./code


Domain -d

This will be used as a prefix for an output received by the client. Value will be prepended with http.

go-fiche -d domain.com
go-fiche -d subdomain.domain.com
go-fiche -d subdomain.domain.com/some_directory

Default value: localhost


Slug size -s

This will force slugs to be of required length:

go-fiche -s 6

Output url with default value: http://localhost/xxxx, where x is a randomized character

Output url with example value 6: http://localhost/xxxx, where is a randomized character

Default value: 4


HTTPS -S

If set, fiche returns url with https prefix instead of http

go-fiche -S

Output url with this parameter: https://localhost/xxxx, where x is a randomized character


Buffer size -B

This parameter defines size of the buffer used for getting data from the user. Maximum size (in bytes) of all input files is defined by this value.

go-fiche -B 2048

Default value: 32768


Log file -l

go-fiche -l /home/www/fiche-log.txt

Default value: not set

WARNING: this file has to be user-writable