Created
March 11, 2017 02:56
-
-
Save MasonM/bea0f5c90aa6d172aa5d6e496db12187 to your computer and use it in GitHub Desktop.
Search confluence XML export using Nokogir
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
#!/bin/bash | |
nokogiri entities.xml -e ' | |
# Based on https://github.com/locationtech/udig-platform/blob/4b926e7bd35d4c95ee2b7a4d1c3294cc3c2729a7/docs/src/main/java/docs/ConfluencePage.java#L103 | |
current_pages=%{ | |
//object[ | |
@class="Page" | |
and property[@name="contentStatus" and .="current"] | |
and ( | |
collection[@name="historicalVersions"] | |
or ( | |
property[@name="version" and .="1"] | |
and not(property[@name="originalVersion"]) | |
) | |
) | |
] | |
}.gsub(/\s+/, " ").strip | |
p '+"$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment