A Python package for creating, editing, and reading folder tree diagrams
Change the interface for calling seedir from command line (#22). Can now do either:
seedir
(as before)python -m seedir
seedir.command_line
is no more!
note: 0.4.1 was skipped due to making a mistake on the pypi upload 😅
sd.seedir()
. All other arguments apply as normal; arguments accepting callables (mask
and formatter
) will see pathlib objects.[emoji is now an optional dependency](https://github.com/earnestt1234/seedir/issues/12). It can be installed with pip install seedir[emoji]
. An error is raised if the emoji style is requested without emoji installed.
Reorganization of folderstructure.py
and the FolderStructure
class
folderstructurehelpers.py
has been removed. Most of the functions implemented there have become methods of FolderStucture
.Item inclusion is now prioritized above exclusion for include/exclude folders/files. The order of precedence now is mask (1), inclusion (2), exclusion (3). The code in this function was generally rewritten to be more concise (FolderStructure._filter_items()
).
More examples in the getting started readme.
SeedirError
has been removed. All uses have been replaced with more appropriate errors, mainly ValueError
or TypeError
formatter
parameter: can now dynamically set other seedir arguments as well as styling onessticky_formatter
parameter for causing the formatter changes to continue through sub-directories.formatter
folderend
& fileend
tokens for setting characters at end of line. Default styles have been updated to include these.formatter
but also some smaller tweaksseedir.printing.format_indent()
method now modifies dictionaries in place, rather than creating a new oneFakeDir.realize()
method no longer creates a reference to unused file variableslash
is on warning for removal after addition of folderend
.formatter
parameter for more customizable diagramscopy()
method for FakeDirssiblings()
method for FakeDirsFolderStructure
class in seedir.realdir
module'\s'
with ' '
in seedir.fakedir.fakedir_fromstring()
copy
method in Fakedir.delete()
, which prevented non-list argumentswalk_apply
method is now applied to the calling folder, rather than just childrenseedir()
algorithmfolderstructure.py
module, which is aided by folderstructurehelpers.py
(this contains many functions that were previously in seedir.seedir
and seedir.fakedir
).depthlimit=0
with a beyond
string now produces just the root folder (this was incorrect before)beyond='content'
, empty folders are only shown when the depthlimit
is crossedunittests
have been added to seedir/tests/tests.py
.gettingstarted.md
file which has been added to the main page of the API docs.seedir.fakedir
module are now doctest
-able.seedir.seedir
module has been renamed to seedir.realdir
to avoid some of my confusionsexampledir
to the docs
folder for some examplesname
parameter added to seedir.fakedir.randomdir
seedir.fakedir.fakedir_fromstring
to handle some more failed cases.bool
or int
in the command line toolwords
, FakeItem
removed from package namespaceUpdated the documentation to include code formatting
and within-package links - made wonderfully easy by pdoc
! Also renamed the rfs
output of seedir.seedir()
and seedir.fakedir()
to s
.
Added more example usage to docstrings.
mask
parameter for functionally filtering items, used by seedir.seedir
, seedir.FakeDir.seedir
, and seedir.fakedir
:# example
import os
import seedir as sd
# only print directories
sd.seedir(mask=lambda x : os.path.isdir(x))
mask
Initial release of seedir