Download the PHP package shaarli/netscape-bookmark-parser without Composer
On this page you can find all versions of the php package shaarli/netscape-bookmark-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package netscape-bookmark-parser
Shaarli Netscape Bookmark Parser
This library provides a decoder that is able of parsing Netscape bookmarks (as exported by common Web browsers and bookmarking services), and an encoder that is able to export data to bookmarks format.
🚀 Installation
🔥 Usage
Import from Bookmark file
Above example will return following array:
Export to file
Above example will write following string into file:
💻 Dependencies
Shaarli Netscape Bookmark Parser requires the following dependencies:
- PHP
- Composer
- Make (optional)
🐘 PHP
Learn how to install PHP from official documentation here
📦 Composer
Learn how to install Composer from official documentation here
🛠 Make
🐧 Install Make (Linux)
On linux machine enter following command
🏁 Install Make (Windows)
On windows machine you will need to install cygwin or GnuWin make first to execute make script.
🍎 Install Make (OSX)
Make should be available by default on OSX system, but you can upgrade make version with following command
📑 About
⚡ A word from Kafene
The motivations behind developing this parser are the following:
- the Netscape format has a very loose specification: no DTD nor XSL stylesheet to constrain how data is formatted.
- software and web services export bookmarks using a wild variety of attribute names and values.
- using standard SAX or DOM parsers is thus not straightforward.
How it works:
- the input bookmark file is trimmed and sanitized to improve parsing results
- the resulting data is then parsed using PCRE patterns to match attributes and values corresponding to the most likely:
- attribute names:
description
vs.note
,tags
vs.labels
,date
vs.time
, etc. - data formats:
comma,separated,tags
vs.space separated labels
, UNIX epochs vs. human-readable dates, newlines & carriage returns, etc.
- attribute names:
- an associative array containing all successfully parsed links with their attributes is returned
⚡ Shaarli community fork
This friendly fork is maintained by the Shaarli community at https://github.com/shaarli/netscape-bookmark-parser and is used by the open-source Shaarli bookmarking service. This is a community fork of the original netscape-bookmark-parser project by Kafene.
🤝 Contributing
Thank you for your interrest in contributing to Shaarli Netscape Bookmark Parser.
Please review the contribution guidelines before starting to work on any features.
If you want to open an issue, please check first if it was not reported already before creating a new one.
📜 License
Copyrights (c) 2021 "Shaarli community"
Distributed under the MIT license.
If you like Shaarli Netscape Bookmark Parser please star or tweet about it: