Train Operation Diagram Drawing Program: ydiakun Ver 0.80
( in JAPANESE )
11 Feb 2002
SUZUKI Yasuhiro
ysuzuki@bb.mbn.or.jp
Package DOWNLOAD
Counts of file downloaded recently is 0 but this is not true. A little system problem is occuring now. The true value is not so big as 10,000 but not 0.
CVS
What is changed?
Preface
This software draws a tarin operation diagram. It displays WinDIA data file, which is common for a Japanse railway fan using MS-Windows.
From version 0.32, ydiakun can read WinDIA data file in English. Without Japanese MS-Windows, you can create WinDIA format data file and use ydiakun now.
From version 0.42, you can add and extend train run with mouse and edit arrival and departure time at a staion of trains. Though ydiakun does not have data input method from key board, it can read a CSV file. I put example CSV files. Please copy and fill in it with spread sheet software as gnumeric and so on.
I apologize my bad English. I hope you can understatnd what I want to say. If you correct thie document, I will really appreciate it.
Example
The example below is displaying two diagrams now.
Example of executing the software
Execute 'Save Image' and you can get a image file of the diagram. The file is shown below. You could print out a image file.
Image file of a train operation diagram
How to install
Make from source package
You will be able to compile the source files with GTK+ library. If your environment has at least graphic software gimp, header files of related library as GTK+ and compiler, you could make it.
First of all, you have to get the source package from a page in SourceForge site. Please put the package, ydiakun-0.80.tar.gz or ydia-0_80.tgz in an appropreate directory, for example /tmp, and execute commands as below:
% cd /tmp
% tar xzf ydiakun-0.80.tar.gz
% cd ydiakun-0.80
% ./configure
% make
% su
Password: XXXXXX <-- Enter root password
# make install
# exit <-- Go back to an ordinary user
You can run src/ydiakun before 'make install' and the English menu is shown.
Finishing installation, you will find document files and data example files in /usr/local/doc/ydiakun directory. An example of .ydiakunrc and .gtkrc also exists there.
You could edit ydiakunrc and copy it to your home directory as .ydiakunrc. Then ydiakun uses the settings in the file.
You can change menu font with editing .gtkrc file in your home directory, too. The file influences other applications using GTK+ library.
Install RPM package
If you use Linux distribution with rpm command like RedHat, Turbo, Laser5, Mandrake or Vine and so on, you can install ydiakun RPM package. Put the package file in a directory, for example /tmp, and execute commands below:
% cd /tmp
% su
Password: XXXXXX <-- Enter root password
# rpm -i ydiakun-0.80.1.i386.rpm
# exit <-- Go back to an ordinary user
If you have already installed previous version with rpm command, please replace command line option '-i' with '-F'.
How to use
Startup
On a terminal of X-Window system, please execute the command below:
% ydiakun [ 'dia file' ]&
You can put WinDIA data file names as arguments and ydiakun will show the diagram. You can execute ydiakun without any argument and specify a data file to open from the menu.
When you want to see a WinDIA file in non EUC code, which is diffrent from Shift-JIS code commonly used on Japanse MS-Windows, you have to be non root user.
You can also use .gtkrc and .ydiakunrc to change application settings.
Menu
From the menu, you can do as below:.
- File
-
- Open
- Open a WinDIA data file and show a diagram. If no diagram is shown on a window, a diagram is displayed on the window. If it is, a diagram will be shown on a new window.
ydiakun can also read a CSV file in a prescribed form.
- Save
- Save data to the same file now opened. You can not change a language of keywords in the file.
- Save As
- Save diagram displayed on the window into a file in WinDIA format. You can specify a file name and then are asked if you use English keyword. Say NO if you want to use the file with WinDIA. In order to use the file with WinDIA, You also have to convert character code from EUC to Shift-JIS with a converter, for example nkf.
- Save Image
- Save the diagram shown into a image file. You can set the file name and can specify file type with file name ext as .jpg. The available image file type depends on Imlib library installed on your machine.
- Save Setting
- You can save settings into a file. You can specify the file name in a dialog box. When ydiakun starts, it reads $HOME/.ydiakunrc.
- Close
- Close the window.
- Exit
- Close all windows of ydiakun and finish the software.
- Edit
-
- Train Info (Only from a popup menu)
- Show arrival and departure time at the nearest station to a mouse cursor of trains around the cursor. You could change time and train property. You will find more detailed explanation below.
- Add
- Add a new train. When you select this menu, a dialog box appears showing time and the nearest station to a mouse cursor. You click a left button and the train's origin station and the departure time is set and another dialog box appears on which you can set reliability and stop type of the time you set.
Then you can set train type and number on the next dialog box.
Next, set the arrival time at a next stop. You can check time and a station name on a dialog box. At last, set reliability and stop type on another dialog box.
If you set reliability as Calculated, the time you input may be changed to a new time which is after the shortest time between the stations for a train to run from the departure time.
If you hate the complement but your time table does not tell the definite time, please set Guess to the reliability.
You should execute "Extend" from a popup menu to set time of the train at other stations.
- Extend (Only from a popup menu)
- Extend a train run from its origin or destination. Firstly you have to set the departure or arrival time at a destination or origin station with mouse. A dialog box shows time and station name of a mouse cursor. Please move mouse cursor to an appropreate position and click left button of your mouse.
Then you have to set arrival or departure time at a next stop to a train's destination or origin station. Please use mouse as setting time at a terminal of a train run.
A next stop station does not have to be a next station to its
former origin or destination station. Stations between a former
origin or destination and a next stop are set as passed.
A dialog box is shown to set time reliability and stop type after
setting arrival and departure time. Default value of reliability
is Sure for the first station and Calculated for the second
station.
- Copy (Only from a popup menu)
- Copy a train to clipboard. You can choose a train to
copy on a dialog window which shows trains around your mouse
cursor when you clicked mouse right button. Not only a whole run
of the train, but a part of the run you can copy but the part must
contains an origin station or a destination station of the
train.
- Cut (Only from a popup menu)
- Cut is same as copy but the train you choose vanishes.
- Paste
- Create a new train from a clipboard. Moving mouse
cursor, a red line of the train will be displayed and time and station
of mouse cursor will be showed on a dialog.
- Delete (Only from a popup menu)
- Delete a train. You choose a train and part to delete on
a dialog showing trains around your mouse cursor.
- Undo
- You can cancel results of edition as add, extend, copy, cut,
paste, delete and train information dialog. About 50 edition could be canceled.
- View
-
- Time Line Interval
- Set time line interval less than 1 hour.
- Time Range
- You can specify start time and end time of the shown diagram. The time should be specified as 'HH:MM'. The window size will not be changed.
- Size
- You can change the window size. If you want a smaller window, you have to change the size of window manualy after specifying the new size at the dialog.
- Font
- You can specify font name. You have to choose title or diagram(station name and hour) with radio buttons on the dialog box. Font style specifies for which character set the font set is. I will show you some of character sets below:
- iso646, jisx0201
- Alphabet and number.
- jisx0208, jisx0212
- Japanese. Kana and Kanji.
- iso8859
- Latin alphabet and so on.
- Train Line Style
- You can set line dash style, color and width of train line for each train type.
If you push "Apply" button, lines of the train type will be displayed with the new setting. "Cancel" button, the dialog is closed and new settings for all train types are canceled. "OK" button, a train operation diagram is displayed with new settings for all train types.
- Help
-
- Application Info
- Version number and the authors e-mail address will be shown.
Mouse button click
When you click on a diagram window, you can do things below:
- Center Button
- Show a train information dialog. Train number, type, arrival and departure time at a station and comment about the train around a mouse cursor are shown. You will see at most 5 train information on one dialog.
- Right Button
- Show a menu.
You can choose "Train Info" from the menu and see similar dialog as clicking a center button. In this case, you can modify train type, arrival and departure time at a station and comment about the train.
You can also add and extend run of trains around a mouse cursor.
Train Information Dialog
Train infromation dialog is shown when you choose "Train Info" from a menu shown when you push a mouse right button. There you can edit train type, arrival and departure time at a station and comment of the train.
Time must be written as 'HH:MM(S)' format. A value of second is not saved into a file now.
When you want to make a train pass the station, please entre '--'(two hyphens).
When you push "EditMouse" button on the dialog box, you can edit
arrival or departure time seeing a new train line which is red and thick and time of mouse cursor on another dialog box. Please move your mouse cursor to an appropreate position and click.
Though a new red thick train line is shown after the clicking, a new time is shown on a Train Information dialog. When you push OK button on the dialog box, an old line disappears and the new line is shown in an appropreate style.
You can write a comment in multiple lines but I am not sure WinDIA can handle the data file appropreate. Please be careful.
Postscript
You can distribute the software under GNU General Public Licence(GPL). That means you can not monopoly it and its derivatives but can distribute it without any fee, of course with fee if you wished. COPYING file will tell you much more.
I thank Mr. FURUKAWA Tomoyuki, the author of WinDIA, for his great job on WinDIA and telling me about the specification of WinDIA data file. I also appreciate SourceForge's kindness to let me use their server resouce for ydiakun without any fee.
Contact the author
- Author, SUZUKI Yasuhiro
- ysuzuki@bb.mbn.or.jp
Tokyo Photo Taken by a Guy favoring of Books and Trains
- ydiakun web site
- http://ydiakun.sourceforge.net/
- WinDIA web site
- http://www.nifty.ne.jp/forum/ftrain/windia/