Skip to main content

Convert articles from MT to Hugo

Project description

MT to Hugo Article Converter

How to try

docker-compose up

And see tmp/output/*


Requirements

  • Python3

Installation

pip3 install mt-to-hugo-article-converter

How to use

mt-to-hugo-article-converter --output-directory=/path/to/out --input-file=/path/to/your-exported-articles.txt

You can use the configuration file that YAML format.

mt-to-hugo-article-converter --config-file=/path/to/config.yml
version: "2019.10.0"
output:
  base_path: tmp/output/
  content_path_fmt: "content/posts/%Y.%m"
  static_path_fmt: "static/posts/%Y.%m"
input:
  path: tmp/example-articles.txt
  start_at: 2018/02/01 00:00:00
  stop_at: 2018/03/01 23:00:00
asset_download:
  enabled: true
  base_url: "https://cdn-ak.f.st-hatena.com"
  filter:
    - regex: 'https?://cdn-ak\.f\.st-hatena\.com'
attribute_map:
  tags:
    from:
      - TAGS
      - CATEGORY
    values:
      news:
        - info
        - お知らせ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mt-to-hugo-article-converter-0.0.5.tar.gz (25.2 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page