Posted 24 April 2013 - 01:23 AM
Hey guys, I am working on a sorting program that will remove items from a designated "dump chest" and place them in the appropriate boxes. I'm using two mods to accomplish this:
OpenCCSensors v0.1.4c
Turtle Item Analyzer
There are three files I use:
sort - Does the physical sorting.
insert - Allows me to append to the item ID library.
ID.txt - Contains an entry for each of the items I have sorted thus far.
As of right now it works, but there are two things that I would really like to add and I don't know how to do it. I want to be able to search the ID.txt document and delete a line, so that I don't have to manually download the ID.txt file, edit it, and upload it to the turtle folder via FileZilla. The other thing is the ability to upload the ID.txt file to pastebin, or some other repository of some sort so I don't have to manually back up the file if necessary. I provided documentation on my program on the pastebin pages I linked.
The big issue I'm having is that there is no way to manipulate the file pointer when you're reading or writing lines. If I could manipulate the pointer and just write an empty line there, that would be good enough. However, there isn't a way for me to do that with the default FS API. The uploading of the ID.txt is just icing on the cake, really.
Any help or comments would be appreciated, about any aspect of the program.
OpenCCSensors v0.1.4c
Turtle Item Analyzer
There are three files I use:
sort - Does the physical sorting.
insert - Allows me to append to the item ID library.
ID.txt - Contains an entry for each of the items I have sorted thus far.
As of right now it works, but there are two things that I would really like to add and I don't know how to do it. I want to be able to search the ID.txt document and delete a line, so that I don't have to manually download the ID.txt file, edit it, and upload it to the turtle folder via FileZilla. The other thing is the ability to upload the ID.txt file to pastebin, or some other repository of some sort so I don't have to manually back up the file if necessary. I provided documentation on my program on the pastebin pages I linked.
The big issue I'm having is that there is no way to manipulate the file pointer when you're reading or writing lines. If I could manipulate the pointer and just write an empty line there, that would be good enough. However, there isn't a way for me to do that with the default FS API. The uploading of the ID.txt is just icing on the cake, really.
Any help or comments would be appreciated, about any aspect of the program.