1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2024-11-29 01:33:46 +00:00
Commit graph

340 commits

Author SHA1 Message Date
96c6e967a0 Cache result of ls command. 2016-03-15 09:33:12 +01:00
d21a4fa374 Use readline
Maybe this should be made optional?
2016-03-15 08:42:01 +01:00
0f7a78b395 Fix paths with spaces not being treated correctly. 2016-03-14 19:39:58 +01:00
8fc45ce694 Buildfix on ARM 2016-03-12 00:47:08 +01:00
859764b9a4 Merge branch 'hashdir_refactoring' 2016-03-12 00:37:28 +01:00
e95cd6cc44 Add a --byhash switch to the locate command to search by content.
This is mostly to demonstrate the new task classes.
2016-03-12 00:32:15 +01:00
34ead94c8d Restore DB writing functionality.
This ends the scantask refactoring. It is now possible to scan
directories using the new system. Progress feedback is made
available again, although it could use some improvements.
2016-03-10 18:37:42 +01:00
43c8024b0c Re-add some progress feedback.
It's not multithreaded this time o.O
2016-03-10 09:51:27 +01:00
c28398a1b3 Assert if get_or_create() causes other calls to itself.
This is to try and prevent infinite recursions.
2016-03-09 21:35:22 +01:00
fe7e9c4af9 Turn around Set's tasks so that they provide a SetRecordDataFull. 2016-03-09 21:26:43 +01:00
be1f47a5fd Fix build script for drone.io, which started acting up suddenly 2016-03-09 21:23:53 +01:00
dfa5040667 Add link to diaspora* to readme 2016-03-09 21:21:06 +01:00
fd5be6216a Namespace shortcut 2016-03-09 19:11:45 +01:00
c4c68e3b5c Take file size in filesearcher.
Like this the filesize task I was about to write becomes
unnecessary.
2016-03-09 18:55:03 +01:00
85cbc76de4 Add GeneralFiller helper task to group tasks together. 2016-03-09 09:25:52 +01:00
5798e0d315 New Mime task. 2016-03-09 09:02:17 +01:00
217eac250b Include only needed headers 2016-03-08 22:56:23 +01:00
c068f93bac New ContentType task.
Fix the problems I encountered while trying to use the new task.
2016-03-08 19:54:04 +01:00
b357bfb2cc Use basename() instead of the unclear make_rel_path 2016-03-08 19:09:56 +01:00
250b2df846 Add basename() free function. 2016-03-08 19:09:20 +01:00
63c703f20d Fix wrong hashes for directories
set_listing must sort by abs_path, because the path received by
lower_bound() is an absolute path.
Inside hash_dir() the path passed to append_to_vec() is really
the basename of the current item. This will become more clear
in one of the next commits.
2016-03-08 18:58:47 +01:00
7b0189a119 Make debug output a bit nicer. 2016-03-08 08:51:57 +01:00
d2588d3c7e Implement hashing task.
Also get rid of the ShorFileRecordData and put the new LeanBase
class to use.
2016-03-08 08:48:12 +01:00
c64e572fc8 Split Base into LeanBase and Base.
Build not tested - intermediate commit.
2016-03-08 08:45:56 +01:00
d579b311f2 Add ShortFileRecordData struct to hold the file list in DirTree. 2016-03-04 21:57:09 +01:00
1956594c01 Move mediatypes.hpp/cpp to machinery.
This was needed so that machinery wouldn't depend on common.
Also moved compatibility.h to helpers include dir.
Ideally mediatypes.hpp will be merged into mediatype.hpp, or there
will be some kind of renaming because the two names are
getting really confusing.
2016-03-04 09:01:11 +01:00
6ddf79fad9 Implement MediaType scan task. 2016-03-03 21:31:33 +01:00
5b3e15c45f Create DirTree class and start moving code around. 2016-03-03 20:46:30 +01:00
c69d17395a Improve cscope script so it's easier to customize.
It still does the same thing as before.
2016-02-28 01:56:38 +00:00
b19720548a Fix program hanging in release.
That great idea of spawning a thread for printing to stdout is
firing back. Temporary fix to get past, but the output looks
really broken now.
2016-02-23 23:28:49 +01:00
b55f42e905 Remove debug output. 2016-02-23 21:05:04 +01:00
be9fc3eb0b Fix various problems introduced in scan with the last commit.
Fixes a crash due to an assertion trying to access a
past-the-end iterator.
Gets content type detection to work, although only after
hashing is done (see comment in main.cpp for details).
Fixes a problem with the array passed to guess_content_type
being not sorted as the function expects.
Adds more assertions.
2016-02-23 18:56:07 +01:00
22614432a9 Detect content type after scanning and save to DB. 2016-02-22 19:44:48 +01:00
2e77e4dc0b Add Glob class and use that one to help guessing content types. 2016-02-20 01:36:31 +01:00
8b1b9c48f4 Flattening is useful, so move it out of the unit test. 2016-02-20 01:34:46 +01:00
f31463480f Add stub code to detect VCDs, plus unit test. 2016-02-19 21:57:43 +01:00
7da13f6677 Add assignment operators. 2016-02-19 21:56:10 +01:00
64b5affa4f Add guess_content_type() function.
WiP.
2016-02-19 10:01:11 +01:00
8a97afd6bf Use Kakoune::SafePtr to hold the PathName in DirIterator. 2016-02-18 21:00:17 +01:00
5a2fd1e25e Adapt safe_ptr to build in this project 2016-02-18 19:16:50 +01:00
bc35e185e7 Import safe_ptr from Kakoune project 2016-02-18 19:07:37 +01:00
bb1148863d Add typedefs to SetListingView<B> 2016-02-17 08:54:38 +01:00
e718a21e49 Bash script to generate cscope files 2016-02-17 08:53:41 +01:00
af80771c2e Fix the new hash_dir().
This fixes a bug that I never noticed in the old code.
This also breaks the progress indicator in Release.
2016-02-16 23:01:42 +00:00
5fbad40fda Add level offset.
The level in the FileRecordData is 0 at the base of the
directory being scanned. However PathName::atom_count() can be
more than that. For example scanning /mnt/cdrom will have
level 0 at the mount point, but atom_count() is 2. So it's
necessary to pass in this offset. This way the code can take
that into account and compute stuff correctly.
2016-02-16 20:18:10 +00:00
5908828390 Implement hash_dir() using DirIterator. WiP
Keep the old implementation as well, so they can be easily tested.
Uncomment the USE_LEGACY_HASH_DIR define at the top to build with the
old function.
2016-02-16 20:29:50 +01:00
0a3e469951 Support const/non-const DirIterators and SetListingViews 2016-02-16 18:51:17 +01:00
84a2617c24 Enable interoperability between iterators 2016-02-16 18:12:26 +01:00
b34070f23c Fix drone.io setup (missing rpm package) 2016-02-12 21:29:11 +01:00
566951a638 Enable creation of deb, rpm and tgz 2016-02-12 21:10:40 +01:00