Summary of the invention
Technical matters to be solved by this invention provides a kind of file display packing of UNIX/LINUX character terminal, with so that the UNIX/LINUX character terminal has better applicability at file aspect checking for the user.
Another object of the present invention provides a kind of document display system of UNIX/LINUX character terminal, is used to guarantee the application and the enforcement of said method.
In order to solve the problems of the technologies described above, the invention discloses a kind of file display packing of UNIX/LINUX character terminal, comprising:
Document files is resolved, generate the index information of described document files, described index information comprises the corresponding relation between heading message and heading message and the content;
Show described heading message;
The corresponding contents that shows described document files according to the heading message of user's selection.
Preferably, before the document analysis step, also comprise:
Nondocument is converted to document files.
Preferably, described switch process comprises:
Form in the described nondocument is converted to character list;
And/or, remove the picture file in the described nondocument.
Preferably, generate the index information of document files by following steps:
If described document files has corresponding index information, then directly obtain this index information.
Preferably, described method also comprises:
Instruction according to the user is carried out front/rear page turn over operation to described document files.
Preferably, described method also comprises:
Read the content of certain page according to content displayed, and store buffer zone into.
Preferably, described index information is a multiple index information, and the step of described displaying heading message comprises:
Show other heading message of the first order;
Show other heading message of next stage according to the heading message that the user selects.
The embodiment of the invention also discloses a kind of document display apparatus of UNIX/LINUX character terminal, comprising:
Resolution unit: be used for document files is resolved, generate the index information of described document files, described index information comprises the corresponding relation between heading message and heading message and the content;
Display unit: be used to show described heading message;
Display unit: the corresponding contents that is used for showing described document files according to the heading message that the user selects.
Preferably, described device also comprises:
Converting unit: be used for nondocument is converted to document files.
Preferably, described converting unit comprises:
Form conversion subelement: be used for the form of described nondocument is converted to character list;
And/or figure is removed subelement: the picture file that is used for removing described nondocument.
Preferably, described resolution unit also comprises:
Obtain subelement: be used for directly obtaining the existing index information of described document files, and transfer to resolution unit.
Preferably, described device also comprises:
Operating unit: be used for described document files being carried out front/rear page turn over operation according to user's instruction.
Preferably, described device also comprises:
Buffer cell: be used for reading the content of certain page, and store buffer zone into according to content displayed.
Preferably, described index information is a multiple index information, and described display unit comprises:
First shows subelement: be used to show other heading message of the first order;
Second shows subelement: the heading message that is used for selecting according to the user is showed other heading message of next stage.
Compared with prior art, the embodiment of the invention has the following advantages:
At first, the embodiment of the invention generates the index information of described file by file is resolved, and when user's viewing files, can obtain the displaying of corresponding contents by directly choosing required heading message.Thereby need not to grasp numerous VI orders, also can not enter editing mode owing to the operation of VI order, can not produce the possibility to the source document maloperation, the user is simple to operate, and is safe;
Secondly, the embodiment of the invention can once be showed a plurality of files by the displaying of heading message is provided, and searches simple;
Moreover the embodiment of the invention is by reading the operation of buffer zone in advance, can fastopen, and file activity is had greatly improve;
At last, the embodiment of the invention is for the service provider, and technology realizes simple, does not have special secret algorithm, and cost of development is low.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
One of core idea of the embodiment of the invention is, under the UNIX/LINUX character terminal, generate the index information of document files, the displaying of heading message is provided to the user, obtain the corresponding contents of document files according to user's selection, so that the content that the user is simple, safety obtains required file.
With reference to figure 1, show the process flow diagram of file display packing of a kind of UNIX/LINUX character terminal of the embodiment of the invention, specifically may further comprise the steps:
Step 101, document files is resolved, generate the index information of described document files, described index information comprises the corresponding relation between heading message and heading message and the content;
Step 102, show described heading message;
Step 103, the heading message of selecting according to the user show the corresponding contents of described document files.
Preferably, further comprising the steps of before the document analysis step: that nondocument is converted to document files.
Most of file of the prior art is not a document file format, as html format, DBF form etc., because the limitation of UNIX/LINUX character terminal for the file that is not document file format, need be carried out format conversion.The method of described file layout conversion can adopt any conversion method of the prior art, for example, imports the content of nondocument form based on document file format; Perhaps, directly the extension name of nondocument is changed into the extension name (as .doc is directly changed to .txt) of document files; Perhaps, use software to change (as the READBOOK tool software) etc., the present invention does not limit described conversion method, those skilled in the art as required or experience select for use and get final product.
Preferably, described nondocument is converted to document files after, can also according to the line width that presets and row is high carry out paging again or arrangement, in order to when showing, to offer the friendly interface that meets user's request to content corresponding.
Preferably, in described transfer process, for the form in the nondocument, can be converted into character list, for example, with " | " and "+", the col width that meets former form, the character list that row is high formed in character such as "-" document.A kind of character representation intention as shown in Figure 2.And, for the picture file in the nondocument, in being converted to the process of document files, owing to general UNIX/LINUX character terminal does not show, so should remove.Those skilled in the art can also set up other various transformation rules as required on their own, for example, the video file in the removal nondocument, audio file etc., the present invention does not need this to limit.
If document files has had corresponding index information, then directly obtain this index information, with the index information of this index information as the document file; If document files does not have corresponding index information, perhaps, there are inconsistent situation in this index information and file, then document files are resolved, and generate the index information of described document files.
Specifically, the process of described generation index information is: by the heading message in the analytical documentation file, and set up corresponding relation between the content of heading message and document files.For example, suppose that the pairing page number of title " preface " is 4, then index information is a preface---the 4th page; Perhaps, suppose that the pairing page number of title " preface " is 22, capable number is 20, and then index information is a preface---the 22nd page, and the 20th page.Described heading message obtains after can being scanned byte by the UNIX/LINUX character terminal.For example, by scanning certain document files, the heading message that obtains file is " preface ", " basic theory ", " specific implementation " and " case detailed annotation " etc.Certainly, described heading message also can be the initial speech of paragraph, perhaps, keyword etc., it all is feasible that those skilled in the art are provided with any heading message, the present invention does not need this to limit.
Preferably, described index information can also comprise page setup information, for example, it is 80 bytes that pagewidth is set, and page height is 22 row, document Time Created, the index upgrade time, and document size etc., those skilled in the art as required or any setting of experience all be feasible, the present invention does not need this to limit.
The user selects for a plurality of files for convenience, in practice, can pass through the menu displaying heading message, described menu can adopt any method of the prior art to generate by those skilled in the art, for example, write editmenu with shell, in programming process, menu-driven interface is handled as two-dimentional form, the content of drop-down menu and the subroutine title called are left in respectively in these two bivariate tables, by reading of his-and-hers watches, realized that the control cursor moves, the purpose of choice menus content and call subroutine.Certainly, it also is feasible that those skilled in the art adopt other menu generating method, and the present invention does not limit this.
Preferably, described index information can comprise multiple index information, in this case, described heading message can comprise the heading message of all document files, can also comprise a plurality of heading messages in the single document files, in this case, thestep 102 of described displaying heading message can comprise following substep:
Substep B1, other heading message of the displaying first order;
Substep B2, the heading message of selecting according to the user are showed other heading message of next stage.
In practice, described substep B2 can carry out according to the actual conditions circulation.
For making those skilled in the art understand the present invention better, below by way of example the embodiment of the invention is elaborated.
For example: one, preparation process:
By a plurality of document files are resolved, the heading message that generates a plurality of files is:
1, this collection (The Hound of Baskervilles) of detecting of Fu Er evil spirit;
2, this collection of detecting of Fu Er evil spirit (four signatures);
3, this collection of detecting (research of blood word) of Fu Er evil spirit;
4, Swordman;
…
Also comprise heading message in the described index information " 2, this collection of detecting of Fu Er evil spirit (four sign) ":
One: the research of deduction;
Two: the statement of merit;
Three: seek answer;
Four: bareheaded people's story;
…
Corresponding relation between described heading message and the content is:
One: the research of deduction--------------the 4th page, eighth row;
Two: the statement of merit----------------the 122nd page, the 20th row;
Three: seek answer------------------the 304th page, the 12nd row;
Four: bareheaded people's story--------------the 514th page, the 6th row;
Five: the tragic incident of cherry natural pond villa------------the 646th page, the 16th row;
Six: Holmes judges----------the 871st page, the 14th goes;
Seven: the interlude of wooden barrel----------------the 999th page, the 22nd row;
…
Two, step display:
Show other heading message of the first order, as shown in Figure 3;
The user selects " 2, this collection of detecting of Fu Er evil spirit (four signatures) " in Fig. 3, other heading message of displaying next stage, as shown in Figure 4;
The user selects " seven: the interlude of wooden barrel " in Fig. 4, show the 999th page, the content of the 22nd row, and content displayed is as shown in Figure 5.
Preferably, present embodiment can also comprise step: the instruction according to the user is carried out front/rear page turn over operation to described document files.For example, after the user obtains above-mentioned " interlude of wooden barrel " content shows, send the instruction of downward page turning, promptly can show the content of one page down by " PAGEDOWN " key, " nextpage (N) " or with other mode of operation.
In the prior art, because the restriction (being generally 9600BPS) of the transfer rate of UNIX/LINUX character terminal, the file processing velocity ratio is slower.In order to address this problem, present embodiment can also comprise step: read the content of certain page according to content displayed, and store buffer zone into.The size of described reading of content can by those skilled in the art as required or experience preset, for example, read the content of 3 pages.In practice, can read in the content of the page up that shows current page and following one page in advance in buffer zone.
Suppose to prolong and use example, use present embodiment, when showing " interlude of wooden barrel " first page, then read in second page content in advance, after reading second page content is put into buffer zone.When the user by " during nextpage (N), direct second page content in the display buffer then in procedure for displaying, continues to read in advance the 3rd page content, by that analogy.In this case, the demonstration of file can not be subjected to the restriction of the transfer rate of UNIX/LINUX character terminal, the display efficiency height, and user experience is good.
In sum, the embodiment of the invention simple to operate, the general user can both grasp; And file is to open with read-only form, can be owing to maloperation causes destruction to source document; Moreover the present invention can once obtain the index information of a plurality of files, and the displaying of a plurality of files can be provided to the user; In addition, index information of the present invention and content information committed memory are minimum, can not influence the normal operation of system fully.
With reference to figure 6, show the structural drawing of the document display apparatus embodiment of a kind of UNIX/LINUX character terminal of the present invention, specifically comprise with lower unit:
Resolution unit 601: be used for document files is resolved, generate the index information of described document files, described index information comprises the corresponding relation between heading message and heading message and the content;
Display unit 602: be used to show described heading message;
Display unit 603: the corresponding contents that is used for showing described document files according to the heading message that the user selects.
Preferably, described device also comprises:
Converting unit: be used for nondocument is converted to document files.
Preferably, described converting unit comprises:
Form conversion subelement: be used for the form of described nondocument is converted to character list;
And/or figure is removed subelement: the picture file that is used for removing described nondocument.
Preferably, described index information is a heading message.
Preferably, described resolution unit also comprises:
Obtain subelement: be used for directly obtaining the existing index information of described document files, and transfer to resolution unit.
Preferably, described device also comprises:
Operating unit: be used for described document files being carried out front/rear page turn over operation according to user's instruction.
Preferably, described device also comprises:
Buffer cell: be used for reading the content of certain page, and store buffer zone into according to content displayed.
Preferably, described index information is a multiple index information, and described display unit comprises:
First shows subelement: be used to show other heading message of the first order;
Second shows subelement: the heading message that is used for selecting according to the user is showed other heading message of next stage.
With reference to figure 7, show and use the process flow diagram that device shown in Figure 6 carries out theembodiment 1 of file demonstration, specifically may further comprise the steps:
Step 701, resolution unit are resolved document files, generate the index information of described document files;
Wherein, described index information comprises the corresponding relation between heading message and heading message and the content.
Step 702, display unit are showed described heading message;
The heading message that step 703, display unit are selected according to the user shows the corresponding contents of described document files.
With reference to figure 8, show and use the process flow diagram that device shown in Figure 6 carries out theembodiment 2 of file demonstration, specifically may further comprise the steps:
Step 801, converting unit are converted to document files with nondocument;
Step 802, resolution unit are resolved document files, generate the index information of described document files;
Wherein, described index information comprises the corresponding relation between heading message and heading message and the content.
Step 803, display unit are showed described heading message;
The heading message that step 804, display unit are selected according to the user shows the corresponding contents of described document files;
Step 805, operating unit carry out front/rear page turn over operation according to user's instruction to described document files;
Step 806, buffer cell read the content of certain page according to content displayed, and store buffer zone into.
With reference to figure 9, show and use the process flow diagram that device shown in Figure 6 carries out the embodiment 3 of file demonstration, specifically may further comprise the steps:
Step 901, resolution unit are resolved document files, generate the index information of described document files;
Wherein, described index information comprises the corresponding relation between heading message and heading message and the content.
Step 902, first is showed other heading message of the subelement displaying first order;
Step 903, second is showed other heading message of heading message displaying next stage that subelement is selected according to the user;
The heading message that step 904, display unit are selected according to the user shows the corresponding contents of described document files;
Step 905, buffer cell read the content of certain page according to content displayed, and store buffer zone into;
Step 906, operating unit carry out front/rear page turn over operation according to user's instruction to described document files, read the content of the respective page in the buffer zone and show.
It is to be noted, those skilled in the art are easy to expect: it all is feasible that the foregoing description 1-embodiment 3 combination in any are used, so the combination in any between the foregoing description 1-embodiment 3 all is embodiment of the present invention, but this instructions has not just described in detail one by one at this as space is limited.
Can be at the not detailed part of the description of embodiment 1-embodiment 3 referring to the description of this instructions front appropriate section.
More than the file display packing of a kind of UNIX/LINUX character terminal provided by the present invention and the document display apparatus of UNIX/LINUX character terminal are described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.