Remove test file
This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
# Madomeda Usage Examples
|
||||
|
||||
## Basic Usage
|
||||
|
||||
Process the current directory:
|
||||
```bash
|
||||
python madomeda.py
|
||||
```
|
||||
|
||||
## Dry Run Mode
|
||||
|
||||
Preview changes without modifying files:
|
||||
```bash
|
||||
python madomeda.py --whatif
|
||||
```
|
||||
|
||||
## Specify Directory
|
||||
|
||||
Process a specific repository:
|
||||
```bash
|
||||
python madomeda.py --dir /path/to/repo
|
||||
```
|
||||
|
||||
## Force Update
|
||||
|
||||
Re-process all files regardless of conformance:
|
||||
```bash
|
||||
python madomeda.py --force
|
||||
```
|
||||
|
||||
## Skip Confirmation
|
||||
|
||||
Automatically accept metadata discards:
|
||||
```bash
|
||||
python madomeda.py --no-confirm
|
||||
```
|
||||
|
||||
## Ignore Paths
|
||||
|
||||
Exclude specific paths from processing:
|
||||
```bash
|
||||
python madomeda.py --ignore-paths docs/archive vendor/external
|
||||
```
|
||||
|
||||
## Custom Template
|
||||
|
||||
Use a specific template:
|
||||
```bash
|
||||
python madomeda.py --template my-template
|
||||
```
|
||||
|
||||
## Example: Tag Normalization
|
||||
|
||||
**Before:**
|
||||
```yaml
|
||||
---
|
||||
Title: My Document
|
||||
Tag: Python, Machine-Learning, Data Science
|
||||
Summary: A comprehensive guide
|
||||
---
|
||||
```
|
||||
|
||||
**After (regular mode):**
|
||||
```yaml
|
||||
---
|
||||
title: My Document
|
||||
created: '2025-10-23T17:27:16+02:00'
|
||||
changed: '2025-10-23T17:27:16+02:00'
|
||||
authors:
|
||||
- John Doe
|
||||
version: 34d2d05
|
||||
tags:
|
||||
- python
|
||||
- machine_learning
|
||||
- data_science
|
||||
---
|
||||
```
|
||||
|
||||
**After (--add-only mode):**
|
||||
```yaml
|
||||
---
|
||||
title: My Document
|
||||
description: A comprehensive guide
|
||||
created: '2025-10-23T17:27:16+02:00'
|
||||
changed: '2025-10-23T17:27:16+02:00'
|
||||
authors:
|
||||
- John Doe
|
||||
version: 34d2d05
|
||||
tags:
|
||||
- python
|
||||
- machine_learning
|
||||
- data_science
|
||||
---
|
||||
```
|
||||
Note: In add-only mode, "Summary" becomes "description" (normalized), and all template fields are added.
|
||||
|
||||
## Database Inspection
|
||||
|
||||
The SQLite database (`madomeda.db`) contains:
|
||||
- File tracking
|
||||
- Frontmatter versions
|
||||
- Git commit information
|
||||
- Unique tags repository
|
||||
|
||||
Query example:
|
||||
```python
|
||||
import sqlite3
|
||||
conn = sqlite3.connect('madomeda.db')
|
||||
cursor = conn.cursor()
|
||||
cursor.execute('SELECT tag FROM tags ORDER BY tag')
|
||||
tags = [row[0] for row in cursor.fetchall()]
|
||||
print(tags)
|
||||
```
|
||||
|
||||
## Changelog
|
||||
|
||||
All changes are logged to `madomeda_changelog.txt`:
|
||||
```
|
||||
2025-10-23 17:40:36 (commit: 34d2d054afff9f679468f2d662bf9b8eb9754b82)
|
||||
sample.md - frontmatter updated
|
||||
test.md - frontmatter updated
|
||||
```
|
||||
Reference in New Issue
Block a user