RadioReference on Facebook   RadioReference on Twitter   RadioReference Blog
 

Go Back   The RadioReference.com Forums > Software > Trunking Control Channel Decoding


Trunking Control Channel Decoding For discussion of installation, setup, configuration, and use of the Trunker / Unitrunker digital decoding utilities (for decoding Trunking control channels)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-10-2013, 11:40 AM
bigmattyl's Avatar
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Sep 2010
Location: Orange County, CA
Posts: 54
Default exporting user ids in unitrunker

Hey all,

Can't quite figure out how to export user ids and labels out of unitrunker so I can import them into my HP1.

I tried the obvious of highlighting all the rows and copy/paste into excel and that didnt work

any suggestions?

Matt
Reply With Quote
Sponsored links
        
  #2 (permalink)  
Old 01-10-2013, 12:34 PM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Dec 2002
Location: Wichita Falls, TX
Posts: 3,376
Default

I think you would have to export the system, which will be a .xml file, then use a text editor to remove all the other fields and xml tags.
As far as I know you can't copy/paste anything to or from Unitrunker.
__________________
Tom
Reply With Quote
  #3 (permalink)  
Old 01-10-2013, 12:55 PM
Jay911's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Feb 2002
Location: Bragg Creek, Alberta
Posts: 5,155
Send a message via Skype™ to Jay911
Default

Like Tom says, it's a royal pain (and no offense to Rick) but the best you can do is export to an XML file, then strip out the XML tags. If you do it right with a good search-and-replace editor (Notepad++ is my preferred one) you can replace the tags with tab characters, then copy the entire text editor buffer and paste it into Excel with relative ease. It's getting the data from the XML format into something that Excel can take that's the time-consumer/hassle.
Reply With Quote
  #4 (permalink)  
Old 01-10-2013, 1:58 PM
bigmattyl's Avatar
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Sep 2010
Location: Orange County, CA
Posts: 54
Default

Ewww... Ok thanks guys! =)
Reply With Quote
  #5 (permalink)  
Old 01-11-2013, 1:48 AM
Seņor Member
  RadioReference Database Admininstrator
Database Admin
 
Join Date: Dec 2001
Location: Texas
Posts: 5,414
Default

You can strip the XML down to any format - including CSV - by using XSLT. There's an example here ...

XSLT extraction for Unitrunker
Reply With Quote
Sponsored links
  #6 (permalink)  
Old 01-11-2013, 3:57 AM
Jay911's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Feb 2002
Location: Bragg Creek, Alberta
Posts: 5,155
Send a message via Skype™ to Jay911
Default

Quote:
Originally Posted by Unitrunker View Post
You can strip the XML down to any format - including CSV - by using XSLT. There's an example here ...

XSLT extraction for Unitrunker
Here's one of those things that Rick keeps telling us over and over that I always forget about because I "remember" it when I'm too busy to attack it and try to use it to my advantage. And I'm sure he's sick and tired of telling us about it.

Well, I just woke up, my sleep cycle clearly still out of whack after being on night shifts the past few days, so I have a bunch of time when I won't be able to get back to sleep and I need something to do.
Reply With Quote
  #7 (permalink)  
Old 01-11-2013, 5:11 AM
Jay911's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Feb 2002
Location: Bragg Creek, Alberta
Posts: 5,155
Send a message via Skype™ to Jay911
Default

That's pretty slick. My apologies to you for never listening in the past.

I "massaged" groups.xsl and created a users.xsl which will do similar extraction for user entries. I also created a trio of batch files to help make running this a little easier.

Unzip xml2csv.zip into the folder where your Unitrunker.xml (or other xml files if you have done an export as per the info page Rick linked to) is located.

You can run (from a command prompt) xml2csv-grp filename (without the .xml extension) to extract group data to filename-groups.csv; xml2csv-usr filename (again, no .xml extension) to extract user data to filename-users.csv; or xml2csv filename to extract both at once to the respective filenames listed above. The XSL files I included will give slightly more descriptive column headings and wrap the alpha fields (tag, label, etc) and the color value in quotes, since Excel sometimes spazzes out on those with CSV files if they're not enquoted. Both XSL files have been tested on an exported system from my Unitrunker.xml, which contains over 200 groups and 9000+ users.

The one thing that the batch files crap out on is if your exported system name has a space in it. For example xml2csv APCO P25BEE00-123 will break with an error from the msxsl.exe program (which, btw, I didn't include in the zip, get it from the link Rick supplies on his page). The above filename is what Unitrunker will give you if you export system BEE00-123. Just rename it to something that doesn't have a space in it and you'll be fine. (I tried the usual command prompt tricks of putting the filename in quotes, but msxsl still didn't like it for some reason.)

I'd need to spend a lot more time with the tutorial to figure out how to extract, say, sites and channels/frequencies, or for example to convert flags like "logon" in the user data to human-readable values, and my brain isn't switched on enough right now to go poring through that tutorial. Hope this works well enough for you for now though.
Attached Files
File Type: zip xml2csv.zip (1.3 KB, 11 views)
Reply With Quote
  #8 (permalink)  
Old 01-11-2013, 8:08 AM
Member
  Amateur Radio Operator
Amateur Radio
 
Join Date: Dec 2002
Location: Wichita Falls, TX
Posts: 3,376
Default

Quote:
Originally Posted by Unitrunker View Post
You can strip the XML down to any format - including CSV - by using XSLT. There's an example here ...

XSLT extraction for Unitrunker
I tried that a few years ago and never could get it to work. Has it been changed recently? What if you don't use MS Office or Excel?
__________________
Tom
Reply With Quote
  #9 (permalink)  
Old 01-11-2013, 12:21 PM
Jay911's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Feb 2002
Location: Bragg Creek, Alberta
Posts: 5,155
Send a message via Skype™ to Jay911
Default

Quote:
Originally Posted by nd5y View Post
What if you don't use MS Office or Excel?
I use OpenOffice and it loaded the CSVs from my test above just fine.
Reply With Quote
Sponsored links
  #10 (permalink)  
Old 01-11-2013, 6:18 PM
Seņor Member
  RadioReference Database Admininstrator
Database Admin
 
Join Date: Dec 2001
Location: Texas
Posts: 5,414
Default

Quote:
Originally Posted by Jay911 View Post
The one thing that the batch files crap out on is if your exported system name has a space in it.
You can wrap the path or file name in quotes. eg. "C:\Users\Bob\My Documents" instead of C:\Users\Bob\My Documents.
Reply With Quote
  #11 (permalink)  
Old 01-11-2013, 6:48 PM
Jay911's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Feb 2002
Location: Bragg Creek, Alberta
Posts: 5,155
Send a message via Skype™ to Jay911
Default

I tried just the file name, as in typing xml2csv "APCO P25660C5-05B" and that didn't work. Maybe I have to change the batch file and wrap the filename in quotes by default every time. (Aha, that's probably the problem - the above would be parsed as msxsl "APCO P25660C5-05b".xml groups.xsl -o "APCO P25660C5-05b"-groups.csv - I imagine having only part of the filename in quotes is making the whole thing unhappy.)
Reply With Quote
  #12 (permalink)  
Old 01-15-2013, 2:39 PM
plaws's Avatar
Member
  Shack Photos
Shack photos
Premium Subscriber
Premium Subscriber
 
Join Date: Jan 2005
Location: O-o-o-o-o-o-o-klahoma
Posts: 1,041
Lightbulb

Has anyone written a "users.xsl" to allow extraction of User IDs? I'd like to extract those for upload by Freescan.
__________________
Peter Laws / N5UWY
I am not anti-social ... OK, a little ... but don't friend me, bro.
Reply With Quote
  #13 (permalink)  
Old 01-16-2013, 10:44 AM
Seņor Member
  RadioReference Database Admininstrator
Database Admin
 
Join Date: Dec 2001
Location: Texas
Posts: 5,414
Default

Read post #7 above.
Reply With Quote
  #14 (permalink)  
Old 01-16-2013, 10:48 AM
plaws's Avatar
Member
  Shack Photos
Shack photos
Premium Subscriber
Premium Subscriber
 
Join Date: Jan 2005
Location: O-o-o-o-o-o-o-klahoma
Posts: 1,041
Default

Quote:
Originally Posted by Unitrunker View Post
Read post #7 above.
You mean actually read all the posts in a thread? Why would I do that?

Thank you.


Edited to add that I spent a little more time and had worked up the beginning of a users.xsl myself. The syntax isn't that bad once you start to play with it.
__________________
Peter Laws / N5UWY
I am not anti-social ... OK, a little ... but don't friend me, bro.

Last edited by plaws; 01-16-2013 at 10:50 AM..
Reply With Quote
  #15 (permalink)  
Old 02-14-2013, 12:40 PM
Member
   
Join Date: Apr 2012
Location: St. Louis
Posts: 95
Default

I only just started using unitracker and I'm already beginning to like it.

I admire someone who uses XML instead of something more primitive. But did Rube Goldberg come up with the idea of running xml2csv from the command line?

Does anybody remember Rube Goldberg?

I'm working on converting XML files using the clip language of the text editor Notetab. That's something I might actually enjoy doing and it's something I know will work.
Reply With Quote
Sponsored links
  #16 (permalink)  
Old 02-14-2013, 12:51 PM
nosoup4u's Avatar
Member
   
Join Date: Jan 2002
Location: Broadway, NJ
Posts: 1,123
Send a message via AIM to nosoup4u Send a message via Yahoo to nosoup4u
Default

I do it in excel. I rename the unitrunker file to unitrunker.txt and load as a delimited text file using " as the delimiter. Once you do that, Column B will be the radio ID and Column D will be the tag.
__________________
John - KC2KZZ
http://www.warrenskywarn.org
PSR-800, BCD996XT (w/GPS) Home Patrol-1 & BCT15
Icom IC-80AD
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:05 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
All information here is Copyright 2012 by RadioReference.com LLC and Lindsay C. Blanton III.Ad Management by RedTyger
Copyright 2011 by RadioReference.com LLC Privacy Policy  |  Terms and Conditions