Skip to content

Commit 8b5d01c

Browse files
author
Flavius12
committed
Update README.md
1 parent 51ba15b commit 8b5d01c

1 file changed

Lines changed: 108 additions & 1 deletion

File tree

README.md

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,109 @@
1+
![start2](https://cloud.githubusercontent.com/assets/10303538/6315586/9463fa5c-ba06-11e4-8f30-ce7d8219c27d.png)
2+
13
# PharTools
2-
A PHP tool to extract or create phar archives
4+
A powerful PHP-CLI tool to create, extract and get info of phar files
5+
6+
## Category
7+
8+
PHP Command Line Interface script
9+
10+
## Requirements
11+
12+
PHP >= 5.3.0<br>
13+
14+
## Overview
15+
16+
**PharTools** is a powerful PHP-CLI tool to create, extract and get info of phar files
17+
18+
***Don't run this script directly. Run it from a cmd.exe or from a Linux Terminal instance instead***
19+
20+
***To create phar files you need to set php.readonly to 0 in php.ini configuration***
21+
22+
## Documentation
23+
24+
**Configuration:**
25+
26+
###### Windows
27+
28+
To configure PharTools on Windows you need only to edit *%PHP_PATH* and *%PHP_EXE* variables in *phartools.cmd* file where *%PHP_PATH* must be the PHP binaries path and *%PHP_EXE* must be the main PHP executable file (usually *php.exe*)
29+
30+
###### Linux
31+
32+
On Linux, PharTools usually doesn't require to be configured but if you have some problems, edit *phartools.sh* file.
33+
34+
**Commands:**
35+
36+
If you are running PharTools on Windows you can simply run it calling *phartools.cmd* on Command Shell. On Linux you have to run phartools using *./phartools.sh* instead.
37+
38+
###### Create Phar:
39+
40+
To create phar files use the -c command
41+
42+
*phartools -c <source_path|source_file> <destination_phar> [options]*
43+
44+
**Options:**
45+
-c gzip|bzip2 Compress the phar file using gzip or bzip2 compression
46+
-m <metadata> Add metadata to the phar file (metadata format must be like 'key=>value,key2=>value2'
47+
-s <stub> Set stub string for the phar
48+
-r <regex> Include only files matching the regular expression
49+
50+
**Example:**
51+
52+
phartools -c mysource myphar.phar (Windows)
53+
54+
./phartools.sh -c mysource myphar.phar (Linux)
55+
56+
###### Extract Phar:
57+
58+
To extract phar files use the -e command
59+
60+
*phartools -e <phar_file> [extract_directory]*
61+
62+
If *extract_directory* is not specified, files will be extracted in the current directory
63+
64+
**Example:**
65+
66+
phartools -e myphar.phar (Windows)
67+
68+
./phartools.sh -e myphar.phar (Linux)
69+
70+
###### Get Phar Info:
71+
72+
To get some infos about a phar file use the -i command. You will get the size, the signature, the signature type, metadata, the stub and some other infos about the specified phar file
73+
74+
*phartools -i <phar_file>*
75+
76+
**Example:**
77+
78+
phartools -i myphar.phar (Windows)
79+
80+
./phartools.sh -i myphar.phar (Linux)
81+
82+
###### Get PharTools Version:
83+
84+
*phartools -v*
85+
86+
**Example:**
87+
88+
phartools -v (Windows)
89+
90+
./phartools.sh -v (Linux)
91+
92+
## Available PharTools Downloads
93+
94+
**All platforms:**
95+
96+
PharTools_v1.0.zip (Only the script)
97+
98+
**Windows:**
99+
100+
PharTools_v1.0_win_installer (Preconfigured Script + Precompiled PHP binaries)
101+
PharTools_v1.0_win_portable (Preconfigured Script + Precompiled PHP binaries, No Installer)
102+
103+
***Please note that precompiled PHP binaries provided in the Portable and Installer versions are provided with minimal extensions and configuration***
104+
105+
##Contributing
106+
107+
If you want to contribute to this project please follow the [Contribution Guidelines](https://github.com/EvolSoft/PharTools/blob/master/CONTRIBUTING.MD)
108+
109+

0 commit comments

Comments
 (0)