Sort by - committed date
-
CLI/Template#CLI #Templates ❯ scraps template This command generates scrap files from Markdown templates located in the /templates directory. Commands List Templates ❯ scraps template list Lists all available templates in the /templates directory. Example output: daily_note book meeting project Generate Scrap from Template ❯ scraps template generate <TEMPLATE_NAME> [OPTIONS] Generates a scrap file from the specified template. Examples # List available templates ❯ scraps template list # Generate from template with metadata-specified title ❯ scraps template generate daily_note # Generate with command-line title ❯ scraps template generate meeting -t "Weekly Standup" # Generate with environment variables ❯ TITLE="My Book Review" scraps template generate book References Template features and syntax: Templates Template samples: Sample templates
-
CLI/Tag#CLI ❯ scraps tag This command lists all tags found in your Scraps content, helping you understand the tag distribution across your knowledge base. Examples # List all tags ❯ scraps tag # List tags from specific directory ❯ scraps tag --path /path/to/project
-
What is Scraps?
-
Sample templates#Templates This document provides practical template samples that you can use immediately. Each sample includes detailed explanations and complete workflow examples. Daily Note Creates a daily note with today’s date as the title. This template utilizes Tera’s standard now() function, date filter, and Scraps’ custom timezone variable. Template file: /templates/daily_note.md +++ title = "{{ now() | date(timezone=timezone) }}" +++ # Daily Notes ## Today's Tasks - [ ] Usage: scraps template generate daily_note This generates a scrap with the current date as title (e.g., “2024-01-15”). Arguments by Environment Variables Using the get_env() function, you can write templates that customize arguments at the time of CLI execution. Template file: /templates/book.md +++ title = "[Book] {{ get_env(name="TITLE", default="") }}" +++  }}) Usage: TITLE="Test-Driven Development By Example" COVER="https://m.media-amazon.com/images/I/71I1GcjT-IL._SY522_.jpg" scraps template generate book
-
Feature/Templates#Templates Generate scrap files from predefined Markdown templates for efficient content creation. Basic Usage Create template files in /templates directory Run generate scrap on command-line Template Syntax Templates use Tera template engine with TOML metadata: +++ title = "{{ now() | date(timezone=timezone) }}" +++ # Content goes here Available Variables timezone - Access Config.toml timezone setting All Tera built-in functions Examples See Sample templates for ready-to-use templates. For CLI commands, see Template.
-
README File ProcessingIn Scraps, the scraps/README.md file is automatically converted to HTML and included in the static site’s top page ( public/index.html ). For Markdown syntax, please refer to Markdown Syntax. Limitations When using autolink syntax in scraps/README.md, the OGP card described in Autolink will not be displayed. URLs will be displayed as normal links. In: <https://example.com> Out: https://example.com
-
Context link#Internal Link #Markdown Syntax In cases where the same term exists in different contexts and Scrap titles would overlap, you can use the context feature by separating them with folders. For example: ❯ tree scraps scraps ├── DDD │ └── Service.md └── Kubernetes └── Service.md Links to Scrap with different contexts can be specified like [[DDD/Service]], [[Kubernetes/Service]]. You can also combine them with Alias link such as [[Kubernetes/Service|Kubernetes Service]]. The context is also displayed on the Scrap detail page in the static site. Not Recommended Scraps aims for simple knowledge management, so overuse of folders should be avoided. Use folders (Context) only in cases such as: When duplicate Scrap titles occur across different contexts When a Scrap has a strong association with a specific context
-
Tag link#Internal Link #Markdown Syntax If there is no scrap with the specified title, such as #Markdown Syntax, it becomes a tag. Tags are displayed on the index page. Each tag links to a page that lists all scraps using that tag.
-
Alias link#Internal Link #Markdown Syntax Internal links allow you to use different display text as aliases. Writing [[Markdown Syntax|here]] creates a link that displays as here but links to the “Markdown Syntax” page.
-
Normal link#Markdown Syntax #Internal Link Specifying the name of the markdown file with a notation such as [[Link]] will generate a wiki-like internal link. For example, if you have the following set of files. ❯ tree scraps scraps ├── Overview.md └── Usage.md Fill in the file name in the scraps directory in Overview.md as follows to generate the link. See [[Usage]] for detail.