Skip to content

Releases: Karthikeya-Akhandam/codetodocx

v1.1.0

16 Nov 09:31
bc5a8c3

Choose a tag to compare

πŸŽ‰ Major Release: Fixed Critical Issues & Enhanced Functionality

πŸ› Critical Fixes

License Error Fixed

  • Replaced proprietary unioffice library (required commercial license) with free open-source go-docx library
    (AGPL-3.0)
  • The tool now works without any license errors

First-Time Export Bug Fixed

  • Previous behavior: On first run, only exported changed files, missing the entire existing codebase
  • New behavior: First-time export includes ALL git-tracked files, subsequent runs export only changed files
  • This ensures you get the complete codebase on initial export

Other Bug Fixes

  • Fixed invalid Go version in go.mod (1.24.4 β†’ 1.24)
  • Fixed divide-by-zero panic when processing empty files

✨ New Features

Smart Export Modes

  • πŸ†• First-time export: Automatically exports all git-tracked files
  • πŸ”„ Incremental export: Exports only modified/added/untracked files
  • πŸ“ Non-git folders: Exports entire project directory

New CLI Flags

  • -full - Force export of all files (even on subsequent runs)
  • -changed-only - Force export of only changed files (even on first run)
  • -help - Show usage information with examples

Enhanced Formatting

  • πŸ”’ Line numbers added to all code
  • πŸ“ Full file paths shown (not just filenames)
  • βž– Horizontal separators between files
  • πŸ“ Improved font sizing (16pt titles, 14pt headings, 10pt code)
  • πŸ“ Better spacing and visual structure

πŸ“ Documentation Updates

  • Updated README.md with new features and usage examples
  • Added CLAUDE.md for future development guidance
  • Documented all CLI flags and export modes

πŸ”§ Technical Changes

New Functions

  • getAllGitTrackedFiles() - Get all git-tracked files using git ls-files
  • ExportProjectWithOptions() - Advanced API with manual export control

API Changes

  • ExportProject() maintains backward compatibility with smart defaults
  • Document generation now always creates fresh files (no longer appends)

πŸ“Š Files Changed

  • 6 files modified
  • 353 lines added, 71 lines removed

πŸš€ Upgrade Notes

No breaking changes for existing users. The ExportProject() function maintains the same signature with improved
behavior.


CodeTodox v1.0.0 - Smart Code Export to Word Documents

07 Sep 20:35

Choose a tag to compare

CodeTodox v1.0.0 - Smart Code Export to Word Documents

07 Sep 20:18

Choose a tag to compare

CodeTodox v1.0.0 - Smart Code Export to Word Documents

What is CodeTodox?

CodeTodox is a smart Go package that automatically exports your code to Microsoft Word documents. It intelligently detects if you're in a git repository and exports only changed files, or exports the entire project if it's not a git repository.

✨ Key Features

  • Smart Detection: Automatically detects git repositories and exports only changed files
  • Word Document Export: Creates professional Word documents with your code
  • Incremental Updates: Appends to existing documents instead of overwriting
  • Git Integration: Exports files with git status M (modified), A (added), or U (untracked)
  • Intelligent File Filtering: Automatically skips binary files and detects text files
  • Bold Headings: File names appear as bold headings in the document

πŸš€ Quick Start

# Install the package
go get github.com/Karthikeya-Akhandam/codetodox

# Use it in your code
package main

import (
    "fmt"
    "github.com/Karthikeya-Akhandam/codetodox"
)

func main() {
    // One function call - automatically does the smart thing!
    err := codetodox.ExportProject("./myproject", "mycode.docx")
    if err != nil {
        fmt.Println("Error:", err)
    }
}

🎯 How It Works

The ExportProject() function is intelligent and automatically:

  1. Git Repository: Exports only changed files (M/A/U status)
  2. Regular Folder: Exports entire project
  3. Existing Document: Appends to existing Word document
  4. New Document: Creates fresh Word document

οΏ½οΏ½ What's Included

  • βœ… Smart git integration for changed files only
  • βœ… Automatic binary file detection and filtering
  • βœ… Professional Word document formatting
  • βœ… Incremental document updates
  • βœ… Simple one-function API
  • βœ… CLI example included
  • βœ… Comprehensive documentation

οΏ½οΏ½ Requirements

  • Go 1.24.4 or later
  • Git (optional, for git integration)
  • Microsoft Word or compatible software to view output

πŸ“– Documentation

Check out the README.md for detailed usage instructions and examples.

🎊 Perfect For

  • Code documentation and sharing
  • Project code reviews
  • Creating readable code backups
  • Sharing code with non-technical stakeholders
  • Generating professional code reports

CodeTodox - Because sometimes you need your code in a Word document! ��✨

Install now: go get github.com/Karthikeya-Akhandam/codetodox

Full Changelog: https://github.com/Karthikeya-Akhandam/codetodocx/commits/v1.0.0