Jump to content

NikolayBPetrov

Level 1
  • Posts

    6
  • Joined

  • Last visited

About NikolayBPetrov

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

NikolayBPetrov's Achievements

5

Reputation

  1. A few "upcoming weeks" later and this still does not work for me. Anyone else?
  2. Here's a workaround. A bad one. But a workaround nonetheless. Use case: you have notes tag with a specific tag and you want the notes in that tag to be sorted by Location (i.e. notebook). How to: Use the API to get all the notes of that tag, sort them however you want, then update their date created such that when you sort by date created in EN, they are in the desired order. Schedule that script to run every morning. Set up a shortcut or w/e to run the script at any point. Limitations: Takes a while to run (20-ish seconds). You can't have one of the notes open while running the script. Sample code: # import hashlib # import binascii import os from base64 import b64encode import pandas as pd import time from evernote.api.client import EvernoteClient import evernote.edam.userstore.constants as UserStoreConstants # import evernote.edam.type.ttypes as Types from evernote.edam.notestore.ttypes import NoteFilter, NotesMetadataResultSpec import inspect if not hasattr(inspect, 'getargspec'): inspect.getargspec = inspect.getfullargspec auth_token = "your token..." sandbox=False china=False client = EvernoteClient(token=auth_token, sandbox=sandbox,china=china) note_store = client.get_note_store() next_tag_guid = "<tag guid here>" filter = NoteFilter() filter.tagGuids = [next_tag_guid] spec = NotesMetadataResultSpec() spec.includeTitle = True spec.includeNotebookGuid = True # spec.includeTagGuids = True notes_list = note_store.findNotesMetadata(auth_token, filter, 0, 1000, spec) notebooks_guid_name_map = {} for notebook in note_store.listNotebooks(auth_token): notebooks_guid_name_map[notebook.guid] = notebook.name notebook_order = ['Notebook 1', 'Notebook 2', 'Notebook 3'] mylist = [{'note_guid': e.guid, 'notebook_guid': e.notebookGuid, 'notebook_name': notebooks_guid_name_map[e.notebookGuid]} for e in notes_list.notes] df = pd.DataFrame(mylist) # Check if all elements of the df column are present in the order array if set(df['notebook_name'].unique()).issubset(set(notebook_order)): print("All elements of the df column are present in the order array.") else: print("Not all elements of the df column are present in the order array.") # Create a categorical data type with the given order df['notebook_name'] = pd.Categorical(df['notebook_name'], categories=notebook_order, ordered=True) df = df.sort_values('notebook_name', ascending=True).reset_index(drop=True) for ind, row in df.iterrows(): existing_note = note_store.getNote(row['note_guid'], True, True, True, True) new_date_created = int(round(time.time()*1000)) - (ind*24*60*60*1000) existing_note.created = new_date_created note_store.updateNote(existing_note) In any case, this, among other things, is why I am considering switching to Notion...
  3. Many thanks for @gazumped and @PinkElephant for their kind and helpful suggestions. My solution is a 3rd party app - https://github.com/vzhd1701/evernote-backup. 3 command lines. 2 minutes. Structured backup (directory of .enex files with stacks/notebooks hierarchy as well as a sqlite .db file). Easy to automatise (e.g. batch file).
  4. For what it's worth, here's an AHK script to open a new note window and move it to the default inbox. It's a bit slow but for quicker captures the default Alt+S shortcut (open evernote helper) works fine. ;create new note in default window global shortcut ;shift-alt-n +!n:: Send ^!n ;default "create new note" shortcut, global Sleep 500 Send !+m ;"move note" shortcut Sleep 1000 SendInput {Raw}Inbox Send {Down} Send {Enter} Feel free to tinker with the Sleep numbers depending on how quick your PC is. Really a shame that there isn't a better way.
  5. I quite like this idea. A must-have for a GTD user!
×
×
  • Create New...