search in-text?

Discussion in 'NDS - Flashcarts and Accessories' started by questionsleep, Apr 23, 2008.

  1. questionsleep
    OP

    questionsleep Newbie

    Newcomer
    6
    0
    Apr 23, 2008
    United States
    Michigan
    I desire to search a large text file, on my DS.
    For example, I have the text of an encyclopedia, and I look up a specific word and it finds it, just like control F.

    Are there any applications which do this?
    Any similar options? Perhaps searching a saved website?
     
  2. DanTheManMS

    DanTheManMS aka Ricochet Otter

    Member
    4,329
    105
    Jun 2, 2007
    United States
    Georgia
    The only thing I can think of is Vi in DSLinux (press the slash key to enter a word to search for) but you'd almost certainly need slot-2 RAM to open such a large text file without crashing.
     
  3. Jools

    Jools Advanced Member

    Newcomer
    80
    0
    Dec 12, 2005
    Thats a shame, I'd really like to do that too.
     
  4. questionsleep
    OP

    questionsleep Newbie

    Newcomer
    6
    0
    Apr 23, 2008
    United States
    Michigan
    Would you be able to tell me how to do this, exactly?
    I got Linux on my DS, but I have no idea how to do this "Vi" thing.
    And, the file I need to look at is only 2.4 MB?
     
  5. DanTheManMS

    DanTheManMS aka Ricochet Otter

    Member
    4,329
    105
    Jun 2, 2007
    United States
    Georgia
    But the DS only has 4 MB of RAM, and DSLinux uses up a huge chunk of that so that by the time you're done you've only got a few hundred KB of free RAM for running programs. Try it on a small text file first.

    Regardless, once you get inside and are presented with the flashing cursor, type "vi path/to/file.txt". Note that to access the root of your card it's /media/ and spaces must be preceded by a backslash for Linux to handle them properly. Therefore, to access a file in "(root)\Ebooks\Alice In Wonderland.txt" you would type:
    Code:
    vi /media/Ebooks/Alice\ In\ Wonderland.txt
    Tab-completion makes this process much much easier. Start typing the first few letters of the file or folder name and hit Tab to have it automatically complete the name for you. Much faster, and it automatically adds the backslashes for you.

    Once you've got it opened, hit the slash key and type the phrase you wish to find and hit Enter. To escape Vi, press Shift+; to create a colon, type q! and hit Enter to force it to close without saving any changes.

    Vi is a bit complicated, I'll admit, but the page on the DSLinux wiki for Vi explains it better than I can. Use it if you get stuck.