Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art or the related art.
To this end, an aspect of the present invention is to provide a directory update method.
Another aspect of the present invention is to provide a directory update system.
Yet another aspect of the present invention is to provide a computer-readable storage medium.
In view of the above, an aspect of the present invention provides a directory updating method, including: extracting a first directory content file and typesetting effect information according to the existing directory files of the whole book file; extracting a second catalogue content file according to each article information of the adjusted whole book file; merging the first directory content file and the second directory content file according to the directory updating option to form a third directory content file; and generating a result directory file according to the third directory content file and the typesetting effect information.
According to the directory updating method, firstly, a first directory content file is extracted from the existing directory files of the whole book file, and when the directory content is extracted, typesetting effect information is collected; secondly, after the whole book file is finely adjusted, extracting the latest catalog content file, namely a second catalog content file according to a certain catalog extraction rule and the information of each article in the adjusted whole book file; and then, merging the first directory content file and the second directory content file according to the directory update option selected by the user to generate a third directory content file expected by the user, typesetting the third directory content file according to the typesetting effect information collected at the beginning to generate a latest directory file, namely a result directory file after performing directory update. The catalog updating method provided by the invention can automatically update the catalog files to different degrees according to the automatic catalog updating requirements under different scenes and user selection, effectively improves the typesetting efficiency, saves a large amount of manpower, and is particularly suitable for the typesetting process of publications such as scientific and technological journals.
The directory update method according to the present invention may further include the following technical features:
in the above technical solution, preferably, the step of extracting the first directory content file and the layout effect information according to an existing directory file of the whole book file specifically includes: dividing the existing directory files according to the directory entries; extracting the content of each part of catalog and corresponding typesetting effect information according to the division result; and forming a first directory content file according to the directory contents of the parts, and forming typesetting effect information according to the typesetting effect information corresponding to the directory contents of the parts.
According to the technical scheme, when the first directory content file is extracted, the existing directory file is divided according to directory entries, the directory contents of all parts and the specific typesetting effect information corresponding to the directory contents are extracted according to the division result, no repetition or omission is ensured, the first directory content file is formed according to the directory contents of all parts, and the typesetting effect information is formed according to the specific typesetting effect information of the directory contents of all parts, so that the first directory content file can be used later, and the content and the typesetting effect of other information except the directory entries are ensured to be kept unchanged.
In any of the above technical solutions, preferably, the step of dividing the existing directory file according to the directory entry specifically includes: performing first-level division on the existing directory file according to directory entries, and performing second-level division on the existing directory file according to directory entries included in the directory entries, wherein the directory entries include any one or a combination of the following items: title, author, page number.
In the technical scheme, because the content and the typesetting effect repeatability contained in each directory entry in the directory file are strong, the first-level division can be performed according to the directory entries; the content of each directory entry, i.e. the directory entry, has obvious characteristics, such as title, author, page number, etc., which can be used as the basis for the second level of division. The specific division rule and the hierarchy can be determined according to specific requirements. And then extracting the content of each part of catalog and the corresponding typesetting effect information according to the division result.
In any of the above technical solutions, preferably, the directory updating method further includes: corresponding the typesetting effect information with nodes in the first directory content file; processing and numbering the typesetting effect information; and establishing the association relation between the typesetting effect information and the first directory content file according to the serial number of the typesetting effect information.
In the technical scheme, each part of specific typesetting effect information in the typesetting effect information corresponds to each node in the first directory content file, and meanwhile, each part of specific typesetting effect information is processed, repeated items are eliminated, and the serial numbers are unified, so that the unified serial numbers need to pay attention to a predetermined numbering principle, the non-repetition, easy identification and strong readability are ensured, and the subsequent use is facilitated; and establishing an association relation between the typesetting effect information and the first directory content file according to the serial numbers, for example, recording the serial number of the typesetting effect information corresponding to a certain node on the node in an attribute form for subsequent use, facilitating subsequent information search and use, and ensuring that the content and the typesetting effect of other information except the directory entries are kept unchanged after the directory updating is executed. It should be noted that the association relationship between each node in the first directory content file and the typesetting effect information is a many-to-one correspondence relationship, and a plurality of content nodes apply the same typesetting effect, which is a normal phenomenon.
In any of the above technical solutions, preferably, the step of generating the result directory file according to the third directory content file and the typesetting effect information specifically includes: recording the number of the typesetting effect information on the corresponding node of the third catalogue content file according to the incidence relation between the typesetting effect information and the first catalogue content file; and typesetting the third directory content file according to the typesetting effect information to obtain a result directory file.
In the technical scheme, on the basis of a third directory content file, the number of the typesetting effect information of each node in the first directory content file is recorded on the node corresponding to the first directory content file, when the nodes which do not record the typesetting effect information number are left in the third directory content file, the typesetting effect information number on the node with the same structure and the same type in front of the third directory content file is preferentially selected, if the node which does not accord with the typesetting effect information number is searched in front of the third directory content file, the typesetting effect information number of the node with the same structure and the same type behind the third directory content file is selected, if the node which does not accord with the typesetting effect information number is not found in front of the third directory content file, the searching condition is lowered, and finally all the nodes are ensured to record the number of the corresponding typesetting effect information; during typesetting, specifically, according to the specific typesetting effect information of each node, additional typesetting is performed at the rearmost of directory entries in the existing directory file, and then the original entry content in the directory file is removed to generate the latest directory file, namely a result directory file.
In any of the above technical solutions, preferably, the typesetting effect information includes any one of or a combination of the following items: font, font size, character style, paragraph style, line spacing; the formats of the first directory content file, the second directory content file and the third directory content file are XML formats; the catalog update options include any one or a combination of: directory entry, title, author, page number.
In this technical solution, the typesetting effect information includes, but is not limited to, any one of the following items or a combination thereof: font, font size, text style, paragraph style, line space, directory update options include, but are not limited to, any one or a combination of: directory entry, title, author, page number.
Another aspect of the present invention provides a directory update system, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor when executing the computer program implementing: extracting a first directory content file and typesetting effect information according to the existing directory files of the whole book file; extracting a second catalogue content file according to each article information of the adjusted whole book file; merging the first directory content file and the second directory content file according to the directory updating option to form a third directory content file; and generating a result directory file according to the third directory content file and the typesetting effect information.
According to the directory updating system, firstly, a first directory content file is extracted from the existing directory files of the whole book file, and when the directory content is extracted, typesetting effect information is collected; secondly, after the whole book file is finely adjusted, extracting the latest catalog content file, namely a second catalog content file according to a certain catalog extraction rule and the information of each article in the adjusted whole book file; and then, merging the first directory content file and the second directory content file according to the directory update option selected by the user to generate a third directory content file expected by the user, typesetting the third directory content file according to the typesetting effect information collected at the beginning to generate a latest directory file, namely a result directory file after performing directory update. The catalog updating system provided by the invention can automatically update the catalog files to different degrees according to the automatic catalog updating requirements under different scenes and user selection, effectively improves the typesetting efficiency, saves a large amount of manpower, and is particularly suitable for the typesetting process of publications such as scientific and technological journals.
In the foregoing technical solution, preferably, when the processor executes the computer program, the step of extracting the first directory content file and the typesetting effect information according to the existing directory file of the whole book file is specifically implemented, and specifically includes: dividing the existing directory files according to the directory entries; extracting the content of each part of catalog and corresponding typesetting effect information according to the division result; and forming a first directory content file according to the directory contents of the parts, and forming typesetting effect information according to the typesetting effect information corresponding to the directory contents of the parts.
According to the technical scheme, when the first directory content file is extracted, the existing directory file is divided according to directory entries, the directory contents of all parts and the specific typesetting effect information corresponding to the directory contents are extracted according to the division result, no repetition or omission is ensured, the first directory content file is formed according to the directory contents of all parts, and the typesetting effect information is formed according to the specific typesetting effect information of the directory contents of all parts, so that the first directory content file can be used later, and the content and the typesetting effect of other information except the directory entries are ensured to be kept unchanged.
In any of the above technical solutions, preferably, when the processor executes the computer program, the step of dividing the existing directory file according to the directory entry is specifically implemented, and specifically includes: performing first-level division on the existing directory file according to directory entries, and performing second-level division on the existing directory file according to directory entries included in the directory entries, wherein the directory entries include any one or a combination of the following items: title, author, page number.
In the technical scheme, because the content and the typesetting effect repeatability contained in each directory entry in the directory file are strong, the first-level division can be performed according to the directory entries; the content of each directory entry, i.e. the directory entry, has obvious characteristics, such as title, author, page number, etc., which can be used as the basis for the second level of division. The specific division rule and the hierarchy can be determined according to specific requirements. And then extracting the content of each part of catalog and the corresponding typesetting effect information according to the division result.
In any of the above technical solutions, preferably, the processor further implements, when executing the computer program: corresponding the typesetting effect information with nodes in the first directory content file; processing and numbering the typesetting effect information; and establishing the association relation between the typesetting effect information and the first directory content file according to the serial number of the typesetting effect information.
In the technical scheme, each part of specific typesetting effect information in the typesetting effect information corresponds to each node in the first directory content file, and meanwhile, each part of specific typesetting effect information is processed, repeated items are eliminated, and the serial numbers are unified, so that the unified serial numbers need to pay attention to a predetermined numbering principle, the non-repetition, easy identification and strong readability are ensured, and the subsequent use is facilitated; and establishing an association relation between the typesetting effect information and the first directory content file according to the serial numbers, for example, recording the serial number of the typesetting effect information corresponding to a certain node on the node in an attribute form for subsequent use, facilitating subsequent information search and use, and ensuring that the content and the typesetting effect of other information except the directory entries are kept unchanged after the directory updating is executed. It should be noted that the association relationship between each node in the first directory content file and the typesetting effect information is a many-to-one correspondence relationship, and a plurality of content nodes apply the same typesetting effect, which is a normal phenomenon.
In any of the above technical solutions, preferably, when the processor executes the computer program, the step of generating the result directory file according to the third directory content file and the typesetting effect information is specifically implemented, and specifically includes: recording the number of the typesetting effect information on the corresponding node of the third catalogue content file according to the incidence relation between the typesetting effect information and the first catalogue content file; and typesetting the third directory content file according to the typesetting effect information to obtain a result directory file.
In the technical scheme, on the basis of a third directory content file, the number of the typesetting effect information of each node in the first directory content file is recorded on the node corresponding to the first directory content file, when the nodes which do not record the typesetting effect information number are left in the third directory content file, the typesetting effect information number on the node with the same structure and the same type in front of the third directory content file is preferentially selected, if the node which does not accord with the typesetting effect information number is searched in front of the third directory content file, the typesetting effect information number of the node with the same structure and the same type behind the third directory content file is selected, if the node which does not accord with the typesetting effect information number is not found in front of the third directory content file, the searching condition is lowered, and finally all the nodes are ensured to record the number of the corresponding typesetting effect information; during typesetting, specifically, according to the specific typesetting effect information of each node, additional typesetting is performed at the rearmost of directory entries in the existing directory file, and then the original entry content in the directory file is removed to generate the latest directory file, namely a result directory file.
In any of the above technical solutions, preferably, the typesetting effect information includes any one of or a combination of the following items: font, font size, character style, paragraph style, line spacing; the formats of the first directory content file, the second directory content file and the third directory content file are XML formats; the catalog update options include any one or a combination of: directory entry, title, author, page number.
In this technical solution, the typesetting effect information includes, but is not limited to, any one of the following items or a combination thereof: font, font size, text style, paragraph style, line space, directory update options include, but are not limited to, any one or a combination of: directory entry, title, author, page number.
A further aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the directory update method according to any one of the above-mentioned technical solutions.
According to the computer-readable storage medium of the present invention, when being executed by the processor, the computer program stored thereon implements the steps of the directory update method according to any one of the above technical solutions, and thus has all the advantages of the directory update method, and will not be described again.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
Fig. 1 is a flowchart illustrating a directory update method according to an embodiment of the present invention. The directory updating method comprises the following steps:
102, extracting a first directory content file and typesetting effect information according to the existing directory files of the whole book file;
step 104, extracting a second catalogue content file according to each article information of the adjusted whole book file;
step 106, merging the first directory content file and the second directory content file according to the directory updating option to form a third directory content file;
and 108, generating a result directory file according to the third directory content file and the typesetting effect information.
Firstly, extracting a first directory content file from the existing directory files of the whole book file, and collecting typesetting effect information when the directory content is extracted; secondly, after the whole book file is finely adjusted, extracting the latest catalog content file, namely a second catalog content file according to a certain catalog extraction rule and the information of each article in the adjusted whole book file; and then, merging the first directory content file and the second directory content file according to the directory update option selected by the user to generate a third directory content file expected by the user, typesetting the third directory content file according to the typesetting effect information collected at the beginning to generate a latest directory file, namely a result directory file after performing directory update. The catalog updating method provided by the invention can automatically update the catalog files to different degrees according to the automatic catalog updating requirements under different scenes and user selection, effectively improves the typesetting efficiency, saves a large amount of manpower, and is particularly suitable for the typesetting process of publications such as scientific and technological journals.
Fig. 2 is a flowchart illustrating a directory update method according to another embodiment of the present invention. The directory updating method comprises the following steps:
step 202, dividing the existing directory file according to the directory entries; extracting the content of each part of catalog and corresponding typesetting effect information according to the division result; forming a first directory content file according to the directory contents of all the parts, and forming typesetting effect information according to the typesetting effect information corresponding to the directory contents of all the parts;
step 204, extracting a second directory content file according to each article information of the adjusted whole book file;
step 206, merging the first directory content file and the second directory content file according to the directory update option to form a third directory content file;
and step 208, generating a result directory file according to the third directory content file and the typesetting effect information.
In this embodiment, when the first directory content file is extracted, the existing directory file is divided according to the directory entries, and the directory contents of each portion and the specific typesetting effect information corresponding to the directory contents are extracted according to the division result, so as to ensure no duplication or omission, form the first directory content file according to the directory contents of each portion, and form the typesetting effect information according to the specific typesetting effect information of the directory contents of each portion, so as to facilitate subsequent use, and ensure that the contents and typesetting effect of other information except the directory entries remain unchanged.
In an embodiment of the present invention, preferably, the step of dividing the existing directory file according to the directory entry specifically includes: performing first-level division on the existing directory file according to directory entries, and performing second-level division on the existing directory file according to directory entries included in the directory entries, wherein the directory entries include any one or a combination of the following items: title, author, page number.
In the embodiment, because the content and the typesetting effect repeatability contained in each directory entry in the directory file are strong, the first-level division can be performed according to the directory entries; the content of each directory entry, i.e. the directory entry, has obvious characteristics, such as title, author, page number, etc., which can be used as the basis for the second level of division. The specific division rule and the hierarchy can be determined according to specific requirements. And then extracting the content of each part of catalog and the corresponding typesetting effect information according to the division result.
In any of the above embodiments, preferably, the directory update method further includes: corresponding the typesetting effect information with nodes in the first directory content file; processing and numbering the typesetting effect information; and establishing the association relation between the typesetting effect information and the first directory content file according to the serial number of the typesetting effect information.
In the embodiment, each part of the specific typesetting effect information in the typesetting effect information corresponds to each node in the first directory content file, and meanwhile, each part of the specific typesetting effect information is processed, repeated items are eliminated, the serial numbers are unified, the unified serial numbers need to pay attention to a predetermined numbering principle, and the method ensures no repetition, easy identification, strong readability and convenient subsequent use; and establishing an association relation between the typesetting effect information and the first directory content file according to the serial numbers, for example, recording the serial number of the typesetting effect information corresponding to a certain node on the node in an attribute form for subsequent use, facilitating subsequent information search and use, and ensuring that the content and the typesetting effect of other information except the directory entries are kept unchanged after the directory updating is executed. It should be noted that the association relationship between each node in the first directory content file and the typesetting effect information is a many-to-one correspondence relationship, and a plurality of content nodes apply the same typesetting effect, which is a normal phenomenon.
Fig. 3 is a flowchart illustrating a directory update method according to still another embodiment of the invention. The directory updating method comprises the following steps:
step 302, dividing the existing directory files according to the directory entries; extracting the content of each part of catalog and corresponding typesetting effect information according to the division result; forming a first directory content file according to the directory contents of all the parts, and forming typesetting effect information according to the typesetting effect information corresponding to the directory contents of all the parts;
step 304, corresponding the typesetting effect information with nodes in the first directory content file; processing and numbering the typesetting effect information; establishing an incidence relation between the typesetting effect information and the first directory content file according to the number of the typesetting effect information;
step 306, extracting a second directory content file according to the adjusted article information of the whole book file;
step 308, merging the first directory content file and the second directory content file according to the directory update option to form a third directory content file;
step 310, recording the number of the typesetting effect information on the corresponding node of the third catalogue content file according to the incidence relation between the typesetting effect information and the first catalogue content file; and typesetting the third directory content file according to the typesetting effect information to obtain a result directory file.
In the embodiment, on the basis of a third directory content file, the number of the typesetting effect information of each node in the first directory content file is recorded to the node corresponding to the first directory content file, when the nodes which do not record the typesetting effect information number are left in the third directory content file, the typesetting effect information numbers of the nodes with the same structure and the same type in front of the third directory content file are preferentially selected, if the nodes which do not meet the requirement are searched in the front, the typesetting effect information numbers of the nodes with the same structure and the same type in back of the third directory content file are selected, if the nodes are not found in the front and back, the searching condition is lowered, and finally all the nodes are ensured to record the numbers of the corresponding typesetting effect information; during typesetting, specifically, according to the specific typesetting effect information of each node, additional typesetting is performed at the rearmost of directory entries in the existing directory file, and then the original entry content in the directory file is removed to generate the latest directory file, namely a result directory file.
In any of the above embodiments, preferably, the typesetting effect information includes any one or a combination of the following items: font, font size, character style, paragraph style, line spacing; the formats of the first directory content file, the second directory content file and the third directory content file are XML formats; the catalog update options include any one or a combination of: directory entry, title, author, page number.
Fig. 4 is a flowchart illustrating a directory update method according to an embodiment of the invention. The directory updating method comprises the following steps:
step 402, dividing the content of the existing directory file according to specific conditions;
step 404, extracting an xml file of the directory content, namely original.
Step 406, collecting the typesetting effect information of the contents of each part of the catalog according to the division result, and arranging and numbering;
step 408, corresponding the nodes in original.xml to the typesetting effect information, and establishing an association relation;
step 410, re-extracting the catalog content xml file, namely new.xml, according to each manuscript information in the adjusted whole book file;
step 412, combining original.xml and new.xml according to specific setting requirements to generate result.xml;
and step 414, adding typesetting to the existing directory file entries according to the typesetting effect information, and finally removing the original entry information in the directory to generate a result directory file.
In this embodiment, preferably, the first level of division may be made by directory entry; the specific content and features in each entry are also obvious, such as title, author name, page number, and the like, which can be used as the basis for dividing the second layer.
In this embodiment, preferably, the composition effect information may include, according to the composition effect information of each piece of content collected by the division result: font, font size, text style, paragraph style, line spacing, etc., as determined by particular needs. When collected information is sorted, the unified numbering needs to pay attention to a predetermined numbering principle, so that the repeated information is avoided, the identification is easy, the readability is high, and the follow-up use is facilitated.
In this embodiment, preferably, the association relationship between each node in original.
In this embodiment, preferably, original.xml and new.xml are merged, and during the merging operation, the merging rule of the content node is determined according to the setting option when the user performs the directory update, for example, if the user selects to update only the page number, the page number information in new.xml is updated to the corresponding page number node in original.xml based on original.xml, and result.xml is generated; and if the user selects to completely re-extract, generating result.
On the basis of result.xml, recording the layout information ID of each node in original.xml to the corresponding node in result.xml, preferentially selecting the layout information ID of the node with the same structure and the same type in front of the node without recording the layout information ID of the remaining nodes in result.xml, if the node with the same structure and the same type in back of the node is not searched in the past, selecting the ID of the node with the same structure and the same type in back of the node, if the node is not found in the past, lowering the searching condition, and finally ensuring that all the nodes record the corresponding layout information ID.
And further, performing additional typesetting on the directory file entries according to the typesetting effect information of each node of the generated result. In the process, the content and the typesetting effect of other information except the catalog items are required to be kept unchanged.
As shown in FIG. 5, a schematic block diagram of a directory update system in accordance with one embodiment of the present invention. The catalog updating system 500 includes: a memory 502, a processor 504, and a computer program stored on the memory 502 and executable on the processor 504, the processor 504 when executing the computer program implementing: extracting a first directory content file and typesetting effect information according to the existing directory files of the whole book file; extracting a second catalogue content file according to each article information of the adjusted whole book file; merging the first directory content file and the second directory content file according to the directory updating option to form a third directory content file; and generating a result directory file according to the third directory content file and the typesetting effect information.
The directory update system 500 provided by the invention firstly extracts a first directory content file from the existing directory files of the whole book file, and collects typesetting effect information when the directory content is extracted; secondly, after the whole book file is finely adjusted, extracting the latest catalog content file, namely a second catalog content file according to a certain catalog extraction rule and the information of each article in the adjusted whole book file; and then, merging the first directory content file and the second directory content file according to the directory update option selected by the user to generate a third directory content file expected by the user, typesetting the third directory content file according to the typesetting effect information collected at the beginning to generate a latest directory file, namely a result directory file after performing directory update. The catalog updating system 500 provided by the invention can automatically update the catalog files to different degrees according to the automatic catalog updating requirements under different scenes and user selection, effectively improves the typesetting efficiency, saves a large amount of manpower, and is particularly suitable for the typesetting process of publications such as scientific and technological journals.
In an embodiment of the present invention, preferably, when the processor 504 executes the computer program, the step of extracting the first directory content file and the typesetting effect information according to the existing directory file of the whole book file is specifically realized, and specifically includes: dividing the existing directory files according to the directory entries; extracting the content of each part of catalog and corresponding typesetting effect information according to the division result; and forming a first directory content file according to the directory contents of the parts, and forming typesetting effect information according to the typesetting effect information corresponding to the directory contents of the parts.
In this embodiment, when the first directory content file is extracted, the existing directory file is divided according to the directory entries, and the directory contents of each portion and the specific typesetting effect information corresponding to the directory contents are extracted according to the division result, so as to ensure no duplication or omission, form the first directory content file according to the directory contents of each portion, and form the typesetting effect information according to the specific typesetting effect information of the directory contents of each portion, so as to facilitate subsequent use, and ensure that the contents and typesetting effect of other information except the directory entries remain unchanged.
In an embodiment of the present invention, preferably, when the processor 504 executes the computer program, the step of dividing the existing directory file according to the directory entry is specifically implemented, and specifically includes: performing first-level division on the existing directory file according to directory entries, and performing second-level division on the existing directory file according to directory entries included in the directory entries, wherein the directory entries include any one or a combination of the following items: title, author, page number.
In the embodiment, because the content and the typesetting effect repeatability contained in each directory entry in the directory file are strong, the first-level division can be performed according to the directory entries; the content of each directory entry, i.e. the directory entry, has obvious characteristics, such as title, author, page number, etc., which can be used as the basis for the second level of division. The specific division rule and the hierarchy can be determined according to specific requirements. And then extracting the content of each part of catalog and the corresponding typesetting effect information according to the division result.
In one embodiment of the present invention, the processor 504, when executing the computer program, preferably further implements: corresponding the typesetting effect information with nodes in the first directory content file; processing and numbering the typesetting effect information; and establishing the association relation between the typesetting effect information and the first directory content file according to the serial number of the typesetting effect information.
In the embodiment, each part of the specific typesetting effect information in the typesetting effect information corresponds to each node in the first directory content file, and meanwhile, each part of the specific typesetting effect information is processed, repeated items are eliminated, the serial numbers are unified, the unified serial numbers need to pay attention to a predetermined numbering principle, and the method ensures no repetition, easy identification, strong readability and convenient subsequent use; and establishing an association relation between the typesetting effect information and the first directory content file according to the serial numbers, for example, recording the serial number of the typesetting effect information corresponding to a certain node on the node in an attribute form for subsequent use, facilitating subsequent information search and use, and ensuring that the content and the typesetting effect of other information except the directory entries are kept unchanged after the directory updating is executed. It should be noted that the association relationship between each node in the first directory content file and the typesetting effect information is a many-to-one correspondence relationship, and a plurality of content nodes apply the same typesetting effect, which is a normal phenomenon.
In an embodiment of the present invention, preferably, when the processor 504 executes the computer program, the step of generating the result directory file according to the third directory content file and the typesetting effect information specifically includes: recording the number of the typesetting effect information on the corresponding node of the third catalogue content file according to the incidence relation between the typesetting effect information and the first catalogue content file; and typesetting the third directory content file according to the typesetting effect information to obtain a result directory file.
In the embodiment, on the basis of a third directory content file, the number of the typesetting effect information of each node in the first directory content file is recorded to the node corresponding to the first directory content file, when the nodes which do not record the typesetting effect information number are left in the third directory content file, the typesetting effect information numbers of the nodes with the same structure and the same type in front of the third directory content file are preferentially selected, if the nodes which do not meet the requirement are searched in the front, the typesetting effect information numbers of the nodes with the same structure and the same type in back of the third directory content file are selected, if the nodes are not found in the front and back, the searching condition is lowered, and finally all the nodes are ensured to record the numbers of the corresponding typesetting effect information; during typesetting, specifically, according to the specific typesetting effect information of each node, additional typesetting is performed at the rearmost of directory entries in the existing directory file, and then the original entry content in the directory file is removed to generate the latest directory file, namely a result directory file.
In an embodiment of the present invention, preferably, the composition effect information includes any one of or a combination of the following items: font, font size, character style, paragraph style, line spacing; the formats of the first directory content file, the second directory content file and the third directory content file are XML formats; the catalog update options include any one or a combination of: directory entry, title, author, page number.
In yet another embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the directory update method as in any one of the above embodiments.
The computer program stored on the computer-readable storage medium provided by the present invention, when executed by a processor, implements the steps of the directory update method according to any of the above embodiments, and thus has all the advantages of the directory update method, and will not be described again.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Computer readable storage media may include any medium that can store or transfer information. Examples of computer readable storage media include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.