Advertisement
xrobau

Last Updated Timestamp for QLD Local Government Election

Mar 18th, 2024
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | Software | 0 0
  1. This outputs the last time the xml file was generated, as well as the lasteUpdated timestamp of Gladstone.
  2.  
  3. xmlstarlet sel -t -c '/ecq/generationDateTime' -n -v '//lga[@areaCode=028]//district/@lastUpdated' -n
  4.  
  5. You can use this to automatically display both by something like this:
  6.  
  7. curl -s https://resultsdata.elections.qld.gov.au/PublicResults.zip | zcat 2>/dev/null | xmlstarlet sel -t -c '/ecq/generationDateTime' -n -v '//lga[@areaCode=028]//district/@lastUpdated' -n
  8.  
  9. That will output something similar to this:
  10.  
  11. <generationDateTime>2024-03-19T10:38:27.482106</generationDateTime>
  12. 2024-03-18T13:47:25
  13.  
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement