Welcome to Frostmark’s documentation!

Getting started

Requirements

  • Python 3.7+ (however 3.6 should work too)

Installation

Frostmark is distributed as a Python package on PyPI and on GitHub as a source release with packages included. You can install multiple versions:

  • CLI
  • React GUI

The CLI version is the basic building stone and should work just fine for quick listing or pulling and exporting the bookmarks from the browsers into some common format. While you can use advanced options for editing bookmarks, folders and their relationships, using the React GUI option is prettier.

You can install the CLI with:

pip install frostmark

For the React GUI version you need to specify an additional flag for pip to install even the GUI dependencies:

pip install frostmark[gui_react]

For installing from files (.tar.gz or .whl) you need to adjust the name a little bit:

# archive
pip install frostmark.tar.gz
pip install frostmark.tar.gz[gui_react]

# wheel package
pip install frostmark.whl
pip install frostmark.whl[gui_react]

Commands

After the successful installation you are provided with multiple options for accessing the program:

  • From Python as a module:

    # module help
    python -m frostmark
    python -m frostmark --help
    
    # CLI & CLI help
    python -m frostmark console
    python -m frostmark console --help
    
    # GUI & GUI help
    python -m frostmark gui
    python -m frostmark gui --help
    
  • By specific commands provided by frostmark to the OS:

    # CLI & CLI help
    fmcli
    fmcli --help
    
    # GUI & GUI help
    fmgui
    fmgui --help
    

Config

Modify how the specific parts of the application run with the Environment variables. The values have to be set before the application is started.

React GUI

FROSTMARK_HOST

Specify what host you want to run the server layer between Frostmark and React frontend displaying the bookmarks.

FROSTMARK_HOST=192.168.1.100 fmgui

Development

REACT_PROXY

Specify the endpoint for all the requests attempted to fetch from path starting with /api via Node’s fetch(). For more info see the proxy config for specific routes in src/setupProxy.js

REACT_PROXY=http://192.168.1.100:5000 ./run_frontend.sh

Note

Check firewall rules in case of not being able to proxy the requests.

Entrypoint

Module for interfacing with the package via python command:

python -m frostmark

Common

Module for common functions.

DB Base

Module for creating a connection to SQLite DB and SQLAlchemy declarative base home.

Database

Module for creating SQLite DB schema and session retrieving.

frostmark.db.folder_check_root(session)[source]

Check whether default rows for Folder model exist and create them if not.

frostmark.db.get_session()[source]

Create DB schema and return a new session.

Models

ORM SQLAlchemy models for Frostmark application storage.

class frostmark.models.Bookmark(**kwargs)[source]

Bookmark item containing URL, title, icon (favicon.ico) and folder_id.

class frostmark.models.Folder(**kwargs)[source]

Folder item for grouping bookmarks. ID 0 is reserved for ROOT folder.

get_root

Return root folder constants to e.g. create root folder value in DB if it does not exist.

User data

Parser

Module for parsing arguments from console.

class frostmark.parser.ExecuteAction(*a, func=None, func_args=(), func_kwargs={}, **kw)[source]

ArgumentParser action for add_argument(action=…)

Executes a function and its args + kwargs passed as the __init__ arguments:

  • func
  • func_args
  • func_kwargs

together with argument values inserted into func_kwargs as ‘arg_values’ and exits immediately.

class frostmark.parser.FrostmarkArgumentParser(prog=None, usage=None, description=None, epilog=None, parents=[], formatter_class=<class 'argparse.HelpFormatter'>, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True, allow_abbrev=True)[source]

Inheriting from ArgumentParser to print custom print message.

Profiles

Module for retrieving all ‘profiles’ from specified browser.

Importer

Import bookmarks from various bookmarks database files into internal database.

class frostmark.importer.Importer[source]

Interface for retrieving and importing bookmarks into local storage for multiple backends.

import_from

Import bookmarks from particular path into internal storage.

Exporter

Export bookmarks from internal database into various formats.

class frostmark.exporter.Exporter[source]

Interface for retrieving and exporting bookmarks from local storage to multiple backends.

export_to

Public export function for STDOUT or file.

prepare_export

Export bookmarks from internal storage.

Core

Tests

Test: Database

Module for creating a connection to SQLite DB and SQLAlchemy declarative base home.

class frostmark.tests.test_database.DBBaseTestCase(methodName='runTest')[source]

TestCase for SQLite database backend.

test_db_base()[source]

Test all variables, locations, files for creating DB base.

test_db_create()[source]

Test creating SQLite3 DB only (without tables) in the user_data section.

test_db_session()[source]

Test getting session for SQLite DB which passively creates a new DB (new .sqlite file) if it isn’t present yet.

Indices and tables