CN117075870A - Online document generation method, device, equipment and medium - Google Patents

Online document generation method, device, equipment and medium Download PDF

Info

Publication number
CN117075870A
CN117075870A CN202311107538.8A CN202311107538A CN117075870A CN 117075870 A CN117075870 A CN 117075870A CN 202311107538 A CN202311107538 A CN 202311107538A CN 117075870 A CN117075870 A CN 117075870A
Authority
CN
China
Prior art keywords
document
file
format
target
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311107538.8A
Other languages
Chinese (zh)
Inventor
李沙沙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN202311107538.8A priority Critical patent/CN117075870A/en
Publication of CN117075870A publication Critical patent/CN117075870A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for generating an online document, which relate to the technical field of generating and displaying the document of a virtualization platform and comprise the following steps: writing a code file aiming at a target document according to a preset text format to acquire a target code file containing specific document contents of the target document; defining a page style and a document language format of a webpage where a target document is located; performing format conversion on the target code file based on the page style and the document language format to obtain a hypertext markup language file; and packaging the hypertext markup language file into an image file corresponding to the code item of the virtualization system so as to generate and display a corresponding online document in the virtualization environment. The target document is written and managed in a code form, which is different from plain text editing of the offline document in the prior art, so that a developer can conveniently manage the document, convert the document into a hypertext markup language file, optimize the converted file page, and improve the reading experience of a user.

Description

Online document generation method, device, equipment and medium
Technical Field
The application relates to the technical field of document generation and display of a virtualization platform, in particular to an online document generation method, device, equipment and medium.
Background
The current document management mainly uses traditional offline document management, but the single offline document management has the defects of difficult document maintenance, time consumption, difficult management, single interface presentation and the like, the interface presentation is single and provides poor reading experience for users, and the offline document management is not beneficial to the developer for document maintenance.
In summary, how to implement compact document code management, reduce the cost of maintaining codes for developers, and improve the user reading experience is a technical problem to be solved in the field.
Disclosure of Invention
Accordingly, the present application aims to provide an online document generation method, device, equipment and medium, which can realize compact document code management, reduce the cost of maintaining codes for developers and promote the reading experience of users. The specific scheme is as follows:
in a first aspect, the present application discloses an online document generation method, including:
writing a code file aiming at a target document according to a preset text format to acquire a target code file containing specific document contents of the target document;
defining a page style and a document language format of a webpage where the target document is located;
performing format conversion on the target code file based on the page style and the document language format to obtain a hypertext markup language file;
and packaging the hypertext markup language file into an image file corresponding to a code item of the virtualization system so as to generate and display a corresponding online document in the virtualization environment.
Optionally, before writing the code file for the target document according to the preset text format to obtain the target code file containing the specific document content of the target document, the method further includes:
and installing a preset software development kit locally so as to start a code writing flow when the preset software development kit receives a document generation instruction.
Optionally, the defining the page style and the document language format of the webpage where the target document is located includes:
compiling a cascading style sheet file through the preset software development kit so as to assign the webpage style of the hypertext markup language file element by utilizing the cascading style sheet file;
writing a dynamic webpage behavior file for controlling webpage page behaviors through a preset dynamic type programming language;
defining a page style of a webpage where the target document is located according to the cascading style sheet file and the dynamic webpage behavior file;
writing a document language format definition file for defining a document language format of the target document through a universal programming language;
storing the cascading style sheet file, the dynamic webpage behavior file, the document language format definition file and the target code file into different subfolders respectively according to a preset file storage rule;
and merging the subfolders corresponding to the cascading style sheet file, the dynamic webpage behavior file, the document language format definition file and the target code file respectively based on a preset merging rule to generate a source file to be analyzed.
Optionally, before the converting the format of the target code file based on the page style and the document language format to obtain the hypertext markup language file, the method further includes:
and analyzing the file of the source file to be analyzed by using a preset document generating tool, and analyzing subfolders corresponding to the cascading style sheet file, the dynamic webpage behavior file and the document language format definition file respectively obtained after current analysis to obtain page styles and document language formats corresponding to the online document to be generated.
Optionally, the format conversion of the target code file based on the page style and the document language format to obtain a hypertext markup language file includes:
and performing format conversion operation from the lightweight markup language to the hypertext markup language on the target code file by using a preset document generation tool according to the page style and the document language format obtained after analysis so as to obtain the hypertext markup language file.
Optionally, the performing, by using a preset document generating tool and according to the page style and the document language format, a format conversion operation from a lightweight markup language to a hypertext markup language on the object code file to obtain a hypertext markup language file, includes:
traversing and extracting the hierarchical directory of the target code file based on the preset document generation tool to obtain directory titles of different hierarchies, and converting the format of the corresponding document content under each directory title of the target code file according to each directory title, the page style and the document language format to obtain the hypertext markup language file.
Optionally, the packaging the hypertext markup language file into an image file corresponding to a code item of the virtualization system so as to generate and display a corresponding online document in the virtualization environment, including:
and running and compiling the document item of the hypertext markup language file, and packaging the compiled document item into an image file corresponding to the code item of the virtualization system so as to generate and display a corresponding online document in a corresponding document module of the virtualization environment.
Optionally, the packaging the hypertext markup language file into an image file corresponding to a code item of the virtualization system, so as to generate and display a corresponding online document in the virtualization environment, further includes:
and acquiring a target document file format input by a user terminal through a human-computer interaction channel, and executing document file format conversion operation of the online document on the basis of the target document file format so as to acquire and output the online document in a corresponding format.
In a second aspect, the present application discloses an online document generating apparatus, comprising:
the code writing module is used for writing a code file aiming at a target document according to a preset text format so as to acquire the target code file containing specific document contents of the target document;
the format definition module is used for defining the page style and the document language format of the webpage where the target document is located;
the code conversion module is used for carrying out format conversion on the target code file based on the page style and the document language format so as to obtain a hypertext markup language file;
and the document generation module is used for packaging the hypertext markup language file into an image file corresponding to the code item of the virtualization system so as to generate and display a corresponding online document in the virtualization environment.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the online document generation method disclosed previously.
In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the steps of the online document generation method disclosed previously.
Thus, the application discloses an online document generation method, which comprises the following steps: writing a code file aiming at a target document according to a preset text format to acquire a target code file containing specific document contents of the target document; defining a page style and a document language format of a webpage where the target document is located; performing format conversion on the target code file based on the page style and the document language format to obtain a hypertext markup language file; and packaging the hypertext markup language file into an image file corresponding to a code item of the virtualization system so as to generate and display a corresponding online document in the virtualization environment. Therefore, the target document is written and managed in a code form by writing the code file, which is different from plain text editing of the offline document in the prior art, so that the specific content of the document can be coded in the code form, the document is convenient to manage by a developer, meanwhile, the code file is converted into the hypertext markup language file through the defined webpage style and the document language format, and meanwhile, the converted file page is optimized, so that the online document for improving the reading experience of the user is obtained.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an online document generation method disclosed by the application;
FIG. 2 is a flowchart of a specific online document generation method disclosed in the present application;
FIG. 3 is a flowchart of another specific online document generation method of the present disclosure;
FIG. 4 is a flowchart of a method for automatically generating an online document based on RST code files in combination with Sphinx technology;
FIG. 5 is a schematic diagram of an online document generating apparatus according to the present disclosure;
fig. 6 is a block diagram of an electronic device according to the present disclosure.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The current document management mainly uses traditional offline document management, but the single offline document management has the defects of difficult document maintenance, time consumption, difficult management, single interface presentation and the like, the interface presentation is single and provides poor reading experience for users, and the offline document management is not beneficial to the developer for document maintenance.
Therefore, the online document generation scheme provided by the application can realize concise document code management, reduce the cost of maintaining codes for developers and promote the reading experience of users.
Referring to FIG. 1, an embodiment of the application discloses an online document generation method, which comprises the following steps:
step S11: writing a code file aiming at a target document according to a preset text format to acquire the target code file containing specific document contents of the target document.
In this embodiment, the rst Code file is written using the reconstructed text grammar in the VS Code (Visual Studio Code ) system development software using the Python programming language, defining the detailed presentation of the specific document; a RST (reconstruction text) code file is composed, the currently composed RST code file specifically containing specific document content of the target document to be presented for online generation.
In this embodiment, before writing the code file for the target document according to the preset text format to obtain the target code file containing the specific document content of the target document, the method further includes: and installing a preset software development kit locally so as to start a code writing flow when the preset software development kit receives a document generation instruction. It will be appreciated that JDK (Java Development Kit, software development kit in Java language), VS Code system, etc. software required for development is installed in the local computer so that when a document generation instruction is received, a Code file writing flow is started.
Step S12: and defining the page style and the document language format of the webpage where the target document is located.
In this embodiment, a cascading style sheet file is written through the preset software development kit, so that a web page style of a hypertext markup language file element is specified by using the cascading style sheet file; writing a dynamic webpage behavior file for controlling webpage page behaviors through a preset dynamic type programming language; defining a page style of a webpage where the target document is located according to the cascading style sheet file and the dynamic webpage behavior file; a document language format definition file for defining a document language format of the target document is written by a general-purpose programming language. It will be appreciated that CSS files for defining web page styles of hypertext markup language file elements of a target document to be generated are written using CSS (Cascading Style Sheets ) techniques; JS files, which can define page presentation styles of target documents, are written using JS (JavaScript, interpreted or just-in-time compiled programming language), by which the web page styles can be defined together. Python files are written using Python technology, which are used to define the language format of the target document. Therefore, the page style, language format and the like of the hypertext markup language file to be generated by the target code file are correspondingly written with the corresponding code file, and further, the online documents with attractive typesetting and attractive page design for improving the reading interest of the user can be obtained during file conversion.
Step S13: and performing format conversion on the target code file based on the page style and the document language format to acquire a hypertext markup language file.
In this embodiment, the target code file is formatted according to the defined page style and document language format by the Sphinx technique, that is, the RST code file is automatically converted into an HTML (HyperText Markup Language ) file using the Sphinx technique.
Step S14: and packaging the hypertext markup language file into an image file corresponding to a code item of the virtualization system so as to generate and display a corresponding online document in the virtualization environment.
In this embodiment, an HTML file is packaged into an ISO (international standard optical disc file system format) file corresponding to a code item of a virtualization system, and by virtualizing the HTML file into ISO items corresponding to the virtualization item of the virtualization system, each ISO item corresponds to a blank virtual machine, that is, each HTML file corresponds to a virtual machine.
Thus, the application discloses an online document generation method, which comprises the following steps: writing a code file aiming at a target document according to a preset text format to acquire a target code file containing specific document contents of the target document; defining a page style and a document language format of a webpage where the target document is located; performing format conversion on the target code file based on the page style and the document language format to obtain a hypertext markup language file; and packaging the hypertext markup language file into an image file corresponding to a code item of the virtualization system so as to generate and display a corresponding online document in the virtualization environment. Therefore, the target document is written and managed in a code form by writing the code file, which is different from plain text editing of the offline document in the prior art, so that the specific content of the document can be coded in the code form, the document is convenient to manage by a developer, meanwhile, the code file is converted into the hypertext markup language file through the defined webpage style and the document language format, and meanwhile, the converted file page is optimized, so that the online document for improving the reading experience of the user is obtained.
Referring to fig. 2, an embodiment of the present application discloses a specific online document generation method, and compared with the previous embodiment, the present embodiment further describes and optimizes a technical solution. Specific:
step S21: writing a code file aiming at a target document according to a preset text format to acquire the target code file containing specific document contents of the target document.
Step S22: compiling a cascading style sheet file through a preset software development kit so as to assign a webpage style of a hypertext markup language file element by utilizing the cascading style sheet file; writing a dynamic webpage behavior file for controlling webpage page behaviors through a preset dynamic type programming language; defining a page style of a webpage where the target document is located according to the cascading style sheet file and the dynamic webpage behavior file; a document language format definition file for defining a document language format of the target document is written by a general-purpose programming language.
Step S23: storing the cascading style sheet file, the dynamic webpage behavior file, the document language format definition file and the target code file into different subfolders respectively according to a preset file storage rule; and merging the subfolders corresponding to the cascading style sheet file, the dynamic webpage behavior file, the document language format definition file and the target code file respectively based on a preset merging rule to generate a source file to be analyzed.
In this embodiment, respective subfolders are set according to different file storage requirements, and then the cascading style sheet file, the dynamic web page behavior file, the document language format definition file and the object code file representing specific contents of the object document are respectively stored in the respective subfolders according to the correspondence between the subfolders and the corresponding files, and then the subfolders are combined to generate the source file to be parsed.
Step S24: and analyzing the file of the source file to be analyzed by using a preset document generating tool, and analyzing subfolders corresponding to the cascading style sheet file, the dynamic webpage behavior file and the document language format definition file respectively obtained after current analysis to obtain page styles and document language formats corresponding to the online document to be generated.
In this embodiment, a source file to be parsed is parsed by using a Sphinx technology, and each subfolder obtained by parsing is parsed, so as to finally obtain a page style and a document language format corresponding to an online document to be generated.
Step S25: and performing format conversion operation from the lightweight markup language to the hypertext markup language on the target code file by using a preset document generation tool according to the page style and the document language format obtained after analysis so as to obtain the hypertext markup language file.
In this embodiment, the Sphinx technology is used again to perform format conversion on the object code file obtained by the same analysis according to the page style and the document language format, and it should be noted that the file object corresponding to the page style and the document language format at this time is a hypertext markup language file, so after the source file to be analyzed is analyzed by the Sphinx technology, the format conversion is directly and automatically performed to obtain the hypertext markup language file.
Step S26: and packaging the hypertext markup language file into an image file corresponding to a code item of the virtualization system so as to generate and display a corresponding online document in the virtualization environment.
The more detailed processing procedures in steps S21, S22, and S26 refer to the above disclosed embodiments, and are not described herein.
Therefore, online documents are written, managed and maintained in a RST code form, document presentation forms are optimized through JS and CSS technologies, source files are analyzed and converted through a Sphinx technology, perfect conversion from codes to pages of the documents is successfully completed, source files to be analyzed, which are formed by cascading style sheet files, dynamic webpage behavior files and document language format definition files, are analyzed through Sphinx, target code files can be conveniently and automatically converted through Sphinx, and hypertext markup language files with attractive pages are generated. Meanwhile, the modes of offline code management and online HTML presentation are realized, so that the documents are simultaneously optimized on line and offline, the document maintenance dilemma of developers is solved, and better reading experience is brought to users.
Referring to fig. 3, the embodiment of the application correspondingly discloses another online document generation method, which comprises the following steps:
step S31: writing a code file aiming at a target document according to a preset text format to acquire the target code file containing specific document contents of the target document.
Step S32: and defining the page style and the document language format of the webpage where the target document is located.
In the more detailed processing in steps S31 and S32, please refer to the above disclosed embodiment, and the detailed description is omitted here.
Step S33: traversing and extracting the hierarchical directory of the target code file based on a preset document generation tool to obtain directory titles of different hierarchies, and converting the format of the corresponding document content under each directory title of the target code file according to each directory title, the page style and the document language format to obtain the hypertext markup language file.
In this embodiment, after the subfolder in which the object code file is located is analyzed by using Sphinx, directory titles of different levels in the object code file are traversed and extracted, and format conversion is performed according to the extracted directory title and corresponding code content under the title according to page style and language style, so as to obtain the hypertext markup language file carrying the directories of each level.
Step S34: and running and compiling the document item of the hypertext markup language file, and packaging the compiled document item into an image file corresponding to the code item of the virtualization system so as to generate and display a corresponding online document in a corresponding document module of the virtualization environment.
In this embodiment, after the file format is converted, the document item where the hypertext markup language file is located is run and compiled, then the document item is packaged into the image file corresponding to the code item of the virtualization system, and then the virtualization environment is opened, so that the corresponding document module generates and displays the corresponding online document.
Step S35: and acquiring a target document file format input by a user terminal through a human-computer interaction channel, and executing document file format conversion operation of the online document on the basis of the target document file format so as to acquire and output the online document in a corresponding format.
In this embodiment, in the case that an online document has been generated and stored in the virtualization system, for better user experience, a man-machine interaction page and a man-machine interaction channel may be provided, so that a user may connect to an external device through a physical machine, for example: and the keyboard, the mouse and the like are used for determining the corresponding file format of the page part corresponding to the file format of the target document to be selected in the man-machine interaction interface, and in one embodiment, a user can directly click on a component corresponding to the Word version option configured in the man-machine interaction interface so as to obtain the file format of the Word version input by the user by the virtualization system, perform file format conversion operation of the online document and output the online document with the corresponding format. In another embodiment, the user directly writes Word version export instructions through the man-machine interaction channel and the keyboard, so that the system receives the instructions and performs file format conversion operation of the online document, and outputs the online document in a corresponding format. Note that the target document file format may specifically include, but is not limited to: word file format and PDF (Portable Document Format ) file format. It will be appreciated that, in general, the hypertext markup file converted by using Sphinx does not support the file format selection operation, but only outputs an online document in a fixed file format, but the present embodiment obtains the hypertext markup language file carrying each hierarchical directory by traversing and extracting directory titles in different levels in the object code file, and then performing format conversion according to the extracted directory title and corresponding code content under the title according to page style and language style. And further, the file conversion of the PDF format can be realized in the final document export process.
Referring to fig. 4, a method for automatically generating an online document based on RST Code file in combination with Sphinx technology is provided, firstly, a local computer, i.e. a physical machine, needs to be installed with software required for development such as JDK, sphinx, VS Code system, etc.; the virtualization system for the online document to be presented is then ready. Specifically, software required for development such as JDK, sphinx, VS Code and the like is required to be installed on a local computer; writing RST Code files on the VSCode; JS and CSS files are written by JS and CSS technologies, and document page presentation styles are defined; writing a Python file by using a Python technology, and defining a document language format; writing codes by using a Sphinx technology, and converting a document from a RST file to an HTML file; packaging together with source code of the virtualized system, and carrying out complete presentation on a document module on the virtualized system. The specific implementation process is as follows:
1) Installing and developing software: software required for development such as JDK, sphinx, VS Code and the like is required to be installed on a local computer;
2) Writing RST code files: on the VS Code, writing a rst Code file by using a unstructured text grammar, and defining detailed presentation content of a specific document;
3) Writing JS files: js file, defining document page presentation style;
4) Writing CSS files: the css file is written by using Cascading Style Sheets technology, and HTML page presentation styles are defined;
5) Writing a Python file: the Python technique is used for writing the py file, and a document language format is defined;
6) The Sphinx technique parses and converts files: analyzing the original RST file by using a Sphinx technology to obtain specific file content, and converting the specific file content into an HTML file;
7) Packaging into ISO: running and compiling a document project, packaging the compiled file into an ISO of a virtualized project, opening a virtualized environment, and performing complete presentation in the virtualized environment;
as can be seen from the overall flow of FIG. 4, online documents are written, managed and maintained in the form of RST code; optimizing a document presentation form through JS and CSS technologies; analyzing and converting the source file by using a Sphinx technology, and successfully completing perfect conversion of the document from the code to the page; after the document project is compiled, packaging the compiled file into a virtualized project in an ISO mode, and presenting the online document by a document module in a virtualized environment.
Therefore, the online document manufactured based on the virtualized platform environment can be perfectly presented in the virtualized environment, and the document codes are uniformly managed through the VS Code compiling management tool, so that the maintenance cost of a developer on the document is greatly reduced, and the development of the document is more standardized and unified; through JS and CSS technologies, the presentation page of the document is optimized, the presentation form of the document is greatly beautified, and a user obtains better reading experience; analyzing and converting the source file by using a Sphinx technology, and successfully completing perfect conversion of the document from the code to the page; after the document project is compiled, the compiled file is packaged into the virtualized project in an ISO mode, and all documents can be presented in a document module in the virtualized environment, so that a better document maintenance mode is brought to research personnel, detailed operation guidance is brought to a user, and meanwhile, very pleasant reading experience is brought to the user.
Referring to fig. 5, the embodiment of the application also correspondingly discloses an online document generating device, which comprises:
a code writing module 11, configured to write a code file for a target document according to a preset text format, so as to obtain a target code file containing specific document content of the target document;
a format definition module 12, configured to define a page style and a document language format of a web page where the target document is located;
a code conversion module 13, configured to perform format conversion on the target code file based on the page style and the document language format, so as to obtain a hypertext markup language file;
the document generation module 14 is configured to package the hypertext markup language file into an image file corresponding to a code item of the virtualization system, so as to generate and display a corresponding online document in the virtualization environment.
It can be seen that the application discloses writing a code file for a target document according to a preset text format to obtain a target code file containing specific document contents of the target document; defining a page style and a document language format of a webpage where the target document is located; performing format conversion on the target code file based on the page style and the document language format to obtain a hypertext markup language file; and packaging the hypertext markup language file into an image file corresponding to a code item of the virtualization system so as to generate and display a corresponding online document in the virtualization environment. Therefore, the target document is written and managed in a code form by writing the code file, which is different from plain text editing of the offline document in the prior art, so that the specific content of the document can be coded in the code form, the document is convenient to manage by a developer, meanwhile, the code file is converted into the hypertext markup language file through the defined webpage style and the document language format, and meanwhile, the converted file page is optimized, so that the online document for improving the reading experience of the user is obtained.
Further, the embodiment of the present application further discloses an electronic device, and fig. 6 is a block diagram of an electronic device 20 according to an exemplary embodiment, where the content of the figure is not to be considered as any limitation on the scope of use of the present application.
Fig. 6 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is adapted to store a computer program which is loaded and executed by the processor 21 to implement the relevant steps of the online document generating method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
Processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 21 may also comprise a main processor, which is a processor for processing data in an awake state, also called CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the processor 21 on the mass data 223 in the memory 22, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the online document generation method performed by the electronic device 20 as disclosed in any of the previous embodiments. The data 223 may include, in addition to data received by the electronic device and transmitted by the external device, data collected by the input/output interface 25 itself, and so on.
Further, the application also discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the online document generation method of the foregoing disclosure. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may be located in random access Memory (Random Access Memory, RAM), memory, read Only Memory (ROM), electrically programmable ROM (Electrically Programmable Read Only Memory, EPROM), electrically erasable programmable ROM (Electric Erasable Programmable Read Only Memory, EEPROM), registers, hard disk, a removable disk, a CD-ROM (Compact Disc-Read Only Memory), or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above detailed description of the method, the device, the equipment and the medium for generating the online document provided by the application applies specific examples to illustrate the principle and the implementation of the application, and the above examples are only used for helping to understand the method and the core idea of the application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (11)

1. An online document generation method, comprising:
writing a code file aiming at a target document according to a preset text format to acquire a target code file containing specific document contents of the target document;
defining a page style and a document language format of a webpage where the target document is located;
performing format conversion on the target code file based on the page style and the document language format to obtain a hypertext markup language file;
and packaging the hypertext markup language file into an image file corresponding to a code item of the virtualization system so as to generate and display a corresponding online document in the virtualization environment.
2. The online document generating method according to claim 1, wherein before writing the code file for the target document in a preset text format to obtain the target code file containing the specific document content of the target document, further comprising:
and installing a preset software development kit locally so as to start a code writing flow when the preset software development kit receives a document generation instruction.
3. The online document generating method according to claim 2, wherein the defining the page style and document language format of the web page on which the target document is located includes:
compiling a cascading style sheet file through the preset software development kit so as to assign the webpage style of the hypertext markup language file element by utilizing the cascading style sheet file;
writing a dynamic webpage behavior file for controlling webpage page behaviors through a preset dynamic type programming language;
defining a page style of a webpage where the target document is located according to the cascading style sheet file and the dynamic webpage behavior file;
writing a document language format definition file for defining a document language format of the target document through a universal programming language;
storing the cascading style sheet file, the dynamic webpage behavior file, the document language format definition file and the target code file into different subfolders respectively according to a preset file storage rule;
and merging the subfolders corresponding to the cascading style sheet file, the dynamic webpage behavior file, the document language format definition file and the target code file respectively based on a preset merging rule to generate a source file to be analyzed.
4. The online document generating method according to claim 3, wherein before the converting the object code file based on the page style and the document language format to obtain a hypertext markup language file, further comprising:
and analyzing the file of the source file to be analyzed by using a preset document generating tool, and analyzing subfolders corresponding to the cascading style sheet file, the dynamic webpage behavior file and the document language format definition file respectively obtained after current analysis to obtain page styles and document language formats corresponding to the online document to be generated.
5. The online document generating method according to claim 4, wherein the converting the object code file based on the page style and the document language format to obtain a hypertext markup language file comprises:
and performing format conversion operation from the lightweight markup language to the hypertext markup language on the target code file by using a preset document generation tool according to the page style and the document language format obtained after analysis so as to obtain the hypertext markup language file.
6. The online document generating method of claim 5, wherein said performing a format conversion operation from a lightweight markup language to a hypertext markup language on the object code file using a preset document generating tool and according to the page style and the document language format to obtain a hypertext markup language file comprises:
traversing and extracting the hierarchical directory of the target code file based on the preset document generation tool to obtain directory titles of different hierarchies, and converting the format of the corresponding document content under each directory title of the target code file according to each directory title, the page style and the document language format to obtain the hypertext markup language file.
7. The online document generating method according to claim 1, wherein said packaging the hypertext markup language file into an image file corresponding to a code item of a virtualization system to generate and present a corresponding online document in a virtualization environment comprises:
and running and compiling the document item of the hypertext markup language file, and packaging the compiled document item into an image file corresponding to the code item of the virtualization system so as to generate and display a corresponding online document in a corresponding document module of the virtualization environment.
8. The online document generating method according to any one of claims 1 to 7, wherein said packaging the hypertext markup language file into an image file corresponding to a code item of a virtualization system so as to generate and present the corresponding online document in a virtualization environment, further comprises:
and acquiring a target document file format input by a user terminal through a human-computer interaction channel, and executing document file format conversion operation of the online document on the basis of the target document file format so as to acquire and output the online document in a corresponding format.
9. An online document generating apparatus, comprising:
the code writing module is used for writing a code file aiming at a target document according to a preset text format so as to acquire the target code file containing specific document contents of the target document;
the format definition module is used for defining the page style and the document language format of the webpage where the target document is located;
the code conversion module is used for carrying out format conversion on the target code file based on the page style and the document language format so as to obtain a hypertext markup language file;
and the document generation module is used for packaging the hypertext markup language file into an image file corresponding to the code item of the virtualization system so as to generate and display a corresponding online document in the virtualization environment.
10. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to carry out the steps of the online document generating method according to any one of claims 1 to 8.
11. A computer-readable storage medium storing a computer program; wherein the computer program when executed by a processor implements the steps of the online document generation method of any one of claims 1 to 8.
CN202311107538.8A 2023-08-30 2023-08-30 Online document generation method, device, equipment and medium Pending CN117075870A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311107538.8A CN117075870A (en) 2023-08-30 2023-08-30 Online document generation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311107538.8A CN117075870A (en) 2023-08-30 2023-08-30 Online document generation method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117075870A true CN117075870A (en) 2023-11-17

Family

ID=88707853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311107538.8A Pending CN117075870A (en) 2023-08-30 2023-08-30 Online document generation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117075870A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117454847A (en) * 2023-12-26 2024-01-26 南京翼辉信息技术有限公司 Method for converting online document into offline document

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117454847A (en) * 2023-12-26 2024-01-26 南京翼辉信息技术有限公司 Method for converting online document into offline document
CN117454847B (en) * 2023-12-26 2024-03-15 南京翼辉信息技术有限公司 Method for converting online document into offline document

Similar Documents

Publication Publication Date Title
US11526481B2 (en) Incremental dynamic document index generation
RU2683174C2 (en) Ink to text representation conversion
US20180322396A1 (en) Knowledge Process Modeling and Automation
JP7324831B2 (en) DEPLOYMENT METHOD, DEPLOYMENT DEVICE AND ELECTRONIC DEVICE OF OPERATORS IN DEEP LEARNING FRAMEWORK
US8745581B2 (en) Method and system for selectively copying portions of a document contents in a computing system (smart copy and paste
US11366957B2 (en) Real-time rendering based on efficient device and server processing of content updates
US20200150937A1 (en) Advanced machine learning interfaces
JP7291740B2 (en) Modeling parameter setting method, apparatus, device, computer storage medium, and computer program
CN117075870A (en) Online document generation method, device, equipment and medium
KR20150005608A (en) Building multi-language processes from existing single-language processes
US20200327201A1 (en) Provision of natural language response to business process query
CN115525292A (en) Low code development method and device, readable storage medium and electronic equipment
WO2019094891A1 (en) Knowledge process modeling and automation
CN115309298A (en) Text structuring method and device, medium and equipment based on rich text editor
WO2005098660A1 (en) Document processing device and document processing method
WO2005098658A1 (en) Document processing device and document processing method
CN111078228A (en) Method and device for converting webpage into small program, server and storage medium
CN113296759B (en) User interface processing method, user interface processing system, device and storage medium
CN112699642B (en) Index extraction method and device for complex medical texts, medium and electronic equipment
Conlen et al. Fidyll: A Compiler for Cross-Format Data Stories & Explorable Explanations
Choi et al. Streamside: A fully-customizable open-source toolkit for efficient annotation of meaning representations
CN113518160A (en) Video generation method, device, equipment and storage medium
CN105630149A (en) Techniques for providing a user interface incorporating sign language
CN111782196A (en) MVP architecture-based development method and device
KR20210040545A (en) Multilingual manual authoring apparatus based on XML and method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination