Tools for leaving Microsoft Word behind, among other things.
Palabra is a set of scripts and resources designed to help writers move away from proprietary word processors and into plain-text workflows. These tools leverage textutil and Pandoc to convert .doc
/.docx
files into Markdown, providing more control over text and easier collaboration across platforms.
- Convert Word Documents to Markdown: Convert
.doc
or.docx
files into.md
(Markdown) format with ease. - Batch Conversion: Process multiple files in a directory using simple scripts.
- Script Collection: Includes shell scripts for renaming files by first line, adding file extensions, splitting one big file into many, and more.
- Text-Based Workflow: Once your files are in Markdown, you can use version control, text editors, or any other plain-text tools.
- Templates & Database (Work in Progress): Additional templates are planned for standard manuscript formatting, as well as a writer's database to track submissions.
- Pandoc: Install Pandoc for file conversion to and from Markdown.
- textutil (macOS): Pre-installed on macOS for converting
.doc
/.docx
to.html
.- Windows users: Alternative tools may be needed (contributions welcome!).
Clone or download this repository, then navigate into the scripts
directory (or wherever you place the scripts) from your terminal.
-
Convert
.doc
→.html
→.md
# Step 1: Convert all .doc files to .html sh convert1.sh # Step 2: Convert all .html files to Markdown sh convert2.sh
Update the extension in
convert1.sh
if you need.docx
or.rtf
. -
Batch Convert a Directory
# Convert every .doc or .docx in /path/to/dir to .md ./batch_convert.sh /path/to/dir
-
Splitting & Renaming
- split-files.md: Example commands to split a large text file into multiple files based on a marker.
- linenumber-rename.sh: Renames each file using the first line of text.
- add_txt_extension.sh: Appends
.txt
to any file lacking an extension.
- One Word Document, Many Texts: If you have a single
.docx
containing many pieces (e.g., hundreds of poems), you can first convert it to.md
or.txt
, then split it into individual files using thesplit-files.md
instructions. - Preserving Formatting: Markdown conversion captures basic text styling (headings, italics, etc.). Complex Word features (track changes, special fields) may require post-editing.
Contributions are welcome—especially for cross-platform support and new scripts. Feel free to open issues or pull requests.
This project is licensed under the MIT License.
Questions, ideas, or suggestions? Please open an issue or contribute directly via a pull request.