Skip to content

Commit d2321f3

Browse files
authored
Merge pull request #62 from shaarli/fix/readme
README: apply changes from v3.0 and add installation section
2 parents 43f924f + cf93c00 commit d2321f3

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,22 @@ This is a community fork of the original
3737
[netscape-bookmark-parser](https://github.com/kafene/netscape-bookmark-parser)
3838
project by [Kafene](http://kafene.org/).
3939

40+
## Installation
41+
42+
Using [Composer](https://getcomposer.org/) ([package](https://packagist.org/packages/shaarli/netscape-bookmark-parser)):
43+
44+
```bash
45+
composer require shaarli/netscape-bookmark-parser
46+
```
47+
4048
## Example
4149
Script:
4250
```php
4351
<?php
44-
require_once 'NetscapeBookmarkParser.php';
52+
53+
require_once 'vendor/autoload.php';
54+
55+
use Shaarli\NetscapeBookmarkParser\NetscapeBookmarkParser;
4556

4657
$parser = new NetscapeBookmarkParser();
4758
$bookmarks = $parser->parseFile('./tests/input/netscape_basic.htm');
@@ -53,29 +64,41 @@ Output:
5364
array(2) {
5465
[0] =>
5566
array(6) {
56-
'tags' =>
57-
string(14) "private secret"
5867
'uri' =>
5968
string(19) "https://private.tld"
6069
'title' =>
6170
string(12) "Secret stuff"
6271
'note' =>
6372
string(52) "Super-secret stuff you're not supposed to know about"
73+
'tags' =>
74+
array(2) {
75+
[0] =>
76+
string(7) "private"
77+
[1] =>
78+
string(6) "secret"
79+
}
6480
'time' =>
6581
int(971175336)
6682
'pub' =>
6783
int(0)
6884
}
6985
[1] =>
7086
array(6) {
71-
'tags' =>
72-
string(18) "public hello world"
7387
'uri' =>
7488
string(17) "http://public.tld"
7589
'title' =>
7690
string(12) "Public stuff"
7791
'note' =>
7892
string(0) ""
93+
'tags' =>
94+
array(3) {
95+
[0] =>
96+
string(6) "public"
97+
[1] =>
98+
string(5) "hello"
99+
[2] =>
100+
string(5) "world"
101+
}
79102
'time' =>
80103
int(1456433748)
81104
'pub' =>

0 commit comments

Comments
 (0)