Method and system of modifying information on file
Systems and computer-implemented methods and systems for modifying information in a document file are disclosed. An example computer-implemented method for modifying information in a document file includes: receiving a first text string; opening a file corresponding to the first text string, the file including binary data and text data; reading the text data; detecting a file location identifier in the text data; replacing a portion of the file location identifier with a second text string based on the first text string; and closing the file.
1. A computer-implemented method of modifying information in a document file comprising:
receiving a first text string;
opening a file corresponding to the first text string, the file including binary data and text data;
reading the text data;
detecting a file location identifier in the text data, wherein detecting comprises,
parsing the text data into two or more text strings, and
identifying a third text string including a tag among the one or more text strings,
wherein the tag indicates that a fourth text string following the third text string includes the file location identifier;
replacing a portion of the file location identifier with a second text string based on the first text string; and
closing the file.
2. The method of claim 1 , wherein the portion of the file location identifier is indicative of a first file location and the second text string is indicative of a second file location newer than the first file location.
3. The method of claim 1 , wherein the portion of the file location identifier is indicative of a temporary path and the second text string is indicative of a permanent path.
4. The method of claim 1 , wherein the file is a portable document file (PDF).
5. The method of claim 1 , further comprising receiving a signal indicative of a timing to update the portion of the file location identifier,
wherein receiving the first text string and opening the file are performed responsive to the signal.
6. The method of claim 5 , wherein receiving the signal is responsive to a change of a location of the file,
wherein the second text string is indicative of a current location of the file.
7. The method of claim 5 , wherein the second text string is based on an identifier of a user.
8. The method of claim 5 , wherein the second text string is based on a category.
9. A non-transitory computer-readable medium storing executable instructions to perform a method of modifying information in a document file which, when executed by a processor, cause the processor to:
receive a first text string;
open a file corresponding to the first text string, the file including binary data and text data;
read the text data;
detect a file location identifier in the text data, including,
parse the text data into two or more text strings; and
identify a third text string including a tag among the one or more text strings,
wherein the tag indicates that a fourth text string following the third text string includes the file location identifier;
replace a portion of the file location identifier with a second text string based on the first text string; and
close the file.
10. The non-transitory computer-readable medium of claim 9 , wherein the portion of the file location identifier is indicative of a first file location and the second text string is indicative of a second file location newer than the first file location.
11. The non-transitory computer-readable medium of claim 9 , wherein the portion of the file location identifier is indicative of a temporary path and the second text string is indicative of a permanent path.
12. The non-transitory computer-readable medium of claim 1 , wherein the file is a portable document file (PDF).
13. The non-transitory computer-readable medium of claim 9 , wherein the executable instructions which, when executed by the processor, cause the processor to further:
receive a signal indicative of a timing to update the portion of the file location identifier,
wherein the executable instructions which, when executed by the processor, cause the processor to receive the first text string and open the file responsive to the signal.
14. The non-transitory computer-readable medium of claim 13 , wherein receiving the signal is responsive to a change of a location of the file, wherein the first text string is indicative of a current location of the file.
15. The non-transitory computer-readable medium of claim 13 , wherein the second text string is based on an identifier of a user.
16. The non-transitory computer-readable medium of claim 13 , wherein the second text string is based on a category.
17. A system comprising:
one or more processors;
a storage comprising:
a data storage configured to store a file; and
a program memory comprising executable instructions to perform a method of modifying information in the file which, when executed by the processor, cause the processor to:
receive a first text string;
open the file including binary data and text data;
read the text data;
detect a file location identifier in the text data, including,
parse the text data into two or more text strings; and
identify a third text string including a tag among the one or more text strings,
wherein the tag indicates that a fourth text string following the third text string includes the file location identifier;
replace a portion of the file location identifier with a second text string based on the first text string; and
close the file.
18. The system of claim 17 , wherein the portion of the file location identifier is indicative of a first file location and the second text string is indicative of a second file location newer than the first file location.
19. The system of claim 17 , wherein the portion of the file location identifier is indicative of a temporary path and the second text string is indicative of a permanent path.
20. The system of claim 17 , wherein the file is a portable document file (PDF).
21. The system of claim 17 , wherein the executable instructions which, when executed by the processor, cause the processor to further:
receive a signal indicative of a timing to update the portion of the file location identifier,
wherein the executable instructions which, when executed by the processor, cause the processor to receive the first text string and open the file responsive to the signal.
22. The system of claim 21 , wherein receiving the signal is responsive to a change of a location of the file,
wherein the first text string is indicative of a current location of the file.
23. The system of claim 21 , wherein the portion of the file location identifier is based on an identifier of a user.