PyBookmark


NamePyBookmark JSON
Version 1.1.1.1 PyPI version JSON
download
home_pagehttps://github.com/Crumbs350/pybookmark
SummaryA Bookmark.html file parser, merger and data viewer using pure python
upload_time2023-01-13 14:53:33
maintainerCrumbs
docs_urlNone
authorCrumbs
requires_python
licenseLICENSE
keywords python bookmark json tkinter privacy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyBookmark
A bookmark.html parser, merger and viewer using pure python
* parse bookmark.html files from browsers with html structure included
* merge the parsed bookmark.html files
* export the parsed and merged bookmarks as a JSON archive
* GUI to view, edit, and add to the bookmarks stored in JSON archive

# Package Justification
PyBookmark exists to solve a problem you may not have. Read the following to understand the trade off.

## Why
You should use PyBookmark if:
* you have many different bookmark html files saved over time
* you wish to merge your bookmark history from multiple computers or files into one view
* you wish to separate the bookmark manager from the browser
  - reduce possibility for tracking fingerprint (what bookmarks exist, unique icon file checksums or URLs)
* you wish to reduce clutter in bookmarks (icons)
* you are tired of Firefox (or other) changing which fields are supported to edit/view
  - example: description, keywords, tags are intermittently viewable
* you are tired of Firefox (or other) breaking or changing how bookmark edit occurs
  - example: recently Firefox made it so edits in the bookmark organizer did not save
* you want a more powerful bookmark search method
* you like control

## Why Not
You should not use PyBookmark if:
* you are happy with native browser bookmark management
* you have very few bookmarks or all your bookmarks are in one file already
* you need or want in application multiple device synchronization or cloud backup support
* you primarily browse the internet using a smartphone or proprietary platform apps (facebook/reddit)
* you do not use bookmarks (why did you read this far?)
* you have no interest in understanding code or data structure
  - eventually a browser change will mean the file format you try to import won't work and you will have to figure out why

# Implementation Details
## Assumptions
1. Bookmark data is stored in html format. It is possible to extend to merge in json and other backups but that has not been the focus.
2. Bookmark data has additional folder structure that
  - is important
  - indicates relationships between bookmarks
  - these assumptions are why a complex parsing of beautiful soup is implemented to extract the URLs and related content
3. Colons are useful separators of descriptive location in bookmark labels (not the URL)
4. Duplicate bookmarks are bad but merging should be controlled
5. You intend to migrate to a separate bookmark manager
6. You will always be on a platform that can read the output json structure

## Run Options (How to Use)
1. parse single file
   * library: pybookmark.bookmarks_parse.py
2. merge files
   * scripts: scripts.bookmarks_merge.py
   * parses single or multiple bookmark.html files using pybookmark.bookmarks_parse.py library
   * merges bookmarks across html files
   * reduces duplication of information based on user defined mappings
   * you only need to do this once if you start using the viewer as your bookmark manager
3. viewer: 
   * viewer allows view, edit, add/remove of json bookmark collection
   * library: pybookmark.pybookmarkjsonviewer.py
     - can be called from command line
     - $ python pybookmarkjsonviewer.py -f /path_to_json_file/sample.json
   * script: scripts.PyBookmark_viewer.py
     - runs against predefined yaml configuration in the same path
   * Uses Tk to provide GUI
   * note to run from a desktop launcher in linux may require a separate shell script with interactive mode enabled see [reference](https://forums.linuxmint.com/viewtopic.php?p=2127717#p2127717)

## File Layout
* Data contains
  - reference YAML configurations
  - example input bookmark.html files
  - example output json files
* pybookmark
  - where the library code is, see run options above for types
  - where the icon file is
* scripts
  - where command line tools live
  - see run options above for more details

## Data Structures

The core data structure is AddrStruct. 

addrStruct: dictionary of url keys with list of list values  
    key = URL address  
    [0] = label  
    [1] = age  
    [2] = tags  
    [3] = location  
    [4] = description  
    [5] = file location  

With Version 1.1.0 the AddrStruct has been mapped to classes:
* bookmarkAttr
  - defines basic bookmark attribute data object
  - fundamentally a list of lists
  - note the age uses new class AgeAsInt
* bookmarks
  - the colleciton of bookmarks is fundamentally a dictionary
  - key = url and value = bookmarkAttr object

## Requirements Overview
Created using Python 3.7 or higher and Beautiful Soup 4.

## Version History

| Version | Description |
| ------------- | ------------- |
| 1.0.0 | first release |
| 1.1.0 | refactored to use classes |
| 1.1.1 | fix pypi file due to bug |
| 1.1.1.1 | fixed list display bugs in viewer |




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Crumbs350/pybookmark",
    "name": "PyBookmark",
    "maintainer": "Crumbs",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "22521102+Crumbs350@users.noreply.github.com",
    "keywords": "python bookmark json tkinter privacy",
    "author": "Crumbs",
    "author_email": "22521102+Crumbs350@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/29/3a/0d1a36c1412cb64db2f187c6ee925205dc7067cd021730d8b6da20977eb4/PyBookmark-1.1.1.1.tar.gz",
    "platform": null,
    "description": "# PyBookmark\nA bookmark.html parser, merger and viewer using pure python\n* parse bookmark.html files from browsers with html structure included\n* merge the parsed bookmark.html files\n* export the parsed and merged bookmarks as a JSON archive\n* GUI to view, edit, and add to the bookmarks stored in JSON archive\n\n# Package Justification\nPyBookmark exists to solve a problem you may not have. Read the following to understand the trade off.\n\n## Why\nYou should use PyBookmark if:\n* you have many different bookmark html files saved over time\n* you wish to merge your bookmark history from multiple computers or files into one view\n* you wish to separate the bookmark manager from the browser\n  - reduce possibility for tracking fingerprint (what bookmarks exist, unique icon file checksums or URLs)\n* you wish to reduce clutter in bookmarks (icons)\n* you are tired of Firefox (or other) changing which fields are supported to edit/view\n  - example: description, keywords, tags are intermittently viewable\n* you are tired of Firefox (or other) breaking or changing how bookmark edit occurs\n  - example: recently Firefox made it so edits in the bookmark organizer did not save\n* you want a more powerful bookmark search method\n* you like control\n\n## Why Not\nYou should not use PyBookmark if:\n* you are happy with native browser bookmark management\n* you have very few bookmarks or all your bookmarks are in one file already\n* you need or want in application multiple device synchronization or cloud backup support\n* you primarily browse the internet using a smartphone or proprietary platform apps (facebook/reddit)\n* you do not use bookmarks (why did you read this far?)\n* you have no interest in understanding code or data structure\n  - eventually a browser change will mean the file format you try to import won't work and you will have to figure out why\n\n# Implementation Details\n## Assumptions\n1. Bookmark data is stored in html format. It is possible to extend to merge in json and other backups but that has not been the focus.\n2. Bookmark data has additional folder structure that\n  - is important\n  - indicates relationships between bookmarks\n  - these assumptions are why a complex parsing of beautiful soup is implemented to extract the URLs and related content\n3. Colons are useful separators of descriptive location in bookmark labels (not the URL)\n4. Duplicate bookmarks are bad but merging should be controlled\n5. You intend to migrate to a separate bookmark manager\n6. You will always be on a platform that can read the output json structure\n\n## Run Options (How to Use)\n1. parse single file\n   * library: pybookmark.bookmarks_parse.py\n2. merge files\n   * scripts: scripts.bookmarks_merge.py\n   * parses single or multiple bookmark.html files using pybookmark.bookmarks_parse.py library\n   * merges bookmarks across html files\n   * reduces duplication of information based on user defined mappings\n   * you only need to do this once if you start using the viewer as your bookmark manager\n3. viewer: \n   * viewer allows view, edit, add/remove of json bookmark collection\n   * library: pybookmark.pybookmarkjsonviewer.py\n     - can be called from command line\n     - $ python pybookmarkjsonviewer.py -f /path_to_json_file/sample.json\n   * script: scripts.PyBookmark_viewer.py\n     - runs against predefined yaml configuration in the same path\n   * Uses Tk to provide GUI\n   * note to run from a desktop launcher in linux may require a separate shell script with interactive mode enabled see [reference](https://forums.linuxmint.com/viewtopic.php?p=2127717#p2127717)\n\n## File Layout\n* Data contains\n  - reference YAML configurations\n  - example input bookmark.html files\n  - example output json files\n* pybookmark\n  - where the library code is, see run options above for types\n  - where the icon file is\n* scripts\n  - where command line tools live\n  - see run options above for more details\n\n## Data Structures\n\nThe core data structure is AddrStruct. \n\naddrStruct: dictionary of url keys with list of list values  \n    key = URL address  \n    [0] = label  \n    [1] = age  \n    [2] = tags  \n    [3] = location  \n    [4] = description  \n    [5] = file location  \n\nWith Version 1.1.0 the AddrStruct has been mapped to classes:\n* bookmarkAttr\n  - defines basic bookmark attribute data object\n  - fundamentally a list of lists\n  - note the age uses new class AgeAsInt\n* bookmarks\n  - the colleciton of bookmarks is fundamentally a dictionary\n  - key = url and value = bookmarkAttr object\n\n## Requirements Overview\nCreated using Python 3.7 or higher and Beautiful Soup 4.\n\n## Version History\n\n| Version | Description |\n| ------------- | ------------- |\n| 1.0.0 | first release |\n| 1.1.0 | refactored to use classes |\n| 1.1.1 | fix pypi file due to bug |\n| 1.1.1.1 | fixed list display bugs in viewer |\n\n\n\n",
    "bugtrack_url": null,
    "license": "LICENSE",
    "summary": "A Bookmark.html file parser, merger and data viewer using pure python",
    "version": "1.1.1.1",
    "split_keywords": [
        "python",
        "bookmark",
        "json",
        "tkinter",
        "privacy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "045538591904514a28a2d834df28b53deea88b183053a62910cb3bd2f0bf6836",
                "md5": "3d031fcc9cdf601641b2995a597deb2b",
                "sha256": "f6fcbdcb39c2c147cb6f7e27fb7eb2bc985474bdcacae268b9bce572c7408671"
            },
            "downloads": -1,
            "filename": "PyBookmark-1.1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3d031fcc9cdf601641b2995a597deb2b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 112602,
            "upload_time": "2023-01-13T14:53:31",
            "upload_time_iso_8601": "2023-01-13T14:53:31.628964Z",
            "url": "https://files.pythonhosted.org/packages/04/55/38591904514a28a2d834df28b53deea88b183053a62910cb3bd2f0bf6836/PyBookmark-1.1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "293a0d1a36c1412cb64db2f187c6ee925205dc7067cd021730d8b6da20977eb4",
                "md5": "f10d9e45d4e25a7e033b72e7de0d171c",
                "sha256": "24531a9e5f9297ccd3b931d1fae715ced58564e9e7d1485d13fa6525f84896f0"
            },
            "downloads": -1,
            "filename": "PyBookmark-1.1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f10d9e45d4e25a7e033b72e7de0d171c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 112211,
            "upload_time": "2023-01-13T14:53:33",
            "upload_time_iso_8601": "2023-01-13T14:53:33.182984Z",
            "url": "https://files.pythonhosted.org/packages/29/3a/0d1a36c1412cb64db2f187c6ee925205dc7067cd021730d8b6da20977eb4/PyBookmark-1.1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-13 14:53:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Crumbs350",
    "github_project": "pybookmark",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pybookmark"
}
        
Elapsed time: 0.03260s