View Single Post
Old 04-15-2012, 08:11 AM   #3616
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by Analogus View Post
Question to developers:

I want to edit a specific TXT-file with the MEMO-App on/with my reader. How to manage it?

More info:

I have a specific TXT-file on a specific place on the reader. I want to be able to edit this file with the memo-application. Why?
Idea is to edit CSS-files without plug the reader to the PC. I tried to solve it with the functionality allready exists (copy notes to txt and vice versa).

My code goes like that:
Code:
...
case 'CopyTo':
	Core.shell.exec ('cp -f /Data/Notepads/1334415424314.963.note.txt /Data/database/system/PRSPlus/epub/CSS/extern.css'); 
break;

case 'CopyFrom':
	Core.shell.exec ('cp -f /Data/database/system/PRSPlus/epub/CSS/extern.css /Data/Notepads/1334415424314.963.note.txt'); 
break; 
...
Problem is a NEW TXT-file in /Notepads will not be recognized as Memo. And every new memo gets a new filename. If I would delete this note, code is not working any longer.

Any ideas?

A.
Hi Analogus,

A Sony memo is more than just a text file. It has a lot of other metadata and a specific format. So your code would need to read the content of the css file and incorporate it properly into a memo file. However, this should be possible. Just look at a memo created by the reader to see the format.

Then, when the memo is saved you would need to extract the text and save it off as a css file. That part, at least, has mostly been done for you in the SaveNotepadData addon. You would need to modify this code to change the destination file.

The problem is, though, that all of this will conflict with the existing SaveNotepadData addon. I am not sure how easy it would be to get everything working together...

Sincerely,
Ben.
BenChen is offline   Reply With Quote