wx-uploader-0.4.2 is not a library.
Visit the last successful build:
wx-uploader-0.7.0
wx-uploader
A simple tool to upload markdown files to WeChat public account.
Prerequisites
Before using this tool, you need to set up the following environment variables:
Installation
Usage
Upload all markdown files in a directory
# Upload all .md files that don't have `published: true` in their frontmatter
# Upload from a specific directory
Upload a specific file
# Force upload a specific file (ignores publish status)
How it works
- The tool scans for markdown files with YAML frontmatter
- If a file doesn't have
published: truein its frontmatter, it will be uploaded - When specifying a single file, it will be uploaded regardless of its publish status
- After successful upload, the frontmatter is updated with
published: draft
Frontmatter Example
---
title: My Article Title
published: draft # or 'true' to skip upload
---
Your markdown content here...
Development
Running Tests
The project includes comprehensive unit and integration tests:
# Run all tests
# Run tests with output
# Run specific test module
Generating Documentation
The codebase includes comprehensive Rust documentation for all public items:
# Generate and open documentation
# Generate documentation without dependencies
Code Quality
This project maintains high code quality standards:
- Comprehensive Documentation: All public functions, structs, and modules include rustdoc documentation with examples
- Unit Tests: Core parsing and formatting functions have dedicated unit tests
- Integration Tests: File I/O and directory traversal functionality is thoroughly tested
- Error Handling: Proper error handling with context using the
anyhowcrate - Type Safety: Leverages Rust's type system for reliable frontmatter parsing and manipulation
Notes
- Files with
published: truewill be skipped during directory scans - Single file uploads always force upload regardless of publish status
- The tool preserves all other frontmatter fields when updating the
publishedstatus