{"id":17423031,"url":"https://github.com/step-/opera-bookmarks.awk","last_synced_at":"2026-03-19T01:48:07.744Z","repository":{"id":145039904,"uuid":"194275031","full_name":"step-/opera-bookmarks.awk","owner":"step-","description":"Export Opera bookmarks and QuickDial thumbnails","archived":false,"fork":false,"pushed_at":"2019-06-28T13:11:26.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-06T04:44:32.927Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Awk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/step-.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.APACHE2","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-28T13:03:30.000Z","updated_at":"2022-12-11T06:56:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"4a2a63c0-e019-4b72-8ab7-a24eec36c584","html_url":"https://github.com/step-/opera-bookmarks.awk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-%2Fopera-bookmarks.awk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-%2Fopera-bookmarks.awk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-%2Fopera-bookmarks.awk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-%2Fopera-bookmarks.awk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/step-","download_url":"https://codeload.github.com/step-/opera-bookmarks.awk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246390864,"owners_count":20769478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-17T04:36:31.795Z","updated_at":"2026-01-11T02:53:28.659Z","avatar_url":"https://github.com/step-.png","language":"Awk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opera-bookmarks.awk\n\n* Export (Chromium) Opera bookmarks and QuickDial thumbnails\n* Convert bookmark data to SQLite database and CSV file.\n\nSee section Examples further down in this document.\n\n## Supported Platforms\n\nThis application consists of some [JSON.awk](https://github.com/step-/JSON.awk)\ncallback files, and requires `JSON.awk`, and commands `awk`, `base64` and\n`mkdir`. It was developed and tested on Linux. It should be able to run\nunchanged on Mac OSX, provided that JSON.awk can also run, which for some Mac\nusers has been [challenging](https://github.com/step-/JSON.awk/issues/15).\nWindows users need to install the missing commands before they can run this\napplication.\n\nConverting bookmarks to SQLite and CSV requires command `sqlite3`.\n\n## Installing\n\nDownload or clone this repository and move it in a directory of your\nchoosing.  Run the examples.\n\nThe examples in this document assume that the repository folder is located\ninside the Opera profile folder, where Opera stores its files `Bookmarks` and\n`BookmarksExtras`.  The default Opera profile folder on Linux is located in\n`$XDG_CONFIG_HOME`, usually `~/.config`. The full path to JSON.awk must be\nsubstituted in the examples. Alternatively, you can create link JSON.awk from\nthe repository folder.\n\n```\n~/.config\n├── opera\n    ├── Bookmarks\n    ├── BookmarksExtras\n    ├── this-repo\n        ├── JSON.awk -\u003e /path/to/JSON.awk\n        ├── lib\n        │   ├── splitBookmarks.awk\n        │   ├── splitBookmarksExtras.awk\n        │   ├── toFile.awk\n        │   └── toSql.awk\n        ├── LICENSE.MIT\n        ├── LICENSE.APACHE2\n        └── README.md\n```\n\n## Usage\n\n### lib/splitBookmarks.awk\n\n**Output**\n\nRecords to stdout.\nRecord separator: empty line.\nRecord format: newline separated list of shell variable assignments.\n\n**Usage**\n\n```sh\nawk -f lib/splitBookmarks.awk -f JSON.awk -v STREAM=0 [Options] /path/to/Bookmarks\n```\n\n**Options**\n\n```\n-v OUTFILE=\"path\"    write to \"path\" rather than to stdout.\n```\n\n### lib/splitBookmarksExtras.awk\n\n**Requirements**\n\nLinux commands: base64, mkdir.\n\n**Output**\n\nList of written image IDs to stdout; image (and base64) files written to destination directory.\n\n**Usage**\n\n```sh\nawk -f lib/splitBookmarksExtras.awk -f JSON.awk -v STREAM=0 [Options] /path/to/BookmarksExtras\n```\n\n**Options**\n\n```\n-v B64=1             also write base64 encoded files (default 0).\n-v CLOBBER=1         overwrite an existing base64/image file (default 0).\n-v DEST_DIR=\"bookmark-extras\"     destination directory for image and base64 files.\n-v DRY_RUN=1         list files that would be written but don't write them (default 0).\n-v OUTFILE=\"path\"    write to \"path\" rather than to stdout.\n```\n\n### lib/toFile.awk\n\n**Output**\n\nList of written file IDs to stdout; files written to destination directory.\nIf a file ID is missing, the record is written to stderr.\n\n**Usage**\n\n```sh\nawk -f lib/toFile.awk [Options] file | \"-\"\n```\n\n**Options**\n\n```\n-v CLOBBER=1         overwrite an existing file (default 0).\n-v DEST_DIR=\"bookmark-files\"     destination directory for new files.\n-v DRY_RUN=1         list files that would be written but don't write them (default 0).\n-v OUTFILE=\"path\"    write to \"path\" rather than to stdout.\n```\n\n### lib/toSql.awk\n\n**Output**\n\nSQLite table dump statements, which can create a table when fed into sqlite3.\n\n**Usage**\n\n```sh\nawk -f lib/toSql.awk [Options] file | \"-\"\n```\n\n**Options**\n\n```\n-v OUTFILE=\"path\"    write to \"path\" rather than to stdout\n-v TABLE=\"t\"         SQL table name\n```\n\n## Examples\n\n### Extract bookmark info files\n\nTo directory `bookmark-files`. Each file is named by the value of the `id` key it contains.\n\n```sh\nawk -f lib/splitBookmarks.awk -f JSON.awk -v STREAM=0 ../Bookmarks |\nawk -f lib/toFile.awk | head\n```\n\n### Extract image thumbnails\n\nTo directory `bookmark-extras`. Each thumbnail is named by its extracted key,\nwhich corresponds to the value of an `imageID` key contained in one or more\ninfo files. Think of the `imageID` value as a link to the image data file.\n\n```sh\nawk -f lib/splitBookmarksExtras.awk -f JSON.awk -v STREAM=0 ../BookmarksExtras | head\n```\n\nNote that the thumbnails that Opera stores in file `Bookmarks` must be extraced\nindividually from the info files that contain key `meta_info_imageData`.  No\nscript is currently provided to do that because the procedure simply involves\nfeeding the `meta_info_imageData` value to command `base64 -d`.\n\n### Convert Bookmarks to CSV\n\nCommand `sqlite3` required.\n\n```sh\nawk -f lib/splitBookmarks.awk -f JSON.awk -v STREAM=0 ../Bookmarks |\nawk -f lib/toSql.awk |\nsqlite3 /tmp/t.sqlite \u0026\u0026\nsqlite3 -csv -header /tmp/t.sqlite \"select * from t\" \u003e bookmarks.csv\n```\n\n### Display duplicated bookmark IDs\n\nLinux commands `sort` and `uniq` required.\n\nThere shouldn't be any, that is, no output is expected if everything is OK.\n\n```sh\nawk -f lib/splitBookmarks.awk -f JSON.awk -v STREAM=0 ../Bookmarks |\ngrep ^id= | sort | uniq -cd\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstep-%2Fopera-bookmarks.awk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstep-%2Fopera-bookmarks.awk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstep-%2Fopera-bookmarks.awk/lists"}