lesana.command module¶
-
class
lesana.command.
Command
(collection_class=<class 'lesana.collection.Collection'>, entry_class=<class 'lesana.collection.Entry'>)[source]¶ Bases:
object
-
class
lesana.command.
Edit
(collection_class=<class 'lesana.collection.Collection'>, entry_class=<class 'lesana.collection.Entry'>)[source]¶ Bases:
lesana.command.Command
Edit a lesana entry
-
arguments
= [(['--collection', '-c'], {'help': 'The collection to work on (default .)'}), (['--no-git'], {'help': "Don't add the new entry to git", 'action': 'store_false', 'dest': 'git'}), (['eid'], {'help': 'eid of an entry to edit'})]¶
-
-
class
lesana.command.
Export
(collection_class=<class 'lesana.collection.Collection'>, entry_class=<class 'lesana.collection.Entry'>)[source]¶ Bases:
lesana.command.Command
Export entries to a different collection
-
arguments
= [(['--collection', '-c'], {'help': 'The collection to work on (default .)'}), (['--query', '-q'], {'help': 'Xapian query to search in the collection'}), (['destination'], {'help': 'The collection to export entries to'}), (['template'], {'help': 'Template to convert entries'})]¶
-
-
class
lesana.command.
Index
(collection_class=<class 'lesana.collection.Collection'>, entry_class=<class 'lesana.collection.Entry'>)[source]¶ Bases:
lesana.command.Command
Index entries in a lesana collection
-
arguments
= [(['--collection', '-c'], {'help': 'The collection to work on (default .)'}), (['--reset'], {'action': 'store_true', 'help': 'Delete the existing index and reindex from scratch.'}), (['files'], {'help': 'List of files to index (default: everything)', 'default': None, 'nargs': '*'})]¶
-
-
class
lesana.command.
Init
(collection_class=<class 'lesana.collection.Collection'>, entry_class=<class 'lesana.collection.Entry'>)[source]¶ Bases:
lesana.command.Command
Initialize a lesana collection
-
arguments
= [(['--collection', '-c'], {'help': 'The directory to work on (default .)', 'default': '.'}), (['--no-git'], {'help': 'Skip setting up git in this directory', 'action': 'store_false', 'dest': 'git'})]¶
-
-
class
lesana.command.
New
(collection_class=<class 'lesana.collection.Collection'>, entry_class=<class 'lesana.collection.Entry'>)[source]¶ Bases:
lesana.command.Command
Create a new entry
-
arguments
= [(['--collection', '-c'], {'help': 'The collection to work on (default .)'}), (['--no-git'], {'help': "Don't add the new entry to git", 'action': 'store_false', 'dest': 'git'})]¶
-
-
class
lesana.command.
Remove
(collection_class=<class 'lesana.collection.Collection'>, entry_class=<class 'lesana.collection.Entry'>)[source]¶ Bases:
lesana.command.Command
Remove an entry from a collection
-
arguments
= [(['--collection', '-c'], {'help': 'The collection to work on (default .)'}), (['entries'], {'help': 'List of entries to remove', 'nargs': '+'})]¶
-
-
class
lesana.command.
Search
(collection_class=<class 'lesana.collection.Collection'>, entry_class=<class 'lesana.collection.Entry'>)[source]¶ Bases:
lesana.command.Command
Search for entries
-
arguments
= [(['--collection', '-c'], {'help': 'The collection to work on (default .)'}), (['--template', '-t'], {'help': 'Template to use when displaying results'}), (['--offset'], {'type': <class 'int'>}), (['--pagesize'], {'type': <class 'int'>}), (['--all'], {'action': 'store_true', 'help': 'Return all available results'}), (['--sort'], {'action': 'append', 'help': 'Sort results by a sortable field'}), (['query'], {'help': 'Xapian query to search in the collection', 'nargs': '+'})]¶
-
-
class
lesana.command.
Show
(collection_class=<class 'lesana.collection.Collection'>, entry_class=<class 'lesana.collection.Entry'>)[source]¶ Bases:
lesana.command.Command
Show a lesana entry
-
arguments
= [(['--collection', '-c'], {'help': 'The collection to work on (default .)'}), (['--template', '-t'], {'help': 'Use the specified template to display results.'}), (['eid'], {'help': 'eid of an entry to edit'})]¶
-
-
class
lesana.command.
Update
(collection_class=<class 'lesana.collection.Collection'>, entry_class=<class 'lesana.collection.Entry'>)[source]¶ Bases:
lesana.command.Command
Update a field in multiple entries
-
arguments
= [(['--collection', '-c'], {'help': 'The collection to work on (default .)'}), (['--field', '-f'], {'help': 'The field to change'}), (['--value', '-t'], {'help': 'The value to set'}), (['query'], {'help': 'Xapian query to search in the collection', 'nargs': '+'})]¶
-