Gnu/Linux OS

下面是使用Emacs的artist-mode绘制出的ASCII格式图形。看了这个图形之后,我想你肯定会说:“简直就是shit!”。

:-)

+---------------------------------------------------------+ 
|                Applications                             |     
|    +----------------------------------------------------+     
|    |           System Libraries                         |     
+----+----------------------------------------------------+     
|                System Call Interface                    |     
+------------------------+--------------+-----------------+       +---------+
|          VFS           |   Socket     |                 |       |         |
+------------------------+--------------+    Scheduler    +-------+   CPU   |
|       File Systems     |   TCP/UDP    |                 |       |         |
+------------------------+--------------+-----------------+       +----+----+
|       Volume Manager   |   IP         |    Virtual      |            |  
+------------------------+--------------+    Memory       |            |
| Block Device Interface |   Ethernet   |                 |            |
+------------------------+--------------+-----------------+       +----+----+
|                       Device Driver                     |       |  DRAM   |
+-----------------------------+---------------------------+       +---------+
                              |            
                              |            
                      +-------+--------+          
                      |   I/O Bridge   |          
                      +-------+--------+          
                              |                            
                              |                  
      ------+-----------------+--------------------+------  
            |                                      |     
  +---------+--------+                  +----------+---------+
  |  I/O Controller  |                  | Network Controller |
  +-+-------+------+-+                  +----+----------+----+
    |       |      |                         |          |
+---+---+   |  +---+---+                +----+----+ +---+----+
| Disk  |  ... | Swap  |                |  Port   | |  Port  |
+-------+      +-------+                +---------+ +--------+


上面的ASCII图形只是开始,下面结合ditaa工具,快速地做出相应的图片。ditaa工具是Stathis Sideris使用Java开发的一款工具,全称是(DIagrams Through Ascii)。


下面的图象是在Emacs的Org-mode下绘制出来的,具体代码为:

#+BEGIN_SRC ditaa :file images/linux-os.png
+---------------------------------------------------------+ 
|                Applications                             |     
|    +----------------------------------------------------+     
|    |           System Libraries                         |     
+----+----------------------------------------------------+     
|                System Call Interface                    |     
+------------------------+--------------+-----------------+       +---------+
|          VFS           |   Socket     |                 |       |         |
+------------------------+--------------+    Scheduler    +-------+   CPU   |
|       File Systems     |   TCP/UDP    |                 |       |         |
+------------------------+--------------+-----------------+       +----+----+
|       Volume Manager   |   IP         |    Virtual      |            |  
+------------------------+--------------+    Memory       |            |
| Block Device Interface |   Ethernet   |                 |            |
+------------------------+--------------+-----------------+       +----+----+
|                       Device Driver                     |       |  DRAM   |
+-----------------------------+---------------------------+       +---------+
                              |            
                              |            
                      +-------+--------+          
                      |   I/O Bridge   |          
                      +-------+--------+          
                              |                            
                              |                  
      ------+-----------------+--------------------+------  
            |                                      |     
  +---------+--------+                  +----------+---------+
  |  I/O Controller  |                  | Network Controller |
  +-+-------+------+-+                  +----+----------+----+
    |       |      |                         |          |
+---+---+   |  +---+---+                +----+----+ +---+----+
| Disk  |  ... | Swap  |                |  Port   | |  Port  |
+-------+      +-------+                +---------+ +--------+
#+END_SRC

在BEGIN_SRC与END_SRC之间的任何位置,按组合键“C-c C-c”即可完成编译,输出的结果为:

wKiom1T61hPwBloGAAGM7GzbQeI990.jpg

还可以添加一些命令行选项:如

ditaa :file images/linux-os.png :cmdline -E

得到的结果如下:

wKioL1UBDLvDaWdWAAFwDyWTHG4777.jpg


怎么样?是不是有些zhuangbility!

:-)

你可能感兴趣的:(linux,gnu)