Libraries and CLIs for my personal all-in-one productivity system including components like bookmarks, notes, todos, projects, etc.

Overview

img Conventional Commits pre-commit

bntp.go

Libraries and CLIs for my personal all-in-one productivity system including components like bookmarks, notes, todos, projects, etc.

Neovim integration available at https://github.com/JonasMuehlmann/bntp.nvim

Why?

Being a huge productivity nerd and life long learner, I value having efficient tools and workflows but have not found any one tool, which satisfied my needs. Combining multiple tools is suboptimal too, even though using Notion and Todoist has serverd me quite alright so far. Being a software developer, I thought, I would use my skills to my advantage and build the very tool I am trying to find, implementing just what I need, exactly how I want it and combining the best of all the other tools out there while having complete control and not depending on others.

Tools and systems, which have or, after research and considerations, might influence this project:

  • Notion
  • Roam Research
  • Obsidian
  • Todoist
  • The Zettelkasten Method
  • David Allens Getting Things Done (GTD)

Goals

  • Synergy by using a single tool serving as a complete productivity system
  • No reliance on external services (local data synced through my own means)
  • Integrate with and built upon my neovim/terminal based workflows and tools (no bloated and unergonomic graphical or web based interfaces)
  • Scriptable (e.g. periodic bookmark imports)
  • Modular (Interfaces built on top of CLIs built on top of different libraries)
  • Portable through import/export to/from and use of common file formats (YML,CSV,Markdown) using a local SQLite database only where it makes sense
  • Discoverable through context given by a hierarchical tag structure fuzzy searching and using filters
  • Extensive association through links/backlinks between documents and declaration of sources and related pages
  • High performance by working completely offline, having no bloat and using a high performance backend written in go
  • Quick and smooth usage because of all of the above(especially the neovim frontend)

Features

  • Bidirectional linking between documents (creating a link to B inside A creates a backlink to A in B)
  • Hierarchical tag structure with YML import/export (tags can have sub tags: software_development has sub tags software_engineering and computer_science, searching for software_developmebt also shows documents with the tags software_engineering and computer_science)

Content types

  • Bookmarks with CSV import/export
  • Todos with CSV import/export
  • Documents (Markdown based files categorized for different purposes)
    • Notes
    • Projects (notes with associated todos)
    • Roadmaps (collection of projects, notes, todos and bookmarks)
Comments
  • make sure to insert all tags in ParentPath and Subtags into db

    make sure to insert all tags in ParentPath and Subtags into db

    make sure to insert all tags in ParentPath and Subtags into db

    Filter Converter //

    ******************************************************************//

    Updater Converter //

    ******************************************************************//

    https://github.com/JonasMuehlmann/bntp.go/blob/a11b2499090d4ad434bbafe62f0312f488491758/model/repository/sqlite3/tag_repository.go#L765

    
            return []*domain.Tag{}, err
        }
    
        domainModels := make([]*domain.Tag, 0, len(repositoryModels))
    
        for _, repoModel := range repositoryModels {
            domainModel, err := repo.TagRepositoryToDomainModel(ctx, repoModel)
            if err != nil {
                return domainModels, err
            }
    
            domainModels = append(domainModels, domainModel)
        }
    
        return domainModels, err
    }
    
    
    
    
    //******************************************************************//
    //                            Converters                            //
    //******************************************************************//
    func (repo *Sqlite3TagRepository) GetTagDomainToRepositoryModel(ctx context.Context) func(domainModel *domain.Tag) (repositoryModel any, err error) {
        return func(domainModel *domain.Tag) (repositoryModel any, err error) {
            return repo.TagDomainToRepositoryModel(ctx, domainModel)
        }
    }
    
    func (repo *Sqlite3TagRepository) GetTagRepositoryToDomainModel(ctx context.Context) func(repositoryModel any) (domainModel *domain.Tag, err error) {
        return func(repositoryModel any) (domainModel *domain.Tag, err error) {
    
            return repo.TagRepositoryToDomainModel(ctx,repositoryModel)
        }
    }
    
    
    //******************************************************************//
    //                          Model Converter                         //
    //******************************************************************//
    
    
    
    func (repo *Sqlite3TagRepository) TagDomainToRepositoryModel(ctx context.Context, domainModel *domain.Tag) (repositoryModel any, err error)  {
    
    // TODO: make sure to insert all tags in ParentPath and Subtags into db
        repositoryModelConcrete := new(Tag)
        repositoryModelConcrete.R = repositoryModelConcrete.R.NewStruct()
    
        repositoryModelConcrete.ID = domainModel.ID
        repositoryModelConcrete.Tag = domainModel.Tag
    
    
    //***********************    Set ParentTag    **********************//
        if len(domainModel.ParentPath) > 0 {
            repositoryModelConcrete.ParentTag = null.NewInt64(domainModel.ParentPath[len(domainModel.ParentPath) - 1].ID, true)
        }
    
    //*************************    Set Path    *************************//
    for _, tag := range domainModel.ParentPath {
        repositoryModelConcrete.Path += strconv.FormatInt(tag.ID, 10) + ";"
    }
    
    repositoryModelConcrete.Path += strconv.FormatInt(domainModel.ID, 10)
    
    //************************    Set Children  ************************//
    for _, tag := range domainModel.Subtags {
        repositoryModelConcrete.Children += strconv.FormatInt(tag.ID, 10) + ";"
    }
    
        repositoryModel = repositoryModelConcrete
    
        return
    }
    
    // TODO: These functions should be context aware
    func (repo *Sqlite3TagRepository) TagRepositoryToDomainModel(ctx context.Context, repositoryModel any) (domainModel *domain.Tag, err error) {
    // TODO: make sure to insert all tags in ParentPath and Subtags into db
        domainModel = new(domain.Tag)
    
        repositoryModelConcrete := repositoryModel.(Tag)
    
        domainModel.ID = repositoryModelConcrete.ID
        domainModel.Tag = repositoryModelConcrete.Tag
    
    //***********************    Set ParentPath    **********************//
    var parentTagID int64
    var parentTag *Tag
    var domainParentTag *domain.Tag
    
    for _, parentTagIDRaw := range strings.Split(repositoryModelConcrete.Path, ";")[:len(repositoryModelConcrete.Path)-2]{
        parentTagID, err = strconv.ParseInt(parentTagIDRaw, 10, 64)
        if err != nil {
            return
        }
    
        parentTag, err = Tags(TagWhere.ID.EQ(parentTagID)).One(ctx, repo.db)
        if err != nil {
            return
        }
    
        domainParentTag, err = repo.TagRepositoryToDomainModel(ctx, parentTag)
        if err != nil {
            return
        }
    
        domainModel.ParentPath = append(domainModel.ParentPath, domainParentTag)
    }
    
    //************************    Set Subtags ************************//
    var childTagID int64
    var childTag *Tag
    var domainChildTag *domain.Tag
    
    for _, childTagIDRaw := range strings.Split(repositoryModelConcrete.Children, ";")[:len(repositoryModelConcrete.Children)-2]{
        childTagID, err = strconv.ParseInt(childTagIDRaw, 10, 64)
        if err != nil {
            return
        }
    
        childTag, err = Tags(TagWhere.ID.EQ(childTagID)).One(ctx, repo.db)
        if err != nil {
            return
        }
    
        domainChildTag, err = repo.TagRepositoryToDomainModel(ctx, childTag)
        if err != nil {
            return
        }
    
        domainModel.Subtags = append(domainModel.Subtags, domainChildTag)
    }
    
        repositoryModel = repositoryModelConcrete
    
        return
    }
    
    //******************************************************************//
    //                         Filter Converter                         //
    //******************************************************************//
    
    
    
    func (repo *Sqlite3TagRepository) TagDomainToRepositoryFilter(ctx context.Context, domainFilter *domain.TagFilter) (repositoryFilter any, err error)  {
        repositoryFilterConcrete := new(TagFilter)
    
    	repositoryFilterConcrete.ID = domainFilter.ID
    	repositoryFilterConcrete.Tag = domainFilter.Tag
    
    	if domainFilter.ParentPath.HasValue {
    
    		//*********************    Set ParentPath    *********************//
    		var convertedParentTagTagFilter model.FilterOperation[*Tag]
    
    		convertedParentTagTagFilter, err = model.ConvertFilter[*Tag, *domain.Tag](domainFilter.ParentPath.Wrappee, repoCommon.MakeDomainToRepositoryEntityConverterGeneric[domain.Tag, Tag](ctx, repo.TagDomainToRepositoryModel))
    		if err != nil {
    			return
    		}
    
    		repositoryFilterConcrete.ParentTagTag.Push(convertedParentTagTagFilter)
    		//*************************    Set Path    *************************//
    		var convertedPathFilter model.FilterOperation[string]
    
    		convertedPathFilter, err = model.ConvertFilter[string, *domain.Tag](domainFilter.ParentPath.Wrappee, func(tag *domain.Tag) (string, error) { return strconv.FormatInt(tag.ID, 10), nil })
    		if err != nil {
    			return
    		}
    
    		repositoryFilterConcrete.Path.Push(convertedPathFilter)
    		//**********************    Set ParentTag    ***********************//
    		var convertedParentTagFilter model.FilterOperation[null.Int64]
    
    		convertedParentTagFilter, err = model.ConvertFilter[null.Int64, *domain.Tag](domainFilter.ParentPath.Wrappee, func(tag *domain.Tag) (null.Int64, error) { return null.NewInt64(tag.ID, true), nil })
    		if err != nil {
    			return
    		}
    
    		repositoryFilterConcrete.ParentTag.Push(convertedParentTagFilter)
    	}
    
    	//**********************    Set child tags *********************//
    	if domainFilter.Subtags.HasValue {
    		var convertedFilter model.FilterOperation[string]
    
    		convertedFilter, err = model.ConvertFilter[string, *domain.Tag](domainFilter.Subtags.Wrappee, func(tag *domain.Tag) (string, error) { return strconv.FormatInt(tag.ID, 10), nil })
    		if err != nil {
    			return
    		}
    
    		repositoryFilterConcrete.Children.Push(convertedFilter)
    	}
    
        repositoryFilter = repositoryFilterConcrete
    
    	return
    }
    
    //******************************************************************//
    //                         Updater Converter                        //
    //******************************************************************//
    
    
    
    func (repo *Sqlite3TagRepository) TagDomainToRepositoryUpdater(ctx context.Context, domainUpdater *domain.TagUpdater) (repositoryUpdater any, err error)  {
        repositoryUpdaterConcrete := new(TagUpdater)
    
    	//**************************    Set tag    *************************//
    	if domainUpdater.Tag.HasValue {
    		repositoryUpdaterConcrete.Tag.Push(model.UpdateOperation[string]{Operator: domainUpdater.Tag.Wrappee.Operator, Operand: repositoryUpdaterConcrete.Tag.Wrappee.Operand})
    	}
    
    	//***********    Set ParentPath    ***********//
    	if domainUpdater.ParentPath.HasValue {
    		var convertedTagRaw any
    		tag := domainUpdater.ParentPath.Wrappee.Operand[len(domainUpdater.ParentPath.Wrappee.Operand)-1]
    		convertedTagRaw, err =  repo.TagDomainToRepositoryModel(ctx, tag)
    		if err != nil {
    			return
    		}
    
    		repositoryUpdaterConcrete.ParentTagTag.Push(model.UpdateOperation[*Tag]{Operator: domainUpdater.ParentPath.Wrappee.Operator, Operand: convertedTagRaw.(*Tag)})
    		repositoryUpdaterConcrete.ParentTag.Push(model.UpdateOperation[null.Int64]{Operator: domainUpdater.ParentPath.Wrappee.Operator, Operand: null.NewInt64(convertedTagRaw.(*Tag).ID, true)})
    
    		pathIDs := make([]string, 0, len(domainUpdater.ParentPath.Wrappee.Operand)+1)
    		for _, tag := range domainUpdater.ParentPath.Wrappee.Operand {
    			pathIDs = append(pathIDs, strconv.FormatInt(tag.ID, 10))
    		}
    
    		pathIDs = append(pathIDs, strconv.FormatInt(tag.ID, 10))
    
    		repositoryUpdaterConcrete.Path.Push(model.UpdateOperation[string]{Operator: domainUpdater.ParentPath.Wrappee.Operator, Operand: strings.Join(pathIDs, ";")})
    	}
    
    	//***********************    Set Children    ***********************//
    	if domainUpdater.Subtags.HasValue {
    		pathIDs := make([]string, 0, len(domainUpdater.Subtags.Wrappee.Operand)+1)
    		for _, tag := range domainUpdater.Subtags.Wrappee.Operand {
    			pathIDs = append(pathIDs, strconv.FormatInt(tag.ID, 10))
    		}
    
    		repositoryUpdaterConcrete.Children.Push(model.UpdateOperation[string]{Operator: domainUpdater.Subtags.Wrappee.Operator, Operand: strings.Join(pathIDs, ";")})
    	}
    
    	//**************************    Set ID    **************************//
    	if domainUpdater.ID.HasValue {
    		repositoryUpdaterConcrete.ID.Push(model.UpdateOperation[int64]{Operator: domainUpdater.ID.Wrappee.Operator, Operand: repositoryUpdaterConcrete.ID.Wrappee.Operand})
    	}
    
        repositoryUpdater = repositoryUpdaterConcrete
    
    	return
    }
    
    
    

    df60b12c26a8b5b739594b922035da37f4608da0

    bug todo 
    opened by github-actions[bot] 6
  • These functions should be context aware

    These functions should be context aware

    These functions should be context aware

    https://github.com/JonasMuehlmann/bntp.go/blob/a11b2499090d4ad434bbafe62f0312f488491758/model/repository/sqlite3/tag_repository.go#L795

    
            return []*domain.Tag{}, err
        }
    
        domainModels := make([]*domain.Tag, 0, len(repositoryModels))
    
        for _, repoModel := range repositoryModels {
            domainModel, err := repo.TagRepositoryToDomainModel(ctx, repoModel)
            if err != nil {
                return domainModels, err
            }
    
            domainModels = append(domainModels, domainModel)
        }
    
        return domainModels, err
    }
    
    
    
    
    //******************************************************************//
    //                            Converters                            //
    //******************************************************************//
    func (repo *Sqlite3TagRepository) GetTagDomainToRepositoryModel(ctx context.Context) func(domainModel *domain.Tag) (repositoryModel any, err error) {
        return func(domainModel *domain.Tag) (repositoryModel any, err error) {
            return repo.TagDomainToRepositoryModel(ctx, domainModel)
        }
    }
    
    func (repo *Sqlite3TagRepository) GetTagRepositoryToDomainModel(ctx context.Context) func(repositoryModel any) (domainModel *domain.Tag, err error) {
        return func(repositoryModel any) (domainModel *domain.Tag, err error) {
    
            return repo.TagRepositoryToDomainModel(ctx,repositoryModel)
        }
    }
    
    
    //******************************************************************//
    //                          Model Converter                         //
    //******************************************************************//
    
    
    
    func (repo *Sqlite3TagRepository) TagDomainToRepositoryModel(ctx context.Context, domainModel *domain.Tag) (repositoryModel any, err error)  {
    
    // TODO: make sure to insert all tags in ParentPath and Subtags into db
        repositoryModelConcrete := new(Tag)
        repositoryModelConcrete.R = repositoryModelConcrete.R.NewStruct()
    
        repositoryModelConcrete.ID = domainModel.ID
        repositoryModelConcrete.Tag = domainModel.Tag
    
    
    //***********************    Set ParentTag    **********************//
        if len(domainModel.ParentPath) > 0 {
            repositoryModelConcrete.ParentTag = null.NewInt64(domainModel.ParentPath[len(domainModel.ParentPath) - 1].ID, true)
        }
    
    //*************************    Set Path    *************************//
    for _, tag := range domainModel.ParentPath {
        repositoryModelConcrete.Path += strconv.FormatInt(tag.ID, 10) + ";"
    }
    
    repositoryModelConcrete.Path += strconv.FormatInt(domainModel.ID, 10)
    
    //************************    Set Children  ************************//
    for _, tag := range domainModel.Subtags {
        repositoryModelConcrete.Children += strconv.FormatInt(tag.ID, 10) + ";"
    }
    
        repositoryModel = repositoryModelConcrete
    
        return
    }
    
    // TODO: These functions should be context aware
    func (repo *Sqlite3TagRepository) TagRepositoryToDomainModel(ctx context.Context, repositoryModel any) (domainModel *domain.Tag, err error) {
    // TODO: make sure to insert all tags in ParentPath and Subtags into db
        domainModel = new(domain.Tag)
    
        repositoryModelConcrete := repositoryModel.(Tag)
    
        domainModel.ID = repositoryModelConcrete.ID
        domainModel.Tag = repositoryModelConcrete.Tag
    
    //***********************    Set ParentPath    **********************//
    var parentTagID int64
    var parentTag *Tag
    var domainParentTag *domain.Tag
    
    for _, parentTagIDRaw := range strings.Split(repositoryModelConcrete.Path, ";")[:len(repositoryModelConcrete.Path)-2]{
        parentTagID, err = strconv.ParseInt(parentTagIDRaw, 10, 64)
        if err != nil {
            return
        }
    
        parentTag, err = Tags(TagWhere.ID.EQ(parentTagID)).One(ctx, repo.db)
        if err != nil {
            return
        }
    
        domainParentTag, err = repo.TagRepositoryToDomainModel(ctx, parentTag)
        if err != nil {
            return
        }
    
        domainModel.ParentPath = append(domainModel.ParentPath, domainParentTag)
    }
    
    //************************    Set Subtags ************************//
    var childTagID int64
    var childTag *Tag
    var domainChildTag *domain.Tag
    
    for _, childTagIDRaw := range strings.Split(repositoryModelConcrete.Children, ";")[:len(repositoryModelConcrete.Children)-2]{
        childTagID, err = strconv.ParseInt(childTagIDRaw, 10, 64)
        if err != nil {
            return
        }
    
        childTag, err = Tags(TagWhere.ID.EQ(childTagID)).One(ctx, repo.db)
        if err != nil {
            return
        }
    
        domainChildTag, err = repo.TagRepositoryToDomainModel(ctx, childTag)
        if err != nil {
            return
        }
    
        domainModel.Subtags = append(domainModel.Subtags, domainChildTag)
    }
    
        repositoryModel = repositoryModelConcrete
    
        return
    }
    
    //******************************************************************//
    //                         Filter Converter                         //
    //******************************************************************//
    
    
    
    func (repo *Sqlite3TagRepository) TagDomainToRepositoryFilter(ctx context.Context, domainFilter *domain.TagFilter) (repositoryFilter any, err error)  {
        repositoryFilterConcrete := new(TagFilter)
    
    	repositoryFilterConcrete.ID = domainFilter.ID
    	repositoryFilterConcrete.Tag = domainFilter.Tag
    
    	if domainFilter.ParentPath.HasValue {
    
    		//*********************    Set ParentPath    *********************//
    		var convertedParentTagTagFilter model.FilterOperation[*Tag]
    
    		convertedParentTagTagFilter, err = model.ConvertFilter[*Tag, *domain.Tag](domainFilter.ParentPath.Wrappee, repoCommon.MakeDomainToRepositoryEntityConverterGeneric[domain.Tag, Tag](ctx, repo.TagDomainToRepositoryModel))
    		if err != nil {
    			return
    		}
    
    		repositoryFilterConcrete.ParentTagTag.Push(convertedParentTagTagFilter)
    		//*************************    Set Path    *************************//
    		var convertedPathFilter model.FilterOperation[string]
    
    		convertedPathFilter, err = model.ConvertFilter[string, *domain.Tag](domainFilter.ParentPath.Wrappee, func(tag *domain.Tag) (string, error) { return strconv.FormatInt(tag.ID, 10), nil })
    		if err != nil {
    			return
    		}
    
    		repositoryFilterConcrete.Path.Push(convertedPathFilter)
    		//**********************    Set ParentTag    ***********************//
    		var convertedParentTagFilter model.FilterOperation[null.Int64]
    
    		convertedParentTagFilter, err = model.ConvertFilter[null.Int64, *domain.Tag](domainFilter.ParentPath.Wrappee, func(tag *domain.Tag) (null.Int64, error) { return null.NewInt64(tag.ID, true), nil })
    		if err != nil {
    			return
    		}
    
    		repositoryFilterConcrete.ParentTag.Push(convertedParentTagFilter)
    	}
    
    	//**********************    Set child tags *********************//
    	if domainFilter.Subtags.HasValue {
    		var convertedFilter model.FilterOperation[string]
    
    		convertedFilter, err = model.ConvertFilter[string, *domain.Tag](domainFilter.Subtags.Wrappee, func(tag *domain.Tag) (string, error) { return strconv.FormatInt(tag.ID, 10), nil })
    		if err != nil {
    			return
    		}
    
    		repositoryFilterConcrete.Children.Push(convertedFilter)
    	}
    
        repositoryFilter = repositoryFilterConcrete
    
    	return
    }
    
    //******************************************************************//
    //                         Updater Converter                        //
    //******************************************************************//
    
    
    
    func (repo *Sqlite3TagRepository) TagDomainToRepositoryUpdater(ctx context.Context, domainUpdater *domain.TagUpdater) (repositoryUpdater any, err error)  {
        repositoryUpdaterConcrete := new(TagUpdater)
    
    	//**************************    Set tag    *************************//
    	if domainUpdater.Tag.HasValue {
    		repositoryUpdaterConcrete.Tag.Push(model.UpdateOperation[string]{Operator: domainUpdater.Tag.Wrappee.Operator, Operand: repositoryUpdaterConcrete.Tag.Wrappee.Operand})
    	}
    
    	//***********    Set ParentPath    ***********//
    	if domainUpdater.ParentPath.HasValue {
    		var convertedTagRaw any
    		tag := domainUpdater.ParentPath.Wrappee.Operand[len(domainUpdater.ParentPath.Wrappee.Operand)-1]
    		convertedTagRaw, err =  repo.TagDomainToRepositoryModel(ctx, tag)
    		if err != nil {
    			return
    		}
    
    		repositoryUpdaterConcrete.ParentTagTag.Push(model.UpdateOperation[*Tag]{Operator: domainUpdater.ParentPath.Wrappee.Operator, Operand: convertedTagRaw.(*Tag)})
    		repositoryUpdaterConcrete.ParentTag.Push(model.UpdateOperation[null.Int64]{Operator: domainUpdater.ParentPath.Wrappee.Operator, Operand: null.NewInt64(convertedTagRaw.(*Tag).ID, true)})
    
    		pathIDs := make([]string, 0, len(domainUpdater.ParentPath.Wrappee.Operand)+1)
    		for _, tag := range domainUpdater.ParentPath.Wrappee.Operand {
    			pathIDs = append(pathIDs, strconv.FormatInt(tag.ID, 10))
    		}
    
    		pathIDs = append(pathIDs, strconv.FormatInt(tag.ID, 10))
    
    		repositoryUpdaterConcrete.Path.Push(model.UpdateOperation[string]{Operator: domainUpdater.ParentPath.Wrappee.Operator, Operand: strings.Join(pathIDs, ";")})
    	}
    
    	//***********************    Set Children    ***********************//
    	if domainUpdater.Subtags.HasValue {
    		pathIDs := make([]string, 0, len(domainUpdater.Subtags.Wrappee.Operand)+1)
    		for _, tag := range domainUpdater.Subtags.Wrappee.Operand {
    			pathIDs = append(pathIDs, strconv.FormatInt(tag.ID, 10))
    		}
    
    		repositoryUpdaterConcrete.Children.Push(model.UpdateOperation[string]{Operator: domainUpdater.Subtags.Wrappee.Operator, Operand: strings.Join(pathIDs, ";")})
    	}
    
    	//**************************    Set ID    **************************//
    	if domainUpdater.ID.HasValue {
    		repositoryUpdaterConcrete.ID.Push(model.UpdateOperation[int64]{Operator: domainUpdater.ID.Wrappee.Operator, Operand: repositoryUpdaterConcrete.ID.Wrappee.Operand})
    	}
    
        repositoryUpdater = repositoryUpdaterConcrete
    
    	return
    }
    
    
    

    f39223360281ce40e2d4f92e12388cf6eeb26ca0

    enhancement todo 
    opened by github-actions[bot] 3
  • Ignore EmptyIterable errors in all goaoi calls

    Ignore EmptyIterable errors in all goaoi calls

    Ignore EmptyIterable errors in all goaoi calls

    https://github.com/JonasMuehlmann/bntp.go/blob/5d269e9350776b5904cc1eb6412cf082501b8378/model/repository/sqlite3/bookmark_repository.go#L391

    
    			panic(fmt.Sprintf("Expected type %T but got %T", BookmarkFilterMapping[any]{}, filter))
    		}
    
    		newQueryMod := buildQueryModFilterBookmark(filterMapping.Field, filterMapping.FilterOperation)
    
    		queryModList = append(queryModList, newQueryMod...)
    	}
    
    	return queryModList
    }
    
    func GetBookmarkDomainToSqlRepositoryModel(ctx context.Context, db *sql.DB) func(domainModel *domain.Bookmark) (sqlRepositoryModel *Bookmark, err error) {
    	return func(domainModel *domain.Bookmark) (sqlRepositoryModel *Bookmark, err error) {
    		return BookmarkDomainToSqlRepositoryModel(ctx, db, domainModel)
    	}
    }
    
    func GetBookmarkSqlRepositoryToDomainModel(ctx context.Context, db *sql.DB) func(repositoryModel *Bookmark) (domainModel *domain.Bookmark, err error) {
    	return func(sqlRepositoryModel *Bookmark) (domainModel *domain.Bookmark, err error) {
    		return BookmarkSqlRepositoryToDomainModel(ctx, db, sqlRepositoryModel)
    	}
    }
    
    type Sqlite3BookmarkRepositoryConstructorArgs struct {
    	DB *sql.DB
    }
    
    func (repo *Sqlite3BookmarkRepository) New(args any) (repositoryCommon.BookmarkRepository, error) {
    	constructorArgs, ok := args.(Sqlite3BookmarkRepositoryConstructorArgs)
    	if !ok {
    		return repo, fmt.Errorf("expected type %T but got %T", Sqlite3BookmarkRepositoryConstructorArgs{}, args)
    	}
    
    	repo.db = constructorArgs.DB
    
    	return repo, nil
    }
    
    func (repo *Sqlite3BookmarkRepository) Add(ctx context.Context, domainModels []*domain.Bookmark) error {
    	repositoryModels, err := goaoi.TransformCopySlice(domainModels, GetBookmarkDomainToSqlRepositoryModel(ctx, repo.db))
    	// TODO: Ignore EmptyIterable errors in all goaoi calls
    	if err != nil {
    		return err
    	}
    
    

    6c1e070e289301af0b7843f213c011c5b7cb8415

    refactor todo 
    opened by github-actions[bot] 1
  • Implement output filters

    Implement output filters

    Implement output filters

    https://github.com/JonasMuehlmann/bntp.go/blob/6d052c29f92befeecb1e86509888ed6acde826c2/cmd/bookmark.go#L181

    
    }
    
    var bookmarkAddCmd = &cobra.Command{
    	Use:   "add MODEL...",
    	Short: "Add a bntp bookmark",
    	Long:  `A longer description`,
    	Args:  cobra.ArbitraryArgs,
    	Run: func(cmd *cobra.Command, args []string) {
    		if len(args) == 0 {
    			cmd.Help()
    			os.Exit(0)
    		}
    
    		bookmarks := make([]*domain.Bookmark, 0, len(args))
    
    		for i, bookmarkOut := range bookmarks {
    			err := BNTPBackend.Unmarshallers[Format].Unmarshall(bookmarkOut, args[i])
    			if err != nil {
    				panic(err)
    			}
    		}
    
    		err := BNTPBackend.BookmarkManager.Add(context.Background(), bookmarks)
    		if err != nil {
    			panic(err)
    		}
    	},
    }
    
    var bookmarkReplaceCmd = &cobra.Command{
    	Use:   "replace MODEL...",
    	Short: "Replace a bntp bookmark with an updated version",
    	Long:  `A longer description`,
    	Args:  cobra.ArbitraryArgs,
    	Run: func(cmd *cobra.Command, args []string) {
    		if len(args) == 0 {
    			cmd.Help()
    			os.Exit(0)
    		}
    
    		bookmarks := make([]*domain.Bookmark, 0, len(args))
    
    		for i, bookmarkOut := range bookmarks {
    			err := BNTPBackend.Unmarshallers[Format].Unmarshall(bookmarkOut, args[i])
    			if err != nil {
    				panic(err)
    			}
    		}
    
    		err := BNTPBackend.BookmarkManager.Replace(context.Background(), bookmarks)
    		if err != nil {
    			panic(err)
    		}
    	},
    }
    
    var bookmarkUpsertCmd = &cobra.Command{
    	Use:   "upsert MODEL...",
    	Short: "Add or replace a bntp bookmark",
    	Long:  `A longer description`,
    	Args:  cobra.ArbitraryArgs,
    	Run: func(cmd *cobra.Command, args []string) {
    		if len(args) == 0 {
    			cmd.Help()
    			os.Exit(0)
    		}
    
    		bookmarks := make([]*domain.Bookmark, 0, len(args))
    
    		for i, bookmarkOut := range bookmarks {
    			err := BNTPBackend.Unmarshallers[Format].Unmarshall(bookmarkOut, args[i])
    			if err != nil {
    				panic(err)
    			}
    		}
    
    		err := BNTPBackend.BookmarkManager.Upsert(context.Background(), bookmarks)
    		if err != nil {
    			panic(err)
    		}
    	},
    }
    
    var bookmarkEditCmd = &cobra.Command{
    	Use:   "edit MODEL...",
    	Short: "Edit a bntp bookmark",
    	Long:  `A longer description`,
    	Args:  cobra.ArbitraryArgs,
    	Run: func(cmd *cobra.Command, args []string) {
    		if len(args) == 0 {
    			cmd.Help()
    			os.Exit(0)
    		}
    
    		var err error
    		var filter *domain.BookmarkFilter
    		var updater *domain.BookmarkUpdater
    		var numAffectedRecords int64
    
    		bookmarks := make([]*domain.Bookmark, 0, len(args))
    
    		for i, bookmarkOut := range bookmarks {
    			err := BNTPBackend.Unmarshallers[Format].Unmarshall(bookmarkOut, args[i])
    			if err != nil {
    				panic(err)
    			}
    		}
    
    		err = BNTPBackend.Unmarshallers[Format].Unmarshall(updater, UpdaterRaw)
    		if err != nil {
    			panic(err)
    		}
    		// TODO: We should also have Update and Upsert methods in the managers and repositories
    		if FilterRaw == "" {
    			err := BNTPBackend.BookmarkManager.Update(context.Background(), bookmarks, updater)
    			if err != nil {
    				panic(err)
    			}
    
    			numAffectedRecords = int64(len(args))
    		} else {
    			err = BNTPBackend.Unmarshallers[Format].Unmarshall(filter, FilterRaw)
    			if err != nil {
    				panic(err)
    			}
    
    			numAffectedRecords, err = BNTPBackend.BookmarkManager.UpdateWhere(context.Background(), filter, updater)
    			if err != nil {
    				panic(err)
    			}
    		}
    
    		fmt.Println(numAffectedRecords)
    	},
    }
    
    // TODO: Implement output filters
    var bookmarkListCmd = &cobra.Command{
    	Use:   "list",
    	Short: "List bntp bookmarks",
    
    

    ebd67247bd01a3833b03eaa3b07c2c3e6ce4e4c9

    todo 
    opened by github-actions[bot] 1
  • We should also have Update and Upsert methods in the managers and repositories

    We should also have Update and Upsert methods in the managers and repositories

    We should also have Update and Upsert methods in the managers and repositories

    https://github.com/JonasMuehlmann/bntp.go/blob/6d052c29f92befeecb1e86509888ed6acde826c2/cmd/bookmark.go#L157

    
    }
    
    var bookmarkAddCmd = &cobra.Command{
    	Use:   "add MODEL...",
    	Short: "Add a bntp bookmark",
    	Long:  `A longer description`,
    	Args:  cobra.ArbitraryArgs,
    	Run: func(cmd *cobra.Command, args []string) {
    		if len(args) == 0 {
    			cmd.Help()
    			os.Exit(0)
    		}
    
    		bookmarks := make([]*domain.Bookmark, 0, len(args))
    
    		for i, bookmarkOut := range bookmarks {
    			err := BNTPBackend.Unmarshallers[Format].Unmarshall(bookmarkOut, args[i])
    			if err != nil {
    				panic(err)
    			}
    		}
    
    		err := BNTPBackend.BookmarkManager.Add(context.Background(), bookmarks)
    		if err != nil {
    			panic(err)
    		}
    	},
    }
    
    var bookmarkReplaceCmd = &cobra.Command{
    	Use:   "replace MODEL...",
    	Short: "Replace a bntp bookmark with an updated version",
    	Long:  `A longer description`,
    	Args:  cobra.ArbitraryArgs,
    	Run: func(cmd *cobra.Command, args []string) {
    		if len(args) == 0 {
    			cmd.Help()
    			os.Exit(0)
    		}
    
    		bookmarks := make([]*domain.Bookmark, 0, len(args))
    
    		for i, bookmarkOut := range bookmarks {
    			err := BNTPBackend.Unmarshallers[Format].Unmarshall(bookmarkOut, args[i])
    			if err != nil {
    				panic(err)
    			}
    		}
    
    		err := BNTPBackend.BookmarkManager.Replace(context.Background(), bookmarks)
    		if err != nil {
    			panic(err)
    		}
    	},
    }
    
    var bookmarkUpsertCmd = &cobra.Command{
    	Use:   "upsert MODEL...",
    	Short: "Add or replace a bntp bookmark",
    	Long:  `A longer description`,
    	Args:  cobra.ArbitraryArgs,
    	Run: func(cmd *cobra.Command, args []string) {
    		if len(args) == 0 {
    			cmd.Help()
    			os.Exit(0)
    		}
    
    		bookmarks := make([]*domain.Bookmark, 0, len(args))
    
    		for i, bookmarkOut := range bookmarks {
    			err := BNTPBackend.Unmarshallers[Format].Unmarshall(bookmarkOut, args[i])
    			if err != nil {
    				panic(err)
    			}
    		}
    
    		err := BNTPBackend.BookmarkManager.Upsert(context.Background(), bookmarks)
    		if err != nil {
    			panic(err)
    		}
    	},
    }
    
    var bookmarkEditCmd = &cobra.Command{
    	Use:   "edit MODEL...",
    	Short: "Edit a bntp bookmark",
    	Long:  `A longer description`,
    	Args:  cobra.ArbitraryArgs,
    	Run: func(cmd *cobra.Command, args []string) {
    		if len(args) == 0 {
    			cmd.Help()
    			os.Exit(0)
    		}
    
    		var err error
    		var filter *domain.BookmarkFilter
    		var updater *domain.BookmarkUpdater
    		var numAffectedRecords int64
    
    		bookmarks := make([]*domain.Bookmark, 0, len(args))
    
    		for i, bookmarkOut := range bookmarks {
    			err := BNTPBackend.Unmarshallers[Format].Unmarshall(bookmarkOut, args[i])
    			if err != nil {
    				panic(err)
    			}
    		}
    
    		err = BNTPBackend.Unmarshallers[Format].Unmarshall(updater, UpdaterRaw)
    		if err != nil {
    			panic(err)
    		}
    		// TODO: We should also have Update and Upsert methods in the managers and repositories
    		if FilterRaw == "" {
    			err := BNTPBackend.BookmarkManager.Update(context.Background(), bookmarks, updater)
    			if err != nil {
    				panic(err)
    			}
    
    			numAffectedRecords = int64(len(args))
    		} else {
    			err = BNTPBackend.Unmarshallers[Format].Unmarshall(filter, FilterRaw)
    			if err != nil {
    				panic(err)
    			}
    
    			numAffectedRecords, err = BNTPBackend.BookmarkManager.UpdateWhere(context.Background(), filter, updater)
    			if err != nil {
    				panic(err)
    			}
    		}
    
    		fmt.Println(numAffectedRecords)
    	},
    }
    
    // TODO: Implement output filters
    var bookmarkListCmd = &cobra.Command{
    	Use:   "list",
    	Short: "List bntp bookmarks",
    
    

    aace8e0f2351b8b136d4dcef0e909f0f5e921f5d

    todo 
    opened by github-actions[bot] 1
  • Reimplement libdocuments (file operations) here

    Reimplement libdocuments (file operations) here

    Reimplement libdocuments (file operations) here

    https://github.com/JonasMuehlmann/bntp.go/blob/b71f4520e4ae522ad48de0e8bfcdeb3b353e8a00/bntp/libdocuments/documentmanager.go#L36

    
    
    type DocumentManager struct {
    	Repository repository.DocumentRepository
    	// TODO: Reimplement libdocuments (file operations) here
    	ContentRepository repository.ContentFileRepository
    	Hooks             *bntp.Hooks[domain.Document]
    }
    
    func New(hooks *bntp.Hooks[domain.Document], repository repository.DocumentRepository) (DocumentManager, error) {
    
    

    6156cfc49d39b9e03f49db6541086c681d671039

    todo 
    opened by github-actions[bot] 1
  • Allow skipping certain hooks.

    Allow skipping certain hooks.

    Allow skipping certain hooks.

    https://github.com/JonasMuehlmann/bntp.go/blob/66b9bad1c6d2af149f08cdccd0ec49f607085f13/pkg/libbookmarks/bookmarkmanager.go#L32

    
    	bntp "github.com/JonasMuehlmann/bntp.go/pkg"
    )
    
    // TODO: Allow skipping certain hooks.
    type BookmarkManager struct {
    	hooks      bntp.Hooks[domain.Bookmark]
    	repository repository.BookmarkRepository
    }
    
    func (m *BookmarkManager) New(...any) (BookmarkManager, error) {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) Add(context.Context, []domain.Bookmark) (numAffectedRecords int, newID int, err error) {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) Replace(context.Context, []domain.Bookmark) error {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) UpdateWhere(context.Context, domain.BookmarkFilter, map[domain.BookmarkField]domain.BookmarkUpdater) (numAffectedRecords int, err error) {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) Delete(context.Context, []domain.Bookmark) error {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) DeleteWhere(context.Context, domain.BookmarkFilter) (numAffectedRecords int, err error) {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) CountWhere(context.Context, domain.BookmarkFilter) int {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) CountAll(context.Context) int {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) DoesExist(context.Context, domain.Bookmark) bool {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) DoesExistWhere(context.Context, domain.BookmarkFilter) bool {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) GetWhere(context.Context, domain.BookmarkFilter) []domain.Bookmark {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) GetFirstWhere(context.Context, domain.BookmarkFilter) domain.Bookmark {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) GetAll(context.Context) []domain.Bookmark {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) AddType(context.Context, string) error {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) DeleteType(context.Context, string) error {
    	panic("Not implemented")
    }
    
    func (m *BookmarkManager) UpdateType(context.Context, string, string) error {
    	panic("Not implemented")
    }
    
    

    d0664f443967ff52b3be8c23b6469bb069283d0e

    todo 
    opened by github-actions[bot] 1
  • Add template for type safe config struct per provider for New() methods

    Add template for type safe config struct per provider for New() methods

    Add template for type safe config struct per provider for New() methods

    It could embed a generic RepositoryConfig into repository specific configurations e.g. Sqlite3RepositoryConfig

    https://github.com/JonasMuehlmann/bntp.go/blob/fed1c8852ea770cea00ac811c143dd075a52cac7/tools/generate_sql_repositories/main.go#L100

    
    type Configuration struct {
    	EntityName   string
    	DatabaseName string
    	StructFields []tools.StructField
    }
    
    var structNameVarTemplaterFragment = `{{$StructName := print (UppercaseBeginning .DatabaseName) (UppercaseBeginning .EntityName) "Repository" -}}
    {{$EntityName := UppercaseBeginning .EntityName -}}`
    
    var structDefinition = `type {{UppercaseBeginning .DatabaseName}}{{UppercaseBeginning .EntityName}}Repository struct {
        db sql.DB
    }`
    
    var repositoryHelperTypesFragment = structNameVarTemplaterFragment + `
    type {{$EntityName}}Field string
    
    var {{$EntityName}}Fields = struct {
        {{range $field := .StructFields -}}
        {{.FieldName}}  {{$EntityName}}Field
        {{end}}
    }{
        {{range $field := .StructFields -}}
        {{.FieldName}}: "{{.LogicalFieldName -}}",
        {{end}}
    }
    
    var {{$EntityName}}FieldsList = []{{$EntityName}}Field{
        {{range $field := .StructFields -}}
        {{$EntityName}}Field("{{.FieldName}}"),
        {{end}}
    }
    
    type {{$EntityName}}Filter struct {
        {{range $field := .StructFields -}}
        {{.FieldName}} optional.Optional[FilterOperation[{{.FieldType}}]]
        {{end}}
    }
    
    type {{$EntityName}}Updater struct {
        {{range $field := .StructFields -}}
        {{.FieldName}} optional.Optional[UpdateOperation[{{.FieldType}}]]
        {{end}}
    }
    
    type {{$StructName}}Hook func(context.Context, {{$StructName}}) error`
    
    // TODO: Add template for type safe config struct per provider for New() methods
    // It could embed a generic RepositoryConfig into repository specific configurations e.g. Sqlite3RepositoryConfig
    
    func main() {
    	for _, database := range databases {
    		for _, entity := range entities {
    
    

    19d5d01f45bca483c9ac2b13262464436c8e0e7e

    todo 
    opened by github-actions[bot] 1
  • Allow skipping certain hooks

    Allow skipping certain hooks

    Allow skipping certain hooks

    https://github.com/JonasMuehlmann/bntp.go/blob/e0906c0d1a785b7767a7948b7c898192a058cef6/pkg/libbookmarks/bookmarkmanager.go#L30

    
    
    	"github.com/JonasMuehlmann/bntp.go/domain"
    	bntp "github.com/JonasMuehlmann/bntp.go/pkg"
    )
    
    // TODO: Allow skipping certain hooks
    type BookmarkManager struct {
    	hooks bntp.Hooks[Bookmark]
    }
    
    func (m *BookmarkManager) New(...any) (BookmarkManager, error) {
    }
    
    func (m *BookmarkManager) Add(context.Context, []domain.Bookmark) (numAffectedRecords int, newID int, err error) {
    }
    func (m *BookmarkManager) Replace(context.Context, []domain.Bookmark) error {
    }
    func (m *BookmarkManager) UpdateWhere(context.Context, BookmarkFilter, map[domain.BookmarkField]domain.BookmarkUpdater) (numAffectedRecords int, err error) {
    }
    func (m *BookmarkManager) Delete(context.Context, []domain.Bookmark) error {
    }
    func (m *BookmarkManager) DeleteWhere(context.Context, BookmarkFilter) (numAffectedRecords int, err error) {
    }
    func (m *BookmarkManager) CountWhere(context.Context, BookmarkFilter) int {
    }
    func (m *BookmarkManager) CountAll(context.Context) int {
    }
    func (m *BookmarkManager) DoesExist(context.Context, domain.Bookmark) bool {
    }
    func (m *BookmarkManager) DoesExistWhere(context.Context, BookmarkFilter) bool {
    }
    func (m *BookmarkManager) GetWhere(context.Context, BookmarkFilter) []domain.Bookmark {
    }
    func (m *BookmarkManager) GetFirstWhere(context.Context, BookmarkFilter) domain.Bookmark {
    }
    func (m *BookmarkManager) GetAll(context.Context) []domain.Bookmark {
    }
    
    func (m *BookmarkManager) AddType(context.Context, string) error {
    }
    func (m *BookmarkManager) DeleteType(context.Context, string) error {
    }
    func (m *BookmarkManager) UpdateType(context.Context, string, string) error {
    }
    
    

    dc5ed91d32f9d714107e38fba3aeb89daed28f68

    todo 
    opened by github-actions[bot] 1
  • Write test to check if all domain types are handled here

    Write test to check if all domain types are handled here

    Write test to check if all domain types are handled here

    https://github.com/JonasMuehlmann/bntp.go/blob/4062c7d12bdf0937444d9e3b99dfa5ff6956c57b/pkg/libbookmarks/bookmarkmanager.go#L92

    
    	DeletedAt
    )
    
    // TODO: Generate from structs
    type BookmarkUpdateOperation func(any) any
    
    // TODO: Generate from structs
    type BookmarkHook func(context.Context, domain.Bookmark) error
    
    // TODO: Add test to compare with constants.
    // TODO: Allow sipping certain hooks
    // TODO: Write test to check if all domain types are handled here
    
    type BookmarkManager struct {
    	Hooks bntp.Hooks[BookmarkHook]
    	Repo  BookmarkRpository
    }
    
    

    83c723228f10bc8295ee054e6e0b7f48c9cab682

    todo 
    opened by github-actions[bot] 1
  • Allow sipping certain hooks

    Allow sipping certain hooks

    Allow sipping certain hooks

    https://github.com/JonasMuehlmann/bntp.go/blob/4062c7d12bdf0937444d9e3b99dfa5ff6956c57b/pkg/libbookmarks/bookmarkmanager.go#L91

    
    	DeletedAt
    )
    
    // TODO: Generate from structs
    type BookmarkUpdateOperation func(any) any
    
    // TODO: Generate from structs
    type BookmarkHook func(context.Context, domain.Bookmark) error
    
    // TODO: Add test to compare with constants.
    // TODO: Allow sipping certain hooks
    // TODO: Write test to check if all domain types are handled here
    
    type BookmarkManager struct {
    	Hooks bntp.Hooks[BookmarkHook]
    	Repo  BookmarkRpository
    }
    
    

    0b3236e311c6443ab014d36caf0570cca74b0f3d

    todo 
    opened by github-actions[bot] 1
  • Anki integration

    Anki integration

    type CardFlag string
    
    const (
        CardFlagRed CardFlag = "red"
        CardFlagBlue CardFlag = "blue"
        ...
    )
    
    type CardHighlight struct {
        CardID int64
        Flag CardFlag
        IsSuspended bool
        Note string
    }
    
    enhancement 
    opened by JonasMuehlmann 0
Releases(v0.8.1)
  • v0.8.1(Sep 6, 2022)

    0.8.1 (2022-09-06)

    🐞 Bug Fixes

    • repository: fix false positive error in filter conversion (85a52190)

    πŸ“„ Documentation

    • README: fix link to CLI documentation (a4e4c21e)

    πŸ”Ž Tests

    • cli: fix tests after refactor (d19d45b9)

    πŸ”€ Code Refactoring

    • put log into cache dir instead of config dir (694800cf)
    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(Sep 6, 2022)

    0.8.0 (2022-09-06)

    🎁 Feature

    • cli: allow retrieving db providers and db schemas (c30b2f13)
    • cli: allow predefined filter names instead of serialized filters for --filter flag (80f02f49)

    🐞 Bug Fixes

    • make main method return nonzero exit code on error (52adbf6b)
    • config: prevent crash when config dir does not exist yet (6562bcf7)
    • config: prevent crash when log file does not exist yet (8a1df197)
    • repository.filter: properly handle filtering for unset optional (ac09f7b0)

    πŸ“„ Documentation

    • README: add basic setup guide (cb676eb9)

    πŸ”€ Code Refactoring

    • make setup logic return errors instead of panicing (c4df3a99)
    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Sep 4, 2022)

  • v0.6.0(Sep 3, 2022)

    0.6.0 (2022-09-03)

    πŸ“£ Breaking Changes

    • errors: Turn all errro constants into structs (d9771a7a)
    
    BREAKING CHANGE: `helper.EmptyInputError` is now a struct
    BREAKING CHANGE: `helper.NonExistentPrimaryDataError` is now a struct
    BREAKING CHANGE: `helper.NopUpdaterError` is now a struct
    
    • config: make logger destination configurable (2f777363)
    
    BREAKING CHANGE: `config.InitConfig()` now takes an argument
    BREAKING CHANGE: `helper.NewDefaultLogger()` now takes an additional argument
    
    • model: make entities reference IDs instead of instances (12358df9)
    
    BREAKING CHANGE: `domain.Bookmark.Tags []*Tag` has been changed to `TagIDs []int64`
    BREAKING CHANGE: `domain.BookmarkUpdater.Tags []*Tag` has been changed to `TagIDs optional.Optional[int64]`
    BREAKING CHANGE: `domain.BookmarkFilter.Tags []*Tag` has been changed to `TagIDs optional.Optional[int64]`
    
    BREAKING CHANGE: `domain.Document.Tags []*Tag` has been changed to `TagIDs []int64`
    BREAKING CHANGE: `domain.DocumentUpdater.Tags []*Tag` has been changed to `TagIDs optional.Optional[int64]`
    BREAKING CHANGE: `domain.DocumentFilter.Tags []*Tag` has been changed to `TagIDs optional.Optional[int64]`
    BREAKING CHANGE: `domain.Document.LinkedDocuments[]*Document` has been changed to `LinkedDocumentIDs []int64`
    BREAKING CHANGE: `domain.Document.BacklinkedDocuments[]*Document` has been changed to `BacklinkedDocumentIDs []int64`
    BREAKING CHANGE: `domain.DocumentUpdater.LinkedDocuments []*Document` has been changed to `LinkedDocumentIDs optional.Optional[int64]`
    BREAKING CHANGE: `domain.DocumentUpdater.BacklinkedDocuments []*Document` has been changed to `BacklinkedDocumentIDs optional.Optional[int64]`
    BREAKING CHANGE: `domain.DocumentFilter.LinkedDocuments []*Document` has been changed to `LinkedDocumentIDs optional.Optional[int64]`
    BREAKING CHANGE: `domain.DocumentFilter.BacklinkedDocuments []*Document` has been changed to `BacklinkedDocumentIDs optional.Optional[int64]`
    
    BREAKING CHANGE: `domain.Tag.ParentPath []*Tag` has been changed to `ParentPathIDs []int64`
    BREAKING CHANGE: `domain.TagUpdater.ParentPath []*Tag` has been changed to `ParentPathIDs optional.Optional[int64]`
    BREAKING CHANGE: `domain.TagFilter.ParentPath []*Tag` has been changed to `ParentPathIDs optional.Optional[int64]`
    BREAKING CHANGE: `domain.Tag.Subtags []*Tag` has been changed to `SubtagIDs []int64`
    BREAKING CHANGE: `domain.TagUpdater.Subtags []*Tag` has been changed to `SubtagIDs optional.Optional[int64]`
    BREAKING CHANGE: `domain.TagFilter.Subtags []*Tag` has been changed to `SubtagIDs optional.Optional[int64]`
    

    🎁 Feature

    • implement method to get all document/bookmark types (80530b38)
    • cli: marshall and print error (f9ace071)
    • cli: add --debug flag (598de155)
    • cli: split format flag into in-format and out-format (2bb02b98)
    • cli: add flag to return tags in path format (5e4f9abe)
    • libtags: add MarshalPath() (898cd23c)
    • add manager methods GetFromIDs() (b4616a7e)
    • repository: implement GetFromIDs() (08d4d7cd)
    • CLI: use specific error when marshalling/unmarshalling fails (c70183d2)
    • errors: add Is() and As() methods for errors (2c6b346a)
    • add minimal adder and domain converter functions (c1960d6c)
    • domain: add functions to check if domain models are default constructed (65d990cf)
    • domain: add helper methods for adding parent/child tags (c4a10374)
    • add yaml and csv marshaller (a4f5e64d)

    🐞 Bug Fixes

    • repository.fs: return error when adding/renaming to duplicate file (a57b65aa)
    • repository.fs: prevent false negative when there are no entities to remove from documents (17c30da7)
    • repository: prevent loading relationships from overwriting related data (9797c56d)
    • cli: prevent partial data insertion on error (3ef24841)
    • repository.mssql: adapt template to different mssql syntax (d88baf8c)
    • marshallera.json: error when encountering invalid key while unmarshalling (acdfde60)
    • repository: make sure relationship data is properly set/read (cbaee668)
    • repository.document: correctly set empty slice members when converting from repository model (28f52062)
    • fix and test operations on (Bookmark|Document)Types (c8fed414)
    • cli: make sure failing to marshal output returns correct error (7ad49124)
    • repository: fix tests after refactor (2de09ece)
    • repository.fs: validate inputs in repository (f0a594ac)
    • cli: fix some bugs in document command (21fff81f)
    • libdocuments: fix some bugs (1a8f7c7b)
    • libdocuments: fix document content operations (8934f78b)
    • configuration: correctly override used filesystem from CLI (242314cd)
    • repository.sql: correctly build WHERE IN ? query from *Filter (2e747ebb)
    • managers: correctly compare goaoi.EmptyIterableError (98211490)
    • model: correctly marshal/unmarshal FilterOperation, UpdateOperation (f228c0ba)
    • cli.tag: correctly unmarshal args (19989a43)
    • cli.tag.remove: correctly unmarshal args (7be2601c)
    • cli.tag.edit: correctly unmarshal updater (69d26599)
    • cli: correctly unmarshal filters/updaters (e863cf22)
    • model: properly convert some domain updater fields (fdbf398b)
    • CLI: properly parse updaters and mark some flags as required (575fd496)
    • CLI: correctly unmarshal arguments (bc8f6f6e)
    • managers: dont return on hook errors (36f2ea1f)
    • improve error check when updating non-existent data (9b025814)
    • schema: make foreign key constraints deferrable (8c904aac)
    • repository: correctly detect empty result sets and nop updaters (d67bda8b)
    • repository: return proper errors for empty updaters and unique constraint violations (f3dbf6e9)
    • repository: avoid returning false errors in (Bookmark|Document)Type methods (0226d9a1)
    • repository: return proper error when Get* functions have no data to retrieve (1a29e4e8)
    • repository: use correct type assertion in model converets (49bc331d)
    • repository: avoid false type-assertion fail in buildQueryModListFromFilter{{$EntityName}} (ccbc7086)
    • repository: add extra input validation (73faa9d9)
    • repository: add missing include (b1215fc0)
    • repository: add missing include (36d89ff9)
    • repository: fix naming error after schema changes (3459d101)
    • tooling: fix a syntax error in the schema converter (14297144)
    • repository: make model_converter.go functions more robust when handling nilable values (907d5174)

    πŸ”Ž Tests

    • create helper function to get connection to filesystem temp DB (d2cb80c8)
    • libdocuments: add some tests for updating document contents (4578f30e)
    • cli: add tests for document command (6b6b1d96)
    • libdocuments: add tests for document content operations (e1593e2f)
    • correctly validate error content (4663167b)
    • cli: add tests for Bookmark subcommand (8241a5ae)
    • cli: add tests for Tag subcommand (51bab034)
    • allow overriding db cli uses (fe2e96d4)
    • add tests for bookmark and document conversion (6aa36be1)
    • fix tests and extract them from template into own files (d16a4a0c)
    • make tests more robust (d70e5078)
    • make setting up tempory databases more robust (24cfcbcd)
    • repository: add tests for (Document|Tag)Repository and test all repositories for all backends (7c092f36)
    • repository: add tests for nop updaters, nil filters, empty results and duplicate insertion (f5f28537)
    • improve coverage reporting (e74693db)
    • repository: add tests for BookmarkRepository (06ea17f3)

    πŸ”€ Code Refactoring

    • cli: serialize all output (83a4fa75)
    • cli: serialize all output (2058441f)
    • replace fatal log level with panic level (2f31df38)
    • make bntp.BadHookPointError a struct (afea0eb9)
    • libdocuments: validate inputs in content_operations.go (78cd263d)
    • repository: use specific error when no entitties to retrieve exist (68744e4f)
    • repository: use specific error when no entitties to retrieve exist (e1b6ef1c)
    • turn config module into class and give all classes logger instance (1a0adff2)
    • refactor cli into class for easier testing (be2309d8)
    • use new goaoi package functional (7f9a7103)
    • CLI: make output writer configurable (49d2aa6b)

    🚧 Chores

    • add more logging (55b747cf)
    • repository: add more logging (629d5491)
    • document_content_manager: add more logging (f77e4340)
    • fix script to generate markdown cli documentation (f776c96c)
    • add goal to README (3529d8b2)
    • add codecov badge (fb5099b4)
    • repository: remove unneeded unique constraint check from DeleteType (044b1887)
    • add special error for writing data referencing non-existent dependencies (7b522be3)
    • repositories: add TagRepository reference to {Bookmark,Document}Repository (026ba156)
    • tooling: add script for cleanly regenerating code (7ac3552d)

    πŸ“¦ Build

    • update dependencies (47135a5d)
    • update dependency information (3d592bb8)
    • dependencies: bump goaoi version (fc34bbac)
    • dependencies: bump optional.go version (55a893f3)
    • dependencies: import a package for testing (cfa397b4)

    πŸ” CI

    • bump version of actions/cache (80395b9d)
    • remove redundant checkout (44ef0c4c)
    • set up dependency and build cache (3e2aaa5c)
    • revert changes made for debugging (3c605aea)
    • work around dependency to user config dir db (7f42e839)
    • debug test run (7c09fda6)
    • debug test run (33263fea)
    • debug test run (5af2a1d7)
    • debug test run (6f84ea60)
    • copy a file to work around env inconsistency (6d988dcc)
    • create config dir to prevent test fail (918ff875)
    • code_generation: use own safer code generation script (0e37dc44)
    • code_generation: use safer code-gen script (3f444704)
    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Jun 14, 2022)

    0.5.0 (2022-06-14)

    This is a major rewrite with the following highlights:

    • reimplemented CLI with cobra
    • add configuration through viper
    • add logging through logrus
    • reimplement backend using sqlboiler and new architecture
    • completely revamp architecture (main components are *Managers and *Repositorys)
    • add support for executing hooks at the beginning and end of *Manager functions
    • split domain and repository models
    • improve modularity, configurability and extensibility
    • allow passing *Filters and *Updaters to functions processing models
    • use code generation for better maintainability in some parts

    Proper testing, documentation and fixes will follow in the next releases

    🎁 Feature

    • cli: add json marshaller (47851160)
    • add Update function to cli, managers and repositories (1c5838bb)
    • add Upsert function to cli, managers and repositories (68be4d28)
    • repository: make AddType and DeleteType take argument as array (2999b7bf)
    • cli: implement document content handling in document sub-command (6d052c29)
    • cli: implement document sub-command (5f839714)
    • cli: implement bookmark sub-command (887b1440)
    • make complete backend (managers, repositories, db) configurable (029b7c06)
    • domain: add some predefined tag filters (4e1c3385)
    • domain: add some predefined document filters (ed20a905)
    • domain: add some predefined bookmark filters (37a88e02)
    • libdocuments: implement DocumentContentManager (982d3d6b)
    • repository: add LocalFSDocumentContentRepository (304f427f)
    • mamagers: handle most hooks (a5b1f119)
    • implement TagManager (97d184b8)
    • implement DocumentManager (253aa5a0)
    • implement BookmarkManager (7f9a88fc)
    • add first domain models (3fc27d92)
    • config: add config validation and logging (f9dcbdf2)
    • cli: add command for interacting with config (653f16d5)
    • add generated db models (0fae8502)
    • config: add more config search paths and allow using more config formats (3b459285)
    • cli: add basic documentation, flags and arguments (9437dc1e)
    • add sqlboiler integration (4aae64e4)
    • cli.bookmark: make outout format of export and list configurable (10a00b5e)
    • helpers: add methods to push and pop to/from an Optional (66ac35a0)
    • implement an wrapper type to represent optional values (ae9523dc)
    • libtags: also return ambiguous tag component when checking for ambiguity (c0690d3b)
    • cli: configure the logger to show more useful output (2cd9b497)
    • cli: implement document subcommand (7d76e040)
    • cli: partial implementation of document subcommand (ec28397a)
    • cli: document subcommand document (1a5791c6)
    • libbookmarks: implement RemoveBookmark() (4dbc4479)
    • cli: add basic implementation of bookmark subcommand (271e2428)
    • libbookmarks: add method to edit bookmark entry (f04a1d2e)
    • helpers: add method to wraped execution of named sql statement (c8d9afe7)
    • cli: extend documentation of bookmarks subcommand (a1f251be)
    • cli: document subcommand bookmark (b4c3a57d)
    • cli: document subcommand tag (4c3f67fa)
    • cli: document subcommand tag (95c7c89b)
    • cli: implement subcommand tag (98ef4c85)
    • cli: implement subcommand link (9d54c5fb)
    • cli: partially implement subcommands of main cli (ddfe3123)
    • helper: make SqlExecute also return the number of affected rows and the last inserted Id (0c787f54)
    • libdocuments: implement AddType() and RemoveType() (f9b7cb10)
    • libdocuments: implement AddType() and RemoveType() (3e33cc4c)
    • liblinks: implement GetIdFromDocument() (514babf5)
    • liblinks: implement GetIdFromType() (6df6bcdf)
    • libdocuments: add declarations for new functions (4071c358)
    • libdocuments: implement RemoveLink() (bc33ce7c)
    • libbookmarks: implement filtering for bookmark title and url (3da06960)
    • libdocuments: implement AddBacklink() and RemoveBacklink() (2e7566c7)
    • libdocuments: implement RemoveLink() (683be0fb)
    • libdocuments: implement AddLink() (40cbac9c)
    • libdocuments: implement FindBacklinksLines() (20be4881)
    • libdocuments: implement FindLinksLines() (c21ed3ae)
    • implement liblinks (b5df2469)
    • libdocuments: implement FindDocumentsWithTags() (cd7eac32)
    • libdocuments: implement FindDocumentsWithTags() (e7e37e05)
    • libdocuments: implement HasTag() (8a31d72d)
    • libdocuments: implement RemoveTag() (167274ce)
    • libdocuments: implement AddTag() (4212c3b6)
    • libdocuments: implement RenameTag() (1f5bd0a4)
    • libdocuments: implement GetTags() (b27ca7f5)
    • libdocuments: implement FindTagsLine() (2ceeead5)
    • libdocuments: add method declarations (41b3b681)
    • libtags: partial implementation of ExportYML (b5bf64a9)
    • libtags: implement TryShortenTag() (0b8898cd)
    • libtags: implement IsLeafAmbiguous() (beab2273)
    • libtags: implement ListTagsShortened() (34c0f83b)
    • libtags: implement ListTags() (23a3bfa7)
    • libtags: implement DeleteTag() (21171ce8)
    • libtags: implement AddTag() (117a1d74)
    • libbookmarks: implement RemoveTag() (2199352e)
    • libbookmarks: implement AddTag() (91d41a80)
    • libbookmarks: implement EditBookmark() and EditType() (5e461053)
    • extend ExportCSV to allow filtering and printing to STDOUT (323e1241)
    • add more import/export features (8341fdd0)

    🐞 Bug Fixes

    • hooks: fix infinite loop in hook functions (5d269e93)
    • repository.mssql: fix edge case of mssql repository in Upsert method (e544ff1a)
    • prevent error when no config exists and fix race condition in config setup (c30ab678)
    • filter_converter: fix filter converters after db schema change (b63c0c06)
    • updater_converter: fix updater converters after db schema change (50bcd63f)
    • model_converter: fix model converters after db schema change (5aa55b35)
    • domain: use correct types in predefined tag filters (933ebabf)
    • sql_repositories: fix code gen giving wrong types for helper structs (b26fb2f3)
    • repositories: fix constructors (17d85817)
    • repositories: fix constructors (c03b636b)
    • repositories: fix constructors (cc7c257a)
    • repositories: make constructors member functions to avoid redeclarations (d1de7334)
    • repositories: make constructors member functions to avoid redeclarations (84a5abbf)
    • repository: use correct conversion function in tag repository (ab31b611)
    • repositories: make all struct parameters pointers (69679651)
    • repositories: make all struct parameters pointers (b11f38f4)
    • repositories: make all struct parameters pointers (978122bb)
    • repositories: make all struct parameters pointers (627947cc)
    • repository: fix syntax error in repository interface (88744b18)
    • code_gen: fix errors in model/filter/updater converter functions (79b7961b)
    • create separate schema for testing sql server model generation (84d1fb0e)
    • helper: correctly unmarshal HasValue field of Optional (24fe53e8)
    • libbokmarks: fix syntax and parameter binding for EditBookmark (9c0c58f1)
    • lidocuments: fix bad detection of links when removing link (cd2b2f1d)
    • lidocuments: fix bad detection of link lines (a3745315)
    • cli.document: fix a typo in the help message (1e3e816f)
    • cli.bookmark: remove calls to wrong core functions in CLI (1bc45470)
    • cli.bookmark: properly print listed bookmarks as CSV (d04df2c4)
    • cli.document: fix parsing of argument lists (90e857a6)
    • bookmarks: correctly apply bookmark filters (d9635c3f)
    • cli: add missing syntax to prevent for each loop from printing index instead of item (57d65fd2)
    • cli.tag: add missing handler for --add flag (bb85833a)
    • correctly handle changes of refactor (67368efd)
    • cli.tag: add missing handler for --list-short flag (19fb7632)
    • cli: make parsing of cli args more robust (95201e33)
    • libtags: declare tags as ambiguous only if they appear twice or more (2bb5d748)
    • implement working and more robust way to read sql schema (06d3e690)
    • cli: print listed links/backlinks (119068c5)
    • cli: change program name in help message (f71243a6)
    • libdocuments: don't error if empty link/backlink list found in document (41a59b8d)
    • libdocuments: don't error if empty link/backlink list found in document (0ccc8056)
    • libdocuments: correct a typo in an error message (045df9cc)
    • schema: make Document.Path unique (3ee7373e)
    • libdocuments: if removing a non-existent document, return error (5167878b)
    • libdocuments: if renaming a non-existent document, return error (fdb46cb5)
    • libdocuments: if removing a tag from a non-existent document, return error (f402c8fd)
    • libdocuments: fix AddLink(), AddBacklink(), RemoveLink(), RemoveBacklink() (5e32085c)
    • libdocuments: fix FindLinksLines() and FindBacklinksLines() (50d61adf)
    • libdocuments: fix FindDocumentsWithTags() (ab4e2be7)
    • libdocuments: fix GetTags() (e0b3cfe5)
    • libdocuments: fix RenameTag() (1a2b5ac4)
    • libdocuments: fix RemoveTag() (5629bd99)
    • libdocuments: fix AddTag() (30981c2e)
    • use/remove unused declarations (f0fc5334)
    • libookmarks: fix sql query in ListTypes() (a1f66c56)
    • libbookmarks: fix errors in sql queries (d0352e45)
    • libookmarks: fix sql queries after db refactor (ada6a528)
    • liblinks: correct sql queries in ListLinks() and ListBacklinks() (4aec8430)
    • fix sql queries and add db constraints (8fde04b1)
    • fix sql queries and add db constraints (99fa4077)
    • liblinks: fix sql queries after DB refactor (c2280519)
    • libtags: improve logic to find ambiguous tags (df412202)
    • libtags: fix not using an address in a function (07d77477)
    • correct sql placeholder values (ac5408d9)
    • sqlhelpers: fix passing of args in Execute() (55772aae)
    • libtags: fix ExportYML (ceded53b)
    • libbookmarks: fix string quoting in EditType() and EditBookmark() (d34483c9)
    • libbookmarks: fix type and tag filter in ExportCSV (6f601fd9)

    πŸ“ˆ Performance Improvements

    • repository: pass struct parameters by pointer (84f22760)

    πŸ“„ Documentation

    • fix typos in README (c9fb634c)
    • add reference to cli help in README (61f8a6dc)
    • fix doc comments of package declarations (c93c7e53)
    • add doc comments to package declarations (984d6868)
    • libdocuments: document libdocuments (98ce1b4d)
    • libtags: document libtags (2824f33c)
    • liblinks: document liblinks (04e8057a)
    • libbookmarks: document libbookmarks (f2cd39eb)
    • libbookmarks: document helpers (94f9129d)
    • libbookmarks: document helpers (5398185c)
    • libbookmarks: document bookmarkfilter (0d4ed293)

    πŸ”Ž Tests

    • fix tests for third party BindPathFS (82862de0)
    • fix wrong file being searched after refactor (915d53a1)
    • cli: add more tests (b90249fa)
    • cli.document: add missing assert and fix tests (9b33e275)
    • helpers: test conversion methods of Optional (ac54578f)
    • cli: fix some haging tests (915534d6)
    • cli.document: mark and comment out hanging tests (42b183ab)
    • cli.bookmark: implement further tests (65d271ae)
    • cli.document: implement further tests fr document subcommand (fab1d141)
    • cli.bookmark: implement further CLI tests (9f78de3f)
    • cli.document: add some tests (d387c13d)
    • cli: implement tests for link subcommand (b32b03eb)
    • cli.link: add basic tests for --add and --remove flags (c9db05cf)
    • cli.tag: add test for --add flag (eca5461b)
    • cli: implement tests for tag subcommand (a92a6e54)
    • cli: fix test for --ambiguous flag (2ad5391b)
    • cli: implement basic tests for --ambiguous flag (baa59129)
    • implement helper function to intercept STDOUT (5ef180cb)
    • add a missing assertion in a test (18bc5d34)
    • add helper method for more DRY and robust temp file creation (5ffa99f8)
    • fix a test (194ea072)
    • use in memory databases (a8f90130)
    • move test files into tested packages (f3735313)
    • libdocuments: fix wrong indentatin of string literal failing tests (0f0078db)
    • libdocuments: add test for ChangeDocumentType() (16518b77)
    • libdocuments: add test for RenameDocument() (7c6d11bf)
    • libdocuments: add test for RemoveDocument() (7c53e8f3)
    • libdocuments: add test for AddDocument() (70961608)
    • libdocuments: add test for RemoveBackink() (35407772)
    • libdocuments: add test for RemoveLink() (f4d8b8ff)
    • libdocuments: add tests for AddLink() and AddBacklink() (236bad05)
    • libdocuments: add test for FindBacklinksLines() (485cd0d0)
    • libdocuments: add test for FindLinksLines() (a6558d83)
    • libdocuments: add test for FindDocumentsWithTags() (424c337d)
    • libdocuments: add tests for HasTag() (a9e6cb0d)
    • libdocuments: add tests for FindTagsLine() (acfd6b52)
    • libdocuments: add tests for GetTags() (bc0ee198)
    • libdocuments: add tests for RenameTag() (2480e061)
    • libdocuments: add tests for RemoveTag() (46c580dc)
    • libdocuments: add tests for AddTag() (516ed3b4)
    • libbookmarks: add tests for EditBookmark() (beddcb9f)
    • libbookmarks: add tests for RemoveTag() (a702ee9a)
    • liblinks: fix tests after adding foreign key constraints (1c8c088f)
    • libbookmarks: add tests for AddTag() (9026e736)
    • enable foreign key constraints (2daa8b70)
    • libbookmarks: add tests for AddBookmark() (05a1c1e0)
    • libbookmarks: add tests for ListTypes() (4e5e3f99)
    • libbookmarks: add tests for RemoveType() (525cd3d0)
    • libbookmarks: add tests for AddType() (fb30da45)
    • liblinks: add test for ExportCSV() (06fdeee2)
    • libbookmarks: add tests for ImportMinimalCSV() (7bc21397)
    • liblinks: add tests for ListBacklinks() (107026a7)
    • liblinks: add tests for ListLinks() (c53817b8)
    • liblinks: add tests for RemoveLink() (94466bc9)
    • liblinks: add test for AddLink() (a82812ec)
    • libtags: add tests for ListTagsShortened() (c0752a04)
    • libtags: add tests for ListTags() (80bd2d58)
    • libtags: add tests for RenameTag() (a46e2135)
    • libtags: add tests for RemoveTag() (35ff1cd1)
    • libtags: add tests for AddTag() (09c6aed9)
    • implement helper function to create temp DB (5e81e0a5)

    πŸ”€ Code Refactoring

    • extract constant for date format (73559714)
    • repository: add context parameter to model/filter/updater converters (9e2ad719)
    • repository: add context parameter to model/filter/updater converters (7e8b9689)
    • repository: add context parameter to filter converters (86c73019)
    • repository: add context parameter to model converters (cafb8eef)
    • schema: hopefully the final and most optimal refactor of the tag schema (a489388c)
    • db_schema: reimplement the tags schema more simply (ac6c2a72)
    • db_schema: reimplement the tags schema more simply (f095ecfb)
    • document_content_repository: take all parameters as array (8a935054)
    • architecture: create sql sub dir in repository package (ba074568)
    • managers: make all members public (58fde743)
    • architecture: rename pkg to bntp directory (1908e669)
    • architecture: combine domain and repository packages in common parent package model (46181283)
    • schema: simplify primary keys of tag related tables (9802eb6d)
    • schema: simplify primary keys of tag related tables (c61323f4)
    • add parent tags path and child tags list to tag model (e85657fb)
    • architecture: copy generated db models into repository directory (ab999aa1)
    • architecture: copy generated db models into respective libraries repositorypackage (4142c9f0)
    • architecture: move libraries from internal to pkg package (7b98b19a)
    • architecture: flatten directory structure in cmd/ (f7c59994)
    • rename verbs rename to edit and get to list (89e6e11f)
    • cli: make subcommands return error instead of exiting (45c962ec)
    • extract Optional type into own repo (f3eb234e)
    • libbokmarks: use helpers.Optional for the BookmarkFilter (b02b8f54)
    • replace usage of sql.NullXXX with helpers.Optional (9d623c29)
    • replace calls to println with fmt.Println (337298c7)
    • use custom log.Fatal/log.Panic replacement for better testability (e529fb27)
    • use custom log.Fatal/log.Panic replacement for better testability (ba538033)
    • cli: use log.Panic instead of log.Fatal (b5a91aa4)
    • rename cmd/bntp package to cmd/cli (6580d9fe)
    • merge two util files (b7597b1a)
    • use helper function in CLI for less boilerplate code caused by error handling (73143528)
    • extract functions to get IDs of tags to helpers (32642b12)
    • add unqiue constraint to context tables (a935c466)
    • unify packages in cmd/ (69c82377)
    • change db constraints (221bcb26)
    • libbookmarks: change a sqlx.Begin() to sqlx.Beginx() (54d0c786)
    • libbookmarks: implement GetIdFromType() and use it in other methods (6469aeff)
    • libbookmarks: implement GetIdFromType() and use it in other methods (552a9797)
    • libbookmarks: implement GetIdFromTag() and use it in other methods (9d64dfbb)
    • rename project to bntp (1efce489)

    🎨 Styles

    • remove unneeded todo comments (861ba7b4)
    • remove unneeded todo comments (f1504c96)
    • reformat code, clean up imports and rename tooling files (637718a9)
    • cli: remove redundant comments and overly verbose descriptions in files (da5849a2)
    • cli: remove unneeded imports (bdbcc4ad)
    • cli: remove redundant comments and overly verbose descriptions in files (c73e3731)
    • make files in cmd package more readable (2b2cbe8e)
    • make files in cmd package more readable (b38dbc45)
    • remove unneeded TODO comment (ac54c72e)
    • libbookmarks: move Bookmark struct into own file (eac38de1)
    • clean up bookmarkmanager (824e14a8)
    • reformatt for better readability (4ea65977)

    🚧 Chores

    • remove unneeded code generator (eb9dbc0b)
    • add caller info to logging calls and make all places call the correct logger (b5fd72da)
    • set up hardcoded backend in main (cb695043)
    • fix model/filter/updater converters (41118a37)
    • remove automatic conversion of db schema types (d7508513)
    • delete files for clean regeneration (fc6f90d8)
    • delete temporary directory (66a20e16)
    • regenerate alternative sql schemas (964d84db)
    • delete sql repositories for clean re-generation (7abb6634)
    • re-add accidentaly deleted files (7b926f60)
    • try to replace sqlboiler int types with int64 (ca0c1dad)
    • fix bad path in code gen script (3260f5e5)
    • try to replace sqlboiler int types with int64 (34ea4f6a)
    • hooks: add helper function to partially specialze hook executors (2f7533e7)
    • util: implemnt AOS/SOA converters for tuples (aff60e38)
    • libdocuments: reimplement content level document manipulation (7700995a)
    • repository: add rclone backend for afero fs (457f472e)
    • remove old files (b71f4520)
    • repositories: implement constructors (b24a82ca)
    • managers: implement constructors (1ae846fc)
    • sql_repositories: specify arguments as domain types and convert them to repository types (818c0f8a)
    • sql_repositories: add some missing error handling code (c80c4a8c)
    • implement functions to convert domain- to repository updaters (1532ce47)
    • implement functions to convert domain- to repository filters (7a4af383)
    • implement workaround for bad sqlboiler generation (3ff90f66)
    • fix some compiler errors and change RepositoryModels types for more consistency (66b9bad1)
    • code_gen: fix bad path in code generator (b9236ba8)
    • code_gen: fix bad paths in code generator and add missing imports (f35ad118)
    • code_gen: fix bad path in code generator (a292869d)
    • code_gen: fix wrong path in code generator (f3eaad40)
    • implement helper types and functions to handler XXXFilter and XXXUpdater in sqlboiler (321bbc73)
    • repository: extend Filter and Updater types with relational fields (4d2b99d1)
    • repository: add helper type for list of relations in entity repository (45daa1c9)
    • repository: add helper types (entity fields (list), filter, updater) to sql repositories (fed1c885)
    • repository: add parameter names to repository interface definition (cd9e12dd)
    • domain: add array of field names to models (f95b7dfe)
    • implement domain/repositroy model converter functions for tag (3f592be2)
    • fix syntax error in sql schema (4c84dd7b)
    • implement domain/repositroy model converter functions for bookmark and document (7481a097)
    • generate domain models including helpers types and constants (e0906c0d)
    • tooling: partial implementation of entity managers (4062c7d1)
    • tooling: add code generator for repository definitions (7147444b)
    • struct to manage hooks (9a3c9b2c)
    • add first draft of bookmarkmanager (0c93ed88)
    • add dir, so that code generator does not fail (e22106d8)
    • replace non-existent path in script (8b17d2c3)
    • fix syntax error in ci script (6110e901)
    • db_model: add createdAt, updatedAt, deletedAt fields (84a0f8da)
    • db_model: add createdAt and updatedAt fields (3ba21655)
    • tooling: add script to generate settings name constants from struct (89668b24)
    • bind cli flags to config (36d410c7)
    • revert workaround which causes bugs in ci (0fce78a6)
    • update dependency information (21ed6576)
    • update dependency information (7687190d)
    • update dependency information (1630b748)
    • ignore a temporary file (4f03e94e)
    • fix script and config for generating sql server db model (1807d1fb)
    • apply workaround for broken generated test scripts (ba556b9a)
    • update dependency information (fba4b2ea)
    • change order in which db model generation tests are run (faa3462d)
    • copy correct db for model creation tests (07bfed16)
    • change password for postgres database model generator (8dd51961)
    • change password for postgres database model generator (3a9a5372)
    • change password for postgres database model generator (033efb84)
    • change password for postgres database model generator (fd550e09)
    • download correct dependency in db model generation script (f3519829)
    • install sqlboiler through ci script (f6f997b8)
    • update dependency information (2c614b71)
    • update dependency information (6bf9c9c0)
    • make sql model creation script more robust (005f6a50)
    • make sql model creation script more robust (383a0d13)
    • make sql model creation script more robust (6a977937)
    • specify different host name for sqlboilers sql server config (dc1a700a)
    • fix bad shebang in script (5bb08582)
    • add license notice to CLI (4365fcfb)
    • move sql schema into own directory (1832001a)
    • tooling: add script to convert sql schemas (640e0fcd)
    • move sql schema into own directory (9f364cb9)
    • tooling: update linter settings for less false positives (6f20eb50)
    • make all commands print help when no flags are specified (a50f7b2f)
    • add basic structure of new CLIs tag subcommand (4066a80a)
    • add basic structure of new CLIs link subcommand (a3582c77)
    • add basic structure of new CLIs bookmark subcommand (87828cdb)
    • add basic structure of new CLIs document subcommand (c8d3a5d9)
    • add some TODO comments (7df176e7)
    • add a todo comment (2227c1d4)
    • implement dependency-injection-enabled function to replace log.Fatal (9ab4fe01)
    • ignore a fiel (18246d6f)
    • cli: create test files (bc175db5)
    • implement helper function for less boilerplate caused by error handling (f59a1f02)
    • ignore a file (9b7990ef)
    • types: add json tags to Bookmark struct (b90659c9)
    • add licennse (b9d185b6)
    • add licennse (254e7ac9)
    • add license (a22d039f)
    • ignore a file (60e8f7d0)
    • add helper method for getting db conn (1aa846de)
    • fix some comment frames (e5a19ce2)
    • tooling: add script for renewing test db after schema change (bf929514)
    • tooling: add script for renewing test db after schema change (135ecfd6)
    • test (e2db8db5)
    • test (d425a941)
    • test (6447bd5e)
    • test (de8a8789)
    • test (f13af959)
    • test (589f885f)
    • test (4d4c73b4)
    • add foreign key constraint to db (d85665b4)
    • enable foreign key constraints in db (574a4b16)
    • add .gitignore (3d2c33d3)
    • add DB creation script (8f1ac9aa)
    • reformat files (88cfc341)
    • add config for golangci_lint (d97ed719)

    πŸ“¦ Build

    • update dependency information (44fb4cc2)
    • update dependency information (9b26e904)
    • update dependency information (a742632a)
    • update dependency information (e59d591d)
    • bump go version to 1.18 (541d38f6)
    • update dependency information (4bbeb2f5)
    • update dependency information (a28221f7)
    • add dependency information (7b8c362c)

    πŸ” CI

    • run code generator to avoid ci errors (09d4eee1)
    • run code generator to avoid ci errors (c7e156e1)
    • use correct path name in a go generate call (0b6e3c8d)
    • remove line trying to delete non existent files (3c211f5f)
    • work around sqlboiler test generation bugs (6cad9915)
    • code_gen: add workaround for erroneous generation (1b0ae314)
    • code_gen: add workaround for erroneous generation (f65def3d)
    • code_gen: add workaround for erroneous generation (717ceb90)
    • code_gen: add workaround for erroneous generation (798fc386)
    • code_gen: add workaround for erroneous generation (ce2e43da)
    • code_gen: add debug output to repository model generation (e4ce8d78)
    • code_gen: add debug output to repository model generation (39a2b84d)
    • code_gen: add debug output to repository model generation (3d4c6e5b)
    • code_gen: add missing calls to code generators (413621b4)
    • remove potentially unneeded download (45247abd)
    • code_gen: install some dependencies in ci (0eb3c37e)
    • code_gen: fix syntax error (7715d94a)
    • code_gen: run goimports, gofmt after generation (1112b6cd)
    • run fieldalignment in ci (7a63e1b0)
    • swallow error in code generation script to keep ci pipeline alive (1f05b925)
    • test (62c2fd41)
    • test (63f4915a)
    • copy file to prevent embed from failing (ec0c8e4a)
    • install field alignment tool (d95de88b)
    • optimize struct ordering (e4c70269)
    • only test db model generation when the correct files change (b1716201)
    • change script to account for file rename (321248e9)
    • add sleep against pssoible race condition (7d8a0579)
    • set non-blocking flag in sql server set up (869fa47a)
    • fix escaping of special symbols in password (15366fb3)
    • specify different host name for sql server (82668f54)
    • use correct file name for sqlite schema (c9513d75)
    • use correct file name for sqlite schema (2fe59375)
    • fix typo in username (0937b534)
    • specify database to use for postgres (eedada35)
    • specify database to use for mysql (5682ea8e)
    • specify database to use for mysql (3500c90e)
    • specify database to use for sql server (cb789eb1)
    • test database models (a77733e2)
    • add script to build sql models (22886573)
    • bump go version to 1.18 (377c7eb7)
    • add coverage reporting (cc405c3b)
    • add coverage reporting (c6fa5361)
    • add GH Action to format code on PR (16e98178)
    • try to get semantic release working... (ba29c2cb)
    • switch to go-semantic-release (7957dd2c)
    • fix github action config (e17eab66)
    • before testing, generate fresh db from sql script (d134d94c)
    • add GH Actions workflow (39cd10ed)
    • add CI related configs (b36500a6)

    doc

    • document cli help pages in docs/ (2e8bec89)

    tests

    • prepare test dirs and files (f99a1182)
    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Jun 13, 2022)

    0.4.0 (2022-06-13)

    This is a major rewrite with the following highlights:

    • reimplemented CLI with cobra
    • add configuration through viper
    • add logging through logrus
    • reimplement backend using sqlboiler and new architecture
    • completely revamp architecture (main components are *Managers and *Repositorys)
    • add support for executing hooks at the beginning and end of *Manager functions
    • split domain and repository models
    • improve modularity, configurability and extensibility
    • allow passing *Filters and *Updaters to functions processing models
    • use code generation for better maintainability in some parts

    Proper testing, documentation and fixes will follow in the next releases

    🎁 Feature

    • cli: add json marshaller (47851160)
    • add Update function to cli, managers and repositories (1c5838bb)
    • add Upsert function to cli, managers and repositories (68be4d28)
    • repository: make AddType and DeleteType take argument as array (2999b7bf)
    • cli: implement document content handling in document sub-command (6d052c29)
    • cli: implement document sub-command (5f839714)
    • cli: implement bookmark sub-command (887b1440)
    • make complete backend (managers, repositories, db) configurable (029b7c06)
    • domain: add some predefined tag filters (4e1c3385)
    • domain: add some predefined document filters (ed20a905)
    • domain: add some predefined bookmark filters (37a88e02)
    • libdocuments: implement DocumentContentManager (982d3d6b)
    • repository: add LocalFSDocumentContentRepository (304f427f)
    • mamagers: handle most hooks (a5b1f119)
    • implement TagManager (97d184b8)
    • implement DocumentManager (253aa5a0)
    • implement BookmarkManager (7f9a88fc)
    • add first domain models (3fc27d92)
    • config: add config validation and logging (f9dcbdf2)
    • cli: add command for interacting with config (653f16d5)
    • add generated db models (0fae8502)
    • config: add more config search paths and allow using more config formats (3b459285)
    • cli: add basic documentation, flags and arguments (9437dc1e)
    • add sqlboiler integration (4aae64e4)

    🐞 Bug Fixes

    • hooks: fix infinite loop in hook functions (5d269e93)
    • repository.mssql: fix edge case of mssql repository in Upsert method (e544ff1a)
    • prevent error when no config exists and fix race condition in config setup (c30ab678)
    • filter_converter: fix filter converters after db schema change (b63c0c06)
    • updater_converter: fix updater converters after db schema change (50bcd63f)
    • model_converter: fix model converters after db schema change (5aa55b35)
    • domain: use correct types in predefined tag filters (933ebabf)
    • sql_repositories: fix code gen giving wrong types for helper structs (b26fb2f3)
    • repositories: fix constructors (17d85817)
    • repositories: fix constructors (c03b636b)
    • repositories: fix constructors (cc7c257a)
    • repositories: make constructors member functions to avoid redeclarations (d1de7334)
    • repositories: make constructors member functions to avoid redeclarations (84a5abbf)
    • repository: use correct conversion function in tag repository (ab31b611)
    • repositories: make all struct parameters pointers (69679651)
    • repositories: make all struct parameters pointers (b11f38f4)
    • repositories: make all struct parameters pointers (978122bb)
    • repositories: make all struct parameters pointers (627947cc)
    • repository: fix syntax error in repository interface (88744b18)
    • code_gen: fix errors in model/filter/updater converter functions (79b7961b)
    • create separate schema for testing sql server model generation (84d1fb0e)

    πŸ“ˆ Performance Improvements

    • repository: pass struct parameters by pointer (84f22760)

    πŸ“„ Documentation

    • fix typos in README (c9fb634c)
    • add reference to cli help in README (61f8a6dc)

    πŸ”Ž Tests

    • fix wrong file being searched after refactor (915d53a1)

    πŸ”€ Code Refactoring

    • extract constant for date format (73559714)
    • repository: add context parameter to model/filter/updater converters (9e2ad719)
    • repository: add context parameter to model/filter/updater converters (7e8b9689)
    • repository: add context parameter to filter converters (86c73019)
    • repository: add context parameter to model converters (cafb8eef)
    • schema: hopefully the final and most optimal refactor of the tag schema (a489388c)
    • db_schema: reimplement the tags schema more simply (ac6c2a72)
    • db_schema: reimplement the tags schema more simply (f095ecfb)
    • document_content_repository: take all parameters as array (8a935054)
    • architecture: create sql sub dir in repository package (ba074568)
    • managers: make all members public (58fde743)
    • architecture: rename pkg to bntp directory (1908e669)
    • architecture: combine domain and repository packages in common parent package model (46181283)
    • schema: simplify primary keys of tag related tables (9802eb6d)
    • schema: simplify primary keys of tag related tables (c61323f4)
    • add parent tags path and child tags list to tag model (e85657fb)
    • architecture: copy generated db models into repository directory (ab999aa1)
    • architecture: copy generated db models into respective libraries repositorypackage (4142c9f0)
    • architecture: move libraries from internal to pkg package (7b98b19a)
    • architecture: flatten directory structure in cmd/ (f7c59994)
    • rename verbs rename to edit and get to list (89e6e11f)

    🎨 Styles

    • remove unneeded todo comments (861ba7b4)
    • remove unneeded todo comments (f1504c96)
    • reformat code, clean up imports and rename tooling files (637718a9)
    • cli: remove redundant comments and overly verbose descriptions in files (da5849a2)
    • cli: remove unneeded imports (bdbcc4ad)
    • cli: remove redundant comments and overly verbose descriptions in files (c73e3731)

    🚧 Chores

    • remove unneeded code generator (eb9dbc0b)
    • add caller info to logging calls and make all places call the correct logger (b5fd72da)
    • set up hardcoded backend in main (cb695043)
    • fix model/filter/updater converters (41118a37)
    • remove automatic conversion of db schema types (d7508513)
    • delete files for clean regeneration (fc6f90d8)
    • delete temporary directory (66a20e16)
    • regenerate alternative sql schemas (964d84db)
    • delete sql repositories for clean re-generation (7abb6634)
    • re-add accidentaly deleted files (7b926f60)
    • try to replace sqlboiler int types with int64 (ca0c1dad)
    • fix bad path in code gen script (3260f5e5)
    • try to replace sqlboiler int types with int64 (34ea4f6a)
    • hooks: add helper function to partially specialze hook executors (2f7533e7)
    • util: implemnt AOS/SOA converters for tuples (aff60e38)
    • libdocuments: reimplement content level document manipulation (7700995a)
    • repository: add rclone backend for afero fs (457f472e)
    • remove old files (b71f4520)
    • repositories: implement constructors (b24a82ca)
    • managers: implement constructors (1ae846fc)
    • sql_repositories: specify arguments as domain types and convert them to repository types (818c0f8a)
    • sql_repositories: add some missing error handling code (c80c4a8c)
    • implement functions to convert domain- to repository updaters (1532ce47)
    • implement functions to convert domain- to repository filters (7a4af383)
    • implement workaround for bad sqlboiler generation (3ff90f66)
    • fix some compiler errors and change RepositoryModels types for more consistency (66b9bad1)
    • code_gen: fix bad path in code generator (b9236ba8)
    • code_gen: fix bad paths in code generator and add missing imports (f35ad118)
    • code_gen: fix bad path in code generator (a292869d)
    • code_gen: fix wrong path in code generator (f3eaad40)
    • implement helper types and functions to handler XXXFilter and XXXUpdater in sqlboiler (321bbc73)
    • repository: extend Filter and Updater types with relational fields (4d2b99d1)
    • repository: add helper type for list of relations in entity repository (45daa1c9)
    • repository: add helper types (entity fields (list), filter, updater) to sql repositories (fed1c885)
    • repository: add parameter names to repository interface definition (cd9e12dd)
    • domain: add array of field names to models (f95b7dfe)
    • implement domain/repositroy model converter functions for tag (3f592be2)
    • fix syntax error in sql schema (4c84dd7b)
    • implement domain/repositroy model converter functions for bookmark and document (7481a097)
    • generate domain models including helpers types and constants (e0906c0d)
    • tooling: partial implementation of entity managers (4062c7d1)
    • tooling: add code generator for repository definitions (7147444b)
    • struct to manage hooks (9a3c9b2c)
    • add first draft of bookmarkmanager (0c93ed88)
    • add dir, so that code generator does not fail (e22106d8)
    • replace non-existent path in script (8b17d2c3)
    • fix syntax error in ci script (6110e901)
    • db_model: add createdAt, updatedAt, deletedAt fields (84a0f8da)
    • db_model: add createdAt and updatedAt fields (3ba21655)
    • tooling: add script to generate settings name constants from struct (89668b24)
    • bind cli flags to config (36d410c7)
    • revert workaround which causes bugs in ci (0fce78a6)
    • update dependency information (21ed6576)
    • update dependency information (7687190d)
    • update dependency information (1630b748)
    • ignore a temporary file (4f03e94e)
    • fix script and config for generating sql server db model (1807d1fb)
    • apply workaround for broken generated test scripts (ba556b9a)
    • update dependency information (fba4b2ea)
    • change order in which db model generation tests are run (faa3462d)
    • copy correct db for model creation tests (07bfed16)
    • change password for postgres database model generator (8dd51961)
    • change password for postgres database model generator (3a9a5372)
    • change password for postgres database model generator (033efb84)
    • change password for postgres database model generator (fd550e09)
    • download correct dependency in db model generation script (f3519829)
    • install sqlboiler through ci script (f6f997b8)
    • update dependency information (2c614b71)
    • update dependency information (6bf9c9c0)
    • make sql model creation script more robust (005f6a50)
    • make sql model creation script more robust (383a0d13)
    • make sql model creation script more robust (6a977937)
    • specify different host name for sqlboilers sql server config (dc1a700a)
    • fix bad shebang in script (5bb08582)
    • add license notice to CLI (4365fcfb)
    • move sql schema into own directory (1832001a)
    • tooling: add script to convert sql schemas (640e0fcd)
    • move sql schema into own directory (9f364cb9)
    • tooling: update linter settings for less false positives (6f20eb50)
    • make all commands print help when no flags are specified (a50f7b2f)
    • add basic structure of new CLIs tag subcommand (4066a80a)
    • add basic structure of new CLIs link subcommand (a3582c77)
    • add basic structure of new CLIs bookmark subcommand (87828cdb)
    • add basic structure of new CLIs document subcommand (c8d3a5d9)

    πŸ“¦ Build

    • update dependency information (44fb4cc2)
    • update dependency information (9b26e904)
    • update dependency information (a742632a)
    • update dependency information (e59d591d)

    πŸ” CI

    • run code generator to avoid ci errors (09d4eee1)
    • run code generator to avoid ci errors (c7e156e1)
    • use correct path name in a go generate call (0b6e3c8d)
    • remove line trying to delete non existent files (3c211f5f)
    • work around sqlboiler test generation bugs (6cad9915)
    • code_gen: add workaround for erroneous generation (1b0ae314)
    • code_gen: add workaround for erroneous generation (f65def3d)
    • code_gen: add workaround for erroneous generation (717ceb90)
    • code_gen: add workaround for erroneous generation (798fc386)
    • code_gen: add workaround for erroneous generation (ce2e43da)
    • code_gen: add debug output to repository model generation (e4ce8d78)
    • code_gen: add debug output to repository model generation (39a2b84d)
    • code_gen: add debug output to repository model generation (3d4c6e5b)
    • code_gen: add missing calls to code generators (413621b4)
    • remove potentially unneeded download (45247abd)
    • code_gen: install some dependencies in ci (0eb3c37e)
    • code_gen: fix syntax error (7715d94a)
    • code_gen: run goimports, gofmt after generation (1112b6cd)
    • run fieldalignment in ci (7a63e1b0)
    • swallow error in code generation script to keep ci pipeline alive (1f05b925)
    • test (62c2fd41)
    • test (63f4915a)
    • copy file to prevent embed from failing (ec0c8e4a)
    • install field alignment tool (d95de88b)
    • optimize struct ordering (e4c70269)
    • only test db model generation when the correct files change (b1716201)
    • change script to account for file rename (321248e9)
    • add sleep against pssoible race condition (7d8a0579)
    • set non-blocking flag in sql server set up (869fa47a)
    • fix escaping of special symbols in password (15366fb3)
    • specify different host name for sql server (82668f54)
    • use correct file name for sqlite schema (c9513d75)
    • use correct file name for sqlite schema (2fe59375)
    • fix typo in username (0937b534)
    • specify database to use for postgres (eedada35)
    • specify database to use for mysql (5682ea8e)
    • specify database to use for mysql (3500c90e)
    • specify database to use for sql server (cb789eb1)
    • test database models (a77733e2)
    • add script to build sql models (22886573)

    doc

    • document cli help pages in docs/ (2e8bec89)
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Apr 8, 2022)

    0.3.0 (2022-04-08)

    🎁 Feature

    • cli.bookmark: make outout format of export and list configurable (10a00b5e)
    • helpers: add methods to push and pop to/from an Optional (66ac35a0)
    • implement an wrapper type to represent optional values (ae9523dc)
    • libtags: also return ambiguous tag component when checking for ambiguity (c0690d3b)
    • cli: configure the logger to show more useful output (2cd9b497)
    • cli: implement document subcommand (7d76e040)
    • cli: partial implementation of document subcommand (ec28397a)
    • cli: document subcommand document (1a5791c6)
    • libbookmarks: implement RemoveBookmark() (4dbc4479)
    • cli: add basic implementation of bookmark subcommand (271e2428)
    • libbookmarks: add method to edit bookmark entry (f04a1d2e)
    • helpers: add method to wraped execution of named sql statement (c8d9afe7)
    • cli: extend documentation of bookmarks subcommand (a1f251be)
    • cli: document subcommand bookmark (b4c3a57d)
    • cli: document subcommand tag (4c3f67fa)
    • cli: document subcommand tag (95c7c89b)
    • cli: implement subcommand tag (98ef4c85)
    • cli: implement subcommand link (9d54c5fb)
    • cli: partially implement subcommands of main cli (ddfe3123)

    🐞 Bug Fixes

    • helper: correctly unmarshal HasValue field of Optional (24fe53e8)
    • libbokmarks: fix syntax and parameter binding for EditBookmark (9c0c58f1)
    • lidocuments: fix bad detection of links when removing link (cd2b2f1d)
    • lidocuments: fix bad detection of link lines (a3745315)
    • cli.document: fix a typo in the help message (1e3e816f)
    • cli.bookmark: remove calls to wrong core functions in CLI (1bc45470)
    • cli.bookmark: properly print listed bookmarks as CSV (d04df2c4)
    • cli.document: fix parsing of argument lists (90e857a6)
    • bookmarks: correctly apply bookmark filters (d9635c3f)
    • cli: add missing syntax to prevent for each loop from printing index instead of item (57d65fd2)
    • cli.tag: add missing handler for --add flag (bb85833a)
    • correctly handle changes of refactor (67368efd)
    • cli.tag: add missing handler for --list-short flag (19fb7632)
    • cli: make parsing of cli args more robust (95201e33)
    • libtags: declare tags as ambiguous only if they appear twice or more (2bb5d748)
    • implement working and more robust way to read sql schema (06d3e690)
    • cli: print listed links/backlinks (119068c5)
    • cli: change program name in help message (f71243a6)

    πŸ”Ž Tests

    • cli: add more tests (b90249fa)
    • cli.document: add missing assert and fix tests (9b33e275)
    • helpers: test conversion methods of Optional (ac54578f)
    • cli: fix some haging tests (915534d6)
    • cli.document: mark and comment out hanging tests (42b183ab)
    • cli.bookmark: implement further tests (65d271ae)
    • cli.document: implement further tests fr document subcommand (fab1d141)
    • cli.bookmark: implement further CLI tests (9f78de3f)
    • cli.document: add some tests (d387c13d)
    • cli: implement tests for link subcommand (b32b03eb)
    • cli.link: add basic tests for --add and --remove flags (c9db05cf)
    • cli.tag: add test for --add flag (eca5461b)
    • cli: implement tests for tag subcommand (a92a6e54)
    • cli: fix test for --ambiguous flag (2ad5391b)
    • cli: implement basic tests for --ambiguous flag (baa59129)
    • implement helper function to intercept STDOUT (5ef180cb)
    • add a missing assertion in a test (18bc5d34)
    • add helper method for more DRY and robust temp file creation (5ffa99f8)
    • fix a test (194ea072)
    • use in memory databases (a8f90130)
    • move test files into tested packages (f3735313)

    πŸ”€ Code Refactoring

    • cli: make subcommands return error instead of exiting (45c962ec)
    • extract Optional type into own repo (f3eb234e)
    • libbokmarks: use helpers.Optional for the BookmarkFilter (b02b8f54)
    • replace usage of sql.NullXXX with helpers.Optional (9d623c29)
    • replace calls to println with fmt.Println (337298c7)
    • use custom log.Fatal/log.Panic replacement for better testability (e529fb27)
    • use custom log.Fatal/log.Panic replacement for better testability (ba538033)
    • cli: use log.Panic instead of log.Fatal (b5a91aa4)
    • rename cmd/bntp package to cmd/cli (6580d9fe)
    • merge two util files (b7597b1a)
    • use helper function in CLI for less boilerplate code caused by error handling (73143528)

    🎨 Styles

    • make files in cmd package more readable (2b2cbe8e)
    • make files in cmd package more readable (b38dbc45)

    🚧 Chores

    • add some TODO comments (7df176e7)
    • add a todo comment (2227c1d4)
    • implement dependency-injection-enabled function to replace log.Fatal (9ab4fe01)
    • ignore a fiel (18246d6f)
    • cli: create test files (bc175db5)
    • implement helper function for less boilerplate caused by error handling (f59a1f02)
    • ignore a file (9b7990ef)
    • types: add json tags to Bookmark struct (b90659c9)
    • add licennse (b9d185b6)
    • add licennse (254e7ac9)
    • add license (a22d039f)
    • ignore a file (60e8f7d0)
    • add helper method for getting db conn (1aa846de)

    πŸ“¦ Build

    • bump go version to 1.18 (541d38f6)
    • update dependency information (4bbeb2f5)
    • update dependency information (a28221f7)
    • add dependency information (7b8c362c)

    πŸ” CI

    • bump go version to 1.18 (377c7eb7)
    • add coverage reporting (cc405c3b)
    • add coverage reporting (c6fa5361)
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Feb 15, 2022)

    0.2.0 (2022-02-15)

    🎁 Feature

    • helper: make SqlExecute also return the number of affected rows and the last inserted Id (0c787f54)

    🐞 Bug Fixes

    • libdocuments: don't error if empty link/backlink list found in document (41a59b8d)
    • libdocuments: don't error if empty link/backlink list found in document (0ccc8056)
    • libdocuments: correct a typo in an error message (045df9cc)
    • schema: make Document.Path unique (3ee7373e)
    • libdocuments: if removing a non-existent document, return error (5167878b)
    • libdocuments: if renaming a non-existent document, return error (fdb46cb5)
    • libdocuments: if removing a tag from a non-existent document, return error (f402c8fd)
    • libdocuments: fix AddLink(), AddBacklink(), RemoveLink(), RemoveBacklink() (5e32085c)
    • libdocuments: fix FindLinksLines() and FindBacklinksLines() (50d61adf)
    • libdocuments: fix FindDocumentsWithTags() (ab4e2be7)
    • libdocuments: fix GetTags() (e0b3cfe5)
    • libdocuments: fix RenameTag() (1a2b5ac4)
    • libdocuments: fix RemoveTag() (5629bd99)
    • libdocuments: fix AddTag() (30981c2e)

    πŸ”Ž Tests

    • libdocuments: fix wrong indentatin of string literal failing tests (0f0078db)
    • libdocuments: add test for ChangeDocumentType() (16518b77)
    • libdocuments: add test for RenameDocument() (7c6d11bf)
    • libdocuments: add test for RemoveDocument() (7c53e8f3)
    • libdocuments: add test for AddDocument() (70961608)
    • libdocuments: add test for RemoveBackink() (35407772)
    • libdocuments: add test for RemoveLink() (f4d8b8ff)
    • libdocuments: add tests for AddLink() and AddBacklink() (236bad05)
    • libdocuments: add test for FindBacklinksLines() (485cd0d0)
    • libdocuments: add test for FindLinksLines() (a6558d83)
    • libdocuments: add test for FindDocumentsWithTags() (424c337d)
    • libdocuments: add tests for HasTag() (a9e6cb0d)
    • libdocuments: add tests for FindTagsLine() (acfd6b52)
    • libdocuments: add tests for GetTags() (bc0ee198)
    • libdocuments: add tests for RenameTag() (2480e061)
    • libdocuments: add tests for RemoveTag() (46c580dc)
    • libdocuments: add tests for AddTag() (516ed3b4)

    πŸ”€ Code Refactoring

    • extract functions to get IDs of tags to helpers (32642b12)
    • add unqiue constraint to context tables (a935c466)

    🚧 Chores

    • fix some comment frames (e5a19ce2)
    • tooling: add script for renewing test db after schema change (bf929514)
    • tooling: add script for renewing test db after schema change (135ecfd6)

    πŸ” CI

    • add GH Action to format code on PR (16e98178)
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Sep 30, 2021)

    0.1.0 (2021-09-30)

    🎁 Feature

    • libdocuments: implement AddType() and RemoveType() (f9b7cb10)
    • libdocuments: implement AddType() and RemoveType() (3e33cc4c)
    • liblinks: implement GetIdFromDocument() (514babf5)
    • liblinks: implement GetIdFromType() (6df6bcdf)
    • libdocuments: add declarations for new functions (4071c358)
    • libdocuments: implement RemoveLink() (bc33ce7c)
    • libbookmarks: implement filtering for bookmark title and url (3da06960)
    • libdocuments: implement AddBacklink() and RemoveBacklink() (2e7566c7)
    • libdocuments: implement RemoveLink() (683be0fb)
    • libdocuments: implement AddLink() (40cbac9c)
    • libdocuments: implement FindBacklinksLines() (20be4881)
    • libdocuments: implement FindLinksLines() (c21ed3ae)
    • implement liblinks (b5df2469)
    • libdocuments: implement FindDocumentsWithTags() (cd7eac32)
    • libdocuments: implement FindDocumentsWithTags() (e7e37e05)
    • libdocuments: implement HasTag() (8a31d72d)
    • libdocuments: implement RemoveTag() (167274ce)
    • libdocuments: implement AddTag() (4212c3b6)
    • libdocuments: implement RenameTag() (1f5bd0a4)
    • libdocuments: implement GetTags() (b27ca7f5)
    • libdocuments: implement FindTagsLine() (2ceeead5)
    • libdocuments: add method declarations (41b3b681)
    • libtags: partial implementation of ExportYML (b5bf64a9)
    • libtags: implement TryShortenTag() (0b8898cd)
    • libtags: implement IsLeafAmbiguous() (beab2273)
    • libtags: implement ListTagsShortened() (34c0f83b)
    • libtags: implement ListTags() (23a3bfa7)
    • libtags: implement DeleteTag() (21171ce8)
    • libtags: implement AddTag() (117a1d74)
    • libbookmarks: implement RemoveTag() (2199352e)
    • libbookmarks: implement AddTag() (91d41a80)
    • libbookmarks: implement EditBookmark() and EditType() (5e461053)
    • extend ExportCSV to allow filtering and printing to STDOUT (323e1241)
    • add more import/export features (8341fdd0)

    🐞 Bug Fixes

    • use/remove unused declarations (f0fc5334)
    • libookmarks: fix sql query in ListTypes() (a1f66c56)
    • libbookmarks: fix errors in sql queries (d0352e45)
    • libookmarks: fix sql queries after db refactor (ada6a528)
    • liblinks: correct sql queries in ListLinks() and ListBacklinks() (4aec8430)
    • fix sql queries and add db constraints (8fde04b1)
    • fix sql queries and add db constraints (99fa4077)
    • liblinks: fix sql queries after DB refactor (c2280519)
    • libtags: improve logic to find ambiguous tags (df412202)
    • libtags: fix not using an address in a function (07d77477)
    • correct sql placeholder values (ac5408d9)
    • sqlhelpers: fix passing of args in Execute() (55772aae)
    • libtags: fix ExportYML (ceded53b)
    • libbookmarks: fix string quoting in EditType() and EditBookmark() (d34483c9)
    • libbookmarks: fix type and tag filter in ExportCSV (6f601fd9)

    πŸ“„ Documentation

    • fix doc comments of package declarations (c93c7e53)
    • add doc comments to package declarations (984d6868)
    • libdocuments: document libdocuments (98ce1b4d)
    • libtags: document libtags (2824f33c)
    • liblinks: document liblinks (04e8057a)
    • libbookmarks: document libbookmarks (f2cd39eb)
    • libbookmarks: document helpers (94f9129d)
    • libbookmarks: document helpers (5398185c)
    • libbookmarks: document bookmarkfilter (0d4ed293)

    πŸ”Ž Tests

    • libbookmarks: add tests for EditBookmark() (beddcb9f)
    • libbookmarks: add tests for RemoveTag() (a702ee9a)
    • liblinks: fix tests after adding foreign key constraints (1c8c088f)
    • libbookmarks: add tests for AddTag() (9026e736)
    • enable foreign key constraints (2daa8b70)
    • libbookmarks: add tests for AddBookmark() (05a1c1e0)
    • libbookmarks: add tests for ListTypes() (4e5e3f99)
    • libbookmarks: add tests for RemoveType() (525cd3d0)
    • libbookmarks: add tests for AddType() (fb30da45)
    • liblinks: add test for ExportCSV() (06fdeee2)
    • libbookmarks: add tests for ImportMinimalCSV() (7bc21397)
    • liblinks: add tests for ListBacklinks() (107026a7)
    • liblinks: add tests for ListLinks() (c53817b8)
    • liblinks: add tests for RemoveLink() (94466bc9)
    • liblinks: add test for AddLink() (a82812ec)
    • libtags: add tests for ListTagsShortened() (c0752a04)
    • libtags: add tests for ListTags() (80bd2d58)
    • libtags: add tests for RenameTag() (a46e2135)
    • libtags: add tests for RemoveTag() (35ff1cd1)
    • libtags: add tests for AddTag() (09c6aed9)
    • implement helper function to create temp DB (5e81e0a5)

    πŸ”€ Code Refactoring

    • unify packages in cmd/ (69c82377)
    • change db constraints (221bcb26)
    • libbookmarks: change a sqlx.Begin() to sqlx.Beginx() (54d0c786)
    • libbookmarks: implement GetIdFromType() and use it in other methods (6469aeff)
    • libbookmarks: implement GetIdFromType() and use it in other methods (552a9797)
    • libbookmarks: implement GetIdFromTag() and use it in other methods (9d64dfbb)
    • rename project to bntp (1efce489)

    🎨 Styles

    • remove unneeded TODO comment (ac54c72e)
    • libbookmarks: move Bookmark struct into own file (eac38de1)
    • clean up bookmarkmanager (824e14a8)
    • reformatt for better readability (4ea65977)

    🚧 Chores

    • test (e2db8db5)
    • test (d425a941)
    • test (6447bd5e)
    • test (de8a8789)
    • test (f13af959)
    • test (589f885f)
    • test (4d4c73b4)
    • add foreign key constraint to db (d85665b4)
    • enable foreign key constraints in db (574a4b16)
    • add .gitignore (3d2c33d3)
    • add DB creation script (8f1ac9aa)
    • reformat files (88cfc341)
    • add config for golangci_lint (d97ed719)

    πŸ” CI

    • try to get semantic release working... (ba29c2cb)
    • switch to go-semantic-release (7957dd2c)
    • fix github action config (e17eab66)
    • before testing, generate fresh db from sql script (d134d94c)
    • add GH Actions workflow (39cd10ed)
    • add CI related configs (b36500a6)

    tests

    • prepare test dirs and files (f99a1182)
    Source code(tar.gz)
    Source code(zip)
Owner
Jonas MΓΌhlmann
I am a 20 years old student attending the Bib International College in Paderborn, Germany.
Jonas MΓΌhlmann
Go library and CLIs for working with container registries

Go library and CLIs for working with container registries

Google 2.1k Dec 27, 2022
Mange your browser bookmarks with CLI.

go-bookmark Mange your browser bookmarks with CLI.

kenju 2 Dec 3, 2022
Use the command to convert arbitrary formats to Go Struct (including json, toml, yaml, etc.)

go2struct-tool Use the command to convert arbitrary formats to Go Struct (including json, toml, yaml, etc.) Installation Run the following command und

Afeyer 1 Dec 16, 2021
go-shellcommand is the package providing the function System like the one of the programming language C.

go-shellcommand go-shellcommand is the package providing the function System like the one of the programming language C. process, err := shellcommand.

zetamatta 1 Oct 17, 2021
Todos REST API build using echo server.

Todos REST API build using echo server.

herlianto 0 Feb 2, 2022
A personal knowledge management and sharing system for VSCode

Foam ?? This is an early stage project under rapid development. For updates join the Foam community Discord! ?? Foam is a personal knowledge managemen

Foam 13.3k Jan 9, 2023
OTF font with vertical bars for one-line ASCII spectrum analyzers, graphs, etc

graph-bars-font OTF font with vertical bars for one-line ASCII spectrum analyzers, graphs, etc. I didn't find anything similar on the net so I decided

Andrew Dunai 18 Jul 28, 2022
For productivity addicts who enjoys coding while listening to Spotify

?? nvim-spotify For productivity addicts who enjoys coding while listening to Sp

Ricardo Ambrogi 138 Dec 30, 2022
General purpose reloader for all projects.

leaf General purpose reloader for all projects. Command leaf watches for changes in the working directory and runs the specified set of commands whene

Vaibhav 118 Nov 8, 2022
textnote is a command line tool for quickly creating and managing daily plain text notes.

textnote is a command line tool for quickly creating and managing daily plain text notes. It is designed for ease of use to encourage the practice of daily, organized note taking. textnote intentionally facilitates only the management (creation, opening, organizing, and consolidated archiving) of notes, following the philosophy that notes are best written in a text editor and not via a CLI.

Daniel Kaslovsky 162 Jan 2, 2023
πŸ“ Take notes quickly and expeditiously from terminal

Installation See the last release, where you can find binary files for your ecosystem Curl: curl -sfL https://raw.githubusercontent.com/anonistas/noty

Anon 15 Dec 29, 2022
A very simple note-taking CLI you can use from the terminal that uses a SQLite DB to persist, and query, notes.

Note Logger Summary A very simple note-taking CLI you can use from the terminal that uses a SQLite DB to persist, and query, notes. Building/Installin

Nicholas Page 3 Apr 14, 2022
Hosty is a command-line utility that allows for fast inspection and editing of /etc/hosts-like files

Hosty Description Hosty is a command-line utility that allows for fast inspection and editing of /etc/hosts-like files. It is written in golang and us

null 11 Sep 3, 2021
Allows you to collect all pprof profiles with one command.

Collect Allows you to collect all pprof profiles with one command. Installation Just go-get it: $ go get github.com/tommsawyer/collect/cmd/collect Mot

Denis Maximov 17 Aug 24, 2022
all-in-one cmd tool to search man page of different platform

Overview remote-man is an all-in-one cmd tool to search man page of different platform. support search platform Linux MacOS FreeBSD Installation compi

null 0 Oct 31, 2022
A simple CLI app to take notes daily on markdown file

A simple CLI app to take notes daily on markdown file

Pradeep Khileri 62 Jul 29, 2022
git-glimpse is a command-line tool that is aimed at generating a git prompt like the one from zsh-vcs-prompt.

Git GoGlimpse git-glimpse is a command-line tool that is aimed at generating a git prompt like the one from zsh-vcs-prompt. The particularity of this

Corentin de Boisset 0 Jan 27, 2022
Creating a simple CLI tool in the Go Programming Language for personal learning and fun

Creating a simple CLI tool in the Go Programming Language for personal learning and fun Open to feedback :) Build docker dev environment docker build

Mohamed Abukar 4 Dec 12, 2021
I like reading news but I also like the terminal. I am leaning and practicing my go.

I made an api and didn't know how to use it. Screenshots The initial screen when you first run the app. The screen after you specify an id. This app u

Daniel M. Matongo 2 Jan 14, 2022