{"id":17623630,"url":"https://github.com/m1/smap","last_synced_at":"2025-07-01T11:07:05.010Z","repository":{"id":41192243,"uuid":"175712746","full_name":"m1/smap","owner":"m1","description":"smap is a site-mapping engine written in Go.","archived":false,"fork":false,"pushed_at":"2019-03-14T23:02:09.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T03:36:28.815Z","etag":null,"topics":["crawler","go","go-library","go-package","golang","golang-library","golang-package","golang-tools","sitemap","sitemap-generator","web-crawler","web-crawling"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-14T23:00:17.000Z","updated_at":"2023-09-08T17:51:34.000Z","dependencies_parsed_at":"2022-08-25T17:00:19.512Z","dependency_job_id":null,"html_url":"https://github.com/m1/smap","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/m1%2Fsmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1%2Fsmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1%2Fsmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1%2Fsmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m1","download_url":"https://codeload.github.com/m1/smap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246265002,"owners_count":20749575,"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":["crawler","go","go-library","go-package","golang","golang-library","golang-package","golang-tools","sitemap","sitemap-generator","web-crawler","web-crawling"],"created_at":"2024-10-22T21:11:23.098Z","updated_at":"2025-03-30T01:33:57.616Z","avatar_url":"https://github.com/m1.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smap\n\n[![GoDoc](https://godoc.org/github.com/m1/smap?status.svg)](https://godoc.org/github.com/m1/smap)\n[![Build Status](https://travis-ci.org/m1/smap.svg?branch=master)](https://travis-ci.org/m1/smap)\n[![Go Report Card](https://goreportcard.com/badge/github.com/m1/smap)](https://goreportcard.com/report/github.com/m1/smap)\n[![Release](https://img.shields.io/github/release/m1/smap.svg)](https://github.com/m1/smap/releases/latest)\n[![Coverage Status](https://coveralls.io/repos/github/m1/smap/badge.svg)](https://coveralls.io/github/m1/smap)\n\n## Installation\n\nUse go get to get the latest version\n```text\ngo get github.com/m1/smap\n```\n\nThen import it into your projects using the following:\n```go\nimport (\n\t\"github.com/m1/smap\"\n)\n```\n\n## Usage\n\nsmap can be used as a library, for example:\n\n```go\nc, _ := client.New(\u0026client.Config{\n    MaxWorkers:      50,\n    IgnoreRobotsTxt: false,\n    UserAgent:       \"user-agent 1.1\",\n})\nu, _ := url.Parse(\"http://example.com\")\nsiteMap, err := c.Crawl(u)\nfor _, v := range siteMap {\n\tprintln(v.URL.path, len(v.Links), len(v.LinkedFrom))\n}\n```\n\n## CLI usage\n \nsmap can also be used on the cli, just install using: `go get github.com/m1/gospin/cmd/gospin`\n\nTo use:\n```\n➜  ~ smap --help                    \nsmap is a site-mapping engine written in Go.\n\nUsage:\n  smap [url] [flags]\n\nFlags:\n  -h, --help                help for smap\n      --json                json output\n      --robots              Ignores robots.txt\n  -u, --user-agent string   User agent to use for the crawler\n  -v, --verbose             verbose printing\n  -w, --workers int         How many workers to use (default 50)\n```\n\nFor example:\n\n```\n➜  smap go build \u0026\u0026 ./smap http://google.com --json --verbose --workers=50 --user-agent=\"test-test\" | jq\n   {\n     \"/\": {\n       \"path\": \"/\",\n       \"redirects_to\": null,\n       \"links\": [\n         \"/advanced_search\",\n         \"/language_tools\",\n         \"/intl/en/ads/\",\n         \"/services/\",\n         \"/intl/en/policies/privacy/\",\n         \"/intl/en/policies/terms/\"\n       ],\n       \"linked_from\": [\n         \"/intl/en/ads/\",\n         \"/services/\",\n         \"/advanced_search\",\n         \"/language_tools\",\n       ],\n       \"is_redirect\": false\n     }...\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm1%2Fsmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm1%2Fsmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm1%2Fsmap/lists"}