Giter Site home page Giter Site logo

Comments (3)

sytolk avatar sytolk commented on June 18, 2024

@BlueSpiders99 I can't repead this issue. This is the sorting context provider

return sortByCriteria(currentDirectoryEntries, sortBy, orderBy).map(
sorting is performed before pagination.
This is the sorting function: https://github.com/tagspaces/tagspaces-common/blob/5ebaecc580ed65891535b0d9e5a7cb894bf0df84/packages/common/misc.js#L572
It's have unit tests for sorting too: https://github.com/tagspaces/tagspaces-common/blob/a4fd5768ca0319b5e8b86a3068525a90933ae4e4/__tests__/common/unit/misc.test.js#L133

It will be very helpful if you can provide script that generate files with names to repeat this issue. (Or unit test).
This is our shell script for testing: https://github.com/tagspaces/tagspaces/blob/develop/tests/create-1000files-nothumbs.sh

from tagspaces.

uggrock avatar uggrock commented on June 18, 2024

Can you please tests with our latest beta version: https://github.com/tagspaces/tagspaces/releases/tag/v5.7.1 i think part of the problem should be fixed there.
In general the sorting algorithm we use is not optimized for sorting digits, this will be improved in the future.

from tagspaces.

BlueSpiders99 avatar BlueSpiders99 commented on June 18, 2024

5.7.1 did not work, unfortunately.

Here's the Python I used to generate the files. Put a Python file with this code in a folder containing an image and a directory titled "alphabet folder" and it'll do the rest.

import string
import os
import shutil

folderpath = "alphabet folder"

liststring = string.digits + string.ascii_lowercase

for i in range(50):
    for a in list(liststring):
        filename = f"{a}_{i}.png"
        new_file_path = os.path.join(folderpath, filename)
        if not os.path.isfile(new_file_path):
            imagepath = "dey3mffo06b61.png"  # replace with image name
            shutil.copy(imagepath, folderpath)
            os.rename(os.path.join(folderpath, "dey3mffo06b61.png"), new_file_path)

from tagspaces.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.