|
|
# Import the repository locally #
|
|
|
|
|
|
`git clone git@forgemia.inra.fr:genotoul-bioinfo/bioinfo-utils.git`
|
|
|
|
|
|
If you don't have an authentified access to the repository ask to join the project in GitLab.
|
|
|
|
|
|
# Write your script #
|
|
|
|
|
|
Your scripts should have a pod which display when script is called without parameters.
|
|
|
Here are mandatory pod !
|
|
|
|
|
|
## Perl script example ##
|
|
|
|
|
|
|
|
|
use Getopt::Long;
|
|
|
use Pod::Usage;
|
|
|
|
|
|
my( $opt_help, $opt_man, $opt_full, $opt_admins, $opt_choose, $opt_createdb );
|
|
|
|
|
|
GetOptions(
|
|
|
'help' => \$opt_help,
|
|
|
'man' => \$opt_man,
|
|
|
)
|
|
|
or pod2usage( "Try '$0 --help' for more information.");
|
|
|
|
|
|
pod2usage( -verbose => 1 ) if $opt_help;
|
|
|
pod2usage( -verbose => 2 ) if $opt_man;
|
|
|
|
|
|
# Main
|
|
|
print "Coucou";
|
|
|
|
|
|
=pod
|
|
|
|
|
|
=head1 NAME
|
|
|
|
|
|
mon_script.pl
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
mon_script.pl [options] > STDOUT
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
|
First line must be explicit (will be in web site)
|
|
|
After write what you want
|
|
|
|
|
|
=head1 AUTHORS
|
|
|
|
|
|
Author
|
|
|
|
|
|
=head1 VERSION
|
|
|
|
|
|
1
|
|
|
|
|
|
=head1 DATE
|
|
|
|
|
|
05/2012
|
|
|
|
|
|
=head1 KEYWORDS
|
|
|
|
|
|
bidule bidou
|
|
|
|
|
|
=cut
|
|
|
|
|
|
## Python script example ##
|
|
|
|
|
|
from optparse import *
|
|
|
|
|
|
__name__ = "mon_script.py"
|
|
|
__synopsis__ = "mon_script.py [OPTIONS] > STDOUT"
|
|
|
__date__ = "05/2012"
|
|
|
__authors__ = "Author"
|
|
|
__keywords__ = "bidule bidou"
|
|
|
__description__ = "mon_script.pl prints Coucou"
|
|
|
__version__ = '1.0'
|
|
|
|
|
|
## Bash script example ##
|
|
|
|
|
|
##NAME = "mon_script.sh"
|
|
|
##SYNOPSIS = "mon_script.sh [OPTIONS]"
|
|
|
##DATE = "05/2012"
|
|
|
##AUTHORS = "Author"
|
|
|
##KEYWORDS = "bidule bidou"
|
|
|
##DESCRIPTION = "mon_script.sh prints Coucou"
|
|
|
|
|
|
# Test your script #
|
|
|
|
|
|
Go to your local directory and launch the following command to generate json.
|
|
|
|
|
|
`/usr/local/bioinfo/Scripts/doc/bin/scripts_to_json.pl -f monscript.pl`
|
|
|
|
|
|
You will find in wrong_scripts details about documentations errors. If it's ok, then commit your script.
|
|
|
|
|
|
# Commit your script #
|
|
|
|
|
|
git add YOUR_SCRIPT
|
|
|
git commit -m "YOUR MESSAGE" YOUR_SCRIPT
|
|
|
git push
|
|
|
|
|
|
Ask to admin to update repository on genotoul and to regenerate json documentation to update the page in the plateform website.
|
|
|
|
|
|
# Generate all the documentation #
|
|
|
|
|
|
Go to the directory BioinfoUtils/doc/ en launch the command to generate json.
|
|
|
|
|
|
cd /usr/local/bioinfo/Scripts/doc
|
|
|
./bin/scripts_to_json.pl -d ../bin
|
|
|
|
|
|
This script generate a file out.json in the current directory. This json is read by script.html in BioinfoUtils/doc directory. Open script.html to view the list of scripts.
|
|
|
|