Skip to content

Convert Org-mode headlines and their contents into beautiful visual cards.

Notifications You must be signed in to change notification settings

yibie/org-headline-card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

中文版使用说明

Org Headline Card

Convert Org-mode headlines and their contents into beautiful visual cards.

Features

  • Convert Org headlines into visual cards
  • Support Org markup syntax (bold, italic, links, etc.)
  • Multiple pre-designed themes:
    • Modern Chinese style (chinese-modern)
    • Ink painting style (chinese-ink)
    • Traditional screen style (chinese-screen)
    • Light theme (light)
    • Dark theme (dark)
    • Warm theme (warm)
  • Adaptive content width
  • Support custom themes

DEMO

./images/figure1.png

./images/figure2.png

Installation

Example

(use-package org-headline-card
  :straight (org-headline-card :type git
                               :host github
                               :repo "yibie/org-headline-card"))

(setq org-headline-card-directory "~/card/") ;; set output path
(setq plantuml-default-exec-mode 'jar)
(setq plantuml-jar-path "~/Documents/emacs/package/plantuml.jar") ;; to replace your plantuml.jar path with it. 

Basic Usage

  1. Move cursor to any Org headline
  2. Execute M-x org-headline-card-at-point
  3. Generated card images will be saved in ~/.emacs.d/headline-cards/

Theme

Built-in Themes

Six carefully designed themes are available:

chinese-modern
Modern Chinese style, ideal for general documentation
chinese-ink
Ink painting style, perfect for poetry and prose
chinese-screen
Traditional screen style, suitable for classical texts
light
Light theme, great for daily use
dark
Dark theme, optimal for night mode
warm
Warm theme, comfortable for extended reading

Switch theme:

Use `M-x org-headline-card-set-theme` to switch theme

You can also add common themes to your emacs configuration file, for example:

(org-headline-card-set-theme 'chinese-ink)

Custom Themes

Adjust Base Parameters

(setq org-headline-card-base-theme
      '((dpi . "300")                     ; Image resolution
        (padding . "40")                  ; Padding
        (roundCorner . "40")             ; Corner radius
        (titleFontSize . "32")           ; Title font size
        (contentFontSize . "26")))       ; Content font size

Create Personal Theme

;; Add a light purple theme
(add-to-list 'org-headline-card-themes
             '(purple-light . ((defaultFontName . "Microsoft YaHei")
                              (defaultFontSize . "16")
                              (backgroundColor . "#F8F5FF")
                              (rectangleBorderColor . "#E6E0F3")
                              (rectangleFontColor . "#2C2C2C")
                              (rectangleBackgroundColor . "#FDFAFF"))))

Dependencies

  • Emacs 27.1+
  • Org-mode 9.4+
  • Java Runtime Environment
  • PlantUML

License

GPL-3.0 or later

Contributing

Issues and Pull Requests are welcome!

About

Convert Org-mode headlines and their contents into beautiful visual cards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published