Which one to use for batch import: compressed package or table, and what scenarios are suitable for each source
Should we use a ZIP archive or a spreadsheet for batch import, and what scenarios are suitable for each source? The judgment point lies in whether the content goes along with the resources, or whether we set up the structure first and then fill in the text. AnQiCMS supports batch import through ZIP archives and Excel spreadsheets: the archive can bring the text along with the image and other resource files into the site, while the spreadsheet is for structured fields, suitable for first setting up the entries in bulk and then filling in the content one by one; in addition, there is also an API path available.
Where are the boundaries of the capabilities of ZIP archives and Excel spreadsheets?
The advantage of an archive is its integrity. Migrations often involve both text and images referenced in the text, packaged and sent in, with text and resources landing in one batch, avoiding the trouble of separating content from resources; the cost is that the mapping relationships are hidden in the internal structure of the package, and the larger the package, the more you need to layer by layer to check for problems.
The advantage of the table is its structure. Columns correspond to fields, and each row corresponds to a piece of content. Titles, summaries, and classification belong to batch arrangement. AnQiCMS supports custom content models, and the content structure can be flexibly built according to business needs. Websites with many custom fields will arrange the corresponding relationship between columns and fields in the table; the boundary is not carrying materials outside the main text, and images need to be arranged separately.
How to see the difference between the three sources?
| Comparison item | ZIP compression package | Excel spreadsheet | Interface import /api/import/archive |
|---|---|---|---|
| With or without resource files | Main text and resources enter the station at the same time | Only carries structured fields, and resources are arranged separately. | Import document content mainly, resources need to be confirmed independently |
| Field mapping method | Correspondence between files in the package and the main text | Columns correspond to fields one by one, a mapping table must be written first | Query the title first to see if it already exists |
| Suitable for scenes | Whole site or whole column migration, resource dependency is heavy | Build entries in batches first and then fill in the content, there are many custom fields | Program content is sent in batches, and it needs to be checked for duplication one by one |
| How to locate when it fails | Check the package structure level by level after unpacking | Locate by row, rows correspond to entries | Check each call item by item |
How to choose between two sources?
For columns that are whole copied and strongly depend on images or other materials, using a ZIP compressed package is more convenient, as content and materials enter the station in one action. The site content structure is complex, with many custom fields, and the text can be supplemented later, making Excel tables more suitable: first establish the entries, field values, and classification attribution in bulk, and then fill in the text according to priority.
The content needs to be sent in batches by external programs or old site scripts, following this interface path. AnQiCMS provides a document content import interface /api/import/archive, which supports querying whether the content already exists by title and is used for batch import. Its practical meaning is to remove duplicates: when resuming after a failure, check the title first, then decide whether to send this one again, to avoid the same title entering the station twice. What parameters are involved in the interface, and whether resources can be included, are clear boundaries to be confirmed in the plan.
What should be prepared before import?
The first is the field mapping table. Write the correspondence between the old field and the new field column by column, especially for custom fields: which column goes into which field, how to handle null values, and what are the format conventions, finalize before import, so there is a basis for comparison after import. The second is the alias rule. The alias determines the direction of the page within the site, and it is easy to have duplicate or random strings without rules when batch entering, so it is necessary to set the generation rules in advance. The third is the classification and attribution. Write which column each content belongs to in the mapping table, so that the content does not need to be manually moved after entering the site.
What are the four items that must be checked after import?
Firstly, classify: open the newly arrived content, confirm that it falls in the expected column and list position is correct. Secondly, alias: check whether it conforms to the rules and whether there are duplicates, which is directly related to the stability of the link. Thirdly, image placement: confirm that the resources have indeed arrived and are displayed normally in the text, and confirm that there are no empty references to resources that cannot be reached in the table route. Fourthly, whether it is necessary to repush the link: if there are any old links or list entries pointing to this content within the station, visit them one by one to confirm that the landing point is valid, and synchronize the new direction if necessary.
How to schedule batch import and scheduled release?
AnQiCMS supports scheduled publishing within the time factor, allowing content to be set for release at a specific time. In the migration, this is both convenient and risky: bulk import and scheduled publishing are挤在同个时间窗口,which is equivalent to releasing a large amount of content at the same time, making it difficult to determine whether the problem is caused by the import or publishing stage. The safe approach is to separate the two, first entering a controllable state during the import phase, and then scheduling the scheduled publishing in batches by category or theme, so that the release rhythm matches the verification rhythm.
Common questions
Can you use compressed packages and tables together?Can be separated by range: Structure and custom fields go through the table, and text with resources goes through the compressed package. The premise is to first determine the mapping table and归属 rules to avoid the same content entering from two entrances once.
Can the table import contain images?The table carries structured fields, and images do not rely on it to enter the station. They need to be processed separately outside the import arrangement, and after import, check whether the text reference is valid according to the position of the image.
How to avoid repeated imports?Check by title first and then send. /api/import/archive supports querying the existence of content by title, place this step before each action, so when the batch is re-run, the same content will not be sent twice.
Do we need to do a manual check after import?Yes. Four items such as classification, alias, image placement, and old link redirection all need to be manually sampled and verified. The import action is only responsible for sending the content in, and whether these points are qualified is not within its judgment scope.