I am occasionally a professional software archeologist. Thus looking for information in my spare time is sometimes tedious and I will gravitate towards asking questions rather than perform in-depth research for what is supposed to be a pleasurable, spare time project. Nevertheless, since I have looked for answers to all of these questions, if the response is RTFM then please provide a link to TFM so that I can look there first the next time. Thank you.
1) I used networth.ash and note that it generates a lot of output. I ran it from the Scripts menu in mafia and note that all output appeared in the gCLI window. Is there a way to run an arbitrary ash script that uses print, and tee or pipe the output so that I end up with a file that only contains the script generated output? If yes then examples or syntax, please.
2) I am having trouble finding examples of file_to_map usage. In particular I would like an example that includes the input file itself since I anticipate I would create files external to mafia and ash and read them. Specifically, can the mafia data file mallprices.txt be read as a map? I'd guess not for several reasons including the version number as the first line, but if that is incorrect, what would the resulting map look like?
3) Related to 2) is there a way to search ash scripts attached to forum posts? I can only figure out how to search Posts. The obvious usage would be to find examples of function use.
4) I micro-mange my display case. I would like a file that contains items and associated prices, for items that can be bought, can be displayed and are NOT currently in my display case. I come pretty close with Cygwin, tcsh, awk and some web scraping but it seems like ash will be a more elegant (and portable) solution. If I can iterate over the items in mallprices.txt then it seem pretty trivial to emit a line of output (or add something to a map, that is saved to a file at the end of the iteration) if display_amount of that item is less than 1. But, I see no easy way to get access to mallprices.txt if file_to_map doesn't apply. I could iterate across all items and do various tests, in which case where do I get my list of all items from? I suspect is_tradeable, is_displayable, display_amount and mall_price would give me what I need once I had a list of items.
5) Is there a way to sort a map? If I generated a map of item name and price in 4) above, it would be nice if the resulting file, after map_to_file, were sorted on price, from low to high.
Thanks in advance.
1) I used networth.ash and note that it generates a lot of output. I ran it from the Scripts menu in mafia and note that all output appeared in the gCLI window. Is there a way to run an arbitrary ash script that uses print, and tee or pipe the output so that I end up with a file that only contains the script generated output? If yes then examples or syntax, please.
2) I am having trouble finding examples of file_to_map usage. In particular I would like an example that includes the input file itself since I anticipate I would create files external to mafia and ash and read them. Specifically, can the mafia data file mallprices.txt be read as a map? I'd guess not for several reasons including the version number as the first line, but if that is incorrect, what would the resulting map look like?
3) Related to 2) is there a way to search ash scripts attached to forum posts? I can only figure out how to search Posts. The obvious usage would be to find examples of function use.
4) I micro-mange my display case. I would like a file that contains items and associated prices, for items that can be bought, can be displayed and are NOT currently in my display case. I come pretty close with Cygwin, tcsh, awk and some web scraping but it seems like ash will be a more elegant (and portable) solution. If I can iterate over the items in mallprices.txt then it seem pretty trivial to emit a line of output (or add something to a map, that is saved to a file at the end of the iteration) if display_amount of that item is less than 1. But, I see no easy way to get access to mallprices.txt if file_to_map doesn't apply. I could iterate across all items and do various tests, in which case where do I get my list of all items from? I suspect is_tradeable, is_displayable, display_amount and mall_price would give me what I need once I had a list of items.
5) Is there a way to sort a map? If I generated a map of item name and price in 4) above, it would be nice if the resulting file, after map_to_file, were sorted on price, from low to high.
Thanks in advance.
Last edited: