Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    OM2
    OM2 is offline
    New Coder
    Join Date
    Apr 2012
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Need advice to create a standalone text parser

    I want to write a program that will look through file names in a directory
    These files will be HTML or PHP (or ASP) or CSS - but just be plain text files

    There will be special file names, like index.myName.textparser.html

    When ever it comes across a file with 'textparser' in, it will go through all other text files in the directory and search for:

    <!-- Start myName -->
    <!-- End myName -->

    and replace everything between those 2 markers the contents of the file index.myName.textparser.html

    That's it!

    I'm hoping someone will understand what I want to do!

    What language would be best to code in?
    Important: the program MUST be standalone!

    Otherwise, I would write using Perl or something for multi platform - but then you need the end user to have the Perl programming language!

    ALSO of consideration: I would like the end result be multi platform and be usable on many OS's

    I'd also like to automatically do sub directories - but that can come afterwards - that would be easy to add once we have figured out the first part

    Any feedback would be great

    Thanks


    OM

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by OM2 View Post
    I want to write a program that will look through file names in a directory
    These files will be HTML or PHP (or ASP) or CSS - but just be plain text files

    There will be special file names, like index.myName.textparser.html

    When ever it comes across a file with 'textparser' in, it will go through all other text files in the directory and search for:

    <!-- Start myName -->
    <!-- End myName -->

    and replace everything between those 2 markers the contents of the file index.myName.textparser.html

    That's it!

    I'm hoping someone will understand what I want to do!

    What language would be best to code in?
    Important: the program MUST be standalone!

    Otherwise, I would write using Perl or something for multi platform - but then you need the end user to have the Perl programming language!

    ALSO of consideration: I would like the end result be multi platform and be usable on many OS's

    I'd also like to automatically do sub directories - but that can come afterwards - that would be easy to add once we have figured out the first part

    Any feedback would be great

    Thanks


    OM
    Due to your cross platform requirement your best bet it to just use a scripting language but of course the end user will need that scripts interpreter installed on the machine where the script will be run. Even though I despise Python it would be a good candidate for this task and is a cross platform scripting language.

    If you still want a high end language then Java would work and would only need to be compiled once but then again you need the JVM installed on each platform to run it. You could use other languages such as C/C++ but you would have to compile and build the executables for each platform you intend to support.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    OM2
    OM2 is offline
    New Coder
    Join Date
    Apr 2012
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts
    thanks for that
    i think i'll go for plain old c language in that case
    i won't bother coding myself - i'll get a freelancer to do that
    it's been a loooong time since i had to code in that!

    but, assuming i've got what i need coded in c, how do i make into an executable?
    what would u recommend?

    i'd rather get someone to code for me the program and then i'll compile myself

    thanks

  • #4
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by OM2 View Post
    thanks for that
    i think i'll go for plain old c language in that case
    i won't bother coding myself - i'll get a freelancer to do that
    it's been a loooong time since i had to code in that!

    but, assuming i've got what i need coded in c, how do i make into an executable?
    what would u recommend?

    i'd rather get someone to code for me the program and then i'll compile myself

    thanks
    You will need a C compiler/linker for every platform you plan to build an executable for as well as you will need access to every platform in order to build an executable on each of those platforms. So if you want to build an executable for Windows, Linux, Unix, Mac, etc then you will need systems with each of those along with C compilers/linkers installed on each.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •