Skip to main content

Converts vimwiki files to org mode

Project description

VimWiki To Org Mode 🦄

Migration to Org mode, made a bit easier

workflow

Install or update

pip install -U vimwiki-to-org

What it does:

Converts this:

= Header1 =
== Header2 ==
=== Header3 ===
==== Heading4 ====
===== Heading5 =====
====== Heading6 ======

*bold text*
_italic text_

[[wiki_link]]
[[some wiki|description for some wiki file]]

* bullet list item 1
* bullet list item 2
    1) numbered list item 1
    2) numbered list item 2

{{{python
def greet(s):
    print("Hello, " + s)
}}}

`echo "42"`

| a table |  |
|---------|--|
|         |  |

{{file:./some-image.png}}

To this:

* Header1 
** Header2 
*** Header3 
**** Heading4 
***** Heading5 
****** Heading6 

*bold text*
/italic text/

[[file:wiki_link.org]]
[[some wiki.org][description for some wiki file]]

- bullet list item 1
- bullet list item 2
    1) numbered list item 1
    2) numbered list item 2

#+begin_src python
def greet(s):
    print("Hello, " + s)

#+end_src

~echo "42"~

| a table |  |
|---------|--|
|         |  |

[[file:./some-image.png]]

Usage:

Launch via CLI

vimwiki_to_org

or

python -m vimwiki_to_org

Help

vimwiki_to_org -h

usage: vimwiki_to_org [-h] [-d WIKI_PATH] [-o OUTPUT_PATH]

options:
  -h, --help            show this help message and exit
  -d WIKI_PATH, --wiki-path WIKI_PATH
                        path to vimwiki directory (optional) (default: /home/USERNAME/vimwiki/)
  -o OUTPUT_PATH, --output-path OUTPUT_PATH
                        path to output directory (optional) (default: PROJECT_DIR/converted_files/)

Goals:

  • Make it easier to migrate over existing VimWiki files to .org files
  • Have a reasonable amount .wiki file content converted to it's .org equivalent (at least 60-70%) so there's less to manually edit.

Features:

Extend for your own situation:

  • The current config should be good enough for most basic VimWiki markdown, but everyone's notes are different.
  • Configure the regex and the markdown replacements for your specific situation.

Your ~/vimwiki/ directory is safe:

  • Your .wiki files are not modified, just read.
  • Regular files are not touched (.png, etc). Those will have to be manually transferred.

Keep your linked pages:

  • Links between .wiki files are converted to link to their new .org pages.
[[SomeWikiPage]] -> [[file:SomeWikiPage.org]]

Regex is applied by priority:

  • Headers, code blocks and links get handled first before converting text emphasis markdown
  • This is to avoid accidentally converting things like:
    • underscores used in a code block to italic text: some_var_name -> some/var/name
    • file names with underscores converted to italic text: file:some_file_name.png -> file:some/file/name.png
    • etc, etc.

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

vimwiki_to_org-1.2.0.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vimwiki_to_org-1.2.0-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file vimwiki_to_org-1.2.0.tar.gz.

File metadata

  • Download URL: vimwiki_to_org-1.2.0.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.2

File hashes

Hashes for vimwiki_to_org-1.2.0.tar.gz
Algorithm Hash digest
SHA256 0f11997c295a05f7fedf9937cbd24e928c5f3cf121abbf2dce425d5206c38248
MD5 39a596d071679a7c0c651d92a509852e
BLAKE2b-256 1ecd3ba5fdb6be8658afc798d78bb14567eca4574f876489c6a77face05260da

See more details on using hashes here.

File details

Details for the file vimwiki_to_org-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: vimwiki_to_org-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.2

File hashes

Hashes for vimwiki_to_org-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 401a47e47eeae3be406585881d29a646976d6521cdc0f7044d71119ea46f30f1
MD5 88a658e61ce798f375b1e3497945761f
BLAKE2b-256 7c293e60ce86a9e30d368fef5c9ac91d75a79f5fea81927a57552066a14be780

See more details on using hashes here.

Supported by

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