Notepad icon indicating copy to clipboard operation
Notepad copied to clipboard

Importing notes from other apps

Open ghost opened this issue 5 years ago • 3 comments

I'm trying to import notes over from an ancient "Notes" app from the early days for android which exports notes as sqlite or as text on the following format

[title note1]
content1

[title note2]
content2

( the title of each note in [] and each note separated by a blank line)

But this Notepad-app interprets the text import-file as a single note.

  1. Is there a way I can import this text format? Or a sqlite?
  2. What are the formats required to import in a sensible way? Can I import with timestamps?

I have all my notes back to 2009 in a sqllite from the same app, so if I could somehow import them over here with timestamps I would be willing to put some effort :-)

ghost avatar Jun 24 '19 14:06 ghost

Notepad currently only supports importing plain-text files, and doesn't try to do any sort of parsing for note titles or timestamps. It would be pretty easy to have Notepad parse text file backups in that specific format, though. Do you have a link to the notes app you're trying to export from?

Some more implementation details to list here:

  • Notepad automatically uses the first line of each note as the note's title. There's no separate distinction between a note's contents and its title. This is similar to how the Palm OS notes app worked back in the day.
  • Internally, Notepad stores its notes as plain text files in the app's internal storage, with the filename being the Unix timestamp of when the note was last modified. It's a really bad way of persisting data on the filesystem (this app was originally written 5 years ago back when I didn't know any better). It would be nice to move the app towards storing data in a SQLite database backed by Room.

farmerbb avatar Jun 28 '19 03:06 farmerbb

The app was abandoned and removed from Play ages ago, but I dumped the APK. Just change the filename ending to .apk instead of zip : Notes_com.android.demo.notepad3.zip

I could always hack something that takes my each of my notes and stores them as separate txt-files, but that leaves me with importing thousands of notes I guess, and they all would be timestamped "today" I assume?

ghost avatar Jun 30 '19 10:06 ghost

@farmerbb

  • Internally, Notepad stores its notes as plain text files in the app's internal storage, with the filename being the Unix timestamp of when the note was last modified. It's a really bad way of persisting data on the filesystem (this app was originally written 5 years ago back when I didn't know any better). It would be nice to move the app towards storing data in a SQLite database backed by Room.

Why is separate files bad? What about a single XML-like file?

I used to use an app called simplenotepad by mightyfrog. It is still available but I think it was abandoned. It doesn't even export to an SD card. You can create checklists (check off this as they are done) as well as notes. I think it uses sqlliste.

bjlockie avatar Jul 07 '19 19:07 bjlockie