ownnote icon indicating copy to clipboard operation
ownnote copied to clipboard

Missing Note folder to import notes from Evernote

Open theSmartRed opened this issue 10 years ago • 6 comments
trafficstars

Hi! Thanks for this great app. I like it very much and waiting for the iOs app with much interest. I installed it without issues in OC 8.1 but I cannot find the /Notes folder where to put the notes I am importing into OC. I have created a first note on OC to see if it was going to be created then but with no luck. Any hint?

theSmartRed avatar Aug 31 '15 18:08 theSmartRed

Is the settings in the admin screen set to "Database and Filesystem", or just "Database"?

Fmstrat avatar Oct 14 '15 13:10 Fmstrat

Same here, Specs: ownnote 1.0.7 OC 9.1 (pre alpha) MySQL 5.6.27 PHP 7.0.4 (CGI) php-info: https://s.itmohr.de/updater/i1.php In settings the option is set to "Database" (only) and it will not save any changes.

FiSh-MoB avatar Apr 12 '16 01:04 FiSh-MoB

Same as FiSh-MoB, I tried saving "Database and Filesystem" but it keeps reverting to "Database." I'm on ownnote 1.0.7 OC 9.1 sqlite PHP 5.6.17

edit: just wanted to add that I manually inserted the config entry into the DB and now it seems to be working. I think the line for me was: insert into oc_appconfig values ("ownnote", "folder", "Notes");

realgeek avatar Apr 12 '16 01:04 realgeek

I ended up writing a script to import the recipes I had exported from Evernote. Maybe others will find this useful. It converts any images into data: URL strings which are then inserted in place of the file references. The only catch I've seen is that of two notes with the same title property, only the first will be imported; this appears to be a limitation of ownNote.

#!/bin/bash
mysql_host="files"
mysql_user="user-with-access-to-owncloud-db"
mysql_pass="super-secret-password"
mysql_db="owncloud"

user="salfter"
grouping="recipes"

cp "$1" "$1.tmp"

# integrate images, if any

if [ -e "${1%.html}_files" ]
then
  for i in "${1%.html}_files"/*
  do
    type=$(echo "$i" | sed "s/.*\.//g")
    if [ "$type" == "jpg" ]
    then
      type="jpeg"
    fi
    (echo -n "data:image/$type;base64,"; 
     base64 "$i" | tr -d "\n") >"$i.base64"
    sed -i "s/\"$(echo "$i" | sed "s/\//\\\\\//g")\"/\n**INSERT*HERE**\n/" "$1.tmp"
    (awk '$0 == "**INSERT*HERE**" {exit} {print}' "$1.tmp";
     echo -n "\"";
     cat "$i.base64";
     echo -n "\"";
     awk 'p == 1 {print} $0 == "**INSERT*HERE**" {p=1}' "$1.tmp") >"$1.tmp2" && mv "$1.tmp2" "$1.tmp" && rm "$i".base64
  done
fi

# add to database

title=`tr -d "\n" < "$1.tmp" | grep -a "<title>" | sed "s/.*<title>//;s/<\/title>.*//" | sed "s/'/''/g"`
id=$((echo "insert into oc_ownnote (uid, name, grouping, mtime) values ('"$user"', '"$title"', '"$grouping"', "$(date +%s)");";
      echo "select max(id) from oc_ownnote;") | mysql -h "$mysql_host" -u "$mysql_user" --password="$mysql_pass" "$mysql_db" | grep -v "max(id)")
(echo "insert into oc_ownnote_parts (id, note) values ("$id", '";
 awk '$0 ~ "</body>" {p=0} p == 1 {print} $0 ~ "<body>" {p=1}' "$1.tmp" | sed "s/'/''/g";
 echo "');") | mysql -h "$mysql_host" -u "$mysql_user" --password="$mysql_pass" "$mysql_db"

# clean up

rm "$1.tmp"

salfter avatar May 07 '16 04:05 salfter

I have the same problem as the original poster. The ownCloud admin interface will not save settings after choosing "Database and Files", same problem as FiSh-MoB

I tried realgeek's command to try to manually change the setting but received an error:

owncloud # insert into oc_appconfig values ("ownnote", "folder", "Notes");
-bash: syntax error near unexpected token `('

I've been looking forward to an alternative to Evernote that could integrate into OwnCloud. Import of Evernote files is essential on my server.

TraceyC77 avatar May 08 '16 19:05 TraceyC77

OC 9.1.0 stable and latest ownNote. I had this issue upon install of ownNote this evening. I created a note and it seems to be saved. Per the above I set the the storage to 'database and folder'. I also entered 'notes' as the name of the folder.

  • Upon returning to my folders there was no 'notes' folder. My note remained in the app, however.
  • Upon logoff and re-login, no folder, however the setting was still 'database and folder.' -Logoff, close browser, logon, still no dice.
  • Restart browser, log back in. No folder. Still set to 'database and folder'. Renamed folder to ownNote (I know, creative right?) and <poof!> folder was created. Note was in folder. Progress!
  • Copied large .enex file to new folder. (I thought this was set up to work at one point?) No dice.
  • Read tFM, exported some notes as individual .html files and copied the results to the new ownNote folder. <BAM!> Like a charm it worked.

Best, Jerry Echo4Golf

gdgeorge avatar Jul 27 '16 01:07 gdgeorge