{"id":27193207,"url":"https://github.com/svernidub/telegraph-parser","last_synced_at":"2025-04-09T18:46:50.598Z","repository":{"id":59157429,"uuid":"76117760","full_name":"svernidub/telegraph-parser","owner":"svernidub","description":"Gem to pull and parse articles from Telegra.ph","archived":false,"fork":false,"pushed_at":"2018-08-15T05:54:10.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-10T09:05:19.424Z","etag":null,"topics":["telegram","telegraph","telegraph-parser"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/svernidub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-10T14:34:10.000Z","updated_at":"2023-05-28T06:34:46.000Z","dependencies_parsed_at":"2022-09-13T20:11:40.049Z","dependency_job_id":null,"html_url":"https://github.com/svernidub/telegraph-parser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svernidub%2Ftelegraph-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svernidub%2Ftelegraph-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svernidub%2Ftelegraph-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svernidub%2Ftelegraph-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svernidub","download_url":"https://codeload.github.com/svernidub/telegraph-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248091334,"owners_count":21046259,"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":["telegram","telegraph","telegraph-parser"],"created_at":"2025-04-09T18:46:50.029Z","updated_at":"2025-04-09T18:46:50.578Z","avatar_url":"https://github.com/svernidub.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telegraph-parser\n\nGem to pull and parse articles from Telegra.ph.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'telegraph-parser'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install telegraph-parser\n\n## Usage\n\nLoad parser to your project.\n\n```ruby\nrequire 'telegraph/parser'\n\n```\n\nLoad article from Telegra.ph:\n\n```ruby\narticle = Telegraph::Parser::Article.load('Пять-врагов-государства-12-10')\n```\n\nArticle contains attributes:\n\n```ruby\narticle.id\n =\u003e \"Пять-врагов-государства-12-10\"\n\narticle.title\n =\u003e \"Пять врагов государства\"\n\n article.author\n =\u003e \"Алексей ШЕРСТНЕВ\"\n\narticle.content\n =\u003e \"\u003carticle\u003e\u003cp\u003e\u003cbr\u003e\u003c/p\u003e\\n\u003cfigure\u003e\u003cdiv class=\\\"figure_wrapper\\\"\u003e....\n\narticle.imagese.images\n=\u003e {\"/6e4ecf2f73df0e2a97028.gif\"=\u003e\n  \"GIF89a\\xF4\\x01\\xDC\\x00\\xF7\\xFF\\x00\\x00\\x00\\x00/B9\\x8A\\x94\\x8C\\xAB\\xB0\\xAA\\x15\\x18!z\\x87\\x840\\x01\\x05\u0026)1\\xC7\\xA0\\xA0WffK\\x01\\x06\\x06\\x14\\x15\\x93\\n'\\xA21Gvzy\\xA8\\x00\\x12ivv)CC\\x13!\\x18\\x....\n\n```\n\ntelegraph-parser will change images names in src attribute\n\n```\nhttp://telegra.ph/file/6e4ecf2f73df0e2a97028.gif =\u003e 6e4ecf2f73df0e2a97028.gif\n\n```\n\n\nYou can add prefix to image filenames:\n\n```ruby\narticle = Telegraph::Parser::Article.load('Пять-врагов-государства-12-10', image_prefix: '/static')\n\narticle.images.keys.first\n=\u003e \"/static/6e4ecf2f73df0e2a97028.gif\"\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/svernidub/telegraph-parser.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvernidub%2Ftelegraph-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvernidub%2Ftelegraph-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvernidub%2Ftelegraph-parser/lists"}