You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,12 @@ If you want to report bugs or suggestions use the [Issue Tracker](https://github
12
12
- Please provide as more detailed informations as you can about the issue
13
13
- Please **don't** post issues related to unofficial source code
14
14
- Please **don't** post fake or support issues
15
-
- Please write in English
15
+
- Please write in english
16
16
17
17
## Code contributions
18
18
19
-
If you want to contribute on code simply do a [Pull Request](https://github.com/EvolSoft/PharTools/pull/new). Before doing this **be sure** that:
20
-
- The code is correct, clear and written in English
19
+
If you want to contribute to project's source code simply do a [Pull Request](https://github.com/EvolSoft/PharTools/pull/new). Before doing this **be sure** that:
20
+
- The code is clear, correct and follows the current code syntax
A powerful PHP-CLI tool to create, extract and get info of phar files
3
+
## PharTools
5
4
6
-
## Category
5
+
**PharTools** is a powerful PHP-CLI tool to manage phar (PHP-Archive) files. It allows to create, extract, edit and view phar archives. It also includes a simple API to implement PharTools features on your own scripts.
7
6
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
-*Get informations* about phar archives (such as filesize, metadata, stub, etc...)
12
+
-*Converts* zip or tar archives to phar archives and vice versa
13
+
-*Supports* GZip and BZip2 compression types (BZip2 needs the php_bz2 extension which is already included on the Windows installer)
17
14
18
15
***Don't run this script directly. Run it from a cmd.exe or from a Linux Terminal instance instead***
19
16
20
-
***If you install PharTools on Windows directories (like Program Files, Program Files (x86), ...) you need to run cmd.exe as Administrator***
17
+
***If you install PharTools on Windows directories (like Program Files, Program Files (x86), ...) you may need to run cmd.exe as Administrator***
21
18
22
19
***To create phar files you need to set php.readonly to 0 in php.ini configuration***
23
20
24
21
## Documentation
25
22
26
-
**Configuration:**
23
+
### Manual configuration
27
24
28
-
######Windows
25
+
#### Windows
29
26
30
-
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*)
27
+
To configure PharTools on Windows you need only to edit *%PHP_PATH%*in *phartools.cmd* file by setting the right php executable path.
31
28
32
-
######Linux
29
+
#### Linux
33
30
34
31
On Linux, PharTools usually doesn't require to be configured but if you have some problems, edit *phartools.sh* file.
35
32
36
-
**Commands:**
33
+
### Commands
34
+
35
+
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
36
38
-
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.
-zgzip|-zbzip2 Compress the phar file using gzip or bzip2 compression
56
+
-m<metadata> Add metadata to the phar file (metadata format must be like 'key=>value,key2=>value2')
57
+
-s<stub> Set stub string for the phar
58
+
-r<regex> Include only files matching the regular expression
61
59
62
-
*phartools -e <phar_file> [extract_directory]*
60
+
#### Delete a file from a phar archive:
63
61
64
-
If *extract_directory* is not specified, files will be extracted in the current directory
62
+
*phartools -d <phar_archive> <file>*
65
63
66
-
**Example:**
64
+
*file* can be either a file or a directory.
67
65
68
-
phartools -e myphar.phar (Windows)
66
+
#### Extract a phar archive:
69
67
70
-
./phartools.sh -e myphar.phar (Linux)
68
+
*phartools -e <phar_archive> [extract_path]*
71
69
72
-
###### Get Phar Info:
70
+
If *extract_path* is not specified, the archive will be extracted in the current directory
73
71
74
-
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
72
+
#### Get informations of a phar archive:
75
73
76
-
*phartools -i <phar_file>*
74
+
*phartools -i <phar_archive>*
77
75
78
-
**Example:**
76
+
#### List files inside a phar archive:
79
77
80
-
phartools -i myphar.phar (Windows)
78
+
*phartools -l <phar_archive>*
81
79
82
-
./phartools.sh -i myphar.phar (Linux)
80
+
#### Rename a file into a phar archive:
83
81
84
-
###### Get PharTools Version:
82
+
*phartools -r <phar_archive> <oldname> <newname>*
85
83
86
-
*phartools -v*
84
+
#### Convert zip or tar archive to a phar archive:
87
85
88
-
**Example:**
86
+
*phartools -a2p <archive> [compression]*
89
87
90
-
phartools -v (Windows)
88
+
Currently supported *compression* types are gzip and bzip2
91
89
92
-
./phartools.sh -v (Linux)
90
+
91
+
#### Convert a phar archive to a zip or tar archive:
If you want you can support this project with a small donation by clicking [:dollar: here](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=flavius.c.1999@gmail.com&lc=US&item_name=www.evolsoft.tk&no_note=0&cn=&curency_code=EUR&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted).
135
+
Your generosity will help us paying web hosting, domains, buying programs (such as IDEs, debuggers, etc...) and new hardware to improve software development. Thank you :smile:
136
+
127
137
## Contributing
128
138
129
139
If you want to contribute to this project please follow the [Contribution Guidelines](https://github.com/EvolSoft/PharTools/blob/master/CONTRIBUTING.md)
0 commit comments