{"id":21296956,"url":"https://github.com/reddec/api-notes","last_synced_at":"2025-03-15T17:27:48.101Z","repository":{"id":173374899,"uuid":"650674070","full_name":"reddec/api-notes","owner":"reddec","description":"Dead simple service for publishing notes via API. Markdown supported.","archived":false,"fork":false,"pushed_at":"2023-06-15T14:46:44.000Z","size":70,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-09T00:06:38.931Z","etag":null,"topics":["api-first","markdown","notes","openapi","pastebin","self-hosted"],"latest_commit_sha":null,"homepage":"","language":"Go","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/reddec.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-07T15:04:06.000Z","updated_at":"2024-09-27T05:28:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"39318a39-275e-46ef-928f-64822e98058d","html_url":"https://github.com/reddec/api-notes","commit_stats":null,"previous_names":["reddec/api-notes"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fapi-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fapi-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fapi-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fapi-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reddec","download_url":"https://codeload.github.com/reddec/api-notes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243765075,"owners_count":20344527,"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":["api-first","markdown","notes","openapi","pastebin","self-hosted"],"created_at":"2024-11-21T14:31:18.528Z","updated_at":"2025-03-15T17:27:48.082Z","avatar_url":"https://github.com/reddec.png","language":"Go","readme":"# API-Notes\n\nDead simple service for publishing notes via API. Markdown supported.\n\nThe service exposes minimal API for upload markdown (with attachments) and render it as HTML.\n\nThe generated link is 16-bytes randomly generated and can be shared relatively safely.\n\nThe API-Notes is NOT serving notes - any reverse proxy must do it. With authorization if needed.\nSee [docker-compose.yaml](docker-compose.yaml).\n\nSupported markdown extensions:\n\n- GFM (GitHub Flavored Markdown)\n- Footnotes\n- Basic syntax highlighting\n- Mermaid\n- MathJax\n- Embedded youtube\n\n## Installation\n\n- Docker: `ghcr.io/reddec/api-notes:latest`\n- Go: `go install github.com/reddec/api-notes/cmd/...@latest`\n\n## Usage\n\n```\nUsage:\n  api-notes [OPTIONS] serve [serve-OPTIONS]\n\nHelp Options:\n  -h, --help            Show this help message\n\n[serve command options]\n      -u, --public-url= Public URL for redirects (default: http://127.0.0.1:8080) [$API_NOTES_PUBLIC_URL]\n      -b, --bind=       API binding address (default: 127.0.0.1:8080) [$API_NOTES_BIND]\n      -d, --dir=        Directory to store notes (default: notes) [$API_NOTES_DIR]\n      -t, --token=      Authorization token, empty means any token can be usedauth is disabled [$API_NOTES_TOKEN]\n\n```\n\nDifferences in docker version\n\n| Environment variable | Default        | Description         |\n|----------------------|----------------|---------------------|\n| `API_NOTES_BIND`     | `0.0.0.0:8080` | Binding address     |\n| `API_NOTES_DIR`      | `/data`        | Directory for notes |\n\n## API\n\n- [OpenAPI spec](openapi.yaml)\n- [Live docs](https://elements-demo.stoplight.io/?spec=https://raw.githubusercontent.com/reddec/api-notes/master/openapi.yaml)\n- [![](https://godoc.org/github.com/reddec/api-notes/api/client?status.svg)](http://godoc.org/github.com/reddec/api-notes/api/client) generated Go API client\n\n\n### Example\n\nCreate note\n\n    curl -v -F author=reddec -F title=hello -F text=world -F attachment=@somefile.pdf http://127.0.0.1:8080/notes?token=deadbeaf\n\nFrom Go\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/reddec/api-notes/api/client\"\n)\n\nfunc main() {\n\t// we assume that we are somehow passing parameters (flags, envs...)\n\tconst URL = \"https://example.com\"\n\tconst Token = \"deadbeaf\"\n\tnotes, err := client.NewClient(URL, client.HeaderToken(Token))\n\tif err != nil {\n\t\t// panic is used for illustration only\n\t\tpanic(\"create notes client: \" + err.Error())\n\t}\n\tnote, err := notes.CreateNote(context.Background(), \u0026client.DraftMultipart{\n\t\tTitle:  \"Hello\",\n\t\tText:   \"## hello world\\nThis is sample text\",\n\t\tAuthor: client.NewOptString(\"demo\"),\n\t})\n\tif err != nil {\n\t\tpanic(\"create note: \" + err.Error())\n\t}\n\n\tlog.Println(\"Note ID:\", note.ID)\n\tlog.Println(\"Note URL:\", note.PublicURL)\n}\n```\n\n## Sample note\n\n![Screenshot 2023-06-07 230208](https://github.com/reddec/api-notes/assets/6597086/c5b7b999-ea25-4fb2-996d-bf8f6a6e9c0d)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fapi-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freddec%2Fapi-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fapi-notes/lists"}