Skip to content

Commit

Permalink
Rename the getting filename function to be general
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhph111 committed Aug 12, 2021
1 parent dc951f7 commit 3ea2d6c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion imagepaste/clipboard/clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def pull(cls, image_path: str) -> Clipboard:
pass

@staticmethod
def get_timestamp_filename() -> str:
def get_filename() -> str:
"""Get a string representation of the current time in the file name format.
Returns:
Expand Down
2 changes: 1 addition & 1 deletion imagepaste/clipboard/darwin/darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def push(cls, save_directory: str) -> DarwinClipboard:
# Save an image if it is in the clipboard
contents = pb.get_contents(type=pasteboard.TIFF)
if contents is not None:
filename = cls.get_timestamp_filename()
filename = cls.get_filename()
filepath = join(save_directory, filename)
commands = [
"set pastedImage to "
Expand Down
2 changes: 1 addition & 1 deletion imagepaste/clipboard/linux/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def push(cls, save_directory: str) -> LinuxClipboard:

# If there is an image in clipboard, save the image and send its path
if XclipTarget.IMAGE.value in process.stdout:
filename = cls.get_timestamp_filename()
filename = cls.get_filename()
filepath = join(save_directory, filename)
process = Process.execute(
cls.get_xclip_args(XclipTarget.IMAGE.value), outpath=filepath
Expand Down
2 changes: 1 addition & 1 deletion imagepaste/clipboard/windows/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def push(cls, save_directory: str) -> WindowsClipboard:
"""
from os.path import join

filename = cls.get_timestamp_filename()
filename = cls.get_filename()
filepath = join(save_directory, filename)

image_script = (
Expand Down

0 comments on commit 3ea2d6c

Please sign in to comment.