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-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,16 @@ First of all thank you to contribute and help us to improve our projects.
8
8
9
9
If you want to report bugs or suggestions use the [Issue Tracker](https://github.com/EvolSoft/PharTools/issues)
10
10
11
-
- Please **don't** duplicate issues. Do a small search on current issues before report yours
11
+
- Please **do not** duplicate issues. Do a small search on current issues before report yours
12
12
- Please provide as more detailed informations as you can about the issue
13
-
- Please **don't** post issues related to unofficial source code
14
-
- Please **don't** post fake or support issues
13
+
- Please **do not** post issues related to unofficial source code
14
+
- Please **do not** post fake or support issues
15
15
- Please write in english
16
16
17
17
## Code contributions
18
18
19
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
20
- The code is clear, correct and follows the current code syntax
**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.
5
+
**PharTools** is a powerful PHP command-line 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.
6
6
7
7
***Features:***
8
8
-*Create* phar archives
@@ -13,123 +13,255 @@
13
13
-*Converts* phar archives to zip or tar archives
14
14
-*Supports* GZip and BZip2 compression types (BZip2 needs the php_bz2 extension which is already included on the Windows installer)
15
15
16
-
***Don't run this script directly. Run it from a cmd.exe or from a Linux Terminal instance instead***
16
+
***NOTE: to create phar files you need to set php.readonly to 0 in php.ini configuration***
17
17
18
-
***If you install PharTools on Windows directories (like Program Files, Program Files (x86), ...) you may need to run cmd.exe as Administrator***
18
+
## Requirements
19
19
20
-
***To create phar files you need to set php.readonly to 0 in php.ini configuration***
PharTools_vx.x_win_portable.zip (preconfigured script + precompiled PHP binaries, no installer)
33
35
34
-
### Commands
36
+
***Please note that precompiled PHP binaries included in the portable and installer pacakages are provided with minimal extensions and configuration***
35
37
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.
38
+
### Windows
37
39
38
-
###### Example
40
+
PharTools installation on Windows is very simple. You have three choices:
41
+
- download the installer
42
+
- download the Windows portable package
43
+
- download the all-platforms zip package and configure PharTools manually
39
44
40
-
*phartools -h* (Windows)
45
+
If choose the third option, you must simply edit the `%PHP_PATH%` variable in `phartools.cmd` file by setting a valid PHP executables path.
41
46
42
-
*./phartools.sh -h* (Linux)
47
+
***NOTE: if you install PharTools on Windows directories (like Program Files, Program Files (x86), ...) you may need administrator privileges in order to run the script correctly.***
43
48
44
-
#### Add a file to a phar archive:
49
+
###Linux
45
50
46
-
*phartools -a <phar_archive><file>*
51
+
To install PharTools on Linux, download the all-platforms zip package. Then run:
47
52
48
-
*file* can be either a file or a non-empty directory.
53
+
```
54
+
$ ./phartools.sh
55
+
```
49
56
50
-
#### Create a phar archive:
57
+
It should automatically install the PHP package (if missing) in order to run PharTools correctly or run PharTools directly.
58
+
If you have problems while installing the PHP package, try to install it manually from your Linux distro package manager (i.e. *apt-get*).
You can run PharTools also on macOS. PharTools installation on macOS is very easy: you just need to download the all-platforms zip package. No PHP installation is required because PHP is already bundled with macOS since Mac OS X 10.0.0.
55
63
56
-
-zgzip|-zbzip2 Compress the phar file using gzip or bzip2 compression<br>
57
-
-m<metadata> Add metadata to the phar file (metadata format must be like 'key=>value,key2=>value2')<br>
58
-
-s<stub> Set stub string for the phar<br>
59
-
-r<regex> Include only files matching the regular expression
64
+
## Usage
60
65
61
-
#### Delete a file from a phar archive:
66
+
```
67
+
$ phartools -h
62
68
63
-
*phartools -d <phar_archive><file>*
69
+
Usage:
70
+
-a <phar_archive> <files> Add files to a phar archive
71
+
-c <phar_archive> <files> [options] Create a phar archive
72
+
-d <phar_archive> <file> Delete a file from a phar archive
73
+
-e <phar_archive> [extract_path] Extract a phar archive
74
+
-h Show this help screen
75
+
-i <phar_archive> Show info about a phar archive
76
+
-l <phar_archive> List the content of a phar archive
77
+
-r <phar_archive> <oldname> <newname> Rename a file inside a phar archive
78
+
-a2p <archive> [compression] Convert a zip or tar archive to a phar archive
79
+
-p2a <phar_archive> [options] Convert a phar archive to a zip or tar archive
80
+
```
64
81
65
-
*file* can be either a file or a directory.
82
+
### -a (add) command
66
83
67
-
#### Extract a phar archive:
84
+
Adds files to a phar archive.
68
85
69
-
*phartools -e <phar_archive>[extract_path]*
86
+
```
87
+
$ phartools -a <phar_archive> <files>
88
+
```
70
89
71
-
If *extract_path* is not specified, the archive will be extracted in the current directory
90
+
Parameters:
72
91
73
-
#### Get informations of a phar archive:
92
+
```
93
+
<phar_archive> is the destination phar archive
94
+
<files> are the files you want to add (wildcards are allowed)
@@ -138,6 +270,4 @@ Your generosity will help us paying web hosting, domains, buying programs (such
138
270
139
271
## Contributing
140
272
141
-
If you want to contribute to this project please follow the [Contribution Guidelines](https://github.com/EvolSoft/PharTools/blob/master/CONTRIBUTING.md)
142
-
143
-
273
+
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