Jump to content

JMichaelTX

Level 5
  • Content Count

    9,711
  • Joined

  • Last visited

  • Days Won

    195

JMichaelTX last won the day on May 5

JMichaelTX had the most liked content!

Community Reputation

3,889 Your Knowledge Knows No Bounds

About JMichaelTX

  • Rank
    Explorer

Profile Information

  • Subscription
    PREMIUM

Recent Profile Visitors

64,030 profile views
  1. Thanks for sharing the early stages of your development ideas. However, I am deeply disappointed in, and disturbed by, what you showed: Incremental Search -- I absolutely hate it, and find it a big waste of computing resources and my time. Most often it is NOT appropriate to search on what I am still typing because I am likely to make typos that will mislead the search engine Just as in your own example, the first few characters are rarely good indicators of the search target. As you showed, typing "me" produced results for both "Mexico" and "Melinda" -- totally unrelated. How was that helpful? It was NOT helpful! It wastes computing resources searching on irrelevant text. EN Web App -- I almost never use it. Why are you focusing on it first??? Do you have any metrics that show which EN app most users who have a PAID subscription are using? Due to the nature of the web interface, web apps will likely never be a powerful and easy to use as desktop apps And, of course, you have to have an Internet connection to use any web app. What happened to focusing on rebuilding your foundation? Ian has repeatedly stated that Evernote was going to focus on rebuilding the foundation first. Why are you now working on web search enhancements, especially a platform and feature that many don't want or use??? If you are going to work on the Search engine, why not work on something that will work on all platforms, and that we have been requesting for many, many years, like full boolean search.
  2. Sorry, I don't see anything in the ENML or HTML that is incorrect. The "extra" <div> is perfectly legal HTML, and causes no problems. As long as the Note displays properly that is all that matters. @AngusSanto, how is the script working for you? Any issues?
  3. So? I don’t see the issue. The actual note looks fine in my testing. Do you see something in the updated note that is incorrect?
  4. @AngusSanto and @DTLow: I have a BETA solution you guys can test that will do this: Extract the 2nd Line of the Note body based on the Plain Text of the Note Set the Note Title to the 2nd body line Insert the original Title at top of Note Body. I'm still testing, but thought I'd let you guys get in on the fun. 😎 I started out using RegEx, and found 3 patterns that would work, but there can be just too much variation in how the first two lines are set (formatting, links, etc). So, I resorted to a simpler solution: Convert the HTML to Plain Text, and get the first two non-blank lines. DO NOT TEST ON A REAL NOTE. Just do a Duplicate (⌘D) of one of your target notes, and use the dup. Please let me know if this works for you and if you have any issues or desired changes (no promises). property ptyScriptName : "Set Evernote Note Title to 2nd Body Line Using Plain Text -- TEST" property ptyScriptVer : "BETA 2.0" property ptyScriptDate : "2019-05-19" property ptyScriptAuthor : "JMichaelTX" (* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PURPOSE: β€’ Update Evernote Note Title and Body Using HTML β€’ Set Note Title to 2nd Body Line β€’ Insert Original Note Title at Top of Body RETURNS: Revised Evernote Note REQUIRED: 1. macOS 10.11.6+ 2. Mac Applications β€’ Evernote Mac 6.11.1+ TAGS: @SW.EN @CAT.Notes @CAT.HTML @type.Example REF: The following were used in some way in the writing of this script. 1. 2019-05-17, DTLow, Evernote User Forum Bulk Rename Notes with Script Editor https://discussion.evernote.com/topic/120023-bulk-rename-notes-with-script-editor/?do=findComment&comment=537798 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *) use AppleScript version "2.5" -- El Capitan (10.11) or later use framework "Foundation" -- this may not be required use framework "AppKit" -- this may not be required use scripting additions property LF : linefeed tell application "Evernote" set oNote to item 1 of (get selection) tell oNote set noteTitle to title set noteBodyHTML to HTML content -- Retrieve note contents set noteBodyPtxt to my HTMLDecode(noteBodyHTML) set nbLines to paragraphs of noteBodyPtxt --- Extract the 2nd Line of Text --- -- (ignoring blank lines) set lineCount to 0 repeat with oLine in nbLines if ((contents of oLine) β‰  "") then set lineCount to lineCount + 1 if (lineCount β‰₯ 2) then set nbLine2 to contents of oLine exit repeat end if end repeat --- Replace Unusual "Γ‚" Character with Space --- set nbLine2Clean to my regexChange("Γ‚", " ", nbLine2) --- REPLACE INVISIBLE CHARS FOUND IN SOME HTML (like OUTLOOK 2011) WITH SPACE --- -- set nbLine2Clean to regexChange("\\x{A0}|\\x{2028}", " ", nbLine2Clean) set bodyLine2 to nbLine2Clean --- Change Note Title to 2nd Body Line --- set title to bodyLine2 --- Insert Original Title at Top of Body --- set HTML content to ("<div>" & noteTitle & "</div>") & noteBodyHTML display dialog Β¬ "Note Title Has Been Revised" & LF & LF & "FROM: " & tab & noteTitle Β¬ & LF & "TO: " & tab & bodyLine2 Β¬ with title ptyScriptName buttons {"Cancel", "OK"} default button "OK" end tell end tell --~~~~~~~~~~~~~~~~~ END OF MAIN SCRIPT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ on regexChange(pFindStr, pReplaceStr, pSourceStr) -- @RegEX @Change @Replace @Strings @ASObjC --––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– (* VER: 2.0 2018-07-06 PURPOSE: Change ALL Occurances of pFindStr into pReplaceStr in pSourceStr METHOD: Uses ASObjC RegEx (which is based on ICU Regex) PARAMETERS: β€’ pFindStr | text | RegEx Pattern to Find β€’ pReplaceStr | text | Replace string which β€’ May contain these RegEx MetaChars: \\n, \\r, \\t for linefeed, return, and tab $<CG>, where <CG> is Capture Group number β€’ pSourceStr | text | Source String to be searched RETURNS: Revised String with all changes that were found. AUTHOR: JMichaelTX -- with help from NigelGarvey ## REQUIRES: use framework "Foundation" REF: 1. 2018-07-06, NigelGarvey, Late Night Software Ltd. ASObjC RegEx Change Handler http://forum.latenightsw.com/t/asobjc-regex-change-handler/1395/10 2. ICU RegEx Users Guide http://userguide.icu-project.org/strings/regexp --––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– *) set nsCurApp to current application -- Replace any backslash-n sequences in the replace string with actual character -- set nsReplaceStr to nsCurApp's NSString's stringWithString:pReplaceStr set nsReplaceStr to nsReplaceStr's stringByReplacingOccurrencesOfString:"\\n" withString:(linefeed) set nsReplaceStr to nsReplaceStr's stringByReplacingOccurrencesOfString:"\\r" withString:(return) set nsReplaceStr to nsReplaceStr's stringByReplacingOccurrencesOfString:"\\t" withString:(tab) set nsSourceStr to nsCurApp's NSString's stringWithString:pSourceStr set nsSourceStr to (nsSourceStr's stringByReplacingOccurrencesOfString:pFindStr withString:nsReplaceStr options:(nsCurApp's NSRegularExpressionSearch) range:{0, nsSourceStr's |length|()}) return nsSourceStr as text end regexChange --~~~~~~~~~~~~~~~~~~~~ END of Handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ on HTMLDecode(HTMLString) -- @HTML @Strings @Decode @Convert @Text @PlainText @ASObjC -------------------------------------------------------------------------------------- (* From: Shane Stanley <sstanley@myriad-com.com.au> Date: Thu, Jun 16, 2016 at 8:56 PM To: "ASUL (AppleScript)" <applescript-users@lists.apple.com> Subject: Re: Convert HTML Text to Plain Text -- ASObjC handler is 2.03 X as fast as Shell Handler *) -- make it an NSString set theString to current application's NSString's stringWithString:HTMLString -- get raw data set theData to theString's dataUsingEncoding:(current application's NSUTF8StringEncoding) -- convert to attributed string set attStr to current application's NSAttributedString's alloc()'s initWithHTML:theData documentAttributes:(missing value) -- extract just the text set plainText to attStr's |string|() as text --- REPLACE INVISIBLE CHARS FROM OUTLOOK WITH SPACE --- -- set plainText to regexChange("\\x{A0}|\\x{2028}", " ", plainText) return plainText end HTMLDecode
  5. That would work if the HTML is always nice, neat, and orderly as you show. In my testing I have found it can vary quite a bit. So I'm using RegEx. I have three RegEx patterns currently in place, and the script tries each one until one works. After a bit more testing and cleanup, I'll post my script. @AngusSanto, are you still interested in an AppleScript solution? Please let us know. I have a solution I'm testing that will do this: Extract the first two lines of the Note body Set the Note Title to the 2nd body line Insert the original Title at top of Note Body. Would that work for you?
  6. @DTLow, well done sir! πŸ‘ I can confirm your script works, and retains everything in the Note, including: images, attachments, checkboxes, lists. NOTE: Running Evernote 6.11.1 (455059) on macOS 10.12.6. I also testing adding at the top, and that also worked: set theText to "Updated Note Content at TOP" & theText -- Insert at top of Note I will now test changing the first few lines.
  7. Please share your code if you have found a way to do this. In my testing it always dropped images, attachments, and even the Evernote checkboxes.
  8. Yes, this is definitely possible using AppleScript. Options: Just Set the Note Title The easy part is extracting the second line of each Note, and setting the Note title to it. Changing the Note Body Use HTML of the Body -- Ignore Images & Attachments AppleScript allows us to read/set the HTML of a note. You will lose any images or attachments in the Note. Use Full ENML of the Body Much harder is changing the Note Body that contains images and/or attachments.. This is because Evernote AppleScript does NOT allow us to read the full ENML of the Note that includes images and attachments. I can definitely help you with Option #1, and maybe #2.1. Option 2.2 would require more time than I have available right now. So, if you'd like to get something done quickly, go with Option #1. One thing you should do now, if you have not already done so, is to tag all Notes you imported from Apple Notes that need to have the Title changes. This will allow you to immediately continue to use Evernote and add new Notes. What would you like to do?
  9. In EN Mac, we don't even have a "Search" section in Preferences.
  10. This is a very, very old issue -- years old. When Evernote first released the version with incremental search, many of us complained, loud and often. But to no avail. Let us hope now that Evernote is rebuilding their foundation, that they will at least give us an option to turn off incremental search. BTW, the issue is on both EN Win and EN Mac.
  11. I just confirmed this bug with a colleague who also just upgraded to 7.10, also running Sierra.
  12. BUG Report: Spotlight NOT Working Evernote 7.10 (457732) on macOS 10.12.6 I upgraded my test Mac from Ver 6.11.1 to 7.10. All appeared to go well from the Activity Log. But any new Notes created, or sync'd, since the update are NOT being indexed by Spotlight. I waited 2+ hours after the update to make sure all indexing was complete. Activity Monitor did not show any activity when I ran this test. Spotlight Works on Mac running Evernote 6.11.1 (455059) on macOS 10.12.6 Spotlight Does NOT Work on Mac running Evernote 7.10 (457732) on macOS 10.12.6
  13. @Nick L., thanks for actively looking at AppleScript bugs. AppleScript bugs are the only thing at this point keeping me from upgrading to Ver 7.10. Would you mind listing the AppleScript bugs you have identified so far?
  14. Are You Having AppleScript Issues with Recent Versions of Evernote Mac? If you are having any issues with AppleScripts that used to work, but have stopped working as of Ver 7+, please post your script and a detailed description of the issue(s) here. It is best to post scripts using either the code block tool, or in an attached zip file. Please make sure you do not have any personal or sensitive information in your script before posting. Background As some of you know, I am an avid user and avid fan of AppleScript. I have many AppleScripts that use Evernote that are essential to my daily workflows. As a result I am still holding on Evernote 6.11.1 (455059) on macOS 10.12.6. I can't upgrade to any later version until I know that my essential AppleScripts will work. So I propose that we all work together to provide the Evernote Dev team a single thread to identify, and hopefully, fix AppleScript issues. I hope Evernote will put some resources on this as part of their rework of the Evernote foundation, because AppleScript is a very powerful tool to extend and customize Evernote (and all apps) by each user. Evernote Mac already has a good foundation, it is just fallen in disrepair in recent years as Evernote made changes to the app, but failed to make the corresponding changes to the scripting model. IAC, I am glad to work with the Evernote community to share and develop workarounds to any AppleScript issues we identify until Evernote has a chance to publish the fix. I have a backup/test Mac that I am going to upgrade to Ver 7.10+ to test my existing AppleScripts, as well as test scripts posted by others. Although I have not published any AppleScripts recently, I do have a number of scripts posted in GitHub Gists: β€’ AppleScripts Published by JMichaelTX (GitHubGists) Thanks for your support to get AppleScript issues resolved.
  15. Nick, things are looking good for this release. Can you tell us if the AppleScript bugs reported here have been fixed? If not, can you at least let us know if they are on the list to be fixed?
×
×
  • Create New...