The International Simutrans Forum

Development => Translation and Help Texts => Topic started by: vilvoh on February 18, 2009, 01:01:13 PM

Title: Extension request: export object guide search results to file
Post by: vilvoh on February 18, 2009, 01:01:13 PM
Related with this topic (http://forum.simutrans.com/index.php?topic=1537.msg15793#msg15793), I would like to make a request. Would be possible to export object's guide (http://simutrans-germany.com/translator/script/directions.php) or vehicle's list (http://simutrans-germany.com/translator/script/statistics_vehicles.php) search results to an external file (plain text, xls or ods, I don't mind the format).

This request is specially focused on getting vehicle's info in an easy way. The file would contain all avaliable attributes and if possible others that are not implicit (some examples from pak128 vehicle tables here (http://128.simutrans.com/help.htm))

Futhermore, I think it would be usefull for:

From my point of view it seems pretty easy to implement. You only have to redirect the database query to an external document instead of to screen. You output the file headers, gather the content and load it in the file...simple, isn't it?  ;)

What do you think? Would it be possible?
Title: Re: Extension request: export object guide search results to file
Post by: Zeno on February 18, 2009, 03:06:25 PM
Since some cleaning is needed after making C&P from the translator web, I'd also like some kind of external (i.e. csv) file format output for this.
Title: Re: Extension request: export object guide search results to file
Post by: VS on February 18, 2009, 03:57:02 PM
With the framework I already have, such a tool would be relatively easy... but in Python :P
Title: Re: Extension request: export object guide search results to file
Post by: vilvoh on February 18, 2009, 04:07:34 PM
Simutranslator is implemented with PHP, so I would say it's even easier than using Python... ::)
Title: Re: Extension request: export object guide search results to file
Post by: VS on February 18, 2009, 05:19:59 PM
Yes. On the other hand, you can not run it on arbitrary set of data.
Title: Re: Extension request: export object guide search results to file
Post by: Frank on February 25, 2009, 09:39:14 AM
The main problem here could be that the data in the translator is not updated regularly. Imho pak maintainers do not upload every changed dat-file to the translator. This will happen mainly if the name of the object is changed (or a new object is uploaded).

The statistic is only implemented for vehicles. Any other request must be implemented. Only for vehicles a query on all objects with parameters is available yet.

Moreover, the vehicle statistic is unsorted if everything is displayed. Here, some sorting would make this more user-friendly.

Your request is realizable, preferably as CVS-export. However this relies essentially whether the data is up to date.

Thanks Dwachs for help translating
Title: Re: Extension request: export object guide search results to file
Post by: vilvoh on February 25, 2009, 10:53:46 AM
Quote from: Frank on February 25, 2009, 09:39:14 AM
The main problem here could be that the data in the translator is not updated regularly. Imho pak maintainers do not upload every changed dat-file to the translator. This will happen mainly if the name of the object is changed (or a new object is uploaded).

True, but keep data updated is a problem of pak mantainers not yours, you know. Indeed, is Translator supposed to host development dat files? imho, It wasn't implemented for that.

Quote from: Frank on February 25, 2009, 09:39:14 AM
Your request is realizable, preferably as CVS-export. However this relies essentially whether the data is up to date.

The output format really doesn't matter whenever would be in a file, not only in screen.

Another thing. When you talk about statistics, you actually mean object attributes, don't you? Anyway, my request was only focused on vehicles mainly because this is the type of Simutrans object that interacts more with players, unlike city buildings or tourist attractions, so imho it's usual that pak maintainers and players want an place where they can get all info to improve their strategy, rebalance a set of vehicles or just draw a timeline diagram.

In any case, would be a good idea to leave the door open to new requests in a near future related with other types of objects, but this time vehicles are the priority.

Title: Re: Extension request: export object guide search results to file
Post by: prissi on February 25, 2009, 11:24:55 AM
No, translator is for translation. Frequent uploads should go the the SVN instead.
Title: Re: Extension request: export object guide search results to file
Post by: Frank on February 25, 2009, 11:34:24 AM
Quote from: prissi on February 25, 2009, 11:24:55 AM
... Frequent uploads should go the the SVN instead.

or set doku

german wiki - paksets (http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=de_Paksets_index&bl=y)

for pak.german (http://forum.simutrans.com/index.php?topic=585.msg4782#msg4782)