-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tag shifter/reparent, empty tags, and images
- Loading branch information
Showing
6 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
weight: 308 | ||
title: "Remove Empty Tags" | ||
description: "" | ||
icon: "article" | ||
date: "2024-04-16T20:46:22-05:00" | ||
lastmod: "2024-04-16T20:46:22-05:00" | ||
draft: false | ||
toc: true | ||
--- | ||
|
||
This tool will remove any empty tags. This works in the same manner that the Above tool does. Note that you may need to run this tool several times if you have nested empty tags. | ||
|
||
This is commonly used with the [All Tags](/docs/selection/all-tags) selection. | ||
|
||
## Parameters | ||
|
||
This tool has no parameters. | ||
|
||
## Output | ||
|
||
Output showing that the empty tags were removed. After this tool was run, there were previously non-empty tags that are **now** empty. The remaining empty tags were **not** removed. This is because they were not empty when the tool checked for them. If you have an empty tag in an tag with no elements beside the empty tag, only the lowest child will be removed. You can run the tool multiple times to remove them all, or adjust your selection. | ||
|
||
Based on the order of the "All Tags" selection, the lowest Sect and last 2 Divs were removed. | ||
|
||
![The empty Div tag is removed after this tool is used..'](/img/emptyTagRemoverExample.jpg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
weight: 307 | ||
title: "Tag Reparent" | ||
description: "" | ||
icon: "article" | ||
date: "2024-04-16T20:24:30-05:00" | ||
lastmod: "2024-04-16T20:24:30-05:00" | ||
draft: false | ||
toc: true | ||
--- | ||
|
||
This tool can help to remove nested tags that are the same element type. **This is the same as the Tag-Shift tool, but this tool will move up the tag tree recursively until it finds a match.** Read the [Tag-Shifter](/docs/tools/tag-shift) documentation before using this tool. | ||
|
||
## Parameters | ||
|
||
The Tag Type must must match the selection for the child to be moved. The child element is the selection. This tool also has an option to automatically delete the parent tag if it is empty after the child has been moved. | ||
|
||
| Parameter | Purpose | | ||
|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Tag Type | This is the type of tag that the toolset will search for. This is the *parent* element. If a child element is a distant child of this element, it will be moved up. | | ||
| Delete if Empty | If the parent tag is empty after the child is moved, the parent tag will be deleted. | | ||
|
||
|
||
## Output | ||
|
||
Output showing the nested tags on the left and the corrected tags on the right. This example moved the last P tag up to the section. The two Divs were not needed. While the original parent tag (2nd Div) was removed, the first Div was not. This is because the Tag Reparent Deletion only removes the original parent, not grandparent tags. If you want to remove empty tags that are not the direct parent, use the Empty Tag Remover tool. | ||
|
||
![Duplicate nested tags were moved out of their parent.'](/img/tagReparentExample.jpg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
weight: 306 | ||
title: "Tag Shift" | ||
description: "" | ||
icon: "article" | ||
date: "2024-04-16T20:07:52-05:00" | ||
lastmod: "2024-04-16T20:07:52-05:00" | ||
draft: false | ||
toc: true | ||
--- | ||
|
||
This tool can help to remove nested tags that are the same element type. Many PDFs have tags that unnecessarily encapsulate another tag. For example, a paragraph tag may incorrectly have a child paragraph tag. This tool will automatically move the child tag up one level, leaving the parent intact. If you want to delete the parent tag if it is empty, use the Remove Empty Tag tool after this one. | ||
|
||
## Parameters | ||
|
||
The Tag Type must must match the selection for the child to be moved. The child element is the selection. | ||
|
||
| Parameter | Purpose | | ||
|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Tag Type | This is the type of tag that the toolset will search for. This is the *parent* element. If a child element is a direct child of this element, it will be moved up. | | ||
|
||
|
||
## Output | ||
|
||
Output showing the nested tags on the left and the corrected tags on the right. The extra tags were moved to the bottom of the tag root (which happened to be the next parent.) | ||
|
||
![Duplicate nested tags were moved to the next parent at the end of the children list'](/img/tagShifterExample.jpg) |