Skip to content

Commit

Permalink
[features] add helpstr and menu items to jsvine plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Oct 26, 2023
1 parent 001ec08 commit c32e92d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
10 changes: 7 additions & 3 deletions visidata/features/dedupe.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"""


__version__ = "0.2.0"
__author__ = "Jeremy Singer-Vine <jsvine@gmail.com>"

from copy import copy
Expand Down Expand Up @@ -104,8 +103,13 @@ def _reload(self=vs):


# Add longname-commands to VisiData to execute these methods
BaseSheet.addCommand(None, "select-duplicate-rows", "sheet.select_duplicate_rows()")
BaseSheet.addCommand(None, "dedupe-rows", "sheet.dedupe_rows()")
BaseSheet.addCommand(None, "select-duplicate-rows", "sheet.select_duplicate_rows()", "select each row that is a duplicate of a prior row")
BaseSheet.addCommand(None, "dedupe-rows", "sheet.dedupe_rows()", "open new sheet in which only non-duplicate rows in the active sheet are included")

vd.addMenuItems('''
Row > Select > duplicate rows > select-duplicate-rows
Data > Deduplicate rows > dedupe-rows
''')

"""
# Changelog
Expand Down
7 changes: 5 additions & 2 deletions visidata/features/normcol.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"""

__version__ = "0.1.0"
__author__ = "Jeremy Singer-Vine <jsvine@gmail.com>"

from visidata import vd, Sheet, asyncthread, Progress
Expand Down Expand Up @@ -116,4 +115,8 @@ def undo():


# Add longname-commands to VisiData to execute these methods
Sheet.addCommand(None, "normalize-col-names", "vd.sheet.normalize_column_names()")
Sheet.addCommand(None, "normalize-col-names", "vd.sheet.normalize_column_names()", "normalize the names of all non-hidden columns")

vd.addMenuItems('''
Column > Rename > normalize all > normalize-col-names
''')
1 change: 0 additions & 1 deletion visidata/loaders/fec.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""
Filename: vdfec.py
Version: 0.0.0
Last updated: 2019-04-21
Home: https://github.com/jsvine/visidata-plugins
Author: Jeremy Singer-Vine
Expand Down

0 comments on commit c32e92d

Please sign in to comment.