Seedir Versions Save

A Python package for creating, editing, and reading folder tree diagrams

v0.4.2

1 year ago

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 😅

v0.4.0

1 year ago

Added

  • pathlib Path objects now accepted by sd.seedir(). All other arguments apply as normal; arguments accepting callables (mask and formatter) will see pathlib objects.

Changed

  • [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.
    • FolderStructure has been made more user-friendly, and can now be initialized with less functions.
    • There are no longer separate "real dir"/"fake dir" functions for handing item filtering/sorting.
  • 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.

Fixed

  • Typos in documentation
  • Removal of IPYNB checkpoints

Removed

  • The SeedirError has been removed. All uses have been replaced with more appropriate errors, mainly ValueError or TypeError

v0.3.1

1 year ago

Added

  • Additional functionality to the formatter parameter: can now dynamically set other seedir arguments as well as styling ones
  • Added a sticky_formatter parameter for causing the formatter changes to continue through sub-directories.
  • Additional test cases for formatter
  • Add folderend & fileend tokens for setting characters at end of line. Default styles have been updated to include these.
  • Additional documentation, specifically for formatter but also some smaller tweaks

Changed

  • The CLI was revamped, now using argparse instead of getopts. More seedir options were added.
  • The seedir.printing.format_indent() method now modifies dictionaries in place, rather than creating a new one
  • the FakeDir.realize() method no longer creates a reference to unused file variable

Fixed

  • Fix the words.txt file not being closed after opening 🤦

Deprecated

  • slash is on warning for removal after addition of folderend.

v0.3.0

2 years ago

Added

  • formatter parameter for more customizable diagrams
  • FakeDir methods for creating files/folders now return references to the objects created
  • A copy() method for FakeDirs
  • A siblings() method for FakeDirs

Changed

  • Documentation updates
    • Added code blocks to examples in docstrings
    • replaced the "cheatsheet.png" image in the Getting Started section with a markdown link
    • remove broken link to FolderStructure class in seedir.realdir module
    • fixed some examples in docstrings and readmes
  • in getting started, redo examples to omit empty folders (which are omitted by GitHub)
  • replace '\s' with ' ' in seedir.fakedir.fakedir_fromstring()
  • Remove .DS_Store files (thanks @timweissenfels)
  • Reverted API doc style back to pdoc3 default

Fixed

  • remove call to copy method in Fakedir.delete(), which prevented non-list arguments
  • the walk_apply method is now applied to the calling folder, rather than just children

v0.2.0

3 years ago

Improvements to the main seedir() algorithm

  • There is now a single function which generates folder structure strings for both real directories and seedir "fake" ones. The main algorithm is contained in the new folderstructure.py module, which is aided by folderstructurehelpers.py (this contains many functions that were previously in seedir.seedir and seedir.fakedir).
  • The code is now simpler and (hopefully) more readable than the previous version.
  • Some small changes to the functionality of fringe cases:
    • using depthlimit=0 with a beyond string now produces just the root folder (this was incorrect before)
    • with beyond='content', empty folders are only shown when the depthlimit is crossed
    • trailing separators or slashes no longer cause the name of the root folder to be empty

Added more test cases

  • More unittests have been added to seedir/tests/tests.py.

Overhaul documentation

  • The examples Jupyter notebook has been removed, in favor of a gettingstarted.md file which has been added to the main page of the API docs.
  • The getting started README as well as the seedir.fakedir module are now doctest-able.
  • New style added to the API docs.
  • seedir.seedir module has been renamed to seedir.realdir to avoid some of my confusions
  • added an exampledir to the docs folder for some examples

Other changes

  • name parameter added to seedir.fakedir.randomdir
  • some changes to seedir.fakedir.fakedir_fromstring to handle some more failed cases.
  • now convert some arguments to bool or int in the command line tool
  • words, FakeItem removed from package namespace

v0.1.4

3 years ago

Updated 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.

v0.1.3

3 years ago

Added more example usage to docstrings.

v0.1.2

3 years ago
  • new 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))

v0.1.1

3 years ago

Initial release of seedir