Skip to content
Commits on Jun 11, 2012
  1. fix the newline issue with double quotes \n, delete ItemProcess requi…

    …re and includes in main sm_to_anki.rb file
  2. Found a newline character problem when processing,

    Add a fixture for it.
    remove unnecessary file item_process.rb
  3. Move the clear fold block to the end to make sure it execute at last

    Fix an issue when the question or answer field containing new line character
  4. rewrite the directory generating specs to remove state depenency by c…

    …ombining the directory assertion within one single block
  5. Fix an issue with split() by passing an negative limit to avoid supre…

    …ssing trailing null value
    Fix an greedy match error with multiple spellpad
Commits on Jun 10, 2012
  1. Fix image tag translation bugs:

      digit name is added 5-digil pending
      string name is untouched
    Add 'jpg' as default image type
    Finish the decode_unicode function with HTMLEntities gem
    Add error message in specs for testing image, decode and html_tag
    Fix spec error for html_tag and Nokogiri parse the string as XML instead of HTML
  2. Alter @question and @answer to be Nokogiri.Node object instead of string

    Finish the image tag replacement and pass the test
Commits on Jun 9, 2012
  1. Finish writing specs for the process function of each item

    Added fixtures to suit the test case
    Explicit declare the encoding for specs and scripts
Commits on Jun 8, 2012
  1. finish the output writing function in process_item

    fix process_item to receive an parent_dir parameter to write output path correctly
    fix corresponding specs with mock
    Clear the test genearted dir with FileUtils.rm_rf
  2. Use instead of to enable automatically closing

    correct a number formatting issues
  3. remove detect_type specs on sm_to_anki.spec

    remove type_detection on CourseProcess::process_item, and edited corresponding specs
  4. Write an separate Item class to hold and manipulate information about…

    … an xml file
    Write spec to test this item class
  5. initialize the course_process instance with the fetch_course_info to …

    …avoid calling them explicitly
Commits on Jun 6, 2012
  1. Make the directory geneartion work as intended.

    Let process_item to take an dir to locate current xml files.
  2. unify the detect_item_type function to accept a url instead of an ite…

    …m id\nwrite detailed failure message for spec for output type txt
  3. write the process_course recursive algoritm:

      There are two build-in conditions to determine the direction of recursion:
      1. whether it is the root dir
      2. whether this node is the final item
    write about the processed logging system
      When initialize, use the @processed_items to hold the item being processed before
      Everytime an item is processed, update the list
      When everything is finished write the @processed_items back.
  4. Write the process to process the course data

    Write the spec about how to generate directory
    Add item fixtures
    Correct some typo in
Commits on Jun 4, 2012
  1. Add another key 'content' to hold the items' hierarchy within the con…

    rename the build_dir function to process_course
    add an process_item function
  2. add an instance variable to load the precessed items before; edited t…

    …he spec for the previous title formatting and this processed_item log feature
  3. Put the item processing script on a different tile

    Store the course title as formatter string "fake_title"
  4. the specs for detect_item_type functions, it invokes item processing …

    …functions according to item question's innerhtml tags
Commits on Jun 3, 2012
Something went wrong with that request. Please try again.