log-to-post
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLog-to-Post
Log-to-Post
Log what you built (text, images, commits, branches); get LinkedIn, X, Reddit, and standup copy in one go. One base path holds and by day.
logs/posts/记录你完成的工作(文本、图片、提交记录、分支);一键生成LinkedIn、X、Reddit的帖子文案以及站会内容。一个基础路径下按日期存放和目录。
logs/posts/Base path (first run or unknown)
基础路径(首次运行或路径未知时)
- If the base path for logs and posts is not known, ask once: "Where should I store your logs and posts? (e.g. or
~/dev-log)"./log-to-post - Persist the choice by creating a marker file at that path: with a single line
.log-to-post(or the chosen path). On later runs, ifbasePath: .andlogs/exist under a candidate path, orposts/exists, use that as the base path without asking again..log-to-post - Under the base path ensure two folders exist: and
logs/.posts/
- 如果日志和帖子的基础路径未知,询问一次:“我应该将你的日志和帖子存储在哪里?(例如 或
~/dev-log)”./log-to-post - 通过在该路径创建标记文件 来保存选择,文件中仅包含一行内容
.log-to-post(或用户选择的路径)。后续运行时,如果候选路径下存在basePath: .和logs/目录,或存在posts/文件,则直接使用该路径,无需再次询问。.log-to-post - 确保基础路径下存在两个文件夹:和
logs/。posts/
Log structure and format
日志结构与格式
- One file per day: .
logs/YYYY-MM-DD.md - Each log entry in the file must follow the structure in references/log-format.md: entry type, content, optional links/tags.
- Entry types: |
started|running|blocked|discovered|shipped.learning
- 每日一个文件:。
logs/YYYY-MM-DD.md - 文件中的每条日志条目必须遵循references/log-format.md中的结构:条目类型、内容、可选链接/标签。
- 条目类型:|
started|running|blocked|discovered|shipped。learning
Collecting from different inputs
从不同输入收集内容
-
"Log: " prefix
If the user's message starts with(capital L, colon, space), treat the rest of the message as content to log. Strip the prefix, parse into one or more log entries, infer entry type from context, and append to today's log file. No need to ask for confirmation—just log it.Log: -
Free text / agent chat
Parse the user message or pasted conversation into one or more log entries. Infer entry type from context (e.g. "shipped", "discovered", "blocked"). Append to today's log file () using the format in references/log-format.md.logs/YYYY-MM-DD.md -
Images
Describe or transcribe the image content in one or two sentences, assign an entry type, and append as a log entry to today's file. Infer entry type from the image when possible (e.g. screenshot of terminal/code →orshipped, diagram or doc →discovered). Only ask the user for type when it's ambiguous.learning -
Git commits
Run(e.g.git logor withgit log -n 20 --oneline) in the repo the user indicates. For each relevant commit, include the branch name when available (e.g.--format=...withgit logor%(refname:short)for the repo). Write a short log entry (e.g. typegit branch --show-currentorshipped) with optionaldiscoveredandbranchin the entry metadata, and append to today's log file. Optionally include commit link inrepo.links -
Multiple entries in one go
When the user dumps several items (bullets, paragraphs, or a list), create one log entry per item and append all to the same day file.
-
“Log: ”前缀
如果用户消息以(大写L,冒号,空格)开头,将消息的剩余部分视为待记录内容。移除前缀,解析为一条或多条日志条目,根据上下文推断条目类型,追加到当日的日志文件中。无需确认,直接记录。Log: -
自由文本 / 智能体聊天内容
将用户消息或粘贴的对话内容解析为一条或多条日志条目。根据上下文推断条目类型(例如“shipped”、“discovered”、“blocked”)。使用references/log-format.md中的格式,追加到当日的日志文件()中。logs/YYYY-MM-DD.md -
图片
用一两句话描述或转录图片内容,分配条目类型,作为日志条目追加到当日文件中。尽可能根据图片推断条目类型(例如终端/代码截图→或shipped,图表或文档→discovered)。仅当类型不明确时,再询问用户。learning -
Git提交记录
在用户指定的仓库中运行命令(例如git log或带有git log -n 20 --oneline参数的命令)。对于每条相关的提交记录,若有分支名称则包含在内(例如使用--format=...参数的%(refname:short)命令,或针对仓库运行git log命令)。编写简短的日志条目(例如类型为git branch --show-current或shipped),在条目的元数据中可选包含discovered和branch信息,追加到当日的日志文件中。可选择在repo中包含提交链接。links -
批量记录多条内容
当用户提供多个内容项(项目符号、段落或列表)时,为每个内容项创建一条日志条目,全部追加到当日的日志文件中。
Writing logs
编写日志
- Read existing if present; append new entries without duplicating. Use the same heading/entry format as in references.
logs/YYYY-MM-DD.md - If the file does not exist, create it with a short date heading and then the new entries.
- 若存在已有的文件,读取该文件;追加新条目时避免重复。使用与参考文档中相同的标题/条目格式。
logs/YYYY-MM-DD.md - 若文件不存在,创建文件并添加简短的日期标题,然后写入新条目。
Generating post ideas and drafts
生成发帖灵感与草稿
- When the user asks for "post ideas", "drafts", "standup from my logs", or "turn my log into posts":
- Resolve base path. List available log files (e.g. under ) and show a short summary: "You have logs for [list dates]. Use all, a date range, or only certain entry types (e.g. shipped + discovered)? Default: today + last 2 days if you don't specify." Only after the user confirms or accepts the default, proceed.
logs/*.md - Read the content from the chosen file(s). Aggregate the entry contents (and optional project name) into a single text block.
logs/YYYY-MM-DD.md - Use the content philosophy and platform rules in references/prompts-and-platforms.md to generate. Each output format uses a distinct style per that reference. Produce:
- One draft per format (LinkedIn, X, Reddit, Standup), or
- A single "post ideas" section with 2–3 bullet ideas and then one draft per format if the user wants full drafts.
- Write output under :
posts/- Either one file per day: containing all formats (LinkedIn, X, Reddit, Standup) with clear headings, or
posts/YYYY-MM-DD.md - One file per platform per day: ,
posts/YYYY-MM-DD-linkedin.md,posts/YYYY-MM-DD-twitter.md,posts/YYYY-MM-DD-reddit.md.posts/YYYY-MM-DD-standup.md
- Either one file per day:
- Prefer the single-file-per-day format unless the user asks for separate files per platform.
- Resolve base path. List available log files (e.g. under
- 当用户请求“发帖灵感”、“草稿”、“从日志生成站会内容”或“将日志转为帖子”时:
- 确定基础路径。列出可用的日志文件(例如)并显示简短摘要:“你拥有以下日期的日志:[日期列表]。是否使用全部日志、指定日期范围或仅特定类型的条目(例如shipped + discovered)?默认:若未指定,使用今日及过去2天的日志。” 仅在用户确认或接受默认选项后,再继续操作。
logs/*.md - 读取所选文件的内容。将条目内容(及可选的项目名称)聚合为单个文本块。
logs/YYYY-MM-DD.md - 使用references/prompts-and-platforms.md中的内容准则和平台规则生成内容。每种输出格式采用参考文档中对应的独特风格。生成:
- 每种格式(LinkedIn、X、Reddit、站会)各一份草稿,或
- 若用户需要完整草稿,先输出一个“发帖灵感”部分(包含2-3个要点),再生成每种格式的草稿。
- 将输出写入目录下:
posts/- 每日一个文件:,包含所有格式的内容(LinkedIn、X、Reddit、站会),并配有清晰的标题,或
posts/YYYY-MM-DD.md - 每日每个平台一个文件:、
posts/YYYY-MM-DD-linkedin.md、posts/YYYY-MM-DD-twitter.md、posts/YYYY-MM-DD-reddit.md。posts/YYYY-MM-DD-standup.md
- 每日一个文件:
- 除非用户要求按平台拆分文件,否则优先使用每日单个文件的格式。
- 确定基础路径。列出可用的日志文件(例如
Checklist for "log this" requests
“记录内容”请求检查清单
- Resolve base path (ask or infer from / existing
.log-to-post).logs/ - Ensure and
logs/exist.posts/ - Parse input (text / image / git) into entries with type and content.
- Append to using the reference format.
logs/YYYY-MM-DD.md
- 确定基础路径(询问或从/已存在的
.log-to-post目录推断)。logs/ - 确保和
logs/目录存在。posts/ - 将输入内容(文本/图片/Git记录)解析为包含类型和内容的条目。
- 使用参考格式追加到文件中。
logs/YYYY-MM-DD.md
Checklist for "generate posts" requests
“生成帖子”请求检查清单
- Resolve base path. Prompt user on which logs/dates/themes (or use default: today + last 2 days); then read and aggregate only the chosen set.
- Read and aggregate log content from the chosen file(s).
- Generate drafts using references/prompts-and-platforms.md (one per format: LinkedIn, X, Reddit, Standup).
- Write to (or per-platform files if requested).
posts/YYYY-MM-DD.md
- 确定基础路径。提示用户选择日志/日期/主题(或使用默认:今日及过去2天);然后读取并聚合所选内容。
- 读取并聚合所选文件中的日志内容。
- 使用references/prompts-and-platforms.md生成草稿(每种格式各一份:LinkedIn、X、Reddit、站会)。
- 写入文件(或按用户要求写入各平台独立文件)。
posts/YYYY-MM-DD.md
Additional resources
额外资源
- references/log-format.md — Log entry format and fields. Read when collecting or writing log entries (any input type or appending to logs).
- references/prompts-and-platforms.md — Content philosophy and platform rules. Read when generating post ideas or drafts (LinkedIn, X, Reddit, Standup).
- references/log-format.md — 日志条目格式与字段。收集或编写日志条目(任何输入类型或追加到日志文件时)需参考此文档。
- references/prompts-and-platforms.md — 内容准则与平台规则。生成发帖灵感或草稿(LinkedIn、X、Reddit、站会)需参考此文档。