{"id":50820768,"url":"https://github.com/laserattack/mado","last_synced_at":"2026-06-13T13:34:57.296Z","repository":{"id":357212043,"uuid":"1235854127","full_name":"laserattack/mado","owner":"laserattack","description":"markdown organizer","archived":false,"fork":false,"pushed_at":"2026-06-11T21:20:59.000Z","size":201,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-13T13:34:50.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laserattack.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-11T18:07:58.000Z","updated_at":"2026-06-11T21:21:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/laserattack/mado","commit_stats":null,"previous_names":["laserattack/tamd","laserattack/mado"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/laserattack/mado","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserattack%2Fmado","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserattack%2Fmado/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserattack%2Fmado/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserattack%2Fmado/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laserattack","download_url":"https://codeload.github.com/laserattack/mado/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserattack%2Fmado/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34286975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-06-13T13:34:56.847Z","updated_at":"2026-06-13T13:34:57.288Z","avatar_url":"https://github.com/laserattack.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mado — markdown organizer\n\nA command-line tool that stores entries (tasks, notes) as markdown\nfiles and supports powerful filtering with a query language\n\n![](./static/repo_image.jpg)\n\n## Features\n\n- **Per-project isolation**: Each project has its own `MADO/`\n  directory, similar to `.git` — no global directories are used. This\n  allows you to version‑control `MADO/` alongside your code\n- **Entry storage**: Entries stored as `MAIN.md` files in timestamped\n  directories (`YYYYMMDDTHHMMSS/MAIN.md`) in `MADO/` directory. The\n  entry directory can also contain any additional files related to the\n  entry — attachments, screenshots, logs, scripts, etc. Everything\n  stays organized in one place\n\n## Usage Example\n\nStart from scratch in a new project:\n\n``` bash\n# Create a project directory and enter it\nmkdir myproject\ncd myproject\n\n# Initialize MADO directory (like git init)\nmado -i\n```\n\nOnce the `MADO/` directory is initialized, you can work with entries\nfrom any subdirectory within the project — just like Git, mado\nautomatically finds the nearest `MADO/` directory by walking up the\nfile tree\n\n``` bash\n# Create your first entry\nmado -n\n```\n\nThe entry will be created with the following content:\n\n```\n- NAME:\n- PRIORITY:\n- TAGS:\n- STATUS:\n- DEADLINE:\n```\n\nYou can fill it out as needed, for example:\n\n```\n- NAME: Fix login bug\n- PRIORITY: 10\n- TAGS: bug, critical, auth\n- STATUS: opened\n- DEADLINE: 20260615\n\nThe login page returns 500 error when using special characters.\n...\n```\n\n\u003e No fields are required — you can omit any field entirely or leave its value empty. For example, when writing a note, you probably won't need the priority, status and deadline fields.\n\u003e When a field is omitted or left empty:\n\u003e - NAME, STATUS default to empty string \"\"\n\u003e - PRIORITY defaults to 0\n\u003e - DEADLINE defaults to 99990000T000000\n\u003e - TAGS defaults to a list with one empty element [\"\"]\n\u003e - TIME is a system field, always present and set to the entry's directory name (creation timestamp in YYYYMMDDTHHMMSS format). It cannot be changed or removed — it reflects when the entry was created\n\nWhen you have many entries, you'll want to filter them:\n\n``` bash\n# List all entries\nmado -p 'all'\n\n# Find critical bugs\nmado -p 'tag = bug and priority \u003e 5'\n\n# Delete low priority entries\nmado -r 'priority \u003c 5'\n\n# Filter by entry name (exact match)\nmado -p 'name = login'\n\n# Filter by entry name (substring)\nmado -p 'name ~ login'\nmado -p 'name ~ \"fix login\"' # multiple words — quotes required\n\n# Filter by creation time\nmado -p 'time ~ 20260516' # Entries created on 2026-05-16\nmado -p 'time \u003e 20260516T12' # Entries created after 2026-05-16 12:00:00\nmado -p 'time \u003e= 2023 and time \u003c= 2025' # Entries created between 2023 and 2025 (inclusive)\n\n# Find entries with complex conditions\nmado -p '(tag = bug or tag = critical) and status = opened and deadline \u003c 20260602'\nmado -p 'not (priority \u003c 3 or status = closed)'\nmado -p '(priority \u003e 5 and tag = urgent) or status = reopened'\n\n# Syntactic sugar for matching multiple values\nmado -p 'status = anyof(opened, reopened)' # Status equals \"opened\" OR \"reopened\"\nmado -p 'priority = anyof(10, 20, 30)' # Priority equals 10 OR 20 OR 30\nmado -p 'tag = allof(bug, critical)' # Entry has BOTH \"bug\" AND \"critical\" tags\n```\n\n## Customizing Templates\n\nTemplates are stored in `MADO/.templates/` as markdown files:\n\n``` bash\n# Create a bug report template\ncat \u003e MADO/.templates/bug.md \u003c\u003c 'EOF'\n- NAME:\n- PRIORITY: 10\n- TAGS: bug\n- STATUS: opened\n\n## Steps to Reproduce\n1.\n\n## Expected Behavior\n\n## Actual Behavior\nEOF\n```\n\nYou can create entries with custom templates:\n\n``` bash\nmado -n -t bug\n# The template must exist at: MADO/.templates/bug.md\n```\n\n## Output Formats\n\nThe `-f` flag controls how entries are displayed:\n\n``` bash\n# Default unix format: path:1:1: fields\nmado -p 'all'\n# /home/user/project/mado/MADO/20260521T204844/MAIN.md:1:1: TIME:[20260521T204844] NAME:[The ability to specify the name of the main directory (TASKS by default)] PRIORITY:[10] DEADLINE:[99990000T000000] STATUS:[closed] TAGS:[feat,flag]\n# Compatible with Emacs compile buffer and other tools that parse file:line:col\n\n# Paths only — useful for piping to other tools\nmado -p 'all' -f path\n# /home/user/project/MADO/20260516T161611/MAIN.md\n# Search across entry bodies with grep\ngrep 'match' $(mado -p 'all' -f path)\n# /home/user/project/MADO/20260512T224126/MAIN.md:Operator '=' remains for exact matches.\n\n# Newline-delimited JSON for scripts\nmado -p 'all' -f jsonl\n# {\"time\":\"20260521T204844\",\"name\":\"The ability to specify the name of the main directory (TASKS by default)\",\"priority\":10,\"deadline\":\"99990000T000000\",\"status\":\"closed\",\"tags\":[\"feat\",\"flag\"],\"path\":\"/home/user/project/MADO/20260521T204844/MAIN.md\"}\n# Pipe JSON output to jq for advanced processing\nmado -p 'priority \u003e 5' -f jsonl | jq '.name'\nmado -p 'all' -f jsonl | jq -s 'group_by(.status)'\nmado -p 'all' -f jsonl | jq -s 'sort_by(.priority)'\n```\n\n## Query Syntax\n\nThe query language supports filtering entries using operators and\nkeywords\n\n### Operators\n\n| Operator | Description |\n|----------|-------------|\n| `\u003e` | Greater than |\n| `\u003c` | Less than |\n| `\u003e=` | Greater than or equal |\n| `\u003c=` | Less than or equal |\n| `=` | Equal / exact match |\n| `!=` | Not equal |\n| `~` | Contains |\n| `!~` | Not contains |\n\n### Logical Operators\n\n| Operator | Description |\n|----------|-------------|\n| `and` | Logical AND |\n| `or` | Logical OR |\n| `not` | Logical NOT |\n\n### Types\n\n| Type | Description | Format | Examples |\n|------|-------------|--------|----------|\n| **number** | Integer value | 0-999 | `0`, `10`, `999` |\n| **string** | Text value | Unquoted: `[a-zA-Z_][a-zA-Z0-9_-]*` or quoted: `\"...\"` or `'...'` | `bug`, `\"fix login\"`, `'проблема'` |\n| **timestamp** | Creation time of entry | 4 digits, 6 digits or (8 digits + optional (`T` + 0, 2, 4 or 6 digits)) | `2026`, `20260516`, `20260516T`, `20260516T1230` |\n\n### Keywords\n\n| Keyword | Type    | Operators                      | Example                           |\n|---------|---------|--------------------------------|-----------------------------------|\n| `priority` | number | `\u003e`, `\u003c`, `\u003e=`, `\u003c=`, `=`, `!=`, `~`, `!~` | `priority \u003e 5`, `priority != 10` |\n| `tag`      | string  | `\u003e`, `\u003c`, `\u003e=`, `\u003c=`, `=`, `!=`, `~`, `!~`           | `tag = bug`, `tag ~ crit` |\n| `status`   | string  | `\u003e`, `\u003c`, `\u003e=`, `\u003c=`, `=`, `!=`, `~`, `!~`           | `status = opened`, `status ~ open` |\n| `name`     | string  | `\u003e`, `\u003c`, `\u003e=`, `\u003c=`, `=`, `!=`, `~`, `!~`           | `name = \"Fix bug\"`, `name ~ login` |\n| `time`     | timestamp  | `\u003e`, `\u003c`, `\u003e=`, `\u003c=`, `=`, `!=`, `~`, `!~`           | `time \u003e 20260505T1230 and time \u003c 20260510T` |\n| `deadline`     | timestamp  | `\u003e`, `\u003c`, `\u003e=`, `\u003c=`, `=`, `!=`, `~`, `!~`           | `deadline \u003e 20260505T1230 and deadline \u003c 20260510T` |\n| `all`      | special | -                              | `all`                  |\n\n\u003e **Note:** all operators also work with `anyof(...)` and `allof(...)`.\n\u003e These are syntactic sugar that expand to multiple conditions.\n\u003e `anyof(...)` expands with `or`, `allof(...)` expands with `and`.\n\u003e Examples:\n\u003e - `status = anyof(opened, reopened)` is equivalent to `status = opened or status = reopened`\n\u003e - `tag ~ allof(bug, crit, fix)` is equivalent to `tag ~ bug and tag ~ crit and tag ~ fix`\n\n## Installation\n\nClone the repository and build:\n\n```\nmake\n```\n\nThis will produce an executable file `./mado`\n\n## Requirements\n\n- **Unix system** (Linux, possibly macOS/BSD)\n- **Build dependencies**:\n  - C compiler (gcc/clang)\n  - `make`\n  - `flex`\n  - `bison`\n\n## Integrations\n\n- [emado](https://github.com/laserattack/emado) - Emacs interface for mado\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaserattack%2Fmado","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaserattack%2Fmado","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaserattack%2Fmado/lists"}