Front-end data processing method and device based on command line
By installing and registering command line tools on the operating system, the inconvenience of developers to manually download and move prefabricated code files is solved, and the prefabricated code files are quickly found and downloaded through the command line, improving development efficiency.
Patent Information
- Application Number
- CN202110428374.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-21
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-04-21
AI Technical Summary
In the prior art, developers need to manually download and move prefabricated code files, which leads to inconvenience in use and tool switching affects development efficiency.
By performing global installation and global instruction registration of command line tools based on package management tools on the operating system, receiving user prefabricated code file query and download instructions, the search and download of prefabricated code files can be quickly completed through the command line.
It avoids the impact of tool switching, improves the work efficiency of developers, and quickly completes the search and download of prefabricated code files through command line tools.
Smart Images

Figure CN113050937B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of front-end development and can also be used in the financial field. Specifically, it relates to a front-end data processing method and device based on a command line. Background Art
[0002] When developing the front-end part of applications in similar business fields, some commonly used function templates are usually encapsulated as prefabricated code files based on the commonality of business functions, so that they can be used directly to save time when developing similar functions. Such prefabricated code files are usually provided to developers for review and download in the form of a web site. When using them, the required code files need to be downloaded locally and manually moved to the project, which causes inconvenience to developers. Summary of the invention
[0003] In response to the problems in the prior art, the present application provides a command line-based front-end data processing method and device, which can quickly complete the search and download of prefabricated code files through the command line, avoiding the impact of tool switching on development efficiency.
[0004] In order to solve at least one of the above problems, the present application provides the following technical solutions:
[0005] In a first aspect, the present application provides a front-end data processing method based on a command line, comprising:
[0006] Use package management tools to globally install command line tools and register global commands on the operating system;
[0007] Receiving a prefabricated code file query instruction sent by a user through the command line tool and echoing a query result list of the prefabricated code file according to the prefabricated code file query instruction;
[0008] The prefabricated code file download instruction sent by the user through the command line tool is received, and according to the prefabricated code file download instruction, a server-side script download interface is called to download the corresponding prefabricated code file to the current path.
[0009] Further, the receiving a prefabricated code file query instruction sent by the user through the command line tool and displaying the query result list of the prefabricated code file according to the prefabricated code file query instruction includes:
[0010] Receiving a prefabricated code file query instruction sent by a user through the command line tool;
[0011] The login status of the user is determined according to the site login information in the preset tool configuration information. If the user is logged in, the query result list of the prefabricated code file is displayed according to the prefabricated code file query instruction.
[0012] Further, the receiving the prefabricated code file download instruction sent by the user through the command line tool and calling the server script download interface according to the prefabricated code file download instruction to download the corresponding prefabricated code file to the current path includes:
[0013] Receiving a prefabricated code file download instruction sent by the user through the command line tool;
[0014] The download address of the prefabricated code file is determined according to the site address information in the preset tool configuration information, and the server-side script download interface is called to download the prefabricated code file to the current path.
[0015] Furthermore, it also includes:
[0016] Receive a configuration information editing instruction sent by a user, and call a server-side script editing interface according to the configuration information editing instruction to update the site login information or site address information in the tool configuration information.
[0017] In a second aspect, the present application provides a front-end data processing device based on a command line, comprising:
[0018] The command line installation module is used to globally install the command line tool on the operating system and register global instructions through the package management tool;
[0019] A file query module, configured to receive a prefabricated code file query instruction sent by a user through the command line tool and to echo a query result list of the prefabricated code file according to the prefabricated code file query instruction;
[0020] The file download module is used to receive the prefabricated code file download instruction sent by the user through the command line tool and call the server script download interface according to the prefabricated code file download instruction to download the corresponding prefabricated code file to the current path.
[0021] Furthermore, the file query module includes:
[0022] A query instruction receiving unit, used to receive a prefabricated code file query instruction sent by a user through the command line tool;
[0023] The login status determination unit is used to determine the login status of the user according to the site login information in the preset tool configuration information, and if the user is logged in, the query result list of the prefabricated code file is displayed according to the prefabricated code file query instruction.
[0024] Furthermore, the file download module includes:
[0025] A download instruction receiving unit, used to receive a prefabricated code file download instruction sent by the user through the command line tool;
[0026] The download address determining unit is used to determine the download address of the prefabricated code file according to the site address information in the preset tool configuration information, and call the server script download interface to download the prefabricated code file to the current path.
[0027] Furthermore, it also includes:
[0028] The configuration information editing unit is used to receive a configuration information editing instruction sent by a user, and call a server-side script editing interface according to the configuration information editing instruction to update the site login information or site address information in the tool configuration information.
[0029] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the command line-based front-end data processing method when executing the program.
[0030] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the command line-based front-end data processing method.
[0031] It can be seen from the above technical solution that the present application provides a front-end data processing method and device based on the command line, which performs global installation and global instruction registration of the command line tool based on the package management tool on the operating system, and then receives the prefabricated code file query and download instructions sent by the user, thereby quickly completing the search and download of the prefabricated code file through the command line, avoiding the impact of tool switching on development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0033] Figure 1 This is one of the flow charts of the command line-based front-end data processing method in the embodiment of the present application;
[0034] Figure 2 This is a second flow chart of a front-end data processing method based on a command line in an embodiment of the present application;
[0035] Figure 3 The third flowchart of the command line-based front-end data processing method in the embodiment of the present application;
[0036] Figure 4 This is one of the structural diagrams of a front-end data processing device based on a command line in an embodiment of the present application;
[0037] Figure 5 This is the second structural diagram of the command line-based front-end data processing device in the embodiment of the present application;
[0038] Figure 6 This is the third structural diagram of the command line-based front-end data processing device in the embodiment of the present application;
[0039] Figure 7 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0041] Taking into account that in the prior art, prefabricated code files are usually provided to developers for viewing and downloading in the form of web sites, and when used, the required code files need to be downloaded locally and manually moved to the project, which causes inconvenience to developers. The present application provides a command line-based front-end data processing method and device, which globally installs the command line tool and registers global instructions based on the package management tool on the operating system, and then receives the prefabricated code file query and download instructions sent by the user, so as to quickly complete the search and download of the prefabricated code file through the command line, and avoid affecting the development efficiency due to tool switching.
[0042] In order to quickly complete the search and download of prefabricated code files through the command line and avoid affecting development efficiency due to tool switching, the present application provides an embodiment of a front-end data processing method based on the command line, see Figure 1 The command line-based front-end data processing method specifically includes the following contents:
[0043] Step S101: globally installing the command line tool and registering global instructions on the operating system through a package management tool.
[0044] Optionally, the present application can be developed based on a server-side script, such as nodejs; at the same time, the present application can globally install the command line tool on the operating system and register global instructions through a package management tool (such as an npm package).
[0045] Step S102: receiving a prefabricated code file query instruction sent by the user through the command line tool and displaying a query result list of the prefabricated code file according to the prefabricated code file query instruction.
[0046] Optionally, the user of the present application can send a prefabricated code file query instruction through the command line tool. At the same time, the present application can query the prefabricated code files according to the prefabricated code file query instruction, and return a query result list in the form of "file name-description".
[0047] Step S103: receiving a prefabricated code file download instruction sent by the user through the command line tool and calling a server-side script download interface according to the prefabricated code file download instruction to download the corresponding prefabricated code file to the current path.
[0048] Optionally, when the user sends a prefabricated code file download instruction through the command line tool, the present application can determine the site address information of the prefabricated code file, that is, the download address, based on a pre-stored tool configuration information (which may include the site address information and site login information of the prefabricated code file), and thereby call the server-side script download interface (such as the file system interface of nodejs) to download the corresponding prefabricated code file to the current path.
[0049] From the above description, it can be seen that the command line-based front-end data processing method provided in the embodiment of the present application can perform global installation and global instruction registration of command line tools based on package management tools on the operating system, and then receive prefabricated code file query and download instructions sent by users, so as to quickly complete the search and download of prefabricated code files through the command line, thereby avoiding the impact of tool switching on development efficiency.
[0050] In order to ensure the reliability of prefabricated code file query, in one embodiment of the command line-based front-end data processing method of the present application, see Figure 2 , the above step S102 may also specifically include the following contents:
[0051] Step S201: receiving a prefabricated code file query instruction sent by a user through the command line tool.
[0052] Step S202: determining the login status of the user according to the site login information in the preset tool configuration information, and if the user is logged in, displaying the query result list of the prefabricated code file according to the prefabricated code file query instruction.
[0053] Specifically, when the user enters the prefabricated code file query instruction, the application can first determine whether there is login information locally. If not, the configuration instruction is called to remind the user to enter the user information to obtain the login information. Then the query is performed according to the keyword entered by the user. If the query result is empty, the user is reminded whether the current tool configuration information is incorrect, such as whether the site address information and the login user are correct. If the query result is not empty, the query result is returned.
[0054] In order to ensure that the prefabricated code file is accurately downloaded, in one embodiment of the command line-based front-end data processing method of the present application, see Figure 3 , the above step S103 may also specifically include the following contents:
[0055] Step S301: receiving a prefabricated code file download instruction sent by the user through the command line tool.
[0056] Step S302: determining the download address of the prefabricated code file according to the site address information in the preset tool configuration information, and calling the server script download interface to download the prefabricated code file to the current path.
[0057] Specifically, when the user enters the prefabricated code file download instruction, the application can first determine whether there is login information locally. If not, the configuration instruction is called to remind the user to enter the user information to obtain the login information. Then, the download is attempted according to the prefabricated code name entered by the user. If the current prefabricated code file does not exist, the user is reminded to confirm whether the input information is correct. If the code file exists, the prefabricated code file is downloaded to the current path.
[0058] Specifically, the present application can determine the site address information of the prefabricated code file, that is, the download address, based on a pre-stored tool configuration information (which may include the site address information and site login information of the prefabricated code file), and thereby call the server-side script download interface (such as the file system interface of nodejs) to download the corresponding prefabricated code file to the current path.
[0059] In order to improve the flexibility of users when using command line tools, in an embodiment of the command line-based front-end data processing method of the present application, the following contents may also be specifically included:
[0060] Receive a configuration information editing instruction sent by a user, and call a server-side script editing interface according to the configuration information editing instruction to update the site login information or site address information in the tool configuration information.
[0061] Optionally, in addition to the above-mentioned prefabricated code file query instructions and prefabricated code file download instructions, users of the present application can also send help instructions and configuration information editing instructions, wherein the configuration information editing instructions are used by users to edit and update tool configuration information. During specific operations, the present application updates the site login information or site address information in the tool configuration information by calling the server-side script editing interface.
[0062] In order to quickly complete the search and download of prefabricated code files through the command line and avoid affecting the development efficiency due to tool switching, the present application provides an embodiment of a command line-based front-end data processing device for implementing all or part of the command line-based front-end data processing method, see Figure 4 , the command line-based front-end data processing device specifically includes the following contents:
[0063] The command line installation module 10 is used to globally install the command line tool on the operating system and register global instructions through a package management tool.
[0064] The file query module 20 is configured to receive a prefabricated code file query instruction sent by a user through the command line tool and to echo a query result list of the prefabricated code file according to the prefabricated code file query instruction.
[0065] The file download module 30 is used to receive the prefabricated code file download instruction sent by the user through the command line tool and call the server script download interface according to the prefabricated code file download instruction to download the corresponding prefabricated code file to the current path.
[0066] From the above description, it can be seen that the command line-based front-end data processing device provided in the embodiment of the present application can perform global installation and global instruction registration of command line tools based on package management tools on the operating system, and then receive prefabricated code file query and download instructions sent by users, so as to quickly complete the search and download of prefabricated code files through the command line, thereby avoiding the impact of tool switching on development efficiency.
[0067] In order to ensure the reliability of prefabricated code file query, in one embodiment of the command line-based front-end data processing device of the present application, see Figure 5 , the file query module 20 includes:
[0068] The query instruction receiving unit 21 is used to receive a prefabricated code file query instruction sent by a user through the command line tool.
[0069] The login status determination unit 22 is used to determine the login status of the user according to the site login information in the preset tool configuration information, and if the user is logged in, then the query result list of the prefabricated code file is displayed according to the prefabricated code file query instruction.
[0070] In order to ensure that the prefabricated code file is accurately downloaded, in one embodiment of the command line-based front-end data processing device of the present application, see Figure 6 , the file download module 30 includes:
[0071] The download instruction receiving unit 31 is used to receive a prefabricated code file download instruction sent by the user through the command line tool.
[0072] The download address determining unit 32 is used to determine the download address of the prefabricated code file according to the site address information in the preset tool configuration information, and call the server script download interface to download the prefabricated code file to the current path.
[0073] In order to improve the flexibility of users when using command line tools, in one embodiment of the command line-based front-end data processing device of the present application, the following contents are specifically included:
[0074] The configuration information editing unit is used to receive a configuration information editing instruction sent by a user, and call a server-side script editing interface according to the configuration information editing instruction to update the site login information or site address information in the tool configuration information.
[0075] From the hardware level, in order to quickly complete the search and download of prefabricated code files through the command line and avoid affecting the development efficiency due to tool switching, the present application provides an embodiment of an electronic device for implementing all or part of the content of the command line-based front-end data processing method, and the electronic device specifically includes the following content:
[0076] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between the front-end data processing device based on command line and the core business system, user terminal and related database and other related equipment; the logic controller can be a desktop computer, tablet computer and mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the logic controller can be implemented with reference to the embodiment of the front-end data processing method based on command line and the embodiment of the front-end data processing device based on command line in the embodiment, and the contents thereof are incorporated herein, and the repeated parts are not repeated.
[0077] It is understandable that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.
[0078] In practical applications, part of the front-end data processing method based on the command line can be executed on the electronic device side as described above, or all operations can be completed in the client device. The specific selection can be based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.
[0079] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.
[0080] Figure 7 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Figure 7 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Figure 7 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0081] In one embodiment, the front-end data processing method function based on the command line can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following control:
[0082] Step S101: globally installing the command line tool and registering global instructions on the operating system through a package management tool.
[0083] Step S102: receiving a prefabricated code file query instruction sent by the user through the command line tool and displaying a query result list of the prefabricated code file according to the prefabricated code file query instruction.
[0084] Step S103: receiving a prefabricated code file download instruction sent by the user through the command line tool and calling a server-side script download interface according to the prefabricated code file download instruction to download the corresponding prefabricated code file to the current path.
[0085] From the above description, it can be seen that the electronic device provided in the embodiment of the present application performs global installation and global instruction registration of command line tools based on the package management tool on the operating system, and then receives prefabricated code file query and download instructions sent by the user, thereby quickly completing the search and download of prefabricated code files through the command line, thereby avoiding the impact of tool switching on development efficiency.
[0086] In another embodiment, the command line-based front-end data processing device can be configured separately from the central processing unit 9100. For example, the command line-based front-end data processing device can be configured as a chip connected to the central processing unit 9100, and the function of the command line-based front-end data processing method can be implemented through the control of the central processing unit.
[0087] like Figure 7 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Figure 7 In addition, the electronic device 9600 may also include Figure 7 For components not shown, reference may be made to the prior art.
[0088] like Figure 7 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.
[0089] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.
[0090] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.
[0091] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.
[0092] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0093] The communication module 9110 is a transmitter / receiver 9110 that transmits and receives signals via an antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0094] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module, etc. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.
[0095] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the front-end data processing method based on a command line in the above-mentioned embodiment, where the execution subject is a server or a client. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, all the steps of the front-end data processing method based on a command line in the above-mentioned embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0096] Step S101: globally installing the command line tool and registering global instructions on the operating system through a package management tool.
[0097] Step S102: receiving a prefabricated code file query instruction sent by the user through the command line tool and displaying a query result list of the prefabricated code file according to the prefabricated code file query instruction.
[0098] Step S103: receiving a prefabricated code file download instruction sent by the user through the command line tool and calling a server-side script download interface according to the prefabricated code file download instruction to download the corresponding prefabricated code file to the current path.
[0099] From the above description, it can be seen that the computer-readable storage medium provided in the embodiment of the present application performs global installation and global instruction registration of command line tools based on the package management tool on the operating system, and then receives prefabricated code file query and download instructions sent by the user, thereby quickly completing the search and download of prefabricated code files through the command line, thereby avoiding the impact of tool switching on development efficiency.
[0100] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0101] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0102] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0104] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A front-end data processing method based on command line, characterized in that: The method comprises: Use package management tools to globally install command line tools and register global commands on the operating system; Receiving a prefabricated code file query instruction sent by a user through the command line tool and echoing a query result list of the prefabricated code file according to the prefabricated code file query instruction; Receiving a prefabricated code file download instruction sent by the user through the command line tool and calling a server-side script download interface according to the prefabricated code file download instruction to download the corresponding prefabricated code file to the current path; The receiving a prefabricated code file query instruction sent by the user through the command line tool and echoing the query result list of the prefabricated code file according to the prefabricated code file query instruction includes: Receiving a prefabricated code file query instruction sent by a user through the command line tool; Determine the login status of the user according to the site login information in the preset tool configuration information, and if the user is logged in, then display the query result list of the prefabricated code file according to the prefabricated code file query instruction, specifically including: Search according to the keywords entered by the user. If the query result is empty, remind the user whether the current tool configuration information is incorrect; if the query result is not empty, return the query result; The tool configuration information includes site address information of the prefabricated code file and site login information; The receiving the prefabricated code file download instruction sent by the user through the command line tool and calling the server script download interface according to the prefabricated code file download instruction to download the corresponding prefabricated code file to the current path includes: Receiving a prefabricated code file download instruction sent by the user through the command line tool; Determine the download address of the prefabricated code file according to the site address information in the preset tool configuration information, and call the server script download interface to download the prefabricated code file to the current path; Also includes: When the user enters the prefabricated code file download instruction, determine whether there is login information locally. If not, call the configuration instruction to remind the user to enter the user information to obtain the login information; download according to the prefabricated code name entered by the user. If the current prefabricated code file does not exist, remind the user to confirm whether the input information is correct; if the code file exists, download the prefabricated code file to the current path.
2. The command line based front-end data processing method according to claim 1, characterized in that: Also includes: Receive a configuration information editing instruction sent by a user, and call a server-side script editing interface according to the configuration information editing instruction to update the site login information or site address information in the tool configuration information.
3. A front-end data processing device based on command line, characterized in that: include: The command line installation module is used to globally install the command line tool on the operating system and register global instructions through the package management tool; A file query module, configured to receive a prefabricated code file query instruction sent by a user through the command line tool and to echo a query result list of the prefabricated code file according to the prefabricated code file query instruction; A file download module, used to receive a prefabricated code file download instruction sent by the user through the command line tool and call a server-side script download interface according to the prefabricated code file download instruction to download the corresponding prefabricated code file to the current path; The file query module includes: A query instruction receiving unit, used to receive a prefabricated code file query instruction sent by a user through the command line tool; A login status determination unit, configured to determine the login status of the user according to the site login information in the preset tool configuration information, and if the user is logged in, to echo the query result list of the prefabricated code file according to the prefabricated code file query instruction; The login status determination unit is specifically used to query according to the keyword input by the user, and if the query result is empty, remind the user whether the current tool configuration information is incorrect; if the query result is not empty, return the query result; the tool configuration information includes the site address information of the prefabricated code file and the site login information; The file download module includes: A download instruction receiving unit, used to receive a prefabricated code file download instruction sent by the user through the command line tool; A download address determining unit, used to determine the download address of the prefabricated code file according to the site address information in the preset tool configuration information, and call the server script download interface to download the prefabricated code file to the current path; Also includes: The prefabricated code file download unit is used to determine whether there is login information locally after the user enters the prefabricated code file download instruction. If not, it calls the configuration instruction to remind the user to enter the user information to obtain the login information; download according to the prefabricated code name entered by the user. If the current prefabricated code file does not exist, remind the user to confirm whether the input information is correct; if the code file exists, download the prefabricated code file to the current path.
4. The command line based front-end data processing device according to claim 3, characterized in that: Also includes: The configuration information editing unit is used to receive a configuration information editing instruction sent by a user, and call a server-side script editing interface according to the configuration information editing instruction to update the site login information or site address information in the tool configuration information.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the command line-based front-end data processing method described in claim 1 or 2 are implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the command line-based front-end data processing method described in claim 1 or 2 are implemented.
Citation Information
Patent Citations
Project development method and device, computer readable storage medium and electronic equipment
CN112685035A