Code Monkey home page Code Monkey logo

markup's Introduction

MarkUP

Batch-convert Markdown and HTML files.

Before you begin

  1. Download the newest MarkUP version. See Download MarkUP.
  2. Unzip MarkUP.

Usage

  1. In a terminal app, run: markup <source> <conversion_type> --output <output_dir>
    Where:
    • <source> (required) is the file or directory that contains files that you want to convert.
    • <conversion_type> (required) is one of the following:
      • md_dita - converts Markdown to DITA
      • html_dita - converts HTML to DITA
      • md_html - converts Markdown to HTML
      • html_md - converts HTML to Markdown
    • --output or -out (optional) precedes the directory where you want to save the converted files.
      TIP: By default the output directory is the same as the input directory.
  2. If needed, accept any security prompt. For more information, see Accepting macOS Security Prompts or Accepting Windows Security Prompts.

Examples

The following converts every Markdown file to DITA in the Downloads directory.

MarkUP "/Users/user_name/Downloads" md_dita

The following coverts the README.html file to DITA in the Desktop directory.

MarkUP "/Users/user_name/Desktop/README.html" html_dita

The following converts every Markdown file from the Downloads directory to HTML and saves the HTML files to the Destkop directory.

MarkUP "/Users/user_name/Downloads" md_html -out "/Users/user_name/Desktop/"

markup's People

Contributors

dependabot[bot] avatar rafalkaron avatar

Stargazers

 avatar

Watchers

 avatar

markup's Issues

Issues when trying to convert html to md

Hello, Rafal.

Thanks a lot for your code. It will be very helpful on my workflow to convert html files (old Onenote exports) into markdow.

For now, I could not make it work:

  • download the mac version.
  • unzip the file at Downloads
  • run ./markup "20110114_01.00 - Análise Estratégica - Meta Processo.html" html_md in terminal from Downloads

Result
Traceback (most recent call last):
File "main.py", line 55, in
File "main.py", line 49, in main
File "MarkUP/convert.py", line 131, in html_md
File "MarkUP/convert.py", line 96, in convert_file
File "MarkUP/files.py", line 31, in save_str_as_file
OSError: [Errno 30] Read-only file system: '/20110114_01.00 - Análise Estratégica - Meta Processo.md'
[40098] Failed to execute script main

Expected result:
20110114_01.00 - Análise Estratégica - Meta Processo.md file created.

Could you please help me out?

Thanks again

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.