bookmarks - Export bookmarks from browsers and files.

SYNOPSIS

$ bookmarks [-hVda] [-f format] [file ...]

-h, --help      help
-V, --version   version
-d              debug (sent to STDERR)
-a              all : process arguments and default locations
-f format       export format : csv, csv-noheader, html, html-raw, or any combination
                of characters t,u,d as <title> <url> <description> (default : tud)
-s              find schemeless URLs in text files (default : no)

DESCRIPTION

bookmarks is a tool to export bookmarks from files supplied as arguments. Without arguments, or with option -a, bookmarks will attempt to read files from browsers default locations. If file is a dash "-", STDIN is read and processed as plain text source.

Supported sources :

Supported fields :

Markdown, Gemini and plain text files are processed line by line (as UTF-8) :

  [markdown example](http://example.md/ "with description")
  => gemini://example.gmi gemini example
  plain text example http://example.txt with description

Output format :

By default, fields are exported as plain text. This can be changed by using option -f and specifying any combination of characters t,u,d. Other possible values :</p> <ul> <li><code>csv</code> : Comma-separated values with double-quotes and CR NL (RFC 4180).</li> <li><code>csv-noheader</code> : same as above, without header line.</li> <li><code>html</code> : Netscape Bookmarks File Format.</li> <li><code>html-raw</code> : raw list of HTML <a> elements.</li> </ul> <h2 id="search-bookmarks-interactively-from-cli">SEARCH BOOKMARKS INTERACTIVELY FROM CLI</h2> <p>This tool can be used to search, select and open bookmarks interactively from your terminal. The following instructions are for macOS.</p> <p><img alt="" src="/static/images/gray.png" /></p> <p>Install the wonderful <a href="https://github.com/junegunn/fzf">fzf</a> (available in <a href="https://brew.sh">Homebrew</a>), <a href="https://github.com/schwern/URI-Find">URI::Find</a> (CPAN), <a href="https://github.com/kal247/App-uricolor">App::uricolor</a> (CPAN), and add these aliases to your shell :</p> <p><strong>Open link(s) with default application :</strong></p> <pre><code>alias lk="bookmarks | uricolor | fzf --ansi --exact --multi | urifind | xargs open" </code></pre> <ul> <li><code>uricolor</code> colorizes URIs to distinguish them from title and description.</li> <li><code>fzf</code> is a fuzzy finder : use TAB for multiple selection, press ENTER to confirm, or ESC to cancel.</li> <li><code>urifind</code> extracts all URIs. Try <code>uricolor -s</code> and <code>urifind --schemeless</code> to find schemeless URLs.</li> <li>Selected URIs will open with your default browser or application.</li> <li>Since <code>open</code> uses macOS <em>Launch Services</em> to determine which program to run, most common schemes such as <code>ftp://</code> or <code>ssh://</code> are automatically recognized.</li> </ul> <p>N.B. On Windows, I use <a href="https://frippery.org/busybox/">busybox-w32</a> and a file <code>lk.bat</code> containing :</p> <pre><code>@echo off bookmarks | uricolor | fzf --ansi --exact --multi | urifind | busybox xargs -n1 cmd /c start "" </code></pre> <p><strong>Copy link(s) to clipboard :</strong></p> <pre><code>alias lkc="bookmarks | uricolor | fzf --ansi --exact --multi | urifind | pbcopy" </code></pre> <h2 id="check-links-status">CHECK LINKS STATUS</h2> <p>These examples use the tool <em>http_status</em> provided by <a href="https://metacpan.org/pod/HTTP::SimpleLinkChecker">HTTP::SimpleLinkChecker</a> (CPAN).</p> <p><strong>Check links and show status :</strong></p> <pre><code>bookmarks -f u | xargs http_status </code></pre> <p><strong>Show only broken links (parallel) :</strong></p> <pre><code>bookmarks -f u | xargs -n10 -P16 http_status 2>/dev/null | perl -ne 'print if not /200$/' </code></pre> <h2 id="installation">INSTALLATION</h2> <p>To install this module automatically from CPAN :</p> <pre><code>cpan App::bookmarks </code></pre> <p>To install this module automatically from Git repository :</p> <pre><code>cpanm https://github.com/kal247/App-bookmarks.git </code></pre> <p>To install this module manually, run the following commands :</p> <pre><code>perl Makefile.PL make make test make install </code></pre> <h2 id="prerequisites">PREREQUISITES</h2> <p>All are optional.</p> <ul> <li>Safari : macOS</li> <li>Firefox : DBI, DBD::SQLite</li> <li>Chrome : File::Slurper, JSON</li> <li>Internet Explorer : Config::Any, Config::Tiny, Win32</li> <li>Netscape : Netscape::Bookmarks</li> <li>Plain text : URI::Find</li> </ul> <h2 id="support-and-documentation">SUPPORT AND DOCUMENTATION</h2> <p>After installing, you can find documentation for this module with the perldoc command :</p> <pre><code>perldoc bookmarks </code></pre> <p>You can also look for information at :</p> <ul> <li> <p>CPAN</p> <p><a href="https://metacpan.org/release/App-bookmarks">https://metacpan.org/release/App-bookmarks</a></p> </li> <li> <p>GITHUB</p> <p><a href="https://github.com/kal247/App-bookmarks">https://github.com/kal247/App-bookmarks</a></p> </li> </ul> <h2 id="license-and-copyright">LICENSE AND COPYRIGHT</h2> <p>This software is Copyright (c) 2019-2025 by jul.</p> <p>This is free software, licensed under:</p> <pre><code>The Artistic License 2.0 (GPL Compatible) </code></pre> </main> <div class="content-pagination"> </div> </div> <footer class="footer"> <div class="footer-container"> <div class="footer-social"> <div class="footer-link footer-logo"> <a href="/"> <img src="/static/images/metacpan-logo.svg" alt="MetaCPAN" /> </a> </div> <a class="footer-social-link" href="https://github.com/metacpan"> <i class="fab fa-github-square"></i> </a> <a class="footer-social-link" href="https://fosstodon.org/@metacpan"> <i class="fab fa-mastodon"></i> </a> </div> <div class="footer-links"> <div class="footer-link"> <a href="/about">About</a> </div> <div class="footer-link"> <a href="/about/sponsors">Sponsor</a> </div> <div class="footer-link"> <a href="https://grep.metacpan.org">grep::cpan</a> </div> <div class="footer-link"> <a href="/recent">Recent</a> </div> <div class="footer-link"> <a href="/about/faq">FAQ</a> </div> <div class="footer-link"> <a href="/tools">Tools</a> </div> <div class="footer-link"> <a href="https://fastapi.metacpan.org/">API</a> </div> <div class="footer-link"> <a href="https://www.perl.org/">Perl.org</a> </div> </div> <div class="footer-sponsors"> <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener"> <img class="footer-sponsor-bytemark" src="/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener"> <img class="footer-sponsor-liquidweb" src="/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener"> <img class="footer-sponsor-deriv" src="/static/images/sponsors/deriv.svg" alt="Deriv logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener"> <img class="footer-sponsor-geocode" src="/static/images/sponsors/geocodelogo.svg" alt="Geocode logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener"> <img class="footer-sponsor-fastly" src="/static/images/sponsors/fastly_logo.svg" alt="Fastly logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener"> <img class="footer-sponsor-opencage" src="/static/images/sponsors/open-cage.svg" alt="OpenCage logo"> </a> <!-- Added 2024-07-22 --> <a class="footer-sponsor-link" target="_blank" href="https://www.elastic.co/" rel="noopener"> <img class="footer-sponsor-elastic" src="/static/images/sponsors/elastic.svg" alt="Elastic logo"> </a> <!-- Added 2024-07-22 --> <a class="footer-sponsor-link" target="_blank" href="https://route4me.com/" rel="noopener"> <img class="footer-sponsor-route4me" src="/static/images/sponsors/route4me.png" alt="Route4Me logo"> </a> </div> </div> </footer> <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Keyboard Shortcuts</h4> </div> <div class="modal-body row"> <div class="col-md-6"> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>Global</th> </tr> </thead> <tbody> <tr> <td class="keys"> <kbd>s</kbd> </td> <td>Focus search bar</td> </tr> <tr> <td class="keys"> <kbd>?</kbd> </td> <td>Bring up this help dialog</td> </tr> </tbody> </table> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>GitHub</th> </tr> </thead> <tbody> <tr> <td class="keys"> <kbd>g</kbd> <kbd>p</kbd> </td> <td>Go to pull requests</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>i</kbd> </td> <td>go to github issues (only if github is preferred repository)</td> </tr> </tbody> </table> </div> <div class="col-md-6"> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>POD</th> </tr> </thead> <tbody> <tr> <td class="keys"> <kbd>g</kbd> <kbd>a</kbd> </td> <td>Go to author</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>c</kbd> </td> <td>Go to changes</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>i</kbd> </td> <td>Go to issues</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>d</kbd> </td> <td>Go to dist</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>r</kbd> </td> <td>Go to repository/SCM</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>s</kbd> </td> <td>Go to source</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>b</kbd> </td> <td>Go to file browse</td> </tr> </tbody> </table> </div> <div class="col-md-12"> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>Search terms</th> </tr> </thead> <tbody> <tr> <td><em>module:</em> (e.g. <a href="/search?q=module%3APlugin">module:Plugin</a>)</td> </tr> <tr> <td><em>distribution:</em> (e.g. <a href="/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td> </tr> <tr> <td><em>author:</em> (e.g. <a href="/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td> </tr> <tr> <td><em>version:</em> (e.g. <a href="/search?q=version%3A1.00">version:1.00</a>)</td> </tr> </tbody> </table> </div> </div> <div class="modal-footer"></div> </div> </div> </div> </body> </html>