Author Topic: Inline commenting on *.list files  (Read 780 times)

0 Members and 1 Guest are viewing this topic.

Offline SSOWorld

  • Newbie
  • *
  • Posts: 42
  • Last Login:Today at 01:12:58 pm
Inline commenting on *.list files
« on: December 01, 2016, 10:25:22 am »
I know this is a feature not many would use but does the parser handle inline commenting?

ex:
Code: [Select]
IL I-90 WI/IL I-294  #NW Tollway
Just putting my $.02 out there.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1154
  • Last Login:Today at 02:25:54 pm
Re: Inline commenting on *.list files
« Reply #1 on: December 01, 2016, 11:43:29 am »
I know this is a feature not many would use but does the parser handle inline commenting?

ex:
Code: [Select]
IL I-90 WI/IL I-294  #NW Tollway
Just putting my $.02 out there.

Not at this time.  Any line that doesn't split into 4 space-separated fields generates an "Incorrect format line" message in your log file and is otherwise ignored.  However, full-line comments are supported.  Any line in a .list that begins with # is silently ignored.

Offline SSOWorld

  • Newbie
  • *
  • Posts: 42
  • Last Login:Today at 01:12:58 pm
Re: Inline commenting on *.list files
« Reply #2 on: December 01, 2016, 11:50:00 am »
Understood. 

I won't stress over this one.  Would be a nice enhancement, but the full-line does the job. 8)

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1154
  • Last Login:Today at 02:25:54 pm
Re: Inline commenting on *.list files
« Reply #3 on: December 01, 2016, 12:46:26 pm »
Understood. 

I won't stress over this one.  Would be a nice enhancement, but the full-line does the job. 8)

OK, good.  It would be trivial to add to the code, and my only reason not to do so is that I hesitate to add another operation to the processing of the 180,000 lines of list file entries.  Some time, I'll see how much longer that would take.  It might not be bad, especially if I stripped out comments as a preprocessing step.

Offline rschen7754

  • Newbie
  • *
  • Posts: 40
  • Gender: Male
  • Last Login:July 14, 2018, 11:15:56 pm
    • Rschen7754
Re: Inline commenting on *.list files
« Reply #4 on: December 03, 2016, 01:10:03 am »
I would appreciate it too, so that I don't second-guess myself if I don't remember why a line is there.  :)

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1005
  • Gender: Male
  • Last Login:Today at 01:04:26 pm
Re: Inline commenting on *.list files
« Reply #5 on: December 03, 2016, 02:47:24 am »
I've submitted an issue on GitHub so that the wish won't get lost: https://github.com/TravelMapping/DataProcessing/issues/37.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1349
  • Last Login:Today at 04:18:11 pm
Re: Inline commenting on *.list files
« Reply #6 on: December 03, 2016, 03:04:53 pm »
I would appreciate it too, so that I don't second-guess myself if I don't remember why a line is there.  :)
Just as easily done with full-line comments though. May not be in a preferred, inline, format, but still...

Offline mapcat

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 581
  • Last Login:Today at 03:44:46 pm
Re: Inline commenting on *.list files
« Reply #7 on: December 03, 2016, 03:14:04 pm »
I would appreciate it too, so that I don't second-guess myself if I don't remember why a line is there.  :)
Just as easily done with full-line comments though. May not be in a preferred, inline, format, but still...
Not if you maintain your .list as a spreadsheet and want to be able to sort the data.
Clinched:

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1349
  • Last Login:Today at 04:18:11 pm
Re: Inline commenting on *.list files
« Reply #8 on: December 03, 2016, 04:28:00 pm »
Not if you maintain your .list as a spreadsheet and want to be able to sort the data.
Ooh. Valid point!

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1154
  • Last Login:Today at 02:25:54 pm
Re: Inline commenting on *.list files
« Reply #9 on: July 08, 2018, 11:05:05 pm »
I thought of a simple and efficient way to support this, so it's in.

Valid comments are now full-line ones (whole line starts with '#') or lines with 4 fields followed by a space followed by one or more additional fields, the first of which (and 5th on the line) must start with '#'.