Skip to content

Command Line Program

Wen (Kevin) Zhu edited this page Apr 26, 2015 · 19 revisions

In general, the SketchFinder application finds the projects and libraries in a sketchbook folder just as the Arduino IDE would. It prints them to the console in an indented tree. Several options are available that affect how it displays files.

##Input All options can be found by calling SketchFinder with the argument -h, --h, -help, or --help.

There is another option -import which allows you import a zip file containing one library folder to the sketch folder. If you use this option, the following arguments are path to the zip file and the path to the skech folder.

For example, the command:
java -jar sketchFinder.jar -import /Path/To/Zip/File /Path/To/SketchFolder

Otherwise, the input is the filepath of the folder in which the sketches are located followed by any number of these arguments:

  • hideExtensions - Hides the extensions of the files it shows.
  • showProjectFiles - Shows the actual files in a project.
  • hideLibraryFiles - Hides the actual files in a library.
  • showUnderscoreFiles - Shows the files whose names start with underscore.
  • showHiddenFiles - Shows the hidden files in a project folder. ##Output SketchFinder returns an indented tree of the folders and files, in alphabetical order. By default, the files of projects are not displayed, only the folders, but the files of libraries are. Also by default, extensions are shown for all files and any files that are hidden or begin with an underscore are not displayed. These options can be changed as explained above.

###Example

For example, the command:
java -jar SketchFinder.jar /sketchFinder/test_sketchbooks/seekerakos

Might well return:

> seekerakos
  > receiver  
  > transmiter
  > transmiter_ino
------------------------------------------------------------------
> library
  > GSM
    > GsmWebClient
    > GsmWebServer
    > MakeVoiceCall
    > Tools
      > BandManagement
      > GsmScanNetworks
  > Servo
    > Knob
    > Sweep

If we want to hide the project files, the command:
java SketchFinder /sketchFinder/test_sketchbooks/seekerakos showProjectFiles

Might very well return:

> seekerakos
  > receiver
    > receiver.ino  
  > transmiter
    > transmiter.ino
  > transmiter_ino
    > transmiter_ino.ino
  > range_detector.ino
  > relay.ino
  > servo_micro.ino
  > thermal_sensor.ino
------------------------------------------------------------------
> library
  > GSM
    > GsmWebClient
      > GsmWebClient.ino
    > GsmWebServer
      > GsmWebServer.ino
    > MakeVoiceCall
      > MakeVoiceCall.ino
    > Tools
      > BandManagement
        > BandManagement.ino
      > GsmScanNetworks
        > GsmScanNetworks.ino
  > Servo
    > Knob
      > Knob.ino
    > Sweep
      > Sweep.ino

If we want to hide the extensions of the file, the command:
java SketchFinder /sketchFinder/test_sketchbooks/seekerakos hideExtensions

Might very well return:

> seekerakos
  > receiver
    > receiver  
  > transmiter
    > transmiter
  > transmiter_ino
    > transmiter_ino
  > range_detector
  > relay
  > servo_micro
  > thermal_sensor
------------------------------------------------------------------
> library
  > GSM
    > GsmWebClient
      > GsmWebClient
    > GsmWebServer
      > GsmWebServer
    > MakeVoiceCall
      > MakeVoiceCall
    > Tools
      > BandManagement
        > BandManagement
      > GsmScanNetworks
        > GsmScanNetworks
  > Servo
    > Knob
      > Knob
    > Sweep
      > Sweep
> seekerakos
  > receiver
    > receiver  
  > transmiter
    > transmiter
  > transmiter_ino
    > transmiter_ino
  > range_detector
  > relay
  > servo_micro
  > thermal_sensor
------------------------------------------------------------------
> library
  > GSM
    > GsmWebClient
      > GsmWebClient
    > GsmWebServer
      > GsmWebServer
    > MakeVoiceCall
      > MakeVoiceCall
    > Tools
      > BandManagement
        > BandManagement
      > GsmScanNetworks
        > GsmScanNetworks
  > Servo
    > Knob
      > Knob
    > Sweep
      > Sweep
Clone this wiki locally