{"id":13457818,"url":"https://github.com/TelescopeJS/Telescope","last_synced_at":"2025-03-24T14:32:18.918Z","repository":{"id":45044079,"uuid":"120841989","full_name":"telescopejs/telescope","owner":"telescopejs","description":"🔭 The service ( from Client or Server ) works for render view ( markdown / code / image... ) from fetching URL.","archived":false,"fork":false,"pushed_at":"2022-12-07T13:25:21.000Z","size":185,"stargazers_count":176,"open_issues_count":15,"forks_count":46,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-05-22T19:28:14.359Z","etag":null,"topics":["github-preview","pdf","snapshot","telescope"],"latest_commit_sha":null,"homepage":"http://23.106.151.229:8002/img/telescopejs/telescope","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/telescopejs.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-09T01:49:36.000Z","updated_at":"2024-05-10T08:11:18.000Z","dependencies_parsed_at":"2023-01-23T17:25:12.964Z","dependency_job_id":null,"html_url":"https://github.com/telescopejs/telescope","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/telescopejs%2Ftelescope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telescopejs%2Ftelescope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telescopejs%2Ftelescope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telescopejs%2Ftelescope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telescopejs","download_url":"https://codeload.github.com/telescopejs/telescope/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244375502,"owners_count":20442690,"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":["github-preview","pdf","snapshot","telescope"],"created_at":"2024-07-31T09:00:37.728Z","updated_at":"2025-03-24T14:32:18.887Z","avatar_url":"https://github.com/telescopejs.png","language":"JavaScript","readme":"# Telescope 🔭\n\n[![build status](https://img.shields.io/travis/telescopejs/telescope/master.svg?style=flat-square)](https://travis-ci.org/telescopejs/telescope)\n[![Test coverage](https://img.shields.io/codecov/c/github/telescopejs/telescope.svg?style=flat-square)](https://codecov.io/github/telescopejs/telescope?branch=master)\n\n## What is telescope\nTelescope is the service ( from client or server ) works for render view ( md / code / image... ) via fetching URL.  \nIt's awesome that we can see any file on the internet. And telescope provides three ways (html/image/pdf) to display the view.  \nSo you can write the markup as follows.\n\n```html\n\u003c!--https://telescopejs.github.io/ is the client side's service without any dynamic server--\u003e\n\u003ciframe src=\"https://telescopejs.github.io/?q=picidaejs/picidaejs\" frameborder=\"0\" width=\"100%\" height=\"400px\"\u003e\u003c/iframe\u003e\n```\n\n## Features\n- ✈ Supports client and server side.\n- 🍻 Multiply [styles](https://telescopejs.github.io/?debug=true).\n- 😊 The service server side supports output the view via image or pdf.\n- 🍫 The code supports specified line range.\n- 👍 More features is waiting for you to discover...\n\n## Why needs telescope\n[Hackernoon](https://hackernoon.com) and [Medium](https://medium.com/) has the similar [view](https://hackernoon.com/media/e406a21255c325600273fa5c8c805a89?postId=55995262a254)\nvia rendering gist snippet.\nWe can use telescope service to preview or generate the image / pdf easily!  \n\n\n## Installation\n```bash\ngit clone https://github.com/telescopejs/telescope.git\ncd telescope\n# If you are in china, should set PUPPETEER_DOWNLOAD_HOST to speed the installation of puppeteer. \nPUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors npm install\n# server side, default port 8002\nnpm start\n# or client side, default port 9999\nnpm run client\n# build the assert of client side on `public/`\nnpm run client:build\n```\n**Meanwhile, telescope requires chrome libraries.**    \nYou should ensure the dependencies of chrome that you had installed, \nbecause I use the headless Chrome browser [puppeteer](https://github.com/GoogleChrome/puppeteer) to generate snapshot and pdf.  \n- [More information Here](https://askubuntu.com/questions/510056/how-to-install-google-chrome)\n\n### Client Side\nOpen `http://localhost:9999` after setup the service on port 9999.\n\n- The accepted query string table (server side accepted too)\n  \n| name | type | description |  \n| ---- | ---- | --------- |  \n| `q`  | string | the fetching url, e.g. `picidaejs/picidaejs/master/src/index.js` `picidaejs/picidaejs` |  \n| `style` | string | the view style, please see `https://telescopejs.github.io/?debug=true` |  \n| `hlStyle` | string | the code's highlight style, please see `https://telescopejs.github.io/?debug=true` |  \n| `range` | number\\|\\[start, end\\] | the code's range, e.g. `?range=10` `?range=[10]` `?range=[10, 20]` `?range=[-20, -15]` |  \n\nAnd specially, `debug=true` is accepted on client side for debug.\n\n### Server Side\nTemporary outside service [`http://23.106.151.229:8002/`](http://23.106.151.229:8002)\n- Please try the path name below\n```text\n/telescopejs/telescope\n/img/telescopejs/telescope\n/img/telescopejs/telescope/master/package.json?hlStyle=school-book\n/pdf/telescopejs/telescope\n/pdf/telescopejs/telescope/master/package.json\n```\n\n## Customized\nIf you want to customize yourself own telescope, Please write your [plugin](src/core/plugins) or [style](src/core/styles).  \n\n## License\nMIT [imcuttle](https://github.com/imcuttle)\n","funding_links":[],"categories":["Meteor","CMS"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTelescopeJS%2FTelescope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTelescopeJS%2FTelescope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTelescopeJS%2FTelescope/lists"}