Jump to content

List of Notebooks


Recommended Posts

  • Level 5*
17 hours ago, Howardb said:

Is there a way to make a simple list of my Notebooks?  Highlight and copy doesn't work and I don't find any other buttons to push.

You'll get a more specific answer if you identify your platform

On my Mac, I can easily script the prouction of a Notebook or Tag list

Link to comment
  • 4 months later...

I'd love to be able to do this on my Mac but I'm not really sure how...  I don't believe I can use enscript on a Mac.  I did however find a very neat tool using AppleScript to export a list of all Tags used into a .csv file.  As I'm not a script-writer, is there someone who can modify this script to export only notebook names? 

The script was originally downloaded from https://stackoverflow.com/questions/31257698/export-tags-only-from-evernote and is provided here for your convenience. Thanks in advance for any help. 

tell application "Evernote"
    set tagList to {}
    set allNotebooks to every notebook
    repeat with currentNotebook in allNotebooks
        set allNotes to every note in currentNotebook
        repeat with currentNote in allNotes
            set noteTags to (the tags of currentNote)
            repeat with currentTag in noteTags
                if tagList does not contain name of currentTag then
                    set the end of tagList to name of currentTag

                end if
            end repeat
        end repeat
    end repeat
end tell

set filePath to (path to desktop as text) & "Evernote Tags.csv"
set output to ""
repeat with currentTag in tagList
    set output to output & currentTag & ", "
end repeat

set theResult to writeTo(filePath, output, text, false)
if not theResult then display dialog "There was an error writing the data!"

on writeTo(targetFile, theData, dataType, apendData)
    -- targetFile is the path to the file you want to write
    -- theData is the data you want in the file.
    -- dataType is the data type of theData and it can be text, list, record etc.
    -- apendData is true to append theData to the end of the current contents of the file or false to overwrite it
    try
        set targetFile to targetFile as text
        set openFile to open for access file targetFile with write permission
        if apendData is false then set eof of openFile to 0
        write theData to openFile starting at eof as dataType
        close access openFile
        return true
    on error
        try
            close access file targetFile
        end try
        return false
    end try
end writeTo

 

 

 

Link to comment
  • Level 5*
14 hours ago, gregbarton said:

As I'm not a script-writer, is there someone who can modify this script to export only notebook names? 

In the script, I see the line     set allNotebooks to every notebook
This gives you a list of all notebooks; you just need to convert this to notebook names

My modification would be

set output to “”
tell application "Evernote"     
     set allNotebooks to every notebook     
     repeat with currentNotebook in allNotebooks     
        set output to output & name of currentNotebook as string & “, ”
     end repeat
end tell

Link to comment

Thank you DTLow.  Really appreciate your guidance.  Thanks very, very much.  I made some modifications and ended up with the modified script below.  Generally speaking, it works, but it seems to repeat a list of all the notebook names around 11 times and I'm not certain why that's happening.  No doubt something wrong with my logic and/or modifications.  Any idea what's wrong with this or what I've done incorrectly? 

tell application "Evernote"
	set notebookList to {}
	set allNotebooks to every notebook
	repeat with currentNotebook in allNotebooks
		set allNotes to every note in currentNotebook
		repeat with theNotebook in allNotebooks
			set the end of notebookList to name of theNotebook
		end repeat
	end repeat
end tell

set filePath to (path to desktop as text) & "Evernote Notebooks.csv"
set output to ""
repeat with currentNotebook in notebookList
	set output to output & currentNotebook & ", "
end repeat

set theResult to writeTo(filePath, output, text, false)
if not theResult then display dialog "There was an error writing the data!"

on writeTo(targetFile, theData, dataType, apendData)
	-- targetFile is the path to the file you want to write
	-- theData is the data you want in the file.
	-- dataType is the data type of theData and it can be text, list, record etc.
	-- apendData is true to append theData to the end of the current contents of the file or false to overwrite it
	try
		set targetFile to targetFile as text
		set openFile to open for access file targetFile with write permission
		if apendData is false then set eof of openFile to 0
		write theData to openFile starting at eof as dataType
		close access openFile
		return true
	on error
		try
			close access file targetFile
		end try
		return false
	end try
end writeTo

 

Link to comment
  • Level 5*
10 minutes ago, gregbarton said:

Generally speaking, it works, but it seems to repeat a list of all the notebook names around 11 times and I'm not certain why that's happening.

In your script, you have a recursive pass through the notebook list.  You should remove the first repeat loop

repeat with currentNotebook in allNotebooks
		set allNotes to every note in currentNotebook
		repeat with theNotebook in allNotebooks
			set the end of notebookList to name of theNotebook
		end repeat
Link to comment
  • 6 months later...

I'm running Evernote 6.1 on a laptop with Windows 8.1 as my OS. I know NOTHING about DOS or using the command line. I found the EnScript.exe file, but when I try to open it, I just see a DOS command window flash by. It doesn't stay open for me to type a command. I know how to find the command prompt but that's about it. 

Is there no other way for me to print a list of my notebooks and tags?

I'm amazed that Evernote does not supply this very simple item.

Link to comment
  • Level 5*
3 hours ago, akailiajade said:

I'm running Evernote 6.1 on a laptop with Windows 8.1 as my OS. I know NOTHING about DOS or using the command line. I found the EnScript.exe file, but when I try to open it, I just see a DOS command window flash by. It doesn't stay open for me to type a command. I know how to find the command prompt but that's about it. 

ENScript is a Windows command-line utility: it needs to run in a command shell. To get one, press WindowsKey+R, and in the dialong box, type 'cmd' (without the quote characters) and press Enter. That's a command shell. Now you can try to run the ENScript.exe file, but your PATH may not include the file path where it lives, so you may need to type it in explicitly to run the commnd (something like: "c:\Program Files (x86)\Evernote\Evernote\ENScript.exe" would be a good guess). Once you have it running, you use it as described above to list your notebooks. I know of no easier way, nor do I know of any way to get a list of tags in the Windows client. Most people just use the Evernote application's UI to deal with their notebooks and tags, I'd guess.

Link to comment

Thanks for taking the time to reply. Really appreciate it.

So. I got the command shell. No problem there. Typed Enscript.exe at the prompt. Received an error message stating "Enscript.exe is not recognized as an internal or external command, operable program or batch file."

The command line you suggested above is, in fact, the correct location of my Evernote ENScript.exe file. However, there are variations. When I bring the file up in Windows File Explorer (WFE), it comes up as follows:

This PC˃ Windows (C:)˃Program Files (X86)˃Evernote˃Evernote˃ENScript.exe

I use the arrows to illustrate how it looks in WFE. I understand that you have to use backslashes (\) in the actual command line. 

When I type the command line the way you have it in your note above, I get the same error message as noted above. Do I need to alter the command line based on how it comes up in WFE? Also, is the command upper/lower case sensitive? Finally, not sure if spaces are needed and where.

Again, thank you so much for taking the time to reply. I really do appreciate it. I never expected it would be such a damned nuisance to get a list of my Evernote notebooks. The program itself is great. Hard to believe such a simple function as printing a list of notebooks and tags is lacking. If your next reply doesn't work for me, I think I'll just try to scroll and screen shot it and be done! 

Link to comment
  • Level 5*
On 2018-03-29 at 5:12 PM, akailiajade said:

way for me to print a list of my notebooks and tags?

Now that you retrieved your notebook list; I'm curious as to the purpose - what you need it for?

I'm more a tag user, but I'm comfortable with my 300+ tag list remaining in Evernote.
Also, if I did export it I'd want the hierarchy shown.

Link to comment

Let me just take a moment to give you a bit of background to what I'm trying to do. Both my parents are alive but elderly. My Mom is in a nursing home. I moved back to the family home to care for my Dad. I am also attempting to run a small business for myself. So I'm managing information & paperwork for my Mom, my Dad, my business, & myself. Believe me when I tell you, it's a LOT of stuff!! ??? Tax time seems an excellent time to hoe out the files and organize what is left. So I've started a personal project to do just that.

I am trying to coordinate my electronic (Evernote & email) & paper files. I've been eliminating as many paper files as I can, but there will still be a few things I need to keep in hard copy.  As much as possible, I'd like them to have the same titles. I want a complete file/tag list to have on my desk, so I do not create duplicate or unnecessary files or tags & so I can see fairly quickly where I want to put something. I also use the email to Evernote feature a lot. So I want the list of notebooks & tags so I know what to use with the @ & # symbols in the email subject lines to get them to go where I want them.  Finally, I'm trying to implement David Allen's Getting Things Done methodology into my life & a proper streamlined filing system that coordinates all electronic & paper files seems like it would be a huge help.

So that's why I want these lists. Have a great day!!

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...