Create debug csv files ODK 2.0 without using adb/grunt

Can you point me to the code/files to look at for writing the debug files.

I want to add a mechanism to write the debug files (actually I would like the csv files mainly) directly on the device (i.e not using android debug bridge).

E.g. if I wanted to create a simple app with a button that said create debug files and have them created as opposed to doing this via the debug bridge.

Or is that already possible to do with the existing apps - or point me to the hook where this occurs when using android debug/grunt.

Thanks,
tom

What are you trying to accomplish?

I don't understand what you're asking.

There are two steps to this:

(1) use ODK Tables on the device to emit the debug files (which are
approximately the first 10 rows from each table on the device)
(2) use adb to pull those files onto the computer.

The first step is entirely a manual step, done entirely on the device.

If you want to get a dump of the entire contents of the tables on the
device, you would export those tables to CSV files, which is completely
different.

Both actions are currently only available through the ODK Tables UI.

In all cases, you would still need the debug bridge or some other mechanism
to get them off of the device.

··· On Wed, Aug 12, 2015 at 5:54 AM, <7shriner@gmail.com> wrote:

Can you point me to the code/files to look at for writing the debug files.

I want to add a mechanism to write the debug files (actually I would like
the csv files mainly) directly on the device (i.e not using android debug
bridge).

E.g. if I wanted to create a simple app with a button that said create
debug files and have them created as opposed to doing this via the debug
bridge.

Or is that already possible to do with the existing apps - or point me to
the hook where this occurs when using android debug/grunt.

Thanks,
tom

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Sorry for the confusing question. Thanks for the pointers to the links - I was thinking that write debug was done through adb and not a manual step. Apologies for my misunderstanding of that.

What I wanted to do potentially is have a button to save the survey csv files in the survey or tables app (this already exists as write debug files as you indicate) so I could then push or pull the csv files to a non odk-aggregate placeholder somewhere.

So it seems all I would need to do from your answers would be to modify the write debug files button text to some other text - e.g. save/export CSV data. I could then add to that button functionality to send the files to some location or add an additional button to push the data elsewhere.

Alternatively I could query the database and send the survey data elsewhere (e.g a file or server) but the other method seemed like it would be easier for someone not super familiar with the ODK code to implement.

I was then asking where in the source to begin looking to do the above and if I did not want to modify the app at all what portion of the source should I look at to see how the debug files get written. If I wanted to write a totally separate app to get the survey database data, save it as CSV and push it to an alternate place what portions of the existing code I could use to do such.

I know your time is limited so much thanks.

··· On Wednesday, August 12, 2015 at 7:54:50 AM UTC-5, 7shr...@gmail.com wrote: > Can you point me to the code/files to look at for writing the debug files. > > I want to add a mechanism to write the debug files (actually I would like the csv files mainly) directly on the device (i.e not using android debug bridge). > > E.g. if I wanted to create a simple app with a button that said create debug files and have them created as opposed to doing this via the debug bridge. > > Or is that already possible to do with the existing apps - or point me to the hook where this occurs when using android debug/grunt. > > Thanks, > tom

The instructions for writing the debug objects to CSV files via Tables can
be found at
https://opendatakit.org/use/2_0_tools/odk-application-designer-2-0-rev126/#ODK_Tables_Obtaining_Sample_Data_Values_for_Testing
.

The instructions for exporting your table data via Tables can be found at
https://opendatakit.org/use/2_0_tools/odk-tables-2-0-rev126/#Exporting_Tables_to_CSV
.

Clarice

··· On Wed, Aug 12, 2015 at 10:13 AM, Mitch Sundt wrote:

What are you trying to accomplish?

I don't understand what you're asking.

There are two steps to this:

(1) use ODK Tables on the device to emit the debug files (which are
approximately the first 10 rows from each table on the device)
(2) use adb to pull those files onto the computer.

The first step is entirely a manual step, done entirely on the device.

If you want to get a dump of the entire contents of the tables on the
device, you would export those tables to CSV files, which is completely
different.

Both actions are currently only available through the ODK Tables UI.

In all cases, you would still need the debug bridge or some other
mechanism to get them off of the device.

On Wed, Aug 12, 2015 at 5:54 AM, 7shriner@gmail.com wrote:

Can you point me to the code/files to look at for writing the debug files.

I want to add a mechanism to write the debug files (actually I would like
the csv files mainly) directly on the device (i.e not using android debug
bridge).

E.g. if I wanted to create a simple app with a button that said create
debug files and have them created as opposed to doing this via the debug
bridge.

Or is that already possible to do with the existing apps - or point me to
the hook where this occurs when using android debug/grunt.

Thanks,
tom

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Again, your use of terms is confusing.

I believe you want to Export your data table via Tables

This is NOT the 'debug objects' action.

https://github.com/opendatakit/tables-fixed/blob/master/tables/src/org/opendatakit/tables/activities/ExportCSVActivity.java

is the activity for the UI to write out a table to a csv (and make copies
of any attachments ).

··· On Wed, Aug 12, 2015 at 12:56 PM, <7shriner@gmail.com> wrote:

On Wednesday, August 12, 2015 at 7:54:50 AM UTC-5, 7shr...@gmail.com wrote:

Can you point me to the code/files to look at for writing the debug
files.

I want to add a mechanism to write the debug files (actually I would
like the csv files mainly) directly on the device (i.e not using android
debug bridge).

E.g. if I wanted to create a simple app with a button that said create
debug files and have them created as opposed to doing this via the debug
bridge.

Or is that already possible to do with the existing apps - or point me
to the hook where this occurs when using android debug/grunt.

Thanks,
tom

Sorry for the confusing question. Thanks for the pointers to the links - I
was thinking that write debug was done through adb and not a manual step.
Apologies for my misunderstanding of that.

What I wanted to do potentially is have a button to save the survey csv
files in the survey or tables app (this already exists as write debug files
as you indicate) so I could then push or pull the csv files to a non
odk-aggregate placeholder somewhere.

So it seems all I would need to do from your answers would be to modify
the write debug files button text to some other text - e.g. save/export CSV
data. I could then add to that button functionality to send the files to
some location or add an additional button to push the data elsewhere.

Alternatively I could query the database and send the survey data
elsewhere (e.g a file or server) but the other method seemed like it would
be easier for someone not super familiar with the ODK code to implement.

I was then asking where in the source to begin looking to do the above and
if I did not want to modify the app at all what portion of the source
should I look at to see how the debug files get written. If I wanted to
write a totally separate app to get the survey database data, save it as
CSV and push it to an alternate place what portions of the existing code I
could use to do such.

I know your time is limited so much thanks.

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Another clarification on debug objects is that they are JSON files. Sorry
for any confusion my haste may have caused. The debug objects are used to
help someone style a Tables JavaScript app in the Chrome browser. For
example, if you were to look in the development tip of the app_designer
repo at the app/config/tables/Tea_houses_list.js, you would see that the
debug file ("Tea_houses_data.json") is used as the data only when the
JavaScript code is running in Chrome.

If you want to save the data from your database table into a CSV file and
then push that file to a location of your choice, then you would want to
use the instructions for exporting your table data and not writing out the
debug objects. As Mitch points out, ExportCSVActivity is the place to
start looking.

Clarice

··· On Wed, Aug 12, 2015 at 12:56 PM, <7shriner@gmail.com> wrote:

On Wednesday, August 12, 2015 at 7:54:50 AM UTC-5, 7shr...@gmail.com wrote:

Can you point me to the code/files to look at for writing the debug
files.

I want to add a mechanism to write the debug files (actually I would
like the csv files mainly) directly on the device (i.e not using android
debug bridge).

E.g. if I wanted to create a simple app with a button that said create
debug files and have them created as opposed to doing this via the debug
bridge.

Or is that already possible to do with the existing apps - or point me
to the hook where this occurs when using android debug/grunt.

Thanks,
tom

Sorry for the confusing question. Thanks for the pointers to the links - I
was thinking that write debug was done through adb and not a manual step.
Apologies for my misunderstanding of that.

What I wanted to do potentially is have a button to save the survey csv
files in the survey or tables app (this already exists as write debug files
as you indicate) so I could then push or pull the csv files to a non
odk-aggregate placeholder somewhere.

So it seems all I would need to do from your answers would be to modify
the write debug files button text to some other text - e.g. save/export CSV
data. I could then add to that button functionality to send the files to
some location or add an additional button to push the data elsewhere.

Alternatively I could query the database and send the survey data
elsewhere (e.g a file or server) but the other method seemed like it would
be easier for someone not super familiar with the ODK code to implement.

I was then asking where in the source to begin looking to do the above and
if I did not want to modify the app at all what portion of the source
should I look at to see how the debug files get written. If I wanted to
write a totally separate app to get the survey database data, save it as
CSV and push it to an alternate place what portions of the existing code I
could use to do such.

I know your time is limited so much thanks.

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.