{"id":25883158,"url":"https://github.com/maxlath/hashtags-hub","last_synced_at":"2025-03-02T16:31:49.088Z","repository":{"id":67787864,"uuid":"227479557","full_name":"maxlath/hashtags-hub","owner":"maxlath","description":"A web service to get links to hashtag pages on different web platforms. The main purpose of this tool is to be used on Wikidata as the 'formatter URL' (P1630) value of 'hashtag' (P2572)","archived":false,"fork":false,"pushed_at":"2024-01-07T08:19:40.000Z","size":321,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-01-07T09:25:17.060Z","etag":null,"topics":["hashtags","toolforge","wikidata"],"latest_commit_sha":null,"homepage":"https://hashtags-hub.toolforge.org","language":"JavaScript","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/maxlath.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-12-11T23:27:21.000Z","updated_at":"2023-03-04T02:49:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"e084ff12-871f-48a9-a787-05d2aaabe48f","html_url":"https://github.com/maxlath/hashtags-hub","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fhashtags-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fhashtags-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fhashtags-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fhashtags-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxlath","download_url":"https://codeload.github.com/maxlath/hashtags-hub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241537391,"owners_count":19978524,"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":["hashtags","toolforge","wikidata"],"created_at":"2025-03-02T16:31:48.447Z","updated_at":"2025-03-02T16:31:49.044Z","avatar_url":"https://github.com/maxlath.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [hashtags-hub](https://hashtags-hub.toolforge.org)\n\nA web service to get links to hashtag pages on different web platforms. The main purpose of this tool is to be used on Wikidata as the ['formatter URL' (P1630)](https://www.wikidata.org/wiki/Property:P1630) value of ['hashtag' (P2572)](https://www.wikidata.org/wiki/Property:P2572), without having to systematically link to a unique centralized platform, hashtags being, most of the time, not bound to a single platform.\n\n## Install\n\n### Development\n```sh\ngit clone https://github.com/maxlath/hashtags-hub\ncd hashtags-hub\nnpm install\nnpm run watch\n```\n\n### Deploy on Toolforge\n\n```sh\nmkdir -p ~/www\ncd ~/www\ngit clone https://github.com/maxlath/hashtags-hub js\ncd js\n\n# See https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web#node.js_web_services\nwebservice --backend=kubernetes node10 shell\ncd ~/www/js\nnpm install --production\n# exit node10 shell\nexit\n\nwebservice --backend=kubernetes node10 start\n\n# get the logs\nkubectl logs -f $(kubectl get pods | grep hashtags-hub | grep Running | awk '{print $1}')\n```\n\n*see also [`Hub` setup instructions](https://github.com/maxlath/hub/blob/master/docs/deploy.md)*\n\n## Development\n\n### Add a plaform\nTo add a new platform, 2 things are required:\n\n* [add an icon](#add-an-icon)\n* [add a URL formatter](#add-a-url-formatter)\n\nYou should then ready to commit those changes, asset files included, push your commit to your fork and start a Pull Request.\n\n### Add an icon\n\n1. Add a square icon to the `assets` directory:\n    * resolution must be `\u003e= 32x32` (ideally `\u003e= 64x64` so that we have the possibility to change the icon resolution in the future)\n    * the icon filename must be on the pattern `{platform name}_icon.png`, all lowercased\n2. Run the script `npm run update-icons` to generate the `32x32` version in the `public` folder\n\n### Add a URL formatter\n\n1. Add a `{ name, formatter }` object to one of the lists in `./server/templates/hashtag.js`\n    * The `name` should match the platform name used for the icon, given that the icon url is generated from `name` lowercased and with spaces replaced by `_`\n2. Check that it works as expected:\n    1. Start the server: `npm run start`\n    2. Open the page in your browser, by default http://localhost:4274\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxlath%2Fhashtags-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxlath%2Fhashtags-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxlath%2Fhashtags-hub/lists"}