Convert Microsoft Word Document to Markdown

Overview

docx2md

Convert Microsoft Word Document to Markdown

docx2md

Usage

$ docx2md NewDocument.docx

Installation

$ go get github.com/mattn/docx2md

Supported Styles

  • Header
  • HyperLink
  • Indent
  • Table
  • List
  • Bold
  • Italic
  • Strike
  • Embeded Image

License

MIT

Author

Yasuhiro Matsumoto

Issues
  • bad image support

    bad image support

    Hello in my use I found that docx2md seems to have some problems for images. I am not sure if it happens only on my computer. Description of the situation: The picture only shows the top area, the rest is blank

    opened by Augists 3
  • MacOS Installation error code  missing xcrun

    MacOS Installation error code missing xcrun

    OS: MacOS Catalina

    -> go get github.com/mattn/docx2md
    # cd .; git clone https://github.com/mattn/docx2md /Users/****/go/src/github.com/mattn/docx2md
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    package github.com/mattn/docx2md: exit status 1
    
    opened by rice5 3
  • panic when the left attribute of w:ind element has negative value

    panic when the left attribute of w:ind element has negative value

    Thank you for helpful tool!

    For example, it panics if the document contains

                <w:pPr>
                    <w:ind left="-360" right="-360"/>
                </w:pPr>
    

    .

    panic: strings: negative Repeat count
    
    goroutine 1 [running]:
    strings.Repeat(0x54879c, 0x2, 0xffffffffffffffff, 0x0, 0x0)
            /usr/lib/go/src/strings/strings.go:533 +0x5a9
    main.(*file).walk(0xc0001a9cf0, 0xc0001a6de8, 0x574ac0, 0xc000106870, 0x0, 0x0)
            /home/yuki/.local/src/github.com/acomagu/pkgbuilds/docx2md/src/docx2md/main.go:219 +0xeec
    main.(*file).walk(0xc0001a9cf0, 0xc0001a7ea8, 0x574ac0, 0xc000106870, 0xc0001262e2, 0x6)
            /home/yuki/.local/src/github.com/acomagu/pkgbuilds/docx2md/src/docx2md/main.go:415 +0xa7f
    main.(*file).walk(0xc0001a9cf0, 0xc0001a9038, 0x574ac0, 0xc000106870, 0xc0001263c0, 0x203000)
            /home/yuki/.local/src/github.com/acomagu/pkgbuilds/docx2md/src/docx2md/main.go:442 +0x8b2
    main.(*file).walk(0xc0001a9cf0, 0xc00014c700, 0x574ac0, 0xc000106870, 0x12, 0xc0001306e0)
            /home/yuki/.local/src/github.com/acomagu/pkgbuilds/docx2md/src/docx2md/main.go:442 +0x8b2
    main.docx2md(0x7fffb3d88a65, 0xc, 0x0, 0x0, 0x0)
            /home/yuki/.local/src/github.com/acomagu/pkgbuilds/docx2md/src/docx2md/main.go:535 +0x6a8
    main.main()
            /home/yuki/.local/src/github.com/acomagu/pkgbuilds/docx2md/src/docx2md/main.go:553 +0x148
    

    The spec says it can be negative value.

    http://officeopenxml.com/WPindentation.php

    opened by acomagu 1
  • Update module mattn/go-runewidth to v0.0.8

    Update module mattn/go-runewidth to v0.0.8

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/mattn/go-runewidth | require | patch | v0.0.7 -> v0.0.8 |


    Release Notes

    mattn/go-runewidth

    v0.0.8

    Compare Source


    Renovate configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.

    :recycle: Rebasing: Whenever PR becomes conflicted, or if you tick the rebase/retry checkbox below.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Configure Renovate

    Configure Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    :vertical_traffic_light: To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • go.mod (gomod)

    Configuration Summary

    Based on the default config's presets, Renovate will:

    • Start dependency updates only once this onboarding PR is merged
    • Separate major versions of dependencies into individual branches/PRs
    • Do not separate patch and minor upgrades into separate PRs for the same dependency
    • Upgrade to unstable versions only if the existing version is unstable
    • Raise PRs immediately (after branch is created)
    • If semantic commits detected, use semantic commit type fix for dependencies and chore for all others
    • Keep existing branches updated even when not scheduled
    • Disable automerging feature - wait for humans to merge all PRs
    • Ignore node_modules, bower_components, vendor and various test/tests directories
    • Update existing lock files only when package.json is modified
    • Autodetect whether to pin dependencies or maintain ranges
    • Rate limit PR creation to a maximum of two per hour
    • Limit to maximum 20 open PRs at any time
    • Group known monorepo packages together
    • Use curated list of recommended non-monorepo package groupings

    :abcd: Would you like to change the way Renovate is upgrading your dependencies? Simply edit the renovate.json in this branch with your custom config and the list of Pull Requests in the "What to Expect" section below will be updated the next time Renovate runs.


    You have configured Renovate to use branch master as base branch.

    What to Expect

    It looks like your repository dependencies are already up-to-date and no Pull Requests will be necessary right away.


    :question: Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    Newsflash: Renovate has joined WhiteSource, and is now free for all use. Learn more or view updated terms and privacy policies.

    opened by renovate[bot] 0
Owner
mattn
Long-time Golang user&contributor, Google Dev Expert for Go, and author of many Go tools, Vim plugin author. Windows hacker C#/Java/C/C++
mattn
Produces a set of tags from given source. Source can be either an HTML page, Markdown document or a plain text. Supports English, Russian, Chinese, Hindi, Spanish, Arabic, Japanese, German, Hebrew, French and Korean languages.

Tagify Gets STDIN, file or HTTP address as an input and returns a list of most popular words ordered by popularity as an output. More info about what

ZoomIO 21 Jun 16, 2022
Online server tool to made markdown document.

An authenticated(basic auth with digest) docsify server for private markdown documents. Embedded docsify-mermaid as UML tool.

null 0 Oct 16, 2021
Mdlinks - Markdown cross-document links checker

mdlinks This repository provides Go package, command-line tool, and a GitHub Action that can verify cross-document links in a collection of markdown f

Artyom Pervukhin 1 Mar 19, 2022
🚩 TOC, zero configuration table of content generator for Markdown files, create table of contents from any Markdown file with ease.

toc toc TOC, table of content generator for Markdown files Table of Contents Table of Contents Usage Installation Packages Arch Linux Homebrew Docker

Yagiz Degirmenci 85 Jun 24, 2022
Markdown - Markdown converter for golang

markdown ?? Talks ?? Join ?? Youtube ❤️ Sponsor Install via nami nami install ma

TxThinking 3 Jun 2, 2022
Mdfmt - A Markdown formatter that follow the CommonMark. Like gofmt, but for Markdown

Introduction A Markdown formatter that follow the CommonMark. Like gofmt, but fo

杨英明 13 Jun 6, 2022
⚙️ Convert HTML to Markdown. Even works with entire websites and can be extended through rules.

html-to-markdown Convert HTML into Markdown with Go. It is using an HTML Parser to avoid the use of regexp as much as possible. That should prevent so

Johannes Kaufmann 366 Jun 24, 2022
Easily to convert JSON data to Markdown Table

Easily to convert JSON data to Markdown Table

蛮吉是魁拔 1 Jan 21, 2022
Convert your markdown files to PDF instantly

Will take a markdown file as input and then create a PDF file with the markdown formatting.

Arnab Sen 24 Apr 26, 2022
A targeted word list generation tool

dirtywords Inspired by gau, dirtywords builds targeted wordlists for a given domain using "dirty" knowledge from AlienVault's Open Threat Exchange, th

Tony West 67 Jun 18, 2022
Words - help with a word finder game, sketches a text-processing utility program

Shell-style text processing in Go I saw a word game where the puzzle gives you six letters. By means of a clever user interface, you construct words f

Bruce Ediger 0 Jan 1, 2022
pdf document generation library

gopdf 项目介绍 gopdf 是一个生成 PDF 文档的 Golang 库. 主要有以下的特点: 支持 Unicode 字符 (包括中文, 日语, 朝鲜语, 等等.) 文档内容的自动定位与分页, 减少用户的工作量. 支持图片插入, 支持多种图片格式, PNG, BMP, JPEG, WEBP,

quinn 90 May 11, 2022
Blackfriday: a markdown processor for Go

Blackfriday Blackfriday is a Markdown processor implemented in Go. It is paranoid about its input (so you can safely feed it user-supplied data), it i

Russ Ross 4.9k Jun 20, 2022
Upskirt markdown library bindings for Go

Goskirt Package goskirt provides Go-bindings for the excellent Sundown Markdown parser. (F/K/A Upskirt). To use goskirt, create a new Goskirt-value wi

Jukka-Pekka Kekkonen 31 Nov 12, 2021
A CLI markdown converter written in Go.

MDConv is a markdown converter written in Go. It is able to create PDF and HTML files from Markdown without using LaTeX. Instead MDConv u

null 39 May 3, 2022
A markdown renderer package for the terminal

go-term-markdown go-term-markdown is a go package implementing a Markdown renderer for the terminal. Note: Markdown being originally designed to rende

Michael Muré 241 Jun 5, 2022
A markdown parser written in Go. Easy to extend, standard(CommonMark) compliant, well structured.

goldmark A Markdown parser written in Go. Easy to extend, standards-compliant, well-structured. goldmark is compliant with CommonMark 0.29. Motivation

Yusuke Inuzuka 2.2k Jun 28, 2022
:triangular_ruler:gofmtmd formats go source code block in Markdown. detects fenced code & formats code using gofmt.

gofmtmd gofmtmd formats go source code block in Markdown. detects fenced code & formats code using gofmt. Installation $ go get github.com/po3rin/gofm

po3rin 90 Apr 3, 2022
Stylesheet-based markdown rendering for your CLI apps 💇🏻‍♀️

Glamour Write handsome command-line tools with Glamour. glamour lets you render markdown documents & templates on ANSI compatible terminals. You can c

Charm 1.2k Jun 29, 2022