Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Visualizing Emacs Org-mode heading lines using du and xdu

License

NotificationsYou must be signed in to change notification settings

novoid/org-du

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This Python 3 script parses parses a list of Org-mode files and generates output similar todu (disk usage) but with lines of Org-mode instead of kilobytes.

The purpose of this script is to use its output as the input forxdu in order to get an interactive graphical visualization:

org-du.py my_org_file.org another_org_file.org | xdu

The script accepts an arbitrary number of files (see your shell for possible length limitations).

Why

GNU/Emacs Org-mode does a great job for outlining (collapsing and expanding). However, when you want to get a brief overview on the amount of content of each heading (e.g., to locate performance optimization possibilities), you need a different tool: org-du

Installation

Get it viaGitHub or install it viapip:pip install org-du

Usage

org-du.py --help
usage: org-du.py [-h] [-v | --quiet | --version] file [file ...]org-du parses a list of Org-mode files and generatesoutput similar to "du" (disk usage) but with linesof Org-mode instead of kilobytes.positional arguments:  file           a list of file namesoptional arguments:  -h, --help     show this help message and exit  -v, --verbose  --quiet  --version      show program's version number and exitVerbose description: http://Karl-Voit.at/2017/03/27/org-du/:copyright: (c) by Karl Voit <tools@Karl-Voit.at>:license: GPL v3 or any later version:URL: https://github.com/novoid/org-du:bugreports: via github or <tools@Karl-Voit.at>:version: 2017-03-26

Example

If you applyorg-du to thisREADME.org file, you will see following visualization:

org-du.py README.org

xdu-screenshot.png

You caninteractively navigate through sub-headings using your mouse. Navigate back by clicking on the leftmost item of the visual tree. Exit withq.


Another cool usage scenario is when you invokeorg-du on one host (Windows) and visualizing is done on a different host. This can easily be accomplished by re-directing the output of the script:

Host A (Windows):

org-du.py *.org > org-du-output.txt

Then copying the fileorg-du-output.txt from host A to host B.

Host B (GNU/Linux):

xdu < org-du-output.txt

Changelog

  • <2017-03-26 Sun>: first version on GitHub and pip

Similar Projects

How to Thank Me

I’m glad you like my tools. If you want to support me:

  • Send old-fashionedpostcard per snailmail - I love personal feedback!
  • Send feature wishes or improvements as an issue on GitHub
  • Create issues on GitHub for bugs
  • Contribute merge requests for bug fixes
  • Check out my other coolprojects on GitHub

Local Variables

About

Visualizing Emacs Org-mode heading lines using du and xdu

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp