Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# Copyright 2013 Virantha Ekanayake All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
""" Abstract base class for defining filing objects, whether you want to save to a file-system/directory structure or to something like Evernote
"""
def move_to_matching_folder(self, filename): """ Move the file given by filename to the proper location. You will need to use :py:attr:`target_folder` and :py:attr:`folder_targets` to figure out what the proper destination is. If there is no matching location, then use :py:attr:`default_folder`
:param filename: File to move :type filename: string :returns: Full path+filename of destination :rtype: string """
def file_original(self, original_filename): """ Move the original file given by filename to the proper location. You will need to use :py:attr:`original_move_target`
:param original_filename: File to move :type original_filename: string :returns: Full path+filename of destination(original_filename if not moved) :rtype: string """
def add_folder_target(self, folder, keywords): """ Add a target folder for a list of keywords """
# First, try appending a _v1 to it # Add an incrementing integer to the end of the filename and Loop until we find a new filename
# Silly me, forgot about the splitext function #fn_no_ext = fn.split('.')[0:-1] # Get the filename without ending extension #fn_no_ext = ''.join(fn_no_ext) #ext = fn.split('.')[-1]
are added from :py:func:`add_folder_target` """ |