Skip to content

Comments

Quickfort list#164

Merged
lethosor merged 15 commits intoDFHack:quickfortfrom
myk002:quickfort_list
Jul 29, 2020
Merged

Quickfort list#164
lethosor merged 15 commits intoDFHack:quickfortfrom
myk002:quickfort_list

Conversation

@myk002
Copy link
Member

@myk002 myk002 commented Jul 29, 2020

DFHack/dfhack#499 Implement quickfort list functionality, including .csv file tokenization (so I can read the modeline in the first cell)

local modeline = scan_blueprint(v.path)
if not modeline then
print(string.format(
'skipping "%s": no #mode marker detected', v.path))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have plans to support these later? I happened to have a very bare-bones CSV file I was testing digfort with yesterday, just containing a couple rows and columns:

d,h,d
h,d,h
d,h,d

I don't know how widespread files like these are, if at all (and I'm fine with not supporting them)

Copy link
Member Author

@myk002 myk002 Jul 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you test to see if it works in the original quickfort windows app? I could support it, and just assume that no header means #dig -- I don't think that's something that will bite us later..

At some point I'm thinking of supporting multiple "sheets" in the same .csv file, which would give them a lot of the advantages that .xlsx files have. each "sheet" would be separated by a modeline, but I don't think supporting missing initial modelines would interfere with that -- it's just subsequent "sheets" that would need one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we risk polluting the 'quickfort list' output with unrelated files, but how likely is it that users are storing unrelated .csv or .xlsx files in the blueprints folder?

I guess a greater risk is when we support .xlsx, users can't have non-blueprint sheets in their spreadsheet files. I myself usually keep a "Notes" sheet in my spreadsheet files. we could only support headerless .csv files and not headerless .xlsx sheets, but that might be confusing for users who convert their working .csv files into non-working .xlsx files

Copy link
Member

@lethosor lethosor Jul 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have ready access to Windows, sorry. All I know is that digfort accepts it. I suspect that people wouldn't have non-blueprints in the blueprints folder, particularly since it's new (to DFHack).

Multiple blueprints in a single file isn't something I had considered... if that makes it complicated to handle this, I'm fine with putting this off. The error message is pretty clear about what needs to be added to these sorts of files.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I guess to prevent potential confusion later, I think I'd rather not implement modeless blueprints -- unless, of course, there is a clear signal from the community that this is wanted. I'm not seeing a lot of activity in the thread I started, so I'm not sure it's even worth asking now, but I expect more activity once this script gets into a release and starts seeing some real usage.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me!

@lethosor lethosor merged commit c6aae84 into DFHack:quickfort Jul 29, 2020
@myk002 myk002 deleted the quickfort_list branch July 29, 2020 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants