CN113157651B - Method, system, equipment and medium for renaming resource files of android project in batches - Google Patents

Method, system, equipment and medium for renaming resource files of android project in batches Download PDF

Info

Publication number
CN113157651B
CN113157651B CN202110308521.3A CN202110308521A CN113157651B CN 113157651 B CN113157651 B CN 113157651B CN 202110308521 A CN202110308521 A CN 202110308521A CN 113157651 B CN113157651 B CN 113157651B
Authority
CN
China
Prior art keywords
renaming
file
names
rule
resource files
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.)
Active
Application number
CN202110308521.3A
Other languages
Chinese (zh)
Other versions
CN113157651A (en
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.)
Guangzhou Chenqi Travel Technology Co Ltd
Original Assignee
Guangzhou Chenqi Travel 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 Guangzhou Chenqi Travel Technology Co Ltd filed Critical Guangzhou Chenqi Travel Technology Co Ltd
Priority to CN202110308521.3A priority Critical patent/CN113157651B/en
Publication of CN113157651A publication Critical patent/CN113157651A/en
Application granted granted Critical
Publication of CN113157651B publication Critical patent/CN113157651B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • G06F16/166File name conversion
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention discloses a method, a system, equipment and a medium for renaming resource files of android engineering projects in batches, wherein the method comprises the following steps: setting a renaming rule, wherein the renaming rule comprises file prefix names and/or file suffix names which need to be added in batches; acquiring a matching rule of each file type according to engineering characteristics; selecting a target project folder, and sequentially acquiring the original file names of the resource files in the target project folder to form a renaming list; based on the matching rule, sequentially distinguishing file types of the original file names in the renaming list; sequentially adding corresponding file prefix names and/or file suffix names to the original file names according to renaming rules and matching rules to obtain corresponding new file names; and updating the new file names to the corresponding resource files respectively to achieve renaming, and compiling and verifying the renamed resource files in sequence. The method and the device can achieve batch renaming of the resource files in the android system development process.

Description

Method, system, equipment and medium for renaming resource files of android project in batches
Technical Field
The invention relates to the technical field of resource file renaming methods of android systems, in particular to a method, a system, equipment and a medium for batch renaming of resource files of android engineering projects.
Background
With the popularity of smart devices, particularly smart devices operating with android systems, development of applications in installation systems is becoming popular. With the increase of the software development amount of the android system, a large amount of android development environment software (android studio) for the application program of the android system appears.
In the development process of the existing android development environment software, componentization development is adopted, the application program is generally divided into a plurality of modules (modules) according to different functions in the application program, each module is respectively provided with a resource file related to the function realized by the module, and the modules are respectively developed in units of modules. In the development process of the application program, resource files among different modules need to be called mutually according to the function requirements, so that the development efficiency is improved, and the universality of the resource files in the modules can be improved. In order to avoid running conflict or management confusion caused by identical names among the resource files during the mutual calling of the resource files, the resource files in the modules need to be correspondingly renamed, and the same prefix or suffix is added to the resource files in the same module so as to distinguish the specific modules to which the resource files belong in the calling process. Meanwhile, after renaming, resource files with the same name and content among different modules can be distinguished, so that the universality of the resource files in the development process is improved under the condition that the normal operation of an application program is not influenced.
However, the existing android development environment software cannot rename a large number of resource files, renames are needed to be performed on resource files one by one, development efficiency is affected, and development progress is delayed. Therefore, it is necessary to invent a method for renaming batch resource files in batch, which is suitable for the android system development process, and does not affect the stability and reliability of the development result.
Disclosure of Invention
In order to overcome the technical defect that the existing android development environment software cannot rename batch resource files and needs to rename one by one, the invention provides a method, a system, equipment and a medium for renaming batch resource files of android engineering projects, which can rename the resource files in batches without affecting normal compiling of the resource files.
In order to solve the problems, the invention is realized according to the following technical scheme:
the invention discloses a method for renaming resource files of android engineering projects in batches, which comprises the following steps:
setting a renaming rule, wherein the renaming rule comprises file prefix names and/or file suffix names which need to be added in batches;
acquiring a matching rule of each file type according to engineering characteristics;
selecting a target project folder, and sequentially acquiring the original file names of the resource files in the target project folder to form a renaming list;
based on the matching rule, sequentially distinguishing file types of the original file names in the renaming list;
sequentially adding corresponding file prefix names and/or file suffix names to the original file names according to renaming rules and matching rules to obtain corresponding new file names;
and updating the new file names to the corresponding resource files respectively to achieve renaming, and compiling and verifying the renamed resource files in sequence.
Preferably, the compiling verification of the renamed resource files in turn specifically includes:
verifying whether the renamed resource file passes the compiling; if the compiling is passed, not performing compiling correction; and if the compiling is not passed, carrying out corresponding compiling correction on the new file name.
Preferably, after the corresponding compiling modification is performed on the new file name, the method further comprises the following steps: and according to the compiling and correcting result, correspondingly updating the matching rule.
Preferably, the matching rule is hit matching of key strings of original file names in a renaming list.
Preferably, the matching rule is a matching classification rule for xml files and java files.
Preferably, after the matching rule of each file type is obtained according to the engineering characteristics, the method further comprises the following steps: and based on the matching rule, acquiring the latest version number through the network, and updating the matching rule.
Preferably, after the selecting the target item folder, further performing: detecting the content of the target item folder; if the target item folder is not a blank folder, sequentially executing the next step; if the target item folder is a blank folder, renaming is not performed.
The invention also discloses a system for renaming the resource files of the android project in batches, which comprises the following steps:
the renaming rule module is used for setting a renaming rule, wherein the renaming rule comprises file prefix names and/or file suffix names which need to be added in batches;
the matching rule module is used for acquiring matching rules of all file types according to engineering characteristics;
the renaming list module is used for selecting a target project folder, and sequentially acquiring the original file names of the resource files in the target project folder to form a renaming list;
the file classification module is used for sequentially distinguishing file types of original file names in the renaming list based on the matching rule;
the renaming module is used for sequentially adding corresponding file prefix names and/or file suffix names into the original file names according to the renaming rule and the matching rule so as to obtain corresponding new file names;
and the compiling and verifying module is used for respectively updating the new file names to the corresponding resource files to achieve renaming, and sequentially compiling and verifying the renamed resource files.
The invention also discloses an electronic device, comprising: the system comprises at least one processor and a memory in communication with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for renaming resource files of android engineering projects in batches.
The invention also discloses a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the method for renaming the resource file batch of the android project.
Compared with the prior art, the invention has the beneficial effects that:
in the invention, the project folder to be renamed is marked as a target project folder in the development process, and then the original file names of the resource files in the target project folder are respectively acquired and stored and filled into the corresponding files to form a renaming list. And then sequentially adding corresponding prefix names and/or suffix names to the original file names in the renaming list so as to achieve renaming. Based on the new file name of the renamed resource file and the resource file, compiling and verifying are carried out so as to ensure that the resource files after batch renaming can smoothly pass through compiling, and the reliability and stability of renaming are improved.
Drawings
The invention is described in further detail below with reference to the attached drawing figures, wherein:
FIG. 1 is a main program flow diagram of a method for resource file batch renaming of android project of the present invention;
FIG. 2 is an overall program flow diagram of a method for resource file batch renaming of android project of the present invention;
fig. 3 is a schematic structural diagram of a system for renaming resource files of an android project in batches.
Detailed Description
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings, it being understood that the preferred embodiments described herein are for illustration and explanation of the present invention only, and are not intended to limit the present invention.
In the development process of the application program of the android system, the application program needs to be divided into a plurality of modules according to functions so as to be developed respectively, the development speed is improved, the resource files in the different modules need to be called mutually, and the resource files need to be renamed correspondingly for stability and convenience in management during calling so as to realize the accuracy of calling among the resource files with the same name, so that the working stability of the application program is ensured. In the existing android development environment software (android studio), the resource files in the project folders corresponding to the development modules cannot be renamed in batches in the development process, and because the number of the resource files in the project folders is possibly large, if the renaming is performed one by one manually, the overall development speed is reduced, the development workload of users is increased, and the development of application programs is not facilitated. If renaming is not performed, the resource files among different modules cannot be called mutually, or errors occur in the process of calling the resource files mutually, so that the use stability of the application program is affected.
Therefore, a method for renaming resource files in batches in the development process of the application program of the android system is needed to be created, so that the development workload of a user is reduced, the stability of the application program in calling the resource files among modules after modularized development is improved, and therefore more efficient application program development is achieved.
Example 1
Fig. 1 to fig. 2 are schematic step flow diagrams of a method for renaming resource files of an android project in batches. The invention discloses a method for renaming resource files of android engineering projects in batches, which specifically comprises the following steps:
step S1: and setting a renaming rule, wherein the renaming rule comprises file prefix names and/or file suffix names which need to be added in batches.
Specifically, a user opens a corresponding application program through a terminal, sets a corresponding renaming rule in the application program according to a module in a development process, and renames the resource file by taking keywords in the module as prefix names and/or suffix names to be added into original file names of the resource file in batches. According to practical situations, renaming rules are divided into adding a single prefix name, adding a single suffix name and adding the prefix name and the suffix name simultaneously. And selecting a corresponding renaming mode in a corresponding module according to different development projects so as to adapt to the development of application programs of different android systems.
Step S2: and obtaining the matching rule of each file type according to the engineering characteristics.
Specifically, according to the specific engineering characteristics of development, specific matching rules of different file types are obtained, and the matching rules can effectively classify the resource files rapidly so as to distinguish the specific types of the resource files. Different development projects have different project characteristics, and matching rules among different project characteristics are different. Therefore, the engineering characteristics are acquired firstly, and the matching rules are acquired according to the engineering characteristics, so that the file types can be more effectively matched and classified.
Substep S21: and based on the matching rule, acquiring the latest version number through the network, and updating the matching rule.
Specifically, after a specific matching rule is obtained based on engineering characteristics, the version number of the matching rule is obtained through a network, and if the version number is the latest version, the matching rule is directly adopted; if a higher version exists, the matching rule is correspondingly updated to acquire the latest matching rule, so that the renaming stability after matching is ensured, and the failure rate of compiling after renaming is reduced.
Step S3: and selecting a target project folder, and sequentially obtaining the original file names of the resource files in the target project folder to form a renaming list.
Specifically, in the development engineering of the application program of the android system, a user selects a corresponding module, obtains a project folder needing renaming from the module, marks the project folder as a target project folder, and renames the target project folder as a folder needing renaming currently so as to mark a resource file in the project folder. And creating a file for storing the original file name as a renamed file, sequentially acquiring the original file names of the resource files, respectively storing the original file names into the renamed files to form a renamed list, wherein the sequence of the original file names in the renamed list corresponds to the arrangement sequence of the resource files in the target project folder. The renaming list is set, so that the original file of the resource file can be modified and the original file name can be backed up under the condition that the resource file is not modified.
Step S31: detecting the content of the target item folder; if the target item folder is not a blank folder, sequentially executing the next step; if the target item folder is a blank folder, renaming is not performed.
According to the invention, whether the target project folder is the blank folder or not is detected, so that the project folder with blank contents can be effectively removed, and redundant renaming steps are prevented from being executed, thereby improving the renaming efficiency of the whole resource file and further improving the whole development efficiency of the application program.
Step S4: and based on the matching rule, sequentially distinguishing file types of the original file names in the renaming list.
Specifically, the original file names in the renaming list are sequentially classified based on the matching rule so as to distinguish the file types of the resource files. In this embodiment, preferably, the matching rule is a matching classification rule for xml files and java files, and the matching rule is hit matching for key strings of original file names in a renamed list. As the xml file and the java file respectively have specific key character strings, the xml file and the java file can be rapidly distinguished only by matching the corresponding key character strings. Or distinguishing the xml file from the java file according to specific engineering characteristics so as to quickly classify renaming characteristics among different files.
Step S5: and sequentially adding corresponding file prefix names and/or file suffix names into the original file names according to the renaming rules and the matching rules to obtain corresponding new file names.
Specifically, a specific prefix name and/or a specific suffix name which need to be added to an original file name are obtained from a renaming rule, then, renaming is carried out on a resource file belonging to a java file or an xml file according to a matching rule, and the prefix name and/or the suffix name are sequentially added to the original file name in a renaming list according to a specific mode in the matching rule, so that a new file name with the prefix name and/or the suffix name added is sequentially obtained, and the new file name is stored in the renaming list.
Step S6: and updating the new file names to the corresponding resource files respectively to achieve renaming, and compiling and verifying the renamed resource files in sequence.
Specifically, the new file names are respectively taken out from the renaming list and correspondingly updated to the resource files in the target project folder, so that the respective renaming of the resource files in the target project folder is realized. And then compiling the renamed resource file to verify the integrity and the compilatability of the renamed resource file so as to ensure that the renamed resource file can pass through the compiling, thereby ensuring that the renamed resource file can be mutually called among modules without compiling errors.
Substep S61: verifying whether the renamed resource file passes the compiling; if the compiling is passed, not performing compiling correction; and if the compiling is not passed, carrying out corresponding compiling correction on the new file name.
After the new file name is correspondingly compiled and corrected, the matching rule is correspondingly updated according to the result of compiling and correcting. If the compiling is not passed, the matching rule is wrong, and the matching rule needs to be correspondingly modified according to the specific content corrected by compiling, so that the same error of the file names of the subsequent resource files in renaming is avoided, and the overall success rate of the batch renaming of the resource files in the invention can be effectively improved.
In the invention, the project folder to be renamed is marked as a target project folder in the development process, and then the original file names of the resource files in the target project folder are respectively acquired and stored and filled into the corresponding files to form a renaming list. And then sequentially adding corresponding prefix names and/or suffix names to the original file names in the renaming list so as to achieve renaming. Based on the new file name of the renamed resource file and the resource file, compiling and verifying are carried out so as to ensure that the resource files after batch renaming can smoothly pass through compiling, and the reliability and stability of renaming are improved.
The other steps of the method for renaming resource files of android engineering projects in batches, disclosed by the embodiment of the invention, refer to the prior art.
Example 2
As shown in fig. 3, the invention further discloses a system for renaming resource files of android engineering projects in batches, which specifically comprises:
and the renaming rule module M1 is used for setting a renaming rule, wherein the renaming rule comprises file prefix names and/or file suffix names which need to be added in batches.
And the matching rule module M2 is used for acquiring the matching rule of each file type according to engineering characteristics.
And a substep M21 is further included, configured to obtain the latest version number through the network based on the matching rule, and update the matching rule.
And the renaming list module M3 is used for selecting the target project folder, and sequentially acquiring the original file names of the resource files in the target project folder to form a renaming list.
The sub-module M31 is used for detecting the content of the target project folder; if the target item folder is not a blank folder, sequentially executing the next step; if the target item folder is a blank folder, renaming is not performed.
The file classification module M4 is configured to sequentially differentiate file types of original file names in the renaming list based on a matching rule.
And the renaming module M5 is used for sequentially adding the corresponding file prefix names and/or file suffix names to the original file names according to the renaming rule and the matching rule so as to obtain the corresponding new file names.
And the compiling and verifying module M6 is used for respectively updating the new file names to the corresponding resource files to achieve renaming, and sequentially compiling and verifying the renamed resource files.
The sub-module M61 is used for verifying whether the renamed resource file passes through compiling; if the compiling is passed, not performing compiling correction; and if the compiling is not passed, carrying out corresponding compiling correction on the new file name.
According to the system for renaming the resource files of the android project in batches, which is disclosed by the embodiment of the invention, the method for renaming the resource files of the android project in batches, which is disclosed by the embodiment 1, can be realized during work, so that the resource files are renamed in batches in the android system.
Example 3
The invention also discloses an electronic device, at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor, and the at least one processor executes the instructions, specifically realizes the following steps: setting a renaming rule, wherein the renaming rule comprises file prefix names and/or file suffix names which need to be added in batches; acquiring a matching rule of each file type according to engineering characteristics; selecting a target project folder, and sequentially acquiring the original file names of the resource files in the target project folder to form a renaming list; based on the matching rule, sequentially distinguishing file types of the original file names in the renaming list; sequentially adding corresponding file prefix names and/or file suffix names to the original file names according to renaming rules and matching rules to obtain corresponding new file names; and updating the new file names to the corresponding resource files respectively to achieve renaming, and compiling and verifying the renamed resource files in sequence.
Example 4
The invention also discloses a storage medium storing a computer program which, when executed by a processor, realizes the following steps: setting a renaming rule, wherein the renaming rule comprises file prefix names and/or file suffix names which need to be added in batches; acquiring a matching rule of each file type according to engineering characteristics; selecting a target project folder, and sequentially acquiring the original file names of the resource files in the target project folder to form a renaming list; based on the matching rule, sequentially distinguishing file types of the original file names in the renaming list; sequentially adding corresponding file prefix names and/or file suffix names to the original file names according to renaming rules and matching rules to obtain corresponding new file names; and updating the new file names to the corresponding resource files respectively to achieve renaming, and compiling and verifying the renamed resource files in sequence.
In some embodiments, the client, server, etc. may communicate using any currently known or future developed network protocol, such as HTTP (hypertext transfer protocol), etc., and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a Local Area Network (LAN), a Wide Area Network (WAN), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The storage medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The storage medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: setting a renaming rule, wherein the renaming rule comprises file prefix names and/or file suffix names which need to be added in batches; acquiring a matching rule of each file type according to engineering characteristics; selecting a target project folder, and sequentially acquiring the original file names of the resource files in the target project folder to form a renaming list; based on the matching rule, sequentially distinguishing file types of the original file names in the renaming list; sequentially adding corresponding file prefix names and/or file suffix names to the original file names according to renaming rules and matching rules to obtain corresponding new file names; and updating the new file names to the corresponding resource files respectively to achieve renaming, and compiling and verifying the renamed resource files in sequence.
Alternatively, the storage medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: setting a renaming rule, wherein the renaming rule comprises file prefix names and/or file suffix names which need to be added in batches; acquiring a matching rule of each file type according to engineering characteristics; selecting a target project folder, and sequentially acquiring the original file names of the resource files in the target project folder to form a renaming list; based on the matching rule, sequentially distinguishing file types of the original file names in the renaming list; sequentially adding corresponding file prefix names and/or file suffix names to the original file names according to renaming rules and matching rules to obtain corresponding new file names; and updating the new file names to the corresponding resource files respectively to achieve renaming, and compiling and verifying the renamed resource files in sequence.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
It should be noted that the storage medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any storage medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.
The present invention is not limited to the preferred embodiments, and any modifications, equivalent variations and modifications made to the above embodiments according to the technical principles of the present invention are within the scope of the technical proposal of the present invention.

Claims (7)

1. The method for renaming the resource files of the android project in batches is characterized by comprising the following steps of:
setting a renaming rule, wherein the renaming rule comprises file prefix names and/or file suffix names which need to be added in batches;
acquiring a matching rule of each file type according to engineering characteristics, wherein the matching rule is a hit matching of key character strings of original file names in a renaming list, and the matching rule is a matching classification rule of xml files and java files;
based on the matching rule, the latest version number is acquired through a network, and the matching rule is updated;
selecting a target project folder, and sequentially acquiring the original file names of the resource files in the target project folder to form a renaming list;
based on the matching rule, sequentially distinguishing file types of the original file names in the renaming list;
sequentially adding corresponding file prefix names and/or file suffix names to the original file names according to renaming rules and matching rules to obtain corresponding new file names;
and updating the new file names to the corresponding resource files respectively to achieve renaming, and compiling and verifying the renamed resource files in sequence.
2. The method for batch renaming of resource files of android project according to claim 1, wherein the sequentially renamed resource files are compiled and verified, and the method specifically comprises the following steps:
verifying whether the renamed resource file passes the compiling;
if the compiling is passed, not performing compiling correction;
and if the compiling is not passed, carrying out corresponding compiling correction on the new file name.
3. The method for renaming resource files of an android project according to claim 2, wherein after the corresponding compiling modification is performed on the new file name, further performing:
and according to the compiling and correcting result, correspondingly updating the matching rule.
4. The method for renaming resource files of android project according to claim 1, wherein after selecting the target project folder, further performing:
detecting the content of the target item folder;
if the target item folder is not a blank folder, sequentially executing the next step;
if the target item folder is a blank folder, renaming is not performed.
5. The utility model provides a system for resource file batch renaming of android project, which is characterized in that includes:
the renaming rule module is used for setting a renaming rule, wherein the renaming rule comprises file prefix names and/or file suffix names which need to be added in batches;
the matching rule module is used for acquiring matching rules of all file types according to engineering characteristics, wherein the matching rules are hit matching of key character strings of original file names in a renaming list, and the matching rules are matching classification rules of xml files and java files;
based on the matching rule, the latest version number is acquired through a network, and the matching rule is updated;
the renaming list module is used for selecting a target project folder, and sequentially acquiring the original file names of the resource files in the target project folder to form a renaming list;
the file classification module is used for sequentially distinguishing file types of original file names in the renaming list based on the matching rule;
the renaming module is used for sequentially adding corresponding file prefix names and/or file suffix names into the original file names according to the renaming rule and the matching rule so as to obtain corresponding new file names;
and the compiling and verifying module is used for respectively updating the new file names to the corresponding resource files to achieve renaming, and sequentially compiling and verifying the renamed resource files.
6. An electronic device, comprising:
at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of resource file batch renaming of an android project of any one of claims 1 to 4.
7. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of resource file batch renaming of an android project of any one of claims 1 to 4.
CN202110308521.3A 2021-03-23 2021-03-23 Method, system, equipment and medium for renaming resource files of android project in batches Active CN113157651B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110308521.3A CN113157651B (en) 2021-03-23 2021-03-23 Method, system, equipment and medium for renaming resource files of android project in batches

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110308521.3A CN113157651B (en) 2021-03-23 2021-03-23 Method, system, equipment and medium for renaming resource files of android project in batches

Publications (2)

Publication Number Publication Date
CN113157651A CN113157651A (en) 2021-07-23
CN113157651B true CN113157651B (en) 2024-02-20

Family

ID=76888199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110308521.3A Active CN113157651B (en) 2021-03-23 2021-03-23 Method, system, equipment and medium for renaming resource files of android project in batches

Country Status (1)

Country Link
CN (1) CN113157651B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448875B (en) * 2021-07-27 2024-06-14 中国工商银行股份有限公司 Method and device for processing annual damage and benefit statistics file of test environment
CN114201178B (en) * 2022-02-17 2022-05-27 武大吉奥信息技术有限公司 Method for solving SDK resource conflict in batch
CN114911497A (en) * 2022-04-26 2022-08-16 北京字跳网络技术有限公司 SDK upgrading method and device and computer equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813747A (en) * 2020-07-09 2020-10-23 广东一一五科技股份有限公司 File batch renaming method, electronic equipment and computer readable storage medium
CN112506927A (en) * 2020-12-04 2021-03-16 浪潮云信息技术股份公司 Performance data storage method under cloud environment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030105732A1 (en) * 2000-11-17 2003-06-05 Kagalwala Raxit A. Database schema for structure query language (SQL) server
CN110119274A (en) * 2018-02-05 2019-08-13 北京智明星通科技股份有限公司 A kind of method, apparatus and electric terminal, computer readable storage medium of data compilation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813747A (en) * 2020-07-09 2020-10-23 广东一一五科技股份有限公司 File batch renaming method, electronic equipment and computer readable storage medium
CN112506927A (en) * 2020-12-04 2021-03-16 浪潮云信息技术股份公司 Performance data storage method under cloud environment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
倾斜摄影测量技术在校园三维建模中的应用;李鸽;李永利;赵锦龙;;河南科技(17);全文 *
图片文件批量重命名探讨;周华军;;科技经济市场(11);全文 *

Also Published As

Publication number Publication date
CN113157651A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN113157651B (en) Method, system, equipment and medium for renaming resource files of android project in batches
CN110109681B (en) Method and system for converting codes between different platforms
US20180351845A1 (en) Network verification
CN106155724B (en) Upgrading method and device
US20170099193A1 (en) System and Method Facilitating Reusability of Distributed Computing Pipelines
CN110543427B (en) Test case storage method and device, electronic equipment and storage medium
CN106371881A (en) Method and system for updating program versions in servers
CN111290998A (en) Method, device and equipment for calibrating migration data and storage medium
CN111274204B (en) Terminal identification method, method for generating mobile equipment identification combined code and device thereof
CN104079623A (en) Method and system for controlling multilevel cloud storage synchrony
CN111782679A (en) Method and device for supervising data processing process, computer equipment and storage medium
CN115562686A (en) Lightweight packaging method, system, terminal and storage medium for Springboot project
CN113515303B (en) Project transformation method, device and equipment
CN111124541A (en) Configuration file generation method, device, equipment and medium
US20210342327A1 (en) Method, device, and computer program product for information processing
CN108319551B (en) Software testing method and device, computer equipment and readable storage medium
CN115952185B (en) Data processing method and device, equipment and storage medium
US11327746B2 (en) Reduced processing loads via selective validation specifications
WO2017152079A1 (en) Computer-implemented system and method for automating web application runtime error repairing
CN114466387B (en) Updating method and device of configuration file of base station, storage medium and electronic device
CN103778114A (en) System and method for file recovery
CN112003736B (en) Multi-node configuration information determining method, device and storage medium
CN103761247B (en) A kind of processing method and processing device of error file
CN114090014A (en) Program splitting method, device, equipment and computer storage medium
CN114021133A (en) Code processing method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant