{"_id":"ssb-viewer","_rev":"40-215b9f5ad60264e87a68ab6f3ccd1e78","name":"ssb-viewer","description":"serve ssb threads as (embeddable) web pages","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"ssb-viewer","version":"1.0.0","description":"serve ssb threads as (embeddable) web pages","main":"index.js","bin":{"ssb-viewer":"bin.js"},"dependencies":{"asyncmemo":"^1.0.0","emoji-named-characters":"^1.0.2","emoji-server":"^1.0.0","human-time":"^0.0.1","hyperscript":"2.0.2","lrucache":"^1.0.2","pull-cat":"^1.1.11","pull-paramap":"^1.2.1","pull-stream":"^3.5.0","ssb-client":"^4.4.0","ssb-marked":"^0.7.2","ssb-ref":"^2.6.2","ssb-sort":"^1.0.0","stream-to-pull-stream":"^1.7.2"},"devDependencies":{"tape":"^4.6.2"},"author":{"name":"cel"},"license":"AGPL-3.0+","gitHead":"07ff4c602e229a458d6210ac0c19dc2b699b740f","_id":"ssb-viewer@1.0.0","scripts":{},"_shasum":"0fb9ab9156778054fe33111c90706e6b184a0342","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"dist":{"shasum":"0fb9ab9156778054fe33111c90706e6b184a0342","tarball":"https://registry.npmjs.org/ssb-viewer/-/ssb-viewer-1.0.0.tgz","npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh275BCRA9TVsSAnZWagAAN0UQAJMW1jEK1ZqwfHlkqFkk\nhs7yzgDnWrHAQIQQxKKfjrGvKngCPSJC2+YsA8vakMclpOocWW89PmKR28M7\nKz6ht4voVULAny05QVgG3TlNEpz+J2J9daPoJtVPndwKVwRx0kzmKpLrtfR9\nLD+jKbfrxiBav0RIFB6G5XVTPCXC5fJH69a6MlOOR7z3wiss49iCNzrAsbGl\nhAI34N7bpzAz+CKWjbs+0+Ebagpa60Xbr4d3QsNwEDqrcHjSX9OppU4awwZF\nbIqkeMowwQjw06P/TlXJQ6iJqMFpdkFhTDHU6Mh5jMfXX7ebXlNIygQtF52w\nPkhNjr5+5YSHvYF37W/u3ICKFtU24dhGD212APhG8vbyqGdfFsAkGUMfvHHU\nSYq/qoPxl9q2wXswtmXaPEYkPObXyDoKZbuG6oiCHPXVSP0xd/50QdxJlyD4\nRaZEnlR/s1u2OiMP+PjqfIU25ST1X7s24d958KNkhjE+gr2Xbpq6+knzi3kM\nbqz4KiK699Xe+olOLDP1M5Adiu2DREaV0s3L3IUMeGyw9zlnd6+O9yLH61oX\nx4i4JsA+tflBgel+8TN5OwWVDDsgjhGTMHP4S0ZWQmlD1/c9vuZobP/e2eXd\nJNckxVHVTtsPtijKJA359NJE9TJi6gqWQjFIff7EIa15g+daXoP5N/awT59k\nqQL9\r\n=QYJ9\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-ZXupBzRtfi2m08B+U1pv0zTGoX1kcSx3NNaURTu2xlaZRo2R384WKXFRTf6n71uwfFp6jyfwGcxK9/p20dDpjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiumMQgVGnVietnUcSMfaMJ3hocHEGbMILGcPrOFx/WQIge2TL4B85EKj2O+5fPeVop5aBdKX8SUCRqUspefGcWSk="}]},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ssb-viewer-1.0.0.tgz_1500456099352_0.5021147967781872"},"directories":{}}},"readme":"# ssb-viewer\n\nHTTP server for read-only views of SSB content. Serves content as web pages or as scripts for embedding in other web pages.\n\n## Install & Run\n\nAs a sbot plugin:\n```sh\nmkdir -p ~/.ssb/node_modules\ncd ~/.ssb/node_modules\ngit clone ssb://%MeCTQrz9uszf9EZoTnKCeFeIedhnKWuB3JHW2l1g9NA=.sha256 ssb-viewer && cd ssb-viewer\nnpm install\nsbot plugins.enable ssb-viewer\n# restart sbot\n```\n\nOr standalone:\n```sh\ngit clone ssb://%MeCTQrz9uszf9EZoTnKCeFeIedhnKWuB3JHW2l1g9NA=.sha256 ssb-viewer && cd ssb-viewer\nnpm install\n./bin.js\n```\n\n## Usage\n\nTo view a thread as a web page, navigate to a url like `http://localhost:8807/%MSGID`.\n\nTo embed a thread into another web page, load it as follows:\n\n```html\n<script src=\"http://localhost:8807/%MSGID.js\"></script>\n```\n\nTo add more than the base styles, you can also load `http://localhost:8807/static/nicer.css`.\n\n## Routes\n\n- `/%msgid`: web page showing a message thread\n- `/%msgid.js`: script to embed a message thread\n- `/%msgid.json`: message thread as JSON\n- `/&feedid`: web page showing a complete feed\n- `/user-feed/&feedid`: web page showing messages from followed users and channels of a feed\n- `/channel/#channel`: web page showing messages in a specific channel\n\n### Query options\n\n- `noroot`: don't include the root message in the thread\n- `base=...`: base url for links that ssb-viewer can handle\n- `msg_base=...`: base url for links to messages\n- `feed_base=...`: base url for links to feeds\n- `blob_base=...`: base url for links to blobs\n- `img_base=...`: base url for embedded blobs (images)\n- `emoji_base=...`: base url for emoji images\n\nThe `*_base` query options overwrite the defaults set in the config.\nThe `base` option is a fallback instead of specifying the URLs separately.\nThe base options are mostly useful for embedding, where the script is embedded\non a different origin than where ssb-viewer is running. However, you may not\nneed them, as the ssb-viewer embed script will detect the base where it is\nincluded from.\n\n## Config\n\nTo change `ssb-viewer`'s default options, edit your `~/.ssb/config`, to have\nproperties like the following:\n```json\n{\n  \"viewer\": {\n    \"port\": 8807,\n    \"host\": \"::\"\n  }\n}\n```\nYou can also pass these as command-line options to `./bin.js` or `sbot` as,\ne.g. `--viewer.port 8807`.\n\n- `viewer.port`: port for the server to listen on. default: `8807`\n- `viewer.host`: host address for the server to listen on. default: `::`\n- `viewer.base`: default base url for links that ssb-viewer can handle\n- `viewer.msg_base`: base url for links to ssb messages\n- `viewer.feed_base`: base url for links to ssb feeds\n- `viewer.blob_base`: base url for links to ssb blobs\n- `viewer.img_base`: base url for embedded blobs (images)\n- `viewer.emoji_base`: base url for emoji images\n\n## References\n\n- Concept: [ssb-porthole][]\n- UI ideas: [sdash][], [patchbay][]\n- Server techniques: [ssb-web-server][], [ssb-ws][], [git-ssb-web][]\n\n\n[ssb-porthole]: %cgkDJXsh6pO5m458B3ngEro+U0qUMGTY1TRGTZOP6lQ=.sha256\n[patchbay]: %s9mSFATE4RGyJx9wgH22lBrvD4CgUQW4yeguSWWjtqc=.sha256\n[sdash]: %qrU04j9vfUJKfq1rGZrQ5ihtSfA4ilfY3wLy7xFv0xk=.sha256\n[git-ssb-web]: %q5d5Du+9WkaSdjc8aJPZm+jMrqgo0tmfR+RcX5ZZ6H4=.sha256\n[ssb-web-server]: %gYctTCrA06BhAGGvQ6PJ0H2eCCQLj1iEsmfn8SD5+nk=.sha256\n[ssb-ws]: %tFjo5SoD+Y0SaB5vqZYppmoPmv9LKB5wMPl96qtu4qk=.sha256\n\n## License\n\nCopyright (c) 2016-2017 Secure Scuttlebutt Consortium\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as\npublished by the Free Software Foundation, either version 3 of the\nLicense, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see <http://www.gnu.org/licenses/>.\n","maintainers":[{"email":"jacob.karlsson95@gmail.com","name":"powersource"},{"email":"arj03@protonmail.ch","name":"arj03"},{"email":"andre+npm@staltz.com","name":"staltz"},{"email":"whimful@gmail.com","name":"mixmix"},{"email":"npm.cel@celehner.com","name":"cel"},{"email":"matt@wetsand.co.nz","name":"mmckegg"},{"email":"christianbundy@fraction.io","name":"christianbundy"},{"email":"dominic.tarr@gmail.com","name":"dominictarr"},{"email":"marak.squires@gmail.com","name":"marak"},{"email":"michael.williams@enspiral.com","name":"ahdinosaur"},{"email":"cryptix@riseup.net","name":"cryp7ix"}],"time":{"modified":"2022-11-09T11:52:19.791Z","created":"2017-07-19T09:21:39.456Z","1.0.0":"2017-07-19T09:21:39.456Z"},"author":{"name":"cel"},"license":"AGPL-3.0+","readmeFilename":"README.md"}