GithubHelp home page GithubHelp logo

citon / strangethings Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 3.0 13 KB

A simple tool that scans a directory for files and uses python-magic to try and determine if the file's extension matches the data inside.

License: Other

Python 100.00%

strangethings's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

strangethings's Issues

error when file can not be read and skipped

I can never complete a scan. It seems to fail everytime it has to skip a file. Any ideas

WARNING: File could not be scanned by magic. Skipping: /Volumes/users$/user/Snapshots/Newsletters/Newsletter of โ€œ4-23-12โ€.pdf
Traceback (most recent call last):
File "./strangethings.py", line 206, in
main()
File "./strangethings.py", line 199, in main
scanner(suffixlist, equivtypes, scandir)
File "./strangethings.py", line 74, in scanner
(sufitype, magitype) = magiccheck(equivtypes, fullpath)
File "./strangethings.py", line 101, in magiccheck
return (TRUE,"null")
NameError: global name 'TRUE' is not defined

scanner() call missing the excludedirs variable

Row 222, "scanner(suffixlist, equivtypes, scandir)" need to be changed to "scanner(suffixlist, equivtypes, scandir, excludedirs)" otherwise python trows an error.

Thanks for a great script!

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.